/* ============================================================
   Woven - "Flowing Ribbon" redesign
   Built to workflow/art-direction-contract.json.
   Crisp cool near-white · emerald signature · yellow rationed to CTAs
   Fraunces (display serif + swash italic) + Plus Jakarta Sans (UI/body)
   ============================================================ */

:root{
  /* DS-locked palette (contract sharedPaletteHexes) */
  --paper:#FFFFFF;
  --surface:#F7F7F6;
  --surface-2:#F1F1EF;
  --ink:#2A2A2C;
  --ink-2:#55565A;
  --ink-3:#87888D;
  --green:#37BB92;          /* the ONE signature gesture colour */
  --green-line:#1F9D74;
  --green-text:#2E7C6D;     /* emerald that reads on white - links/accents */
  --green-soft:#E9F6F0;
  --yellow:#F5C63A;         /* primary action only */
  --yellow-ink:#3A3320;
  --hair:#E8E8E6;
  --hair-strong:#D8D8D6;

  --font-serif:'Fraunces','Georgia',serif;
  --font-sans:'Plus Jakarta Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --font-mono:'Inconsolata',ui-monospace,'SFMono-Regular',monospace;

  --bar-h:96px;   /* floating glass bar: top offset + height + clearance */
  --maxw:1280px;
  --ease:cubic-bezier(.22,.61,.36,1);

  /* geometric spacing scale (contract) */
  --s1:8px; --s2:16px; --s3:24px; --s4:40px; --s5:64px; --s6:104px;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;overflow-x:clip;scroll-padding-top:var(--bar-h);-webkit-text-size-adjust:100%}
body{
  overflow-x:clip;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font-sans);
  font-weight:400;
  line-height:1.55;
  font-optical-sizing:auto;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
::selection{background:var(--green-soft);color:var(--green-text)}
:focus-visible{outline:2px solid var(--green);outline-offset:3px;border-radius:3px}

/* NB: no full-page paper-grain overlay - it darkened the body but not the
   transparent ribbon iframe, leaving a visible vertical seam down the hero.
   The only texture in the system lives inside the ribbon shader (per contract). */

/* ---------- shared type helpers ---------- */
.display{font-family:var(--font-serif);font-weight:360;letter-spacing:-.015em;line-height:.98;font-optical-sizing:auto}
.swash{font-style:italic;font-weight:360;font-feature-settings:"swsh" 1,"salt" 1,"ss01" 1;letter-spacing:0}
.swash-teal{color:var(--green-text)}
.eyebrow{font-size:13.5px;font-weight:500;letter-spacing:.01em;color:var(--green-text)}
.section-kicker{font-family:var(--font-serif);font-style:italic;font-size:clamp(15px,1.4vw,18px);color:var(--green-text);font-weight:380}

.wrap{max-width:var(--maxw);margin:0 auto;padding:0 clamp(20px,5vw,56px)}

/* ============================================================
   TOP BAR
   ============================================================ */
/* floating liquid-glass bar - WebGL2 refraction (#glass) renders over the
   backdrop-filter base; the base is the fallback when WebGL2/html2canvas
   is unavailable. All four corners are visible so the glass reads as a
   discrete refractive object, not a frosted strip. */
