/* Round 2 design tweaks (2026-11-16), home page only. Loads after site.css.
   Tweak 02 (the hero) then tweak 06 (the THANK YOU note). */

/* ============================================================
   tw-hero: the home page hero, final version (round 3).
   Pairs with hero_markup() in build.py and the tw-hero block in site.js.

   Two layouts, one title:
     desktop and wide screens, and any screen held sideways:
       "OPEN in Charlotte" on one line, centred on the film both ways
     phones and tablets held upright (any upright screen under 1000px wide, and any wider one
     at least 5:4 tall, so the 12.9 and 13 inch iPads too):
       OPEN with the italic right under it, on the black band above the film
       (the round 2 "d" layout, set 15% smaller)
     an upright screen 1000px or wider that is close to square (a tall desktop window) keeps the
     one centred line, since there the stack would run into the side rail.
   The dates line and the blue waitlist bar hanging across the film's bottom edge are kept.
   The film is not dimmed on desktop, and the title carries no shadow (Maurice, 2026-11-16).

   The title animation (tw-hero.js replays it):
     the three words fade in one after another, all in the accent blue, then a white wash runs
     left to right through the line. OPEN turns white as it passes; "in Charlotte" stays blue and
     only catches a faint light-blue glint. Opacity, transform and background-position only.

   Numbers measured in the real fonts (per 1em of font size, line-height 1):
     OPEN, Thicccboi 900 at -.035em: advance 2.463, ink starts .033 in, caps .70 tall, baseline .8 down
     OPEN, Thicccboi 900 at -.06em:  advance 2.363 (the phone layout uses the round 2 ink figure 2.318)
     word space: .221 (Thicccboi), .243 (Playfair italic)
     "in" Playfair italic at -.01em: advance .862.  "Charlotte": advance 3.931, ink runs .077 past it
     the desktop line, italic at .88em so its ascenders (.795) meet OPEN's cap height (.70):
       2.463 + .221 + .88 x (.862 + .243 + 3.931 + .077 overhang) = about 7.18 wide
   ============================================================ */

/* ---------- 1. Shared: hero box and the waitlist bar ---------- */
.hero{--bar-h:56px;--bar-air:.75rem;
  height:calc(100svh - var(--bar-h) / 2 - var(--bar-air));min-height:0;
  overflow:visible;border-bottom:0}
.hero__frame{overflow:hidden}
.hero__say{min-width:0}   /* a no-wrap title must never widen the page */

/* Dates and status: one small tracked line. Maurice's rule (2026-11-16): no tight or heavy shadows.
   Where small type over the film needs help, the only shadow allowed is very spread and faint. */
.hero__meta{display:flex;flex-wrap:wrap;gap:.25rem 1.5rem;max-width:none;
  font-size:var(--t-xs);font-weight:700;line-height:1.5;letter-spacing:.16em;text-transform:uppercase;
  color:var(--ink);text-shadow:0 2px 40px rgba(0,0,0,.35)}
.hero__meta .hero__status{text-shadow:inherit}

.btn.bar.hero__bar{position:absolute;bottom:calc(var(--bar-h) / -2);min-height:var(--bar-h)}
@media(min-width:1500px){
  .hero{--bar-h:clamp(56px,3.5vw,84px)}
  .btn.bar.hero__bar{padding-inline:clamp(1.25rem,1.5vw,2.2rem)}
}

/* ---------- 2. The title words (both layouts) ----------
   Each word is .hw (it fades and rises) holding .hw__ink (the colour, painted as a gradient clipped
   to the letters so the wash can travel through it). A gradient clipped to text would sit UNDER
   its own text-shadow, so the shadow is drawn by a copy of the word (.hw::before, empty alt text so
   it is never read out) placed under the ink. */
