/* The new home page's layout (views/site-new/home.ejs), in the manner of Attio and Amplitude: more air between
   sections, thin lines, small UI type in the demos, short headlines. Our tokens and font throughout; the demos
   themselves are in app-look.css, the dark band's tokens in dark-band.css. */

main section.block{padding-block:104px}
.sec-head{max-width:720px}
.sec-head h2{font-size:clamp(30px,3.8vw,44px);letter-spacing:-.03em;line-height:1.08}
.sec-head p{font-size:18px;line-height:1.55}

/* a frame: the app's real page, scaled to its box; the box keeps the shape before the frame loads */
.frame .frame-fit{position:relative;width:100%;overflow:hidden;background:var(--bg)}
.frame iframe{position:absolute;left:0;top:0;width:calc(var(--fw) * 1px);height:calc(var(--fh) * 1px);border:0;transform:scale(var(--s,1));transform-origin:0 0;pointer-events:none;opacity:0;transition:opacity .42s ease}
.frame iframe.is-on{opacity:1}
@media (prefers-reduced-motion:reduce){.frame iframe{transition:none}}
.shot-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* the stat row under the logos: four facts with their footnote */
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;margin:56px 0 0;padding:28px 0 0;border-top:1px solid var(--border)}
.stats > div{display:grid;gap:4px;min-width:0}
.stats dt{order:2;font:600 14px var(--display);color:var(--text-strong)}
.stats dd{order:1;margin:0;font:600 clamp(34px,4vw,48px)/1 var(--display);letter-spacing:-.035em;color:var(--text-strong);font-variant-numeric:tabular-nums}
.stats small{order:3;font-size:13px;line-height:1.4;color:var(--text-muted)}
/* the weekly figures (partials/figures, on the home page and every topic page): the same row, centred under
   its heading, the numbers larger and in the logo's blue → violet, as the hero's reel word */
.stats.site-figures{margin-top:0;padding-top:0;border-top:0;text-align:center}
.site-figures > div{justify-items:center;align-content:start}   /* a shorter note never pushes its label down */
.site-figures dd{font-size:clamp(38px,4.4vw,56px)}
.site-figures dd > span[aria-hidden]{background:var(--reel);-webkit-background-clip:text;background-clip:text;color:transparent}
.site-figures small{max-width:26ch}
@media (prefers-contrast:more){.site-figures dd > span[aria-hidden]{background:none;color:var(--text-strong)}}
/* narrower: still four across (two columns spread over a tablet's width left a wide hole between the pairs),
   then two by two in a narrow box of their own, centred, never stretched to the page */
@media (max-width:900px){
  .stats.site-figures{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
  .site-figures dd{font-size:clamp(28px,4.6vw,40px)}
}
@media (max-width:720px){
  .stats.site-figures{grid-template-columns:repeat(2,minmax(0,1fr));max-width:520px;margin-inline:auto;gap:28px 16px}
}

/* how it works: the steps scroll on the left, the stage stays beside them and shows the step's demo */
/* Its ground is a tone of its own with a soft glow of the logo's colours at the top (2026-11-14): in the dark
   theme the band was exactly the page's colour, so its edges — and the Reveal below — never showed. */
.hiw{--hiw-ground:var(--bg);color:var(--text);border-block:1px solid var(--border);
  background:radial-gradient(55% 560px at 10% 0%,color-mix(in srgb,var(--grad-a) 17%,transparent),transparent 72%),
    radial-gradient(45% 520px at 52% 0%,color-mix(in srgb,var(--grad-b) 15%,transparent),transparent 72%),
    radial-gradient(40% 480px at 94% 0%,color-mix(in srgb,var(--dot) 12%,transparent),transparent 72%),var(--hiw-ground)}
:root[data-theme="dark"] .hiw{--hiw-ground:color-mix(in srgb,var(--surface) 60%,var(--bg))}
@media (prefers-contrast:more){.hiw{background:var(--hiw-ground)}}
.hiw .sec-head p{color:var(--text-muted)}
.hiw .eyebrow{color:var(--warm-ink)}
.hiw-grid{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,8fr);gap:56px;align-items:start;margin-top:24px}
.hiw-steps{display:grid}
.hiw-step{position:relative;min-height:68vh;display:flex;flex-direction:column;justify-content:center;padding:32px 0 32px 64px;opacity:.38;transition:opacity .45s ease}
.hiw-step.is-active{opacity:1}
.hiw-n{position:absolute;left:0;top:50%;translate:0 -50%;display:grid;place-items:center;width:40px;height:40px;padding:0;border-radius:50%;border:1px solid var(--border);background:var(--surface);color:var(--text-strong);font:600 13px var(--mono);cursor:pointer}
.hiw-step.is-active .hiw-n{border-color:var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 18%,transparent)}
.hiw-bar{position:absolute;left:50%;top:100%;width:1px;height:calc(34vh - 20px);margin-left:-.5px;background:var(--border);overflow:hidden}
.hiw-step:last-child .hiw-bar{display:none}
.hiw-bar::after{content:"";position:absolute;inset:0;background:var(--accent);transform:scaleY(0);transform-origin:top;transition:transform .5s ease}
.hiw-step.is-done .hiw-bar::after,.hiw-step.is-active .hiw-bar::after{transform:scaleY(1)}
.hiw-kicker{font:600 12px var(--display);letter-spacing:.08em;text-transform:uppercase;color:var(--warm-ink);margin-bottom:10px}
.hiw-step .eyebrow{display:none}
.hiw-step h2{font-size:clamp(26px,2.8vw,36px);letter-spacing:-.03em;line-height:1.1;color:var(--text-strong)}
.hiw-step > p{color:var(--text-muted);font-size:17px;line-height:1.55;margin:14px 0 18px}
.hiw-step .feat li{color:var(--text)}
.hiw-step .more-links a{color:var(--accent)}
.hiw-stage{position:sticky;top:calc(50vh - 220px);min-height:440px}
.hiw-demo{display:none}
.hiw-demo.is-active{display:block;animation:hiw-in .5s cubic-bezier(.2,.8,.2,1)}
@keyframes hiw-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.hiw .shot{border-color:var(--border);box-shadow:var(--shadow)}