.topbar{
  position:fixed;top:14px;left:50%;transform:translateX(-50%);
  width:min(1180px,94vw);height:60px;z-index:60;border-radius:22px;
  background:color-mix(in srgb,var(--paper) 55%,transparent);
  backdrop-filter:blur(14px) saturate(1.25);-webkit-backdrop-filter:blur(14px) saturate(1.25);
  border:1px solid rgba(255,255,255,.55);
  box-shadow:0 18px 45px -20px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.5);
  transition:box-shadow .4s var(--ease);
}
.topbar.scrolled{box-shadow:0 22px 55px -20px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.5)}
.topbar .glass{position:absolute;inset:0;width:100%;height:100%;border-radius:22px;pointer-events:none;z-index:0;display:block}
.topbar .bar-ui{position:relative;z-index:2;display:flex;align-items:center;justify-content:space-between;height:100%;padding:0 12px 0 22px;gap:16px}
/* keep the wordmark + links legible over the moving refraction */
.topbar .brand,.topbar .nav a:not(.btn){text-shadow:0 1px 2px rgba(255,255,255,.6)}
.brand{display:inline-flex;align-items:center;gap:9px;font-family:var(--font-sans);font-weight:700;font-size:21px;letter-spacing:-.02em;color:var(--ink);text-decoration:none}
.brand-mark{width:32px;height:32px;flex:0 0 auto;display:block;box-sizing:border-box;padding:5px;background:#fff;border-radius:50%;box-shadow:0 1px 4px rgba(0,0,0,.10)}
.brand-name{line-height:1}
.nav{display:flex;align-items:center;gap:clamp(18px,3vw,34px)}
.nav a{font-size:15px;font-weight:500;color:var(--ink-2);transition:color .2s var(--ease);position:relative}
.nav a:not(.btn):hover{color:var(--ink)}
.nav a:not(.btn)::after{content:"";position:absolute;left:0;bottom:-4px;width:0;height:1.5px;background:var(--green);transition:width .25s var(--ease)}
.nav a:not(.btn):hover::after{width:100%}

/* primary pill CTA - the one yellow moment */
.btn{
  display:inline-flex;align-items:center;gap:9px;
  height:44px;padding:0 22px;border-radius:999px;
  background:var(--yellow);color:var(--yellow-ink);
  font-family:var(--font-sans);font-size:15px;font-weight:600;letter-spacing:-.005em;
  border:1px solid color-mix(in srgb,var(--yellow) 88%,black 6%);
  cursor:pointer;transition:transform .25s var(--ease),filter .2s var(--ease),box-shadow .25s var(--ease);
  box-shadow:0 1px 0 color-mix(in srgb,var(--yellow) 60%,black 10%);
}
.btn:hover{transform:translateY(-2px);filter:brightness(1.03);box-shadow:0 10px 24px -12px color-mix(in srgb,var(--yellow) 80%,transparent)}
.btn.small{height:38px;padding:0 17px;font-size:14px}
.btn .gm{width:17px;height:17px;display:inline-flex}
.nav .btn{height:40px;padding:0 18px;font-size:14px;background:var(--ink);color:#fff;border-color:var(--ink);box-shadow:none}
.nav .btn:hover{background:#000;color:#fff;filter:none;transform:translateY(-2px);box-shadow:0 10px 24px -12px rgba(0,0,0,.45)}

/* quiet secondary text link */
.link-quiet{display:inline-flex;align-items:center;gap:7px;font-size:15px;font-weight:500;color:var(--ink);cursor:pointer}
.link-quiet .ar{color:var(--green-text);transition:transform .25s var(--ease)}
.link-quiet:hover .ar{transform:translateX(4px)}

/* ============================================================
   HERO - type left, ribbon right (two-pole composition)
   ============================================================ */
.hero{position:relative;min-height:100svh;display:flex;align-items:center;padding-top:var(--bar-h);overflow:hidden}
.hero-inner{position:relative;z-index:2;width:100%;max-width:var(--maxw);margin:0 auto;padding:0 clamp(20px,5vw,56px);transform:translateY(-9vh)}
.hero-copy{max-width:min(60ch,54vw)}
.hero-eyebrow{display:inline-flex;align-items:center;gap:9px;margin-bottom:clamp(20px,3vh,30px)}
.hero-eyebrow .dot{width:7px;height:7px;border-radius:50%;background:var(--green)}
.hero h1{
  font-family:var(--font-serif);font-weight:340;
  font-size:clamp(46px,8vw,118px);line-height:.92;letter-spacing:-.02em;color:var(--ink);
}
.hero h1 .swash{font-weight:360;font-size:1.02em;padding:0 .02em}
.hero-sub{margin-top:clamp(22px,3.4vh,34px);font-size:clamp(16px,1.35vw,20px);color:var(--ink-2);line-height:1.5;max-width:44ch}
.hero-actions{margin-top:clamp(28px,4vh,40px);display:flex;align-items:center;gap:22px;flex-wrap:wrap}

/* ribbon mount - full-bleed behind the copy so the ribbon can loop top-right
   and sweep its long tail across the bottom, under the headline. The scene is
   transparent; the upper-left copy zone is kept clear by the geometry itself. */
.ribbon-mount{
  position:absolute;z-index:0;inset:0;width:100%;height:100%;pointer-events:none;
}
.ribbon-mount iframe,.ribbon-mount canvas,.ribbon-mount img{
  position:absolute;inset:0;width:100%;height:100%;border:0;background:transparent;
  object-fit:cover;object-position:center;
}
/* placeholder shown until the shader runtime is mounted */
.ribbon-mount[data-placeholder] img{opacity:.96;filter:saturate(1.02)}
/* mobile + tablet: cancel the desktop -9vh lift so the hero copy drops below the
   fixed nav and sits on the hero image instead of tucking under the bar */
@media (max-width:1024px){
  .hero-inner{transform:none}
}
@media (max-width:900px){
  .hero{min-height:auto;flex-direction:column;align-items:stretch;padding:calc(var(--bar-h) + 13vh) 0 24px}
  .hero-copy{max-width:none}
  .hero-inner{order:1}
  .ribbon-mount{position:relative;order:2;width:100%;right:0;bottom:0;left:0;height:58vw;min-height:260px;margin-top:8px;overflow:hidden}
  .ribbon-mount iframe,.ribbon-mount img{object-position:center right}
}
/* small screens: keep only the primary pill in the bar so nothing clips */
@media (max-width:620px){
  .topbar{height:54px;top:10px}
  .nav{gap:12px}
  .nav a:not(.btn){display:none}
  .brand{font-size:22px}
  .manifesto .wrap{gap:12px}
  .manifesto .m{font-size:14px}
}

/* ============================================================
   MANIFESTO STRIP - the "no subscription…" promises, quietly
   ============================================================ */
.manifesto{border-top:1px solid var(--hair);border-bottom:1px solid var(--hair)}
.manifesto .wrap{display:flex;flex-wrap:wrap;align-items:center;gap:clamp(14px,2.4vw,30px);padding-top:22px;padding-bottom:22px}
.manifesto .m{display:inline-flex;align-items:center;gap:9px;font-size:15px;font-weight:500;color:var(--ink)}
.manifesto .m::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--green)}
.manifesto .m.os{color:var(--green-text);font-family:var(--font-serif);font-style:italic;font-weight:400;font-size:17px}
.manifesto .m.os::before{display:none}

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.section{padding:clamp(80px,13vh,150px) 0;position:relative}
.section-head{max-width:64ch}
.section-head h2{font-family:var(--font-serif);font-weight:340;font-size:clamp(30px,5vw,64px);line-height:1;letter-spacing:-.02em;color:var(--ink)}
.section-head h2 .swash{font-weight:360}
.section-head p{margin-top:20px;font-size:clamp(16px,1.3vw,19px);color:var(--ink-2);line-height:1.55;max-width:52ch}

/* reveal */
.reveal{opacity:0;transform:translateY(20px);transition:opacity .7s var(--ease),transform .7s var(--ease)}
.reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.reveal{opacity:1;transform:none;transition:none}}