.hero h1{max-width:none;margin:0;line-height:1;white-space:nowrap;text-wrap:nowrap}
.hero h1 .accent{padding-right:0;text-shadow:none}
.hw{display:inline-block;position:relative}
.hw__ink{position:relative;text-shadow:none}
.hw--open .hw__ink{color:var(--ink)}
.hero h1 .accent .hw__ink{color:var(--accent-text)}
/* No shadow on the title at all (Maurice, 2026-11-16: "Take the dropshadow off the open in charlotte
   hero logo"). The shadow copy that used to sit under each word is switched off. */
.hw::before{content:none}

/* The wash. The gradient is twice the word plus 2g wide (g = half the soft edge); sliding it from
   100% to 0% moves the edge from just left of the word to just right of it, at a steady pace.
   The ink box is padded so italic overhangs stay inside the painted area, and the padding is taken
   back with a negative margin so nothing moves. Final state (background-position 0) is what shows
   without the script, without motion, and once the animation is over. */
@supports ((-webkit-background-clip:text) or (background-clip:text)){
  .hw__ink{padding:.12em .15em;margin:0 -.15em;
    color:transparent;-webkit-text-fill-color:transparent;
    -webkit-background-clip:text;background-clip:text;
    background-repeat:no-repeat;background-position:0 0;
    -webkit-box-decoration-break:clone;box-decoration-break:clone}
  .hw--open .hw__ink{--g:.45em;
    background-image:linear-gradient(90deg,var(--ink) calc(50% - var(--g)),var(--accent-text) calc(50% + var(--g)));
    background-size:calc(200% + 2 * var(--g)) 100%}
  /* "in Charlotte" (Maurice, 2026-11-16): the white sweep runs through it left to right, then a
     blue sweep comes straight back right to left. Same white | blue gradient as OPEN; it ends at
     100% (blue), which is also what shows without the script or with reduced motion. */
  .hero h1 .accent .hw__ink{--g:.6em;background-position:100% 0;
    background-image:linear-gradient(90deg,var(--ink) calc(50% - var(--g)),var(--accent-text) calc(50% + var(--g)));
    background-size:calc(200% + 2 * var(--g)) 100%}
}
/* Windows high contrast drops background images: show plain system text instead. */
@media(forced-colors:active){
  .hw__ink{color:CanvasText;-webkit-text-fill-color:CanvasText;background:none}
  .hw::before{content:none}
}

/* ---------- 3. Desktop, wide screens and any sideways screen: one centred line ----------
   --clear keeps the line off the side rail (ticks, gap and its longest label, "How it works",
   plus air) on both sides, so it stays centred. Under 1000px there is no rail, only the gutter. */
.hero{--clear:var(--gutter);
  --tf:min((100vw - 2 * var(--clear)) / 7.2,24svh)}
@media(min-width:1000px){
  .hero{--clear:max(var(--gutter),clamp(.9rem,1.8vw,1.8rem) + 44px + .8rem + 9.2 * var(--t-xs) + 2rem)}
}
@media(orientation:landscape),(min-width:1000px) and (min-aspect-ratio:4001/5000){
  /* No ease-down over the film at all: the title is centred and stands on the film as it is. */
  .hero__frame::after{background:none}
  .hero{display:grid;grid-template-rows:minmax(0,1fr)}
  .hero__say{align-self:stretch;max-width:none;padding:0 var(--clear);
    display:grid;grid-template-rows:1fr auto 1fr;justify-items:center;align-items:start}
  .hero h1{grid-row:2;font-size:var(--tf);letter-spacing:-.035em;text-align:center}
  .hero h1 .accent{font-size:.88em}
  .hero__meta{grid-row:3;justify-content:center;text-align:center;margin:clamp(1rem,2.6svh,2.1rem) 0 0}
  /* The bar is centred under the title, about half its width. */
  .btn.bar.hero__bar{--bar-w:min(100vw - 2 * var(--gutter),max(31rem,var(--tf) * 3.9));
    width:var(--bar-w);left:calc(50% - var(--bar-w) / 2)}
}
/* Under 1100px the centred bar is too short for the whole aside, so it keeps the first two words.
   (The full-width bar of the upright layout has room for all of it down to 761px.)
   Closed bar only: it is the one hero bar that links to /book. The open bar is a pop-up button
   and keeps its own aside ("Pick a day", or the last day's name), which fits here. */