/* audience tabs: one record, dressed for what the shop sells */
.aud-tabs{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:8px 0 40px}
.aud-tabs button{height:40px;padding:0 18px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--text);font:600 14px var(--display);cursor:pointer}
.aud-tabs button[aria-selected="true"]{border-color:var(--accent);color:var(--accent);background:color-mix(in srgb,var(--accent) 9%,var(--surface))}
.aud-panel{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:56px;align-items:center}
.aud-panel.one{grid-template-columns:minmax(0,1fr);max-width:720px;margin-inline:auto;text-align:center}
.aud-panel.one .aud-fields{justify-content:center}
.aud-text h3{font-size:clamp(24px,2.6vw,32px);letter-spacing:-.03em;line-height:1.12}
.aud-text > p{color:var(--text-muted);font-size:17px;margin:12px 0 18px}
.aud-fields{list-style:none;padding:0;margin:0 0 18px;display:flex;flex-wrap:wrap;gap:8px}
.aud-fields li{padding:7px 12px;border-radius:999px;background:var(--surface);border:1px solid var(--border);font:500 13.5px var(--display);color:var(--text-strong)}
.aud-swap{animation:hiw-in .4s cubic-bezier(.2,.8,.2,1)}

/* the bento: the six cards in two sizes */
.bento-sec .cards .card:has(.bento-frame){display:flex;flex-direction:column}
.bento-frame{margin-top:18px;border-radius:12px}
.bento-sec .cards{grid-template-columns:repeat(12,minmax(0,1fr))}
.bento-sec .cards .card{grid-column:span 3;padding:26px}
.bento-sec .cards .card:nth-child(1),.bento-sec .cards .card:nth-child(2){grid-column:span 6}
.bento-sec .cards h3{font-size:18px}
.bento-sec .cards p{font-size:15px;line-height:1.5}

/* ---------- scroll motion (2026-11-14, the "Sellevry Scroll Motion" mock; home-new.js sets the values) ----------
   Every moving state is keyed on a class or value the script sets, so without the script (or with reduced
   motion, where it never runs) each block shows in its place. Only transform, opacity, colour and clip-path. */

/* Zoom: the hero's tour leans back a little and settles flat as the page starts to scroll. Tilted from the
   first paint (--zoom defaults to 1) so the script's first value never snaps it; half the lean on a narrow screen. */
@media (prefers-reduced-motion:no-preference){
  .home-hero,.topic-hero{overflow-x:clip}   /* the leaning frame's lower edge comes forward; it never widens the page */
  /* a landing page's picture leans and settles the same way (round 5 of the design principles, 2026-11-17) */
  :is(.home-hero,.topic-hero) .shot-hero{--lean:13deg;--shrink:.075;transform-origin:50% 0;will-change:transform;
    transform:perspective(1400px) rotateX(calc(var(--zoom,1) * var(--lean))) scale(calc(1 - var(--zoom,1) * var(--shrink)))}
}