/* ============================================================
   WHY, editorial 2-col list, borderless, hairline dividers
   ============================================================ */
.why-grid{margin-top:clamp(48px,7vh,84px);display:grid;grid-template-columns:repeat(2,1fr);gap:0}
.why-item{padding:34px 30px 40px;border-top:1px solid var(--hair);border-left:1px solid var(--hair);position:relative}
.why-item:nth-child(2n+1){border-left:0;padding-left:0}
.why-num{font-family:var(--font-serif);font-style:italic;font-size:15px;color:var(--green-text);opacity:.85}
.why-item h3{margin-top:14px;font-family:var(--font-serif);font-weight:400;font-size:clamp(20px,1.9vw,26px);line-height:1.1;letter-spacing:-.01em;color:var(--ink)}
.why-item p{margin-top:12px;font-size:14.5px;line-height:1.6;color:var(--ink-2)}
@media (max-width:820px){
  .why-grid{grid-template-columns:1fr}
  .why-item,.why-item:nth-child(3n+1){border-left:0;padding-left:0;padding-right:0}
}

/* ============================================================
   FEATURES - 6 groups, sticky serif title left / airy item list right
   ============================================================ */
/* extra bottom room so the last group's hover-motion (which drops below the
   sticky title) never reaches the next section's divider */
.features{padding-top:clamp(60px,9vh,110px);padding-bottom:clamp(200px,28vh,340px)}
.feat-group{display:grid;grid-template-columns:1fr 1fr;gap:clamp(32px,6vw,90px);
  padding:clamp(50px,8vh,92px) 0;border-top:1px solid var(--hair)}
.feat-group:first-of-type{border-top:0}
.feat-head{position:sticky;top:calc(var(--bar-h) + 30px);align-self:start;z-index:2}
/* while a motion is dropped below the title, lift this head above sibling group
   titles (which paint later in DOM) so the motion isn't covered - still under
   the top bar (z-index 60). */