@media(max-width:1099px) and (orientation:landscape),(max-width:1099px) and (min-width:1000px) and (min-aspect-ratio:4001/5000){
  .btn.bar.hero__bar[href="/book"]::before{content:"Next city\2002\2192"}
}

/* ---------- 4. Phones and tablets held upright: the mark on the black band ----------
   The round 2 "d" layout, 15% smaller (every title size times .85). OPEN sits under the logo,
   the italic right under it, and the italic's baseline stands on the film's top edge, so the blue
   never crosses the film. Only the two labels at the bottom are on the film, and only their strip
   is eased down, far less than the phone gradient in site.css.
   From 1000px up the side rail shows, but only on screens at least 5:4 tall, where the rail
   (centred on the screen) always starts below the film's top edge, so it never meets the stack. */
@media(max-width:999.98px) and (orientation:portrait),(orientation:portrait) and (max-aspect-ratio:4/5){
  .hero{
    --logo-w:clamp(34px,4.4vw,44px);
    --cap-top:calc(clamp(1.1rem,3.5vh,2.6rem) + var(--logo-w) * 1.334 + clamp(1.6rem,3.3svh,2.6rem));
    --sign:calc((100vw - 2 * var(--gutter)) / 2.318 * .85);
    --ital:calc((100vw - 2 * var(--gutter)) / 5.003 * .85);
    --film-top:calc(var(--cap-top) + var(--sign) * .766 + var(--ital) * .795)}
  /* Full-bleed film on phones too (Maurice, 2026-11-16: no black band at the top). The title sits
     on the film near the top; --film-top still sets where the italic line lands. */
  .hero__frame{inset:0}
  .hero__frame::after{
    background:linear-gradient(0deg,rgba(12,12,12,.6) 0%,rgba(12,12,12,.3) 18%,rgba(12,12,12,0) 36%)}
  .hero__say{align-self:stretch;display:flex;flex-direction:column;justify-content:flex-end;
    padding-top:0;padding-bottom:calc(var(--bar-h) / 2 + 1rem)}
  .hero h1{position:absolute;z-index:1;font-size:var(--sign);letter-spacing:-.06em;text-align:left;
    left:calc(var(--gutter) - .033em);
    top:calc(var(--cap-top) - var(--sign) * .1)}       /* at line-height 1 the cap top sits .1em under the line box */
  /* The italic line: its own size, nudged in by the ink offsets, and pulled up so its baseline
     lands on --film-top (OPEN's box ends .134 sign under its baseline line, the italic's ascent
     box starts .12 ital above its ascenders). */
  .hero h1 .accent{display:block;font-size:var(--ital);letter-spacing:-.01em;
    margin:calc(var(--sign) * -.134 - var(--ital) * .12) 0 0 calc(var(--sign) * .033 + var(--ital) * .03)}
  .hero__meta{margin:1.15rem 0 0}
  .btn.bar.hero__bar{left:var(--gutter);right:var(--gutter);width:auto}
}
@media(max-width:760px){
  .btn.bar.hero__bar[href="/book"]::before{content:"Next city\2002\2192"}
}
/* Open state (2026-11-16): "Reserve your commercial" is longer than "Join the waitlist", so under
   440px the open bar (the pop-up button) shows the arrow alone. */
@media(max-width:439.98px){
  .btn.bar.hero__bar[data-modal-open]::before{content:"\2192"}
}
/* Under 360px even "Next city" does not fit beside "Join the waitlist": the arrow alone. The open
   bar also tightens its label, the same way the /book bar does under 340px. */
