/* Finishing layer (13/11): one grid edge, one heading scale, one motion family.
   Loaded last; every rule refines an existing one, nothing here adds content. */
:root{
  --pl-out:cubic-bezier(.23,1,.32,1);
  --pl-in-out:cubic-bezier(.77,0,.175,1);
  --pl-press:160ms;--pl-quick:220ms;--pl-base:480ms;--pl-slow:950ms;
  --pl-ink:#eef2ea;--pl-ink-2:#b8c7b4;--pl-ink-3:#9fb09c;--pl-gold:#e4cb9d;
  --pl-edge:max(5.5%,calc((100% - 1360px) / 2));
  --pl-h2:clamp(2.125rem,1.2rem + 2vw,3.25rem);
  --pl-h2-serif:clamp(2.5rem,1.45rem + 2.3vw,3.75rem);
  --pl-h2-sub:clamp(1.875rem,1.15rem + 1.5vw,2.75rem);
  color-scheme:dark;
}
html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
::selection{background:#e4cb9d47;color:#fff}
body[data-current] :is(a,button,summary,label){-webkit-tap-highlight-color:transparent}

/* ---------- Typography ---------- */
body[data-current] h2{text-wrap:balance}
body[data-current] :is(section,footer) p{text-wrap:pretty}
/* No italic serif anywhere: accents stay roman, in the one serif. */
body[data-current] h2 em{font-style:normal}
body[data-current] .features h2 em{font-family:"Instrument Serif",Georgia,serif;font-weight:400;letter-spacing:-.01em}

/* The hero sentence is the page's h1; it keeps the look it had as a paragraph. */
body[data-current] h1.hero-purpose{font:400 clamp(17px,1.55vw,25px)/1.25 Overused,sans-serif;letter-spacing:-.02em}

/* Display bookends keep their size; the opening one loses its crushed tracking. */
body[data-current] .journey-intro h2{letter-spacing:-.04em}

/* Chapter headings: one sans size, one serif size (optically matched), one sub size. */
body[data-current] :is(.assistant-heading,.real-app-heading) h2,
body[data-current] .k-ending.k-faq h2{font-size:var(--pl-h2);line-height:1.06;letter-spacing:-.042em}
body[data-current] :is(.selected-sheet-heading,.agenda-copy) h2,
body[data-current] .k-how h2{font-size:var(--pl-h2-serif);line-height:1.03;letter-spacing:-.012em}
body[data-current] :is(.source-intro,.product-veil .feature-heading) h2,
body[data-current] #section-title{font-size:var(--pl-h2-sub);line-height:1.1;letter-spacing:-.036em}
body[data-current] :is(.real-app-heading,.k-faq) h2 em{letter-spacing:-.01em}

/* Kickers: one voice. */
body[data-current] :is(.section-index,.natural-kicker,.selected-sheet-heading .eyebrow,.chapter-step){
  font-size:12px;line-height:1.4;font-weight:500;letter-spacing:.02em;text-transform:none;color:var(--pl-ink-2)}

/* Leads: one size, one leading, one secondary colour, a readable measure. */
body[data-current] :is(.journey-intro,.section-copy,.source-intro,.feature-heading,.assistant-heading,.agenda-copy,.real-app-heading)>p{
  font-size:15px;line-height:1.65;letter-spacing:0;color:var(--pl-ink-2);max-width:46ch}
body[data-current] .selected-sheet-heading>div p{font-size:14px;line-height:1.55;color:var(--pl-ink-3)}

/* The cockpit's "back to top" footer line sat mid-page; geometry is kept for the camera. */
body[data-current] .cockpit .section-bottom{visibility:hidden}

/* ---------- One grid edge (desktop) ---------- */
@media (min-width:901px){
  body[data-current] header.k-nav{padding-inline:var(--pl-edge)}
  body[data-current] h1.hero-purpose{left:var(--pl-edge)}
  body[data-current].a .copy{left:var(--pl-edge);right:var(--pl-edge);bottom:9%}
  body[data-current].a .copy .support{margin-left:auto}
  body[data-current].a .copy .actions{justify-content:flex-end}
  body[data-current] .journey-intro,
  body[data-current] .source-bridge.source-scene{max-width:none;margin-inline:0;padding-inline:var(--pl-edge)}
  body[data-current] :is(.product-study.cockpit,.relay-veil.product-veil,.selected-sheet,.assistant-section,.agenda-scene,.real-app-story){padding-inline:var(--pl-edge)}
  body[data-current] .real-app-heading{max-width:none;margin-inline:0}
  body[data-current] :is(.k-how-wrap,.k-closing-wrap){margin-inline:var(--pl-edge)}
}

/* ---------- Short screens: the hero follows the viewport height (14/11) ----------
   The 3D canvas already fills the viewport and scales with it; the hero block stayed 798 / 778 px, so at
   800 px of height or less its sentence and buttons fell under the fold. Only below 900 px (desktop) and 844 px
   (phone) of height: 1440×900 and taller, 390×844 and taller keep the exact same layout. Floored so nothing climbs onto the product card.
   Desktop: the scene shrinks with the height but the card and the sentence keep their size, so the block loses
   less than the viewport (13/15 of it: the sentence keeps its ~25 px under the blade) and the card group rises
   by a fifth of the lost height (36 px at most, clear of the nav) to keep air above the ball. */
@media (min-width:701px) and (max-height:899px){
  body[data-current].a main{height:max(340px,calc(86.667vh + 18px));height:max(340px,calc(86.667svh + 18px))}
  body[data-current].a .hero-process{transform:translateY(calc(-142px - min(36px,(900px - 100vh) * .2)));transform:translateY(calc(-142px - min(36px,(900px - 100svh) * .2)))}
}
@media (max-width:700px){
  body[data-current].a main{height:clamp(400px,calc(100vh - 66px),778px);height:clamp(400px,calc(100svh - 66px),778px)}
}
/* On a shorter phone the sentence keeps its distance above the buttons instead of 17 % of a shorter block. */
@media (max-width:700px) and (max-height:843px){body[data-current] h1.hero-purpose{bottom:132px}}

/* Smallest phones: the hero card keeps a gutter and the nav keeps air between its items. */
@media (max-width:380px){
  body[data-current].a .hero-process .product-stack{left:16px;right:16px;width:auto}
  body[data-current] .k-nav-start{gap:0;padding-inline:13px}
  body[data-current] .k-nav-start>span{display:none}
}
@media (max-width:350px){body[data-current] .k-nav .brand{zoom:.86}}

/* ---------- Micro-interactions ---------- */
body[data-current] :is(.primary,.secondary,.k-nav-start,.k-closing-button,.k-invite-demo){
  transition:background-color var(--pl-quick) var(--pl-out),border-color var(--pl-quick) var(--pl-out),box-shadow var(--pl-quick) var(--pl-out),scale var(--pl-press) var(--pl-out)}
body[data-current] :is(.primary,.secondary,.k-nav-start,.k-closing-button)>span{display:inline-block;transition:translate var(--pl-quick) var(--pl-out)}
body[data-current] :is(.primary,.secondary,.k-nav-start,.k-closing-button,.k-invite-demo):active{scale:.97}
@media (hover:hover) and (pointer:fine){
  body[data-current] :is(.primary,.k-nav-start,.k-closing-button):hover{background-color:#f0f5e9;box-shadow:0 0 0 1px #ffffff26,0 10px 24px -14px #e4cb9d80}
  body[data-current] :is(.primary,.k-nav-start,.k-closing-button):hover>span{translate:2px -2px}
  body[data-current] .secondary:hover{border-color:#ffffff38;background-color:#e5efdc1f}
  body[data-current] .secondary:hover>span{translate:0 2px}
  body[data-current] .k-invite-demo:hover{background-color:#22362a;border-color:#d8e8cc70}
}

/* Text links: an underline that draws from the left, never a colour jump to green. */
body[data-current] :is(.k-nav-links a,.k-foot-cols a){position:relative;transition:color var(--pl-quick) var(--pl-out)}
body[data-current] :is(.k-nav-links a,.k-foot-cols a)::after{content:"";position:absolute;left:0;right:0;bottom:var(--pl-ul,8px);height:1px;background:currentColor;opacity:.7;
  transform:scaleX(0);transform-origin:right;transition:transform var(--pl-base) var(--pl-out)}
body[data-current] .k-foot-cols a{--pl-ul:3px}
body[data-current] .k-nav-links a:is(:hover,[aria-current="true"]),body[data-current] .k-foot-cols a:hover{color:#fff}
body[data-current] .k-nav-links a:is(:hover,[aria-current="true"])::after,body[data-current] .k-foot-cols a:hover::after{transform:scaleX(1);transform-origin:left}
body[data-current] .k-footer a:hover{text-decoration:none}
@media (max-width:760px){body[data-current] .k-nav-links a::after{content:none}}

/* Focus: one gold ring everywhere (the lime variants are gone). */
html body[data-current] :is(a,button,summary,input,select,textarea,video,[tabindex]):focus-visible{outline:2px solid var(--pl-gold);outline-offset:4px}

/* ---------- Navigation: transparent over the hero, glass once the page moves ---------- */
body[data-current] header.k-nav{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;transition:border-color var(--pl-base) var(--pl-out)}
body[data-current] header.k-nav::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(170deg,#1c3626cc,#07170feb);backdrop-filter:blur(18px) saturate(1.28);-webkit-backdrop-filter:blur(18px) saturate(1.28);box-shadow:0 2px 20px #0002;
  transition:opacity var(--pl-base) var(--pl-out)}
html.pl-top body[data-current] header.k-nav:not(.is-open){border-bottom-color:transparent}
html.pl-top body[data-current] header.k-nav:not(.is-open)::before{opacity:0}

/* ---------- Matter: a marked film grain over the whole page (Ben, labo 13/11, option B) ----------
   One fixed layer, plain opacity, no blend mode: the compositor stacks it, nothing repaints. */
body[data-current]::after{content:"";position:fixed;inset:0;z-index:190;pointer-events:none;opacity:.08;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0/180px}

/* ---------- Motion: masked line reveals for headings, a short rise for what follows ---------- */
.pl-w{display:inline-block;clip-path:polygon(-.25em -.35em,calc(100% + .25em) -.35em,calc(100% + .25em) calc(100% + .24em),-.25em calc(100% + .24em))}
.pl-wi{display:inline-block;transition:translate var(--pl-slow) var(--pl-out) calc(var(--pl-l,0) * 85ms + var(--pl-d0,60ms))}
.pl-split:not(.pl-shown) .pl-wi{translate:0 135%;transition:none}
.pl-sat{transition:opacity 800ms var(--pl-out) var(--pl-d,0ms),translate 900ms var(--pl-out) var(--pl-d,0ms)}
.pl-sat:not(.pl-shown){opacity:0;translate:0 14px;transition:none}

/* ---------- First load: the scene and the hero arrive in one order ---------- */
#gl{transition:opacity 1.1s var(--pl-out)}
html:not(.gl-on):not(.no-gl) #gl{opacity:0}
html.pl-pre:not(.pl-go) :is(header.k-nav,.hero-process,h1.hero-purpose,.a .copy .actions>*){opacity:0}
html.pl-pre:not(.pl-go) .a .copy .actions>*{translate:0 12px}
html.pl-pre body[data-current] header.k-nav{transition:opacity 700ms var(--pl-out),border-color var(--pl-base) var(--pl-out)}
html.pl-pre .hero-process{transition:opacity 900ms var(--pl-out) 120ms}
html.pl-pre .a .copy .actions>*{transition:opacity 700ms var(--pl-out) var(--pl-d,420ms),translate 800ms var(--pl-out) var(--pl-d,420ms)}
html.pl-pre .a .copy .actions>*+*{--pl-d:490ms}
html.pl-pre h1.hero-purpose{--pl-d0:200ms}

@media (prefers-reduced-motion:reduce){
  .pl-wi,.pl-sat,#gl{transition:none!important}
  .pl-split:not(.pl-shown) .pl-wi,.pl-sat:not(.pl-shown){translate:none;opacity:1}
  body[data-current] :is(.primary,.secondary,.k-nav-start,.k-closing-button,.k-invite-demo):active{scale:1}
}

/* ---------- Safari / WebKit (16/11) ----------
   WebKit's text-wrap:pretty evens out every line; in a box as wide as its longest line (the panorama's "The right tools /
   for each step.", set by hand with <br>) it then breaks each line again: 4 lines instead of 2. Lines set by hand wrap plainly. */
body[data-current] .selected-sheet-heading>div p{text-wrap:wrap}

/* ---------- Touch targets (16/11): at least 44 × 44 px on touch screens, the drawing unchanged ----------
   An invisible ::before (free on each of these) grows the hit area around the control, centred; the language link stops
   at the gap before "Get started" (9 px at the narrowest) and the one before "Log in" (19 px). The menu's rows gain a pixel
   above and below. Footer links (30 px apart) and links inside a sentence keep their size: 44 px there means new spacing. */
@media (any-pointer:coarse){
  body[data-current] :is(header.k-nav .brand,.k-nav-actions .page-language,.k-nav-start,.k-nav-toggle,.dk-tab,.a .copy .actions>*,.demo-offer,.demo-action,.real-app-film figcaption a,.k-closing-button,.k-invite-demo,.k-foot-up){position:relative}
  body[data-current] :is(header.k-nav .brand,.k-nav-actions .page-language,.k-nav-start,.k-nav-toggle,.dk-tab,.a .copy .actions>*,.demo-offer,.demo-action,.real-app-film figcaption a,.k-closing-button,.k-invite-demo,.k-foot-up)::before{
    content:"";position:absolute;inset:min(0px,calc(50% - 22px)) min(0px,calc(50% - 22px))}
  body[data-current] header.k-nav .k-nav-actions .page-language::before{left:-19px;right:-9px}
}
/* The card leaving the hero stack (opacity 0, 12 px higher) no longer catches the taps meant for the tabs above it. */
body[data-current] .deck .dk-card.is-out{pointer-events:none}
@media (max-width:760px){body[data-current] .k-nav.is-open .k-nav-links a{padding-block:13px}}

/* ---------- Small labels over the light (16/11) ----------
   When the light passes behind the top of the hero, the 12-13 px labels there dropped to 2.7-3.9:1. A soft dark halo,
   invisible on the dark green, keeps them readable over the light. */
body[data-current] :is(.k-nav-login,.k-nav-actions .page-language,.k-nav-links a,.horizontal-path span,.dk-tab:not(.is-on)){text-shadow:0 0 12px #06120cb3,0 1px 2px #06120c8c}