.feat-head.motion-on{z-index:40}
.feat-index{display:inline-flex;align-items:baseline;gap:12px;margin-bottom:18px}
.feat-index .n{font-family:var(--font-serif);font-style:italic;font-size:20px;color:var(--green-text)}
.feat-index .rule{width:40px;height:1px;background:var(--green);opacity:.5;transform:translateY(-6px)}
.feat-head h2{font-family:var(--font-serif);font-weight:340;font-size:clamp(27px,3vw,42px);line-height:1.02;letter-spacing:-.02em;color:var(--ink)}
.feat-head h2 .swash{font-weight:360}
.feat-list{display:flex;flex-direction:column}
.feat-item{padding:20px 0;border-top:1px solid var(--hair);transition:padding-left .3s var(--ease)}
.feat-item:first-child{border-top:0}
.feat-item:hover,.feat-item.is-active{padding-left:8px}
.feat-body h3{font-size:clamp(17px,1.5vw,20px);font-weight:600;letter-spacing:-.01em;color:var(--ink);display:inline-block}
.feat-body p{margin-top:5px;font-size:14.5px;line-height:1.55;color:var(--ink-2)}
.feat-item[data-motion]{cursor:pointer}

/* hover a feat-item -> its looping hyperframes motion appears BELOW the sticky
   title. .feat-motion is absolutely anchored to the sticky .feat-head (top:100%),
   so it drops in under the title without disturbing layout; the title stays. */
.feat-motion{
  position:absolute;top:calc(100% + 22px);left:0;width:100%;
  aspect-ratio:16/10;border-radius:16px;overflow:hidden;
  background:var(--surface);border:1px solid var(--hair);
  box-shadow:0 30px 60px -34px rgba(0,0,0,.4);
  opacity:0;visibility:hidden;transform:translateY(10px) scale(.985);
  transition:opacity .34s var(--ease),transform .34s var(--ease),visibility 0s linear .34s;
  pointer-events:none;z-index:5;
}
.feat-motion iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:none;background:var(--surface)}
.feat-motion iframe.is-live{display:block}
.feat-head.motion-on .feat-motion{
  opacity:1;visibility:visible;transform:none;
  transition:opacity .34s var(--ease),transform .34s var(--ease),visibility 0s;
}
/* hovering an item warms that item's own title to yellow */
.feat-body h3{transition:color .2s var(--ease)}
.feat-item:hover .feat-body h3,.feat-item.is-active .feat-body h3{color:var(--yellow)}

/* ---- touch (phone / tablet): numbered-tab view, mirroring the Get Woven step tabs.
   JS adds .feat-tabbed to each group on coarse/no-hover devices; hover desktops never
   get it. Class-driven (not width-driven) so it works on tablets of any width. ---- */
.feat-tabs,.feat-stage{display:none}
.feat-group.feat-tabbed{grid-template-columns:1fr;gap:18px}
.feat-group.feat-tabbed .feat-head{position:static}
.feat-group.feat-tabbed .feat-motion{display:none}
.feat-group.feat-tabbed .feat-tabs{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}
.feat-tab{
  width:34px;height:34px;border-radius:50%;
  border:1.5px solid var(--hair-strong);background:transparent;
  font-family:var(--font-serif);font-style:italic;font-size:13px;color:var(--ink-3);
  cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:color .2s var(--ease),border-color .2s var(--ease),background .2s var(--ease)}
.feat-tab.is-active{color:var(--paper);background:var(--green);border-color:var(--green)}
.feat-group.feat-tabbed .feat-list{margin-top:16px}
.feat-group.feat-tabbed .feat-item{display:none;border-top:0;padding:0}
.feat-group.feat-tabbed .feat-item.is-tab-active{display:block}
.feat-group.feat-tabbed .feat-item:hover{padding-left:0}
.feat-group.feat-tabbed .feat-stage{
  display:block;position:relative;width:100%;aspect-ratio:16/10;margin-top:18px;
  border-radius:16px;overflow:hidden;
  background:var(--surface);border:1px solid var(--hair);
  box-shadow:0 24px 50px -34px rgba(0,0,0,.35)}
.feat-stage iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:none;background:var(--surface)}
.feat-stage iframe.is-live{display:block}

@media (max-width:820px){
  /* no-JS / fallback layout for narrow screens */
  .feat-group{grid-template-columns:1fr;gap:26px;padding:44px 0}
  .feat-head{position:static}
  .feat-motion{display:none}
}

/* ============================================================
   GET WOVEN - number tabs -> title + content / CTA panel
   ============================================================ */
.getwoven{background:linear-gradient(180deg,var(--paper),var(--surface))}

/* step title + number tabs on one row (tabs sit to the right of the title) */
.gw-panel-head{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:clamp(14px,2vh,22px)}
.gw-panel-head .gw-panel-title{margin-bottom:0}