@media(max-width:359.98px){
  .btn.bar.hero__bar[href="/book"]::before,.btn.bar.hero__bar[data-modal-open]::before{content:"\2192"}
  .btn.bar.hero__bar[data-modal-open]{padding-inline:.9rem;gap:.5rem;letter-spacing:.04em}
}

/* ---------- 5. Motion ----------
   Words: each fades from almost nothing (opacity .02, so the title still counts as painted from the
   first frame) and rises a hair, 120ms apart. The wash then starts as the last word lands. Its
   per-word delay and length (--wd, --wt) are written by tw-hero.js from where the words really sit,
   so the edge travels at one steady pace through the line; the values here are the desktop line's,
   in case the script is late. The h1's own "rise" from site.css is replaced by the word rises. */
@keyframes hwIn{from{opacity:.02;transform:translateY(.1em)}to{opacity:1;transform:none}}
@keyframes hwWash{from{background-position:100% 0}to{background-position:0 0}}
@keyframes hwBack{from{background-position:0 0}to{background-position:100% 0}}
.js .hero h1{animation:none}
.js .hw{animation:hwIn 440ms var(--ease-slow) both;animation-delay:calc(80ms + var(--i,0) * 120ms)}
@supports ((-webkit-background-clip:text) or (background-clip:text)){
  .js .hw__ink{animation:hwWash var(--wt,280ms) linear both;animation-delay:var(--wd,620ms)}
  .js .hw--open .hw__ink{--wt:306ms}
  .js .hw[data-w="in"] .hw__ink{--wd:839ms;--wt:174ms;--wd2:1629ms;--wt2:174ms}
  .js .hw[data-w="Charlotte"] .hw__ink{--wd:921ms;--wt:400ms;--wd2:1321ms;--wt2:400ms}
  /* The accent words get the white sweep, then the blue one back (--wd2, --wt2 from tw-hero.js). */
  .js .hero h1 .accent .hw__ink{animation:hwWash var(--wt,280ms) linear var(--wd,620ms) both,
    hwBack var(--wt2,280ms) linear var(--wd2,1400ms) forwards}
}
@media(prefers-reduced-motion:reduce){
  .js .hw,.js .hw__ink{animation:none!important;opacity:1;transform:none}
  .js .hw__ink{background-position:0 0}
  .js .hero h1 .accent .hw__ink{background-position:100% 0}
}

/* Header, logo and rail over the film on the home page: site.css gives them tight dark halos. Per
   Maurice's rule a shadow, if any, is very spread and faint, never tight or heavy. */
body:has(.hero) .top .nav a{text-shadow:0 2px 36px rgba(0,0,0,.35)}
body:has(.hero) .top .lockup img{filter:drop-shadow(0 2px 30px rgba(0,0,0,.3))}
body:has(.hero) .rail__label{text-shadow:0 2px 36px rgba(0,0,0,.35)}
.hero h1 .accent{text-shadow:none}

/* ============================================================
   tw-note: TWEAK 06. The closing note on the home page (#a-note).
   Three planes: THANK YOU huge in white at the back, a cutout of Maurice in front of it,
   the quote, signature and one link on top.
   Stacking is by DOM order: the type is in normal flow (paints first), the cutout is
   positioned (paints over it), the words block is positioned after it (paints last).
   Uses the shared .big, .cut and .lab recipes from tw-shared.css. One local change to
   .big: tracking is -.04em here, not -.06em, so the letters of THANK touch but do not
   run into each other.

   The photo stands at the END of the line and only the edge of his head touches the corner
   of the U, so the words always read THANK YOU. Type and photo are both placed in one unit
   (--u): 1% of the section's width, capped by the screen height so a very wide or very short
   window never gets a plate taller than the screen. Because they share the unit, the
   overlap is the same shape at every screen size.

   The photo: Maurice laughing in the director's chair, cut from the white seamless session
   (oic-originals/maurice-white-seamless-124.jpg). It is used nowhere else on the site: not
   the About portrait, not a frame from the behind-the-scenes strip, and no camera rig.
   ============================================================ */

