/* Home 02 what we do: the loop as a three-panel paper diorama (the school posts, the parent sees it tonight, the child
   is ready tomorrow), joined by two hand-drawn pencil arrows. Motion: the diorama pops up like a pop-up book, on twos
   (CSS steps), when it is seen; a homework note then flies from the teacher to Amma's phone (02-what.js).
   Reduced motion and no-JS: everything is simply there. The three products are the doors (03-doors). */
.what { overflow: clip visible; }

.what__head { max-width: 46rem; }
.what__lead { margin-top: clamp(14px, 1.6vw, 20px); max-width: 38em; font-size: var(--t-lead); line-height: 1.55; color: var(--ink-2); }

/* ---------------------------------------------------------------- the loop diorama */
.loop { position: relative; margin-top: clamp(40px, 5vw, 68px); --loop-gap: clamp(30px, 4.4vw, 68px); }
.loop__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--loop-gap); counter-reset: none; }
.loop__step { position: relative; }
.loop__scene { --sky: #CFE3FF; --ground: #E8D3A3; position: relative; aspect-ratio: 4 / 3.15; overflow: hidden; isolation: isolate;
  border-radius: var(--pk-cut); background: var(--sky); rotate: var(--tilt, 0deg);
  box-shadow: var(--pk-edge-light), var(--pk-sh); }
.loop__scene::before { content: ""; position: absolute; left: -4%; right: -4%; bottom: -8%; height: 26%; z-index: 0; border-radius: 48% 52% 0 0 / 40% 46% 0 0;
  background: var(--ground); box-shadow: 0 -1px 0 rgba(255, 255, 255, .45), 0 -6px 12px -8px rgba(90, 42, 0, .3); }
.loop__scene::after { content: ""; position: absolute; inset: 0; z-index: 9; pointer-events: none; border-radius: inherit;
  background: url(/assets/art/textures/grain-tile.webp) 0 0 / 256px 256px; mix-blend-mode: multiply; opacity: .45; }
.loop__scene > * { position: absolute; z-index: 1; display: block; max-width: none; height: auto; }
.loop__step--school .loop__scene { --tilt: -1.2deg; }
.loop__step--home .loop__scene { --sky: var(--night); --ground: #2C5946; --tilt: .8deg; background: var(--night) url(/assets/art/textures/night-paper-tile.webp) 0 0 / 512px 512px; }
.loop__step--ready .loop__scene { --sky: #FFE6A6; --ground: #9CCB7F; --tilt: -.6deg; }

/* panel 1: the school, Selvi Miss and the homework she posts */
.loop__school { left: 5%; bottom: 13%; width: 62%; }
.loop__teacher { right: 15%; bottom: 7%; width: 12.5%; }
.loop__post { right: 6%; top: 18%; width: 15%; aspect-ratio: 4 / 5; padding: 11% 9%; display: grid; align-content: start; gap: 12%;
  border-radius: 3px 4px 10px 3px; background: var(--lemon); rotate: 9deg;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 1px rgba(90, 42, 0, .25), 2px 6px 8px -4px rgba(90, 42, 0, .4); }
.loop__post i, .loop__note i { display: block; height: 2px; border-radius: 2px; background: rgba(35, 70, 198, .5); }
.loop__post i:nth-child(2) { width: 80%; }
.loop__post i:nth-child(3) { width: 55%; }

/* panel 2: home at night, the window lit, Amma reading the diary */
.loop__moon { left: 7%; top: 8%; width: 20%; }
.loop__star { width: 6.5%; }
.loop__star--a { left: 36%; top: 12%; }
.loop__star--b { right: 9%; top: 22%; animation-delay: -.25s; }
.loop__house { left: 7%; bottom: 10%; width: 54%; aspect-ratio: 316 / 291; }
.loop__house img { position: absolute; display: block; max-width: none; height: auto; }
.loop__house img:first-child { inset: 0 auto auto 0; width: 100%; }
.loop__light { left: 43.67%; top: 36.77%; width: 40.82%; }
.loop__amma { right: 13%; bottom: 7%; width: 12.5%; }
.loop__glow { right: 10%; bottom: 22%; width: 18%; aspect-ratio: 1; border-radius: 50%; z-index: 2; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 226, 138, .62), rgba(255, 226, 138, 0)); }