/* number tabs - small circles */
.gw-tabs{display:flex;gap:9px;flex:0 0 auto}
.gw-tab{
  width:34px;height:34px;border-radius:50%;
  border:1.5px solid var(--hair-strong);background:transparent;
  font-family:var(--font-serif);font-style:italic;font-size:14px;color:var(--ink-3);
  cursor:pointer;transition:color .2s var(--ease),border-color .2s var(--ease),background .2s var(--ease),transform .2s var(--ease)}
.gw-tab:hover{color:var(--ink);border-color:var(--green);transform:translateY(-2px)}
.gw-tab.is-active{color:var(--paper);background:var(--green);border-color:var(--green)}

/* panel */
.gw-panel{margin-top:clamp(34px,5vh,56px)}
.gw-panel-title{font-size:clamp(34px,5vw,64px);line-height:1;margin-bottom:clamp(12px,1.6vh,18px)}
/* body: description + motion on the left, Get Woven CTA top-right (under the tabs) */
.gw-panel-body{display:flex;gap:clamp(32px,5vw,64px);align-items:flex-start;justify-content:space-between}
.gw-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:clamp(18px,2.6vh,26px)}
.gw-slides{max-width:60ch}

/* motion stage: capped so the whole hyperframe is visible without scrolling */
.gw-stage{
  position:relative;width:100%;max-width:760px;aspect-ratio:16/10;
  border-radius:16px;overflow:hidden;
  background:var(--surface);border:1px solid var(--hair);
  box-shadow:0 30px 60px -34px rgba(0,0,0,.4);
}
.gw-stage iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:none;background:var(--surface)}
.gw-stage iframe.is-live{display:block}
.gw-slide{display:none}
.gw-slide.is-active{display:block}
.gw-slide p{font-size:clamp(16px,1.4vw,20px);line-height:1.6;color:var(--ink-2)}
.gw-slide .gw-code{margin-top:clamp(20px,3vh,28px)}
.gw-code{font-family:var(--font-mono);font-size:14px;line-height:1.9;color:var(--paper);
  background:var(--ink);border-radius:12px;padding:22px 24px;overflow-x:auto;box-shadow:0 24px 50px -30px rgba(0,0,0,.5)}
.gw-code .pr{color:var(--green)}
.gw-code .cm{color:#8a8b90}
.gw-code .ok{color:var(--yellow)}

/* persistent Get Woven CTA - top-right, right-aligned so its edge lines up
   with the number tabs directly above it */
.gw-cta-block{flex:0 0 auto;display:flex;flex-direction:column;gap:12px;align-items:flex-end;text-align:right}
.gw-cta-block .note{font-size:13.5px;color:var(--ink-3);max-width:30ch}

@media (max-width:760px){
  .gw-panel-body{flex-direction:column;gap:24px}
  .gw-cta-block{align-items:flex-start;text-align:left}
  .gw-tab{width:46px;height:46px;font-size:17px}
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-foot{background:var(--ink);border-top:1px solid var(--ink);padding:44px 0 60px}
.site-foot .wrap{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:14px}
.site-foot .avatar{width:46px;height:46px;border-radius:50%;object-fit:cover;display:block;box-shadow:0 0 0 1px rgba(255,255,255,.14),0 6px 18px rgba(0,0,0,.35);transition:transform .25s var(--ease),box-shadow .25s var(--ease)}
.site-foot .avatar:hover{transform:translateY(-2px) scale(1.04);box-shadow:0 0 0 1px rgba(143,224,196,.5),0 8px 22px rgba(0,0,0,.4)}
.site-foot .fine{font-size:13.5px;color:#fff}
.site-foot .fine a{color:#8FE0C4;text-decoration:none;transition:opacity .2s var(--ease)}
.site-foot .fine a:hover{opacity:.7}

/* ============================================================
   SCROLL CUE
   ============================================================ */
.scroll-cue{position:absolute;left:clamp(20px,5vw,56px);bottom:clamp(24px,4vh,40px);z-index:2;
  display:flex;align-items:center;gap:11px;font-size:13px;color:var(--ink-3)}
.scroll-cue .line{width:40px;height:1px;background:var(--hair-strong);position:relative;overflow:hidden}
.scroll-cue .line::after{content:"";position:absolute;inset:0;background:var(--green);animation:cue 2.6s var(--ease) infinite}
@keyframes cue{0%{transform:translateX(-100%)}55%,100%{transform:translateX(100%)}}
@media (max-width:900px){.scroll-cue{display:none}}
@media (prefers-reduced-motion:reduce){.scroll-cue .line::after{animation:none}}