.note{text-align:left;overflow-x:clip;container-type:inline-size}
@supports not (overflow:clip){.note{overflow:hidden}}
.note__plate{position:relative;--u:min(1cqi,1.5svh)}

/* The old 68px headline, now the tiny tier. Same words, still the section's h2. */
.note__head{line-height:1.5;max-width:none;text-wrap:balance}

/* Back plane. Decorative (aria-hidden): the quote under it carries the same words.
   Phones: THANK fills the line and YOU sits under it, with the photo at the end of that line.
   The -.01em left margin cancels the T's side bearing, so its arm starts on the gutter. */
.note__stage{position:relative}
.note__big{font-size:calc(var(--u) * 31.5);letter-spacing:-.04em;white-space:nowrap;max-width:none;
  margin:.16em 0 0 -.01em;user-select:none}
.note__big span{display:block}
.note__big span + span{margin-top:-.2em}

/* Middle plane, placed from the top left corner of the type: --w is the width, --x and --y
   the offset, all in --u. --solid and --gone are where the bottom fade starts and ends, as a
   share of the photo's height: his jacket sinks into the ground, so nothing ends in a hard cut.
   Crew are grayscale (shared rule). To swap the photo, replace the one file and retune the
   five numbers. */
.note__cut{--w:76;--x:34.4;--y:29;--solid:33%;--gone:52%;
  position:absolute;left:calc(var(--u) * var(--x));top:calc(var(--u) * var(--y));
  width:calc(var(--u) * var(--w));max-width:none;pointer-events:none;
  filter:grayscale(1) brightness(1.1) contrast(1.04) var(--cut-shadow);
  -webkit-mask-image:linear-gradient(#000 var(--solid),transparent var(--gone));
  mask-image:linear-gradient(#000 var(--solid),transparent var(--gone))}

/* Top plane. */
.note__say{position:relative;margin-top:calc(var(--u) * 13);max-width:34rem}
.note .farewell__note{margin:0;max-width:none}
.note .farewell__note p{font-size:var(--t-m);line-height:1.6;letter-spacing:0;text-wrap:pretty}
.note .farewell__sig{margin:1.25rem 0 0}
.note__next{margin:.6rem 0 0;max-width:none;font-size:var(--t-s);font-weight:700}
.note__next a{display:inline-block;padding:.7rem 0;color:var(--accent-text);text-decoration:none}
.note__next a::after{content:"\2002\2192"}
.note__next a:hover,.note__next a:focus-visible{color:var(--ink)}

/* Wider screens: one line, the photo at its right end, the words settle bottom left. */
@media(min-width:761px){
  .note__plate{display:flex;flex-direction:column;min-height:calc(var(--u) * 42)}
  .note__big{font-size:calc(var(--u) * 14);margin:.2em 0 0 -.01em}
  .note__big span{display:inline}
  .note__big span + span{margin:0}
  .note__cut{--w:40;--x:57.8;--y:6.4;--solid:36%;--gone:61%}
  .note__say{margin-top:auto;padding-top:calc(var(--u) * 3.5);max-width:min(30rem,calc(var(--u) * 48))}
  .note .farewell__sig{margin-top:1.5rem}
  .note__next{margin-top:1.1rem}
}

/* Two planes, two rates, riding the section's existing reveal. */
.js .note__big{transform:translateX(-1.5%);transition:transform 1.8s var(--ease-slow)}
.js .note__cut{transform:scale(1.03);transform-origin:50% 20%;transition:transform 1.8s var(--ease-slow)}
.js .is-in .note__big,.js .is-in .note__cut{transform:none}
@media(prefers-reduced-motion:reduce){.js .note__big,.js .note__cut{transform:none}}
