/* Goaly v2 — the v2 site's own styles, on top of the site styles every page shares
   (public/brand/site.css, which must load first). Used by the static landing page
   (public/v2/index.html) and by the site's other pages (app/(site)). Here: the brand fonts, the
   v2 app pages' base, and the pieces that name products (the landing's word reel, the
   waitlist's coaster scene, the header's product menu on phones), which the public site
   must not carry. Scoped under .v2 / .v2-app. */

/* Brand fonts (trial versions, 67 glyphs; missing glyphs fall back per character) */
@font-face{font-family:"Goaly Display";src:url("/v2/fonts/goaly-display.otf") format("opentype");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Goaly Body";src:url("/v2/fonts/goaly-body.otf") format("opentype");font-weight:400;font-style:normal;font-display:swap}

.v2{
  --font-display: "Goaly Display", "Orbikular TRIAL", "Newsreader", Georgia, serif;
  --font-body: "Goaly Body", "Altform TRIAL", "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}
/* v2 app pages render inside the main site's root layout, whose globals.css gives
   every element Archivo; let v2 pages inherit their own type instead. */
.v2-app{min-height:100vh;display:flex;flex-direction:column}
.v2-app > *{width:100%}
.v2-app *{font-family:inherit}
.v2-app :is(code,kbd,pre,samp){font-family:var(--font-mono)}
.v2-main{flex:1}
body:has(.v2-app){background:#F2F1EE}
/* Side by side, the card stays in view while the taller column beside it scrolls by, so the two end
   together instead of leaving a gap under the card. A card taller than the window (its height is
   --wl-card-h, set by the page) pins by its bottom edge instead, so all of it can still be reached. */
@media (min-width:1101px){
  .v2 .wl-card{position:sticky;top:min(32px, calc(100svh - var(--wl-card-h, 0px) - 32px))}
}
/* LANDING PIECES on the app pages (How it all fits together, waitlist): the landing hero,
   its go/ word reel, and "Smarter every run", as in public/v2/index.html. Scoped to
   .v2-app so they never touch the static landing page, which has its own copies. */
.v2-app .hero{position:relative;max-width:1440px;margin:0 auto;padding-left:max(80px, env(safe-area-inset-left,0px));padding-right:max(80px, env(safe-area-inset-right,0px))}
.v2-app .hero-grid{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:clamp(32px,4vw,64px);align-items:center;padding-block:clamp(24px,3.5vw,56px) clamp(64px,7vw,104px)}
.v2-app .hero-copy{display:flex;flex-direction:column;gap:26px;min-width:0;container-type:inline-size}
.v2-app .hero-copy h1{font-size:clamp(36px,3.9vw,56px);line-height:1;margin-top:8px}
.v2-app .hero-copy p{font-size:20px;line-height:1.4;max-width:440px}
/* capped by its column (cqi) so the longest word, "performer" (~4.45em), never runs into the animation */
.v2-app .reel-line{display:flex;flex-direction:column;align-items:flex-start;font-family:var(--font-display);font-size:min(clamp(80px, 11.2vw, 168px), 22cqi);line-height:1.02;letter-spacing:-0.03em}
.v2-app .reel{display:block;height:1.15em;overflow:hidden;margin-top:-.08em}
.v2-app .reel-col{display:flex;flex-direction:column;animation:v2WordCycle 7.8s var(--ease-swing) infinite}
.v2-app .reel-col span{height:1.15em;white-space:nowrap}
@keyframes v2WordCycle{0%,28%{transform:translateY(0)}33%,61%{transform:translateY(-25%)}66%,94%{transform:translateY(-50%)}100%{transform:translateY(-75%)}}

.v2-app .smarter{padding-block:clamp(48px,6vw,96px) var(--sec)}
.v2-app .smarter-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:32px;margin-bottom:72px}
.v2-app .smarter-head h2{font-size:var(--t-hero);line-height:.95}
.v2-app .smarter-head p{font-size:20px;line-height:1.4;max-width:440px}
.v2-app .runs{position:relative;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:clamp(12px,1.7vw,24px)}
.v2-app .run{display:flex;flex-direction:column;gap:12px;min-width:0}
.v2-app .grid5{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.v2-app .grid5 i{aspect-ratio:1;background:var(--chip-off)}
.v2-app .grid5 i.pop{animation:brand-pop .45s var(--ease-pop)}
.v2-app .run-meta{display:flex;justify-content:space-between;font-family:var(--font-mono);font-size:14px;font-variant-numeric:tabular-nums}
.v2-app .qbar{height:3px;background:var(--chip-off);position:relative;overflow:hidden}
.v2-app .qbar b{position:absolute;inset:0 auto 0 0;width:var(--q);background:var(--ink);transition:width .7s ease}
.v2-app .flyer{position:absolute;z-index:3;pointer-events:none}
.v2-app .smarter-foot{display:flex;justify-content:space-between;align-items:center;margin-top:28px;color:var(--muted)}
.v2-app .smarter-foot .arrow{flex:1;min-width:28px;height:1px;background:var(--line);margin:0 12px;position:relative}
.v2-app .smarter-foot>span:first-child{white-space:nowrap}
.v2-app .smarter-foot>span:last-child{text-align:right}
.v2-app .smarter-foot .arrow::after{content:"";position:absolute;right:0;top:-4px;border-left:8px solid var(--line);border-top:4.5px solid transparent;border-bottom:4.5px solid transparent}

/* Waitlist: one scene above the form. The coaster spans the row; the go/ word sits in its sky, top left,
   and follows the train's stage (the coaster's data-phase): recipe on the data-prep climb, performer
   through training, looper from eval back round to the station. The stage being named gets a ring
   in the word's colour; stages already passed fade back. */
/* The coaster beside the waitlist form: the go/ word on top, the island under it at the column's width. */
.v2-app .wl-scene{--w-recipe:#E58FD0;--w-performer:var(--orange);--w-looper:var(--blue);position:relative;display:flex;flex-direction:column;gap:clamp(4px,1vw,12px)}
/* capped by the screen's height too, so "Join our waitlist" still shows on a laptop's first screen */
.v2-app .wl-scene .hl{width:100%;max-width:none}
.v2-app .wl-scene .lh .stage{max-width:none}
.v2-app .wl-word{position:relative;z-index:4;width:100%;container-type:inline-size;pointer-events:none;padding-top:clamp(8px,1.5vw,20px)}
.v2-app .wl-go{font-family:var(--font-display);font-size:min(64px,13cqi);line-height:1.02;letter-spacing:-0.03em}
.v2-app .wl-go .wl-names{display:inline-grid}
.v2-app .wl-names,.v2-app .wl-tag{display:grid}
/* the outgoing word leaves quickly; the incoming one waits for it, so the two never overlap */
.v2-app .wl-names>span,.v2-app .wl-tag>span{grid-area:1/1;opacity:0;transform:translateY(.18em);transition:opacity .16s ease,transform .2s ease}
.v2-app .wl-tag{margin-top:10px;font-size:clamp(15px,1.4vw,19px);line-height:1.35;max-width:min(300px,86%);color:var(--muted)}
.v2-app .wl-tag>span{transform:translateY(6px)}
/* which word: recipe by default (start, data prep), performer while training, looper after */
.v2-app .wl-scene .w-recipe,
.v2-app .wl-scene:has(.lh[data-phase="cook"]) .w-performer,
.v2-app .wl-scene:has(.lh:is([data-phase="eval"],[data-phase="plate"],[data-phase="loop"],[data-phase="summary"])) .w-looper{opacity:1;transform:none;transition:opacity .3s ease .16s,transform .45s var(--ease-swing) .16s}
.v2-app .wl-scene:has(.lh:is([data-phase="cook"],[data-phase="eval"],[data-phase="plate"],[data-phase="loop"],[data-phase="summary"])) .w-recipe{opacity:0;transform:translateY(-.18em);transition:opacity .16s ease,transform .2s ease}
.v2-app .wl-scene:has(.lh:is([data-phase="cook"],[data-phase="eval"],[data-phase="plate"],[data-phase="loop"],[data-phase="summary"])) .wl-tag .w-recipe{transform:translateY(-6px)}
/* the stage pills: a ring on the one being named, earlier ones fade back */
.v2-app .wl-scene .lh .pill-prep,.v2-app .wl-scene .lh .pill-cook,.v2-app .wl-scene .lh .pill-eval,.v2-app .wl-scene .lh .pill-plate{transition:opacity .3s,transform .3s,visibility .3s,box-shadow .3s}
.v2-app .wl-scene .lh[data-phase="prep"] .pill-prep{box-shadow:0 10px 26px -12px var(--shadow),0 0 0 2px var(--w-recipe)}
.v2-app .wl-scene .lh[data-phase="cook"] .pill-cook{box-shadow:0 10px 26px -12px var(--shadow),0 0 0 2px var(--w-performer)}
.v2-app .wl-scene .lh[data-phase="eval"] .pill-eval,.v2-app .wl-scene .lh[data-phase="plate"] .pill-plate{box-shadow:0 10px 26px -12px var(--shadow),0 0 0 2px var(--w-looper)}
.v2-app .wl-scene .lh:is([data-phase="cook"],[data-phase="eval"],[data-phase="plate"]) .pill-prep,
.v2-app .wl-scene .lh:is([data-phase="eval"],[data-phase="plate"]) .pill-cook,
.v2-app .wl-scene .lh[data-phase="plate"] .pill-eval{opacity:.45}
/* Wide screens (beside the form, not stacked): the coaster gets more of the row. The columns even out
   a little, the gap tightens, and the scene reaches into the page's empty right margin, stopping 24px
   short of the window (and short of the scrollbar). About Goaly under it takes the same width, so its
   ruled lines end where the island does; its paragraphs keep their own reading width. Both stop growing
   at 760px, so a very wide window doesn't make the island loom over the form.
   The scene's reach past the column (--wl-over) is then split: the whole row moves left by half of it,
   so the form's left margin matches the scene's right margin. --wl-col is the scene column's width,
   worked out the same way the grid does (the 1.15fr + 1fr split of the row less the gap). */
@media (min-width:1101px){
  .v2-app .wl-join{
    --wl-gap:clamp(40px,4.5vw,72px);
    --wl-bleed:max(0px, calc((100vw - min(100vw, 1440px)) / 2 + var(--gutter) - 24px));
    --wl-col:calc((min(100vw, 1440px) - 2 * var(--gutter) - var(--wl-gap)) / 2.15);
    --wl-over:max(0px, min(var(--wl-bleed), 760px - var(--wl-col)));
    grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:var(--wl-gap);
    margin-left:calc(var(--wl-over) / -2);margin-right:calc(var(--wl-over) / 2)
  }
  .v2-app .wl-scene,.v2-app .wl-about{width:min(calc(100% + var(--wl-bleed)), 760px)}
}
/* no rule between the coaster and the About claim under it */
.v2-app .wl-about .b-item:first-child{border-top:0;padding-top:0}

@media (max-width:1100px){
  .v2-app .runs{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:32px}
}
@media (max-width:820px){
  .v2-app .hero{padding-left:max(16px, env(safe-area-inset-left,0px));padding-right:max(16px, env(safe-area-inset-right,0px))}
  .v2-app .smarter-head{margin-bottom:40px}
}
/* the coaster shrinks beside the words down to tablet widths; only phones stack it underneath */
@media (max-width:640px){
  .v2-app .hero-grid{grid-template-columns:1fr}
  .v2-app .hl.lh{justify-self:start}
  /* waitlist scene: only the stage being named keeps its pill */
  .v2-app .wl-scene .lh .pill-lap,.v2-app .wl-scene .lh .pill-cost,
  .v2-app .wl-scene .lh:is([data-phase="cook"],[data-phase="eval"],[data-phase="plate"]) .pill-prep,
  .v2-app .wl-scene .lh:is([data-phase="eval"],[data-phase="plate"]) .pill-cook,
  .v2-app .wl-scene .lh[data-phase="plate"] .pill-eval{opacity:0;visibility:hidden}
}
@media (max-width:480px){
  .v2-app .reel-line{font-size:min(clamp(64px,20vw,88px), 22cqi)}
  .v2-app .smarter-head h2{font-size:56px}
  .v2-app .runs{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:820px){
  .v2 .nav-links{display:none}
  .v2 .nav{padding-left:max(16px, env(safe-area-inset-left,0px));padding-right:max(16px, env(safe-area-inset-right,0px))}
}
@media (max-width:560px){
  .v2 .nav{gap:12px}
  .v2 .nav-cta{gap:8px}
  .v2 .nav .btn{min-height:40px;padding:0 16px;font-size:14px}
}