/* panel 3: the next morning: the sun is up, Iniya runs for the bus */
.loop__sun { right: 6%; top: 5%; width: 27%; }
.loop__bus { right: -8%; bottom: 10%; width: 60%; }
.loop__girl { left: 12%; bottom: 7%; width: 19%; }

.loop__label { margin-top: 18px; padding-left: 4px; font: 800 clamp(21px, 1.7vw, 25px)/1.2 var(--font-display); color: var(--ink); letter-spacing: -.005em; }
.loop__line { margin-top: 6px; padding-left: 4px; max-width: 26em; font-size: var(--t-body); line-height: 1.5; color: var(--ink-2); }

/* a hand-drawn pencil arrow in each gap (one solid stroke; the old dotted return line is gone) */
.loop__step + .loop__step::before { content: ""; position: absolute; z-index: 2; top: 30%; left: calc(-1 * var(--loop-gap) - 8px); width: calc(var(--loop-gap) + 16px); height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 40'%3E%3Cpath d='M5 27c10-13 26-19 45-12' fill='none' stroke='%231E2A5A' stroke-width='3.2' stroke-linecap='round'/%3E%3Cpath d='M42 7.5l10.5 8-11.5 6.5' fill='none' stroke='%231E2A5A' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* the homework note on its way (desktop; placed and flown by 03-what.js) */
.loop__note { position: absolute; z-index: 5; left: 0; top: 0; width: 34px; aspect-ratio: 4 / 5; padding: 6px 5px; display: grid; align-content: start; gap: 5px; opacity: 0; pointer-events: none;
  border-radius: 2px 3px 7px 2px; background: var(--lemon); box-shadow: 0 1px 1px rgba(90, 42, 0, .25), 3px 8px 10px -4px rgba(90, 42, 0, .4); }
.loop__note i:nth-child(2) { width: 70%; }

/* pop-up: each piece stands up from the page on twos (five poses, 83 ms each), staggered left to right */
@keyframes loop-pop {
  0% { transform: scale(1, .06); opacity: 1; }
  20% { transform: scale(1, .62); }
  40% { transform: scale(1, 1.1); }
  60% { transform: scale(1, .95); }
  80%, 100% { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.rm) .what.is-live .loop:not(.is-in) .loop__step:not(.is-in) .loop__pop { opacity: 0; }
  html.js:not(.rm) .what.is-live :is(.loop.is-in, .loop__step.is-in) .loop__pop { transform-origin: 50% 100%; animation: loop-pop 415ms steps(1, end) both; animation-delay: var(--d, 0ms); }
  html.js:not(.rm) .what.is-live .loop:not(.is-on) .loop__light, html.js:not(.rm) .what.is-live .loop:not(.is-on) .loop__glow { opacity: 0; }
  .loop__light, .loop__glow { transition: opacity 1ms steps(1, end); }
}
.loop__step--school .loop__school { --d: 0ms; }
.loop__step--school .loop__teacher { --d: 166ms; }
.loop__step--school .loop__post { --d: 332ms; transform-origin: 30% 100%; }
.loop__step--home .loop__moon { --d: 415ms; }
.loop__step--home .loop__house { --d: 498ms; }
.loop__step--home .loop__amma { --d: 664ms; }
.loop__step--ready .loop__sun { --d: 830ms; }
.loop__step--ready .loop__bus { --d: 913ms; }
.loop__step--ready .loop__girl { --d: 1079ms; }

/* ---------------------------------------------------------------- tablets and phones */
@media (max-width: 760px) {
  /* stacked: each panel plays on its own when it is seen (02-what.js), so its delays start from its own first piece */
  .loop__step--home .loop__moon { --d: 0ms; } .loop__step--home .loop__house { --d: 83ms; } .loop__step--home .loop__amma { --d: 249ms; }
  .loop__step--ready .loop__sun { --d: 0ms; } .loop__step--ready .loop__bus { --d: 83ms; } .loop__step--ready .loop__girl { --d: 249ms; }
  .loop__steps { grid-template-columns: 1fr; gap: 64px; max-width: 460px; }
  .loop__step + .loop__step::before { top: -54px; left: 50%; width: 44px; height: 44px; translate: -50% 0; rotate: 90deg; }
  .loop__note { display: none; }
}
@media (forced-colors: active) {
  .loop__scene { border: 1px solid CanvasText; }
}

/* ---------------------------------------------------------------- Tonight in Naalai (R2 motion, 3 Nov)
   A kraft band between the morning hero and "What we do": a rolling belt of paper slips, the kind of things a class's
   families see in the diary tonight, for tomorrow (sample items, labelled). The belt rolls slowly while it is seen
   (motion.js marquee: scrolling nudges it along). Round 3, owner: no Pause button and no stopping on a click or a
   hover; it just rolls. Reduced motion and no-JS: the slips sit still, wrapped onto lines, every one readable. */
.tn { position: relative; z-index: 1; padding: clamp(46px, 5vw, 70px) 0 calc(clamp(26px, 3.4vw, 48px) + clamp(30px, 3.4vw, 46px)); overflow-x: clip; }
.tn__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tn__h { display: inline-flex; align-items: center; gap: 10px; font: 800 clamp(24px, 2.2vw, 32px)/1.1 var(--font-display); color: var(--ink); }
.tn__h img { width: 38px; height: 38px; flex: none; rotate: -12deg; }
.tn__lead { flex: 1 1 100%; font: 700 var(--t-body)/1.45 var(--font-body); color: #57391A; }
.tn__belt { margin-top: clamp(20px, 2.2vw, 28px); padding-block: 14px 18px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.tn__track { gap: clamp(14px, 1.6vw, 22px); padding-inline: 11px; }
.tn__slip { flex: none; display: inline-flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 20px 10px 11px; border-radius: 6px 10px 8px 5px / 5px 8px 10px 6px;
  background: var(--card) url(/assets/art/textures/paper-tile.webp) 0 0 / 512px 512px; color: var(--ink); font: 700 18px/1.25 var(--font-body); white-space: nowrap;
  rotate: -1deg; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 1px 1.5px rgba(90, 42, 0, .3), 0 10px 16px -10px rgba(90, 42, 0, .5); }
.tn__slip:nth-child(even) { rotate: .9deg; }
.tn__slip:nth-child(3n) { rotate: -.4deg; }
.tn__k { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px; border-radius: .55em .7em .6em .5em / .62em .5em .7em .56em;
  background: var(--k-bg, var(--sky)); color: var(--k-fg, var(--blue-deep)); font: 800 15.5px/1.1 var(--font-body);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 1px 0 rgba(90, 42, 0, .16); }
.tn__k--maths { --k-bg: var(--sun); --k-fg: var(--ink); }
.tn__k--bring { --k-bg: var(--pink); --k-fg: #8A2440; }
.tn__k--sign { --k-bg: var(--mint); --k-fg: #1F6B3A; }
.tn__k--notice { --k-bg: var(--sky); --k-fg: var(--blue-deep); }
.tn__k--pt { --k-bg: var(--lemon); --k-fg: #7A4A10; }
.tn__k--tamil { --k-bg: var(--pink); --k-fg: #8A2440; }
.tn__k--english { --k-bg: var(--sky); --k-fg: var(--blue-deep); }
.tn__k--art { --k-bg: var(--lemon); --k-fg: #7A4A10; }

/* still: wrapped onto lines, the copies made for the loop hidden */
.tn__belt:not(.is-rolling) { -webkit-mask: none; mask: none; }
.tn__belt:not(.is-rolling) .tn__track { flex-wrap: wrap; width: auto; max-width: var(--wrap); margin-inline: auto; padding-inline: 0; transform: none !important; }
.tn__belt:not(.is-rolling) .tn__slip[aria-hidden="true"] { display: none; }
@media (max-width: 639.98px) {
  .tn__slip { min-height: 54px; font-size: 17px; }
  .tn__belt:not(.is-rolling) .tn__slip { white-space: normal; }
}
@media (forced-colors: active) { .tn__slip { border: 1px solid CanvasText; } }

/* ---------------------------------------------------------------- nine languages: a paper bunting (Round 3; Round 4 hung
   again, 4 Nov). Under the loop, one string sags gently between two pins (an SVG curve, M0 3 Q50 51 100 3: 24 px of sag
   across the row) and nine paper pennants of one size hang from it, evenly spaced. Each pennant's folded top sits
   exactly where the string passes its column (--y, read off the same curve) and leans with the string's slope there
   (--r: 4 degrees at the ends, level in the middle), so the fold hides the string and the row reads as one hung
   thing. The pennants are hung one by one when the row is seen (on twos), then sway a touch on the string while they
   are on screen (life.css data-idle, on the inner paper, so the two animations never meet). Phones and tablets: short
   straight strings of five and four, or three by three. Reduced motion and no-JS: the pennants simply hang still. */
.lb { margin-top: clamp(64px, 7vw, 104px); }
.lb__lead { max-width: 40em; font-size: var(--t-lead); line-height: 1.5; color: var(--ink-2); }
.lb__lead b { color: var(--ink); font-weight: 800; }
.lb__line { position: relative; margin-top: clamp(22px, 2.4vw, 32px); padding-top: 0; }
.lb__string { position: absolute; left: 0; top: 0; width: 100%; height: 40px; overflow: visible; pointer-events: none; }
.lb__string path { fill: none; stroke: #9A7347; stroke-width: 2.2; stroke-linecap: round; }
/* the two pins the string is tied to: each is centred on the string's end (0, 3) */
.lb__line::before, .lb__line::after { content: ""; position: absolute; top: -3.5px; width: 13px; height: 13px; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle at 36% 32%, #FFD0CB 0 18%, transparent 19%), var(--coral); box-shadow: 0 1px 1px rgba(90, 42, 0, .35); }
.lb__line::before { left: -6.5px; }
.lb__line::after { right: -6.5px; }
.lb__flags { position: relative; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); align-items: start; gap: clamp(6px, 1vw, 14px); }
.lb__flag { --y: 0px; --r: 0deg; --c: var(--sky); position: relative; display: flex; justify-content: center; align-items: flex-start; padding-top: var(--y); }
/* where the string passes each column's centre: y = 3 + 96 x (1 - x) px, x the centre's share of the width; the fold
   (10 px) is centred on it, so each pennant starts 5 px above. The lean is the string's slope there (a 1200 px row). */
.lb__flag:nth-child(1), .lb__flag:nth-child(9) { --y: 3px; }
.lb__flag:nth-child(2), .lb__flag:nth-child(8) { --y: 11.3px; }
.lb__flag:nth-child(3), .lb__flag:nth-child(7) { --y: 17.3px; }
.lb__flag:nth-child(4), .lb__flag:nth-child(6) { --y: 20.8px; }
.lb__flag:nth-child(5) { --y: 22px; }
.lb__flag:nth-child(1) { --c: var(--sky); --r: 4deg; --idle-dur: 4.4s; }
.lb__flag:nth-child(2) { --c: var(--sun); --r: 3deg; --idle-dur: 5.1s; }
.lb__flag:nth-child(3) { --c: var(--pink); --r: 2deg; --idle-dur: 4.7s; }
.lb__flag:nth-child(4) { --c: var(--mint); --r: 1deg; --idle-dur: 5.6s; }
.lb__flag:nth-child(5) { --c: #FFFDF8; --r: 0deg; --idle-dur: 4.2s; }
.lb__flag:nth-child(6) { --c: var(--lemon); --r: -1deg; --idle-dur: 5.3s; }
.lb__flag:nth-child(7) { --c: var(--moon); --r: -2deg; --idle-dur: 4.9s; }
.lb__flag:nth-child(8) { --c: #FFE0C2; --r: -3deg; --idle-dur: 4.5s; }
.lb__flag:nth-child(9) { --c: var(--sky); --r: -4deg; --idle-dur: 5.8s; }
/* the paper hangs from its top centre, leaning with the string; it carries its own crisp contact shadow, so the shadow
   sways with it. The sway is small (1.6 degrees), so the fold never lifts off the string. */
.lb__paper { --idle-r: var(--r); --idle-a: 1.6deg; position: relative; display: block; width: min(100%, 120px); transform-origin: 50% 0; rotate: var(--r); }
.lb__paper::before { content: ""; position: absolute; inset: 0; translate: 1.5px 3px; background: rgba(90, 42, 0, .2);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); }
.lb__cut { position: relative; display: grid; place-items: center; min-height: 82px; padding: 17px 5px 24px; text-align: center; white-space: nowrap;
  background: var(--c) url(/assets/art/textures/grain-soft-tile.webp) 0 0 / 256px 256px; background-blend-mode: multiply; color: var(--ink);
  font: 700 clamp(16px, 1.3vw, 19px)/1.15 var(--font-body); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); }
.lb__flag[lang="en"] .lb__cut { font-family: var(--font-display); font-weight: 800; }
/* the fold over the string */
.lb__cut::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: rgba(90, 42, 0, .1); box-shadow: 0 1px 0 rgba(255, 255, 255, .55); }

/* tablets: two straight strings, five flags and four; phones: three strings of three. Each string is drawn by its
   flags (a line across each column), tied to a pin at both ends of the row. */
@media (max-width: 1099.98px) {
  .lb__string, .lb__line::before, .lb__line::after { display: none; }
  .lb__flags { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 26px; column-gap: 0; }
  .lb__flag:nth-child(n) { --y: 1px; --r: 0deg; }
  .lb__cut { font-size: 18px; }
  .lb__flag::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 2.2px; border-radius: 2px; background: #9A7347; }
  .lb__flag:is(:nth-child(1), :nth-child(5), :nth-child(6), :nth-child(9))::after { content: ""; position: absolute; top: -1.5px; width: 12px; height: 12px; border-radius: 50%;
    background: radial-gradient(circle at 36% 32%, #FFD0CB 0 18%, transparent 19%), var(--coral); box-shadow: 0 1px 1px rgba(90, 42, 0, .35); }
  .lb__flag:is(:nth-child(1), :nth-child(6))::after { left: -4px; }
  .lb__flag:is(:nth-child(5), :nth-child(9))::after { right: -4px; }
  .lb__flags > :nth-child(n + 6) { translate: 50% 0; } /* the four on the second string sit between the five above */
  .lb__paper { width: min(86%, 120px); }
}
@media (max-width: 639.98px) {
  .lb__flags { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 520px; }
  .lb__flags > :nth-child(n + 6) { translate: none; }
  .lb__flag:is(:nth-child(5), :nth-child(6))::after { content: none; }
  .lb__flag:is(:nth-child(3n + 1), :nth-child(3n))::after { content: ""; position: absolute; top: -1.5px; width: 12px; height: 12px; border-radius: 50%;
    background: radial-gradient(circle at 36% 32%, #FFD0CB 0 18%, transparent 19%), var(--coral); box-shadow: 0 1px 1px rgba(90, 42, 0, .35); }
  .lb__flag:nth-child(3n + 1)::after { left: -4px; right: auto; }
  .lb__flag:nth-child(3n)::after { right: -4px; left: auto; }
  /* the widest word (Malayalam) keeps clear paper on both sides */
  .lb__paper { width: min(96%, 120px); }
  .lb__cut { font-size: 16.5px; padding-inline: 6px; }
}

@keyframes lb-hang {
  0% { opacity: 0; transform: translateY(-18px) rotate(-8deg) scale(.9); }
  20% { opacity: 1; transform: translateY(-6px) rotate(5deg) scale(1.02); }
  40% { transform: translateY(2px) rotate(-3deg); }
  60% { transform: translateY(-1px) rotate(1.5deg); }
  80%, 100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.rm) .lb [data-b].b-wait:not(.b-in) { opacity: 0; }
  html.js:not(.rm) .lb [data-b].b-in { transform-origin: 50% 0; animation: lb-hang 420ms steps(1, end) var(--b-at, 0ms) both; }
}
@media (forced-colors: active) {
  .lb__cut { border: 1px solid CanvasText; clip-path: none; }
  .lb__paper::before { display: none; }
}

/* R6 (9 Nov): Tonight in Naalai as a night notice board: Nila, the class and the time, pinned paper notes */
.tn.tn--night { --pk-c: var(--night); --pk-tex: url(/assets/art/textures/night-paper-tile.webp); --pk-tex-size: 512px 512px; --pk-blend: normal; --pk-fg: #FFFFFF; --pk-rim: #4A5A96;
  color: #fff; padding: clamp(60px, 7vw, 96px) 0 clamp(64px, 7vw, 104px); }
.tn--night .tn__head { display: grid; grid-template-columns: clamp(96px, 11vw, 150px) minmax(0, 1fr); gap: clamp(16px, 2.4vw, 32px); align-items: center; }
.tn__nila { width: 100%; }
.tn__when { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: 800 14px/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: #C9D2FF; }
.tn--night .tn__h { margin-top: 8px; font-size: clamp(30px, 3.4vw, 46px); color: #fff; }
.tn--night .tn__lead { margin-top: 8px; max-width: 58ch; color: #D3DBF7; }
.tn__notes { margin-top: clamp(28px, 3.2vw, 44px); display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 16px; }
.tn__note { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 58px; padding: 12px 20px 12px 12px; border-radius: 6px 10px 8px 5px / 5px 8px 10px 6px;
  background: #FFF8E8 url(/assets/art/textures/grain-soft-tile.webp) 0 0 / 256px 256px; background-blend-mode: multiply; color: var(--ink); font: 700 17px/1.3 var(--font-body);
  box-shadow: 0 2px 2px rgba(0, 0, 0, .2), 0 16px 24px -14px rgba(0, 0, 0, .6); rotate: var(--r, 0deg); }
.tn__note::before { content: ""; position: absolute; left: 50%; top: -7px; width: 14px; height: 14px; translate: -50% 0; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FF9A8C, #D8402F 70%); box-shadow: 0 2px 3px rgba(0, 0, 0, .4); }
.tn__foot { margin-top: clamp(24px, 2.8vw, 36px); text-align: center; color: #C9D2FF; font: 700 16px/1.4 var(--font-body); }
@media (max-width: 640px) { .tn--night .tn__head { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; } .tn__notes { gap: 16px 10px; } .tn__note { min-height: 50px; padding: 10px 14px 10px 10px; font-size: 15.5px; } }

/* R6 (9 Nov): one felt picture of the whole loop, three captions under its three parts */
.what__one { margin: clamp(28px, 4vw, 48px) 0 0; }
.what__frame { overflow: hidden; border-radius: 22px; box-shadow: var(--sh-paper); background: #F3E6CF; isolation: isolate; }
.what__pic { display: block; width: 100%; height: auto; will-change: transform; } /* drifts slowly with the scroll (paper-motion layer): the frame clips it */
.what__caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); margin-top: clamp(18px, 2.4vw, 28px); padding: 0 clamp(4px, 1vw, 12px); font: 600 16px/1.5 var(--font-body); color: var(--ink-2); }
.what__cap b { display: block; margin-bottom: 4px; font: 800 clamp(18px, 1.6vw, 22px)/1.2 var(--font-display); color: var(--ink); }
@media (max-width: 760px) { .what__caps { grid-template-columns: 1fr; gap: 14px; } }

@media (max-width: 600px) { .what__pic { aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 62%; } }

/* ---------- Tonight in Naalai (R6 motion, owner round): a real notice board at night. A cork board in a wooden frame, notes at uneven
   angles, each held by a red pin with its own shadow. When the board is seen Nila hands the notes over one by one: each drops on twos
   (the original hand-posed drop), lands with a squash and a tiny paper bounce, then its pin is pressed in. A soft moonlight sweep
   crosses the board once; the line under it underlines itself. Transform and opacity only. Reduced motion and no-JS: the finished board. */
.tn__notes { position: relative; isolation: isolate; overflow: hidden; max-width: 1040px; margin-inline: auto; padding: 46px clamp(22px, 3vw, 40px) 40px; gap: 26px 20px; align-items: flex-start;
  border: 14px solid transparent; border-radius: 14px;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(255, 214, 150, .18), transparent 62%),
    radial-gradient(circle at 18% 22%, rgba(60, 30, 8, .28) 0 2px, transparent 3px) 0 0 / 46px 46px,
    #8E6338 url(/assets/art/textures/kraft-tile.webp) 0 0 / 512px 512px;
  background-blend-mode: normal, normal, multiply;
  box-shadow: inset 0 0 0 3px rgba(40, 20, 6, .55), inset 0 10px 28px rgba(30, 14, 2, .6), inset 0 -8px 20px rgba(30, 14, 2, .35); }
/* the wooden frame, drawn as a border-box background so the cork sits inside it */
.tn__notes::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 14px; pointer-events: none;
  background: linear-gradient(135deg, #6B4423, #4A2C14 45%, #6A4222); -webkit-mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) exclude, linear-gradient(#000 0 0); }
.tn__note { box-shadow: 3px 5px 5px rgba(20, 8, 0, .4), 10px 20px 22px -10px rgba(20, 8, 0, .6); rotate: calc(var(--r, 0deg) * 1.8); min-height: 54px; }
.tn__note:nth-child(3n + 2) { translate: 0 8px; } .tn__note:nth-child(4n + 1) { translate: 0 -5px; }
.tn__note::before { top: -9px; width: 15px; height: 15px; box-shadow: 1px 4px 3px rgba(20, 8, 0, .55), inset -1px -1px 2px rgba(120, 20, 10, .5); }
.tn__note::after { content: ""; position: absolute; left: calc(50% - 3px); top: 4px; width: 10px; height: 5px; border-radius: 50%; background: rgba(40, 20, 0, .28); filter: blur(1px); pointer-events: none; } /* the pin's shadow on the note */
/* moonlight: one soft band crosses the board (the board clips it) */
.tn__moon { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(190, 208, 255, .22) 50%, transparent 62%); }
.tn__foot { position: relative; padding-bottom: 14px; }
.tn__foot::after { content: ""; position: absolute; left: 50%; bottom: 0; width: min(100%, 34ch); height: 4px; translate: -50% 0; border-radius: 4px; background: var(--sun); transform-origin: 0 50%; }
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.rm) .tn__notes:not(.is-in) .tn__note { opacity: 0; animation: tn-failsafe 1ms 4s forwards; }
  html.js:not(.rm) .tn__notes:not(.is-in) ~ .tn__foot::after { transform: scaleX(0); }
  html.js:not(.rm) .tn__notes.is-in .tn__note { animation: tn-drop 720ms steps(1, end) var(--d, 0ms) both; }
  html.js:not(.rm) .tn__notes.is-in .tn__note::before { animation: tn-pin 330ms steps(1, end) calc(var(--d, 0ms) + 330ms) both; }
  html.js:not(.rm) .tn__notes.is-in .tn__moon { animation: tn-moon 2200ms cubic-bezier(.45, 0, .2, 1) var(--moon-at, 2000ms) both; }
  html.js:not(.rm) .tn__notes.is-in ~ .tn__foot::after { animation: tn-line 900ms var(--pm-spring, ease-out) calc(var(--moon-at, 2000ms) + 500ms) backwards; }
  html.js:not(.rm) .tn__nila.is-handing { animation: tn-hand 340ms steps(2, end) var(--hand-at, 250ms) 1; animation-iteration-count: var(--hands, 10); }
}
@keyframes tn-failsafe { to { opacity: 1; } }
@keyframes tn-drop {
  0% { opacity: 0; transform: translateY(-30px) rotate(-5deg) scale(1.12); }
  12% { opacity: 1; transform: translateY(-18px) rotate(-3deg) scale(1.08); }
  24% { transform: translateY(-7px) rotate(-1deg) scale(1.03); }
  36% { transform: translateY(0) rotate(.6deg) scale(1.04, .93); }
  48% { transform: translateY(-4px) rotate(-.3deg) scale(.99, 1.02); }
  60% { transform: translateY(0) scale(1.01, .98); }
  72%, 100% { opacity: 1; transform: none; }
}
@keyframes tn-pin { 0% { scale: 0; } 34% { scale: 1.45; } 67%, 100% { scale: 1; } }
@keyframes tn-moon { 0% { opacity: 1; transform: translateX(-110%); } 100% { opacity: 1; transform: translateX(110%); } }
@keyframes tn-line { 0% { transform: scaleX(0); } }
@keyframes tn-hand { 0% { rotate: 0deg; translate: 0 0; } 50% { rotate: 4deg; translate: 3px -2px; } 100% { rotate: 0deg; translate: 0 0; } }
@media (max-width: 640px) { .tn__notes { padding: 40px 12px 30px; border-width: 10px; gap: 22px 10px; } .tn__note { rotate: calc(var(--r, 0deg) * 1.3); } }
@media (forced-colors: active) { .tn__notes { border: 10px solid CanvasText; } }