/* Depth: a section's frame turns a little toward the pointer, as a card in the hand would (round 5 of the design
   principles, 2026-11-17 — Charles Liu's "solid drawing in 3D", on the website only). A computer's pointer only;
   home-new.js sets --tilt-x / --tilt-y; the box inside turns, never the figure (the hero has its own lean). */
@media (prefers-reduced-motion:no-preference) and (hover:hover) and (pointer:fine){
  .frame:not(.shot-hero) .frame-fit{transform:perspective(1200px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg));transition:transform .5s cubic-bezier(.2,.8,.2,1)}
  .frame.is-tilting:not(.shot-hero) .frame-fit{transition-duration:.12s}
}

/* Reveal: the dark band is a rounded card inside the page until its top nears the middle of the window */
.hiw.is-opening{--reveal-x:8%;--reveal-r:40px;
  clip-path:inset(0 calc(var(--reveal,0) * var(--reveal-x)) round calc(var(--reveal,0) * var(--reveal-r)))}

/* Text Fill: the opening paragraph's words go from faint to full ink as it is read */
.hiw .sec-head p.is-fill .tf-w{color:color-mix(in srgb,var(--text-muted) 34%,transparent);transition:color .3s ease}
.hiw .sec-head p.is-fill .tf-w.on{color:var(--text-strong)}

/* Fade Up + Stagger: a block below the window at load waits 12px low and clear, then rises in */
.fu{transition:opacity .55s cubic-bezier(.2,.8,.2,1),transform .55s cubic-bezier(.2,.8,.2,1)}
.fu-wait{opacity:0;transform:translateY(12px)}

/* Our story (owner, 2026-11-15, the "Our Story Section" mock, variant A): the shop's photo beside the founders'
   note. The two faces are the app's neutral monogram (a person never gets a colour of their own). */
.story-grid{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:64px;align-items:center}
.story-photo{margin:0;display:grid;gap:12px}
.story-photo img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:22px;box-shadow:var(--shadow);background:var(--surface-2)}
.story-photo figcaption{padding-inline:4px;font-size:13.5px;color:var(--text-muted)}
.story-text{display:grid;gap:18px;justify-items:start;min-width:0}
.story-text .eyebrow{margin-bottom:0}
.story-text h2{font-size:clamp(30px,3.8vw,44px);letter-spacing:-.03em;line-height:1.08}
.story-text p{font-size:17px;line-height:1.65;color:var(--text-2)}
.story-sign{display:flex;align-items:center;gap:14px;margin-top:6px;line-height:1.35}
.story-faces{display:flex;flex:none}
.story-faces span{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;box-sizing:border-box;border:2px solid var(--bg);background:var(--mono-bg);color:var(--mono-fg);font:600 16px var(--display)}
.story-faces span + span{margin-left:-10px}
.story-sign b{display:block;font:600 15.5px var(--display);color:var(--text-strong)}
.story-sign b + span{font-size:14px;color:var(--text-muted)}
.story-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:10px}

@media (max-width:900px){
  .home-hero .shot-hero{--lean:6.5deg;--shrink:.0375}
  .hiw.is-opening{--reveal-x:4%;--reveal-r:28px}
}

@media (max-width:1040px){
  .hiw-grid{gap:40px}
}
@media (max-width:900px){
  main section.block{padding-block:72px}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  /* the steps and their demos take turns down the page */
  .hiw-grid{display:flex;flex-direction:column;align-items:stretch;gap:0}
  .hiw-demo{width:100%}
  .hiw-steps,.hiw-stage{display:contents}
  .hiw-step{order:calc(var(--i) * 2);min-height:0;opacity:1;padding:40px 0 20px 0}
  .hiw-n{position:static;translate:none;margin-bottom:14px}
  .hiw-bar{display:none}
  .hiw-demo{order:calc(var(--i) * 2 + 1);display:block;animation:none}
  .hiw-demo + .hiw-step{border-top:1px solid var(--border)}
  .aud-panel{grid-template-columns:minmax(0,1fr);gap:28px}
  .bento-sec .cards .card,.bento-sec .cards .card:nth-child(1),.bento-sec .cards .card:nth-child(2){grid-column:span 6}
  .story-grid{grid-template-columns:minmax(0,1fr);gap:36px}
  .story-photo{max-width:520px}
}
@media (max-width:560px){
  .stats{grid-template-columns:minmax(0,1fr)}
  /* the figures stay two by two on a phone: four numbers stacked are a screen and a half of scrolling */
  .stats.site-figures{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 16px}
  .site-figures dd{font-size:34px}
  .bento-sec .cards .card,.bento-sec .cards .card:nth-child(1),.bento-sec .cards .card:nth-child(2){grid-column:span 12}
  .story-text p{font-size:16px}
  .story-actions,.story-actions .btn{width:100%}
}
