/* ============================================================
   Margaret — Black & White Design System
   Fonts: Fraunces (display) + Inter (UI/body)
   ============================================================ */

/* ----- Tokens ----- */
:root {
  --paper: #ffffff;
  --ink: #0b0b0c;
  --ink-soft: #2b2b2e;
  --muted: #6c6c72;
  --black: #000000;

  --line: #e7e7e7;
  --line-strong: #d6d6d6;
  --surface: #f6f6f6;
  --surface-2: #efefef;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-pill: 999px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);

  --shadow-sm: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
  --shadow-md: 0 10px 40px rgba(0,0,0,.10);
  --shadow-lg: 0 30px 80px rgba(0,0,0,.18);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --header-h: 72px;
}

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
ul { list-style: none; padding: 0; }

::selection { background: var(--ink); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ----- Typography ----- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.015em;
  font-optical-sizing: auto;
}

.display {
  font-size: clamp(2.9rem, 8vw, 6.2rem);
  font-weight: 600;
  line-height: .98;
}
.h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.h3 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  opacity: .5;
}

.lead { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--ink-soft); }
.muted { color: var(--muted); }
em.serif-i { font-family: var(--font-display); font-style: italic; font-weight: 400; }

/* ----- Layout ----- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 10vw, 130px); position: relative; }
.section--tight { padding-block: clamp(48px, 7vw, 90px); }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .h2 { margin-top: 14px; }
.section-head p { margin-top: 18px; }
.center { text-align: center; margin-inline: auto; }

.grid { display: grid; gap: clamp(16px, 2vw, 26px); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ----- Header / Nav ----- */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: flex; align-items: center;
  transition: background .4s var(--ease-soft), border-color .4s, backdrop-filter .4s, height .4s var(--ease-soft);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--line);
  height: 62px;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; }

.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; }
.brand__mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  border-radius: 9px;
  transition: transform .5s var(--ease);
}
.brand__glyph { width: 66%; height: 66%; display: block; }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.05); }
.brand__name { font-size: 1.18rem; letter-spacing: -.01em; }

.nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.nav a { font-size: .96rem; color: var(--ink-soft); position: relative; padding: 6px 0; transition: color .25s; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--ink); transition: width .35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }

.nav__cta { margin-left: 6px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 10px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-strong);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-x { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-x { display: block; }

/* Mobile nav panel */
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0;
  background: var(--paper);
  z-index: 90;
  padding: 28px var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 4px;
  transform: translateY(-12px); opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease-soft), transform .35s var(--ease);
  border-top: 1px solid var(--line);
}
.mobile-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 500;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.mobile-nav a svg { width: 20px; height: 20px; color: var(--muted); }
.mobile-nav .btn { margin-top: 22px; justify-content: center; }
body.nav-open { overflow: hidden; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: .98rem;
  padding: 13px 26px; border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s, box-shadow .3s;
  will-change: transform;
}
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: #000; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--ghost:hover svg.arrow { transform: translateX(4px); }
.btn--sm { padding: 9px 18px; font-size: .9rem; }
.btn--lg { padding: 16px 32px; font-size: 1.05rem; }

/* store badges */
.store-row { display: flex; flex-wrap: wrap; gap: 14px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 10px 20px 10px 18px; border-radius: 14px;
  transition: transform .3s var(--ease), box-shadow .3s, background .3s;
}
.store-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge .sb-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.store-badge .sb-small { font-size: .64rem; letter-spacing: .04em; opacity: .82; text-transform: uppercase; }
.store-badge .sb-big { font-size: 1.12rem; font-weight: 600; }
.store-badge--outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.store-badge--outline:hover { border-color: var(--ink); }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; position: relative;
}
.text-link svg { width: 17px; height: 17px; transition: transform .3s var(--ease); }
.text-link::after { content:""; position:absolute; left:0; bottom:-2px; height:1.5px; width:100%; background:currentColor; transform:scaleX(0); transform-origin:left; transition: transform .35s var(--ease); }
.text-link:hover::after { transform: scaleX(1); }
.text-link:hover svg { transform: translateX(4px); }

/* ----- Hero ----- */
.hero { padding-top: calc(var(--header-h) + clamp(40px, 8vw, 96px)); padding-bottom: clamp(40px, 7vw, 90px); position: relative; }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.hero__title { margin: 18px 0 0; }
.hero__title .word { display: inline-block; }
.hero p.lead { margin-top: 26px; max-width: 30ch; }
.hero__actions { margin-top: 34px; }
.hero__note { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; color: var(--muted); }
.hero__note span { display: inline-flex; align-items: center; gap: 7px; }
.hero__note svg { width: 15px; height: 15px; }

/* ----- Phone mockup ----- */
.device-wrap { display: grid; place-items: center; position: relative; }
.device-wrap::before {
  content: ""; position: absolute; inset: -8% -4%;
  background: radial-gradient(60% 55% at 50% 42%, rgba(0,0,0,.10), transparent 70%);
  z-index: -1;
}
.device {
  width: clamp(248px, 30vw, 320px);
  aspect-ratio: 9 / 19.2;
  background: #0a0a0a;
  border-radius: 46px;
  padding: 13px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #262626;
  animation: floaty 7s var(--ease-soft) infinite;
}
.device__screen {
  width: 100%; height: 100%;
  background: var(--paper);
  border-radius: 34px;
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
}
.device__notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 38%; height: 22px; background: #0a0a0a; border-radius: 0 0 14px 14px; z-index: 3;
}
.scr { padding: 30px 18px 18px; display: flex; flex-direction: column; gap: 14px; height: 100%; }
.scr__top { display: flex; justify-content: space-between; align-items: center; }
.scr__title { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; }
.scr__avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); }
.scr__hero { height: 116px; border-radius: 16px; background: linear-gradient(135deg,#111,#444); position: relative; overflow: hidden; }
.scr__hero::after { content:""; position:absolute; inset:0; background: repeating-linear-gradient(115deg, transparent 0 18px, rgba(255,255,255,.06) 18px 19px); }
.scr__row { display: flex; align-items: center; gap: 12px; }
.scr__dot { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); flex: none; }
.scr__lines { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.scr__line { height: 8px; border-radius: 5px; background: var(--surface-2); }
.scr__line.w-60 { width: 60%; } .scr__line.w-40 { width: 40%; } .scr__line.w-80 { width: 80%; }
.scr__bar { margin-top: auto; height: 52px; border-radius: 16px; background: var(--ink); display:flex; align-items:center; justify-content:center; }
.scr__bar span { color: var(--paper); font-size: .8rem; font-weight: 600; letter-spacing: .02em; }

/* ----- Marquee ----- */
.marquee {
  border-block: 1px solid var(--line);
  padding-block: 22px; overflow: hidden; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: inline-flex; gap: 0; animation: marquee 26s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: var(--font-display); font-size: clamp(1.3rem, 2.6vw, 2.1rem); font-weight: 500;
  padding-inline: 30px; display: inline-flex; align-items: center; gap: 60px;
}
.marquee__track span::after { content: "✦"; font-size: .6em; color: var(--muted); }

/* ----- Feature cards ----- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 30px;
  transition: transform .4s var(--ease), box-shadow .4s, border-color .4s;
  height: 100%;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; margin-bottom: 22px;
  transition: transform .5s var(--ease);
}
.card:hover .card__icon { transform: rotate(-6deg) scale(1.06); }
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .98rem; }

/* ----- Steps ----- */
.steps { counter-reset: step; }
.step { display: flex; gap: 24px; padding: 30px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.step:last-child { border-bottom: 1px solid var(--line); }
.step__num {
  counter-increment: step;
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 600;
  width: 54px; height: 54px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--ink); display: grid; place-items: center;
  transition: background .4s var(--ease), color .4s;
}
.step__num::before { content: counter(step, decimal-leading-zero); }
.step:hover .step__num { background: var(--ink); color: var(--paper); }
.step__body h3 { font-size: 1.35rem; margin-bottom: 6px; }
.step__body p { color: var(--muted); max-width: 56ch; }

/* ----- Dark section ----- */
.section--dark {
  background: var(--ink); color: var(--paper);
  --line: rgba(255,255,255,.16);
  --line-strong: rgba(255,255,255,.3);
  --muted: rgba(255,255,255,.66);
  --ink-soft: rgba(255,255,255,.86);
}
.section--dark .eyebrow { color: rgba(255,255,255,.7); }
.section--dark .card { background: rgba(255,255,255,.04); border-color: var(--line); }
.section--dark .card__icon { background: var(--paper); color: var(--ink); }

/* showcase */
.showcase__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px,5vw,64px); align-items: center; }
.showcase__device .device { animation-delay: -3s; }

/* principles list */
.principles { display: grid; gap: 2px; margin-top: 10px; }
.principle {
  display: flex; align-items: center; gap: 20px;
  padding: 24px 4px; border-bottom: 1px solid var(--line);
  transition: padding-left .4s var(--ease);
}
.principle:hover { padding-left: 16px; }
.principle__k { font-family: var(--font-display); font-size: clamp(1.5rem,3vw,2.3rem); font-weight: 500; flex: none; min-width: 1.6em; opacity: .4; }
.principle__t { font-family: var(--font-display); font-size: clamp(1.4rem,2.6vw,2rem); font-weight: 500; }
.principle__d { color: var(--muted); margin-left: auto; max-width: 34ch; text-align: right; font-size: .96rem; }

/* ----- FAQ (native details) ----- */
.faq { max-width: 820px; }
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 26px 0; font-family: var(--font-display); font-size: clamp(1.15rem,2vw,1.45rem); font-weight: 500;
  transition: color .25s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--black); }
.faq .faq__icon { flex: none; width: 28px; height: 28px; position: relative; }
.faq .faq__icon::before, .faq .faq__icon::after {
  content: ""; position: absolute; background: var(--ink); border-radius: 2px;
  top: 50%; left: 50%; transition: transform .4s var(--ease);
}
.faq .faq__icon::before { width: 16px; height: 2px; transform: translate(-50%,-50%); }
.faq .faq__icon::after { width: 2px; height: 16px; transform: translate(-50%,-50%); }
.faq details[open] .faq__icon::after { transform: translate(-50%,-50%) scaleY(0); }
.faq__answer { overflow: hidden; }
.faq__answer p { padding-bottom: 26px; color: var(--muted); max-width: 70ch; }
.faq details[open] summary { color: var(--black); }

/* ----- CTA banner ----- */
.cta-band { text-align: center; }
.cta-band .display { font-size: clamp(2.4rem, 6vw, 4.6rem); }
.cta-band .store-row { justify-content: center; margin-top: 34px; }
.cta-band p { margin-top: 18px; }

/* ----- Forms ----- */
.form-card {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(26px, 4vw, 44px); background: var(--paper); box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 20px; }
.field label { display: block; font-size: .85rem; font-weight: 600; letter-spacing: .02em; margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-size: 1rem;
  padding: 14px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink);
  transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(0,0,0,.06);
}
.field textarea { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 4px; }

/* contact cards */
.contact-card {
  display: flex; gap: 18px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 26px;
  transition: transform .4s var(--ease), box-shadow .4s, border-color .4s;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.contact-card__icon { width: 48px; height: 48px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; flex: none; border: 1px solid var(--line); }
.contact-card__icon svg { width: 22px; height: 22px; }
.contact-card h3 { font-size: 1.1rem; font-family: var(--font-sans); font-weight: 600; margin-bottom: 4px; letter-spacing: 0; }
.contact-card a, .contact-card address { color: var(--ink-soft); font-style: normal; line-height: 1.5; transition: color .25s; }
.contact-card a:hover { color: var(--ink); }

/* ----- Prose / legal pages ----- */
.page-hero { padding-top: calc(var(--header-h) + clamp(50px, 8vw, 100px)); padding-bottom: clamp(30px,5vw,56px); border-bottom: 1px solid var(--line); }
.page-hero .display { font-size: clamp(2.6rem, 7vw, 5rem); margin-top: 16px; }
.page-hero p { margin-top: 18px; max-width: 60ch; }

.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin-top: 56px; margin-bottom: 16px; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.25rem; margin-top: 32px; margin-bottom: 10px; font-family: var(--font-sans); font-weight: 700; letter-spacing: 0; }
.prose p, .prose li { color: var(--ink-soft); margin-bottom: 14px; }
.prose ul { list-style: none; margin: 0 0 18px; }
.prose ul li { position: relative; padding-left: 26px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .68em; width: 8px; height: 8px; border: 1.5px solid var(--ink); border-radius: 2px; transform: rotate(45deg); }
.prose ol { padding-left: 22px; }
.prose ol li { margin-bottom: 10px; }
.prose a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose strong { color: var(--ink); }
.prose .meta { font-size: .9rem; color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }

.legal-layout { display: grid; grid-template-columns: 240px 1fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: .9rem; }
.toc p { font-weight: 700; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.toc a { display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--line); color: var(--muted); transition: color .25s, border-color .25s; }
.toc a:hover { color: var(--ink); border-color: var(--ink); }

.callout { border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: var(--r-sm); padding: 18px 22px; background: var(--surface); margin: 24px 0; }
.callout p { margin: 0; font-size: .95rem; }

/* ----- Footer ----- */
.site-footer { background: var(--ink); color: var(--paper); padding-top: clamp(56px, 7vw, 90px); --line: rgba(255,255,255,.14); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.footer__brand .brand__mark { background: var(--paper); color: var(--ink); }
.footer__brand p { color: rgba(255,255,255,.6); margin-top: 18px; max-width: 32ch; font-size: .95rem; }
.footer__col h4 { font-family: var(--font-sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); font-weight: 600; margin-bottom: 18px; }
.footer__col a, .footer__col address { display: block; color: rgba(255,255,255,.78); font-style: normal; padding: 6px 0; font-size: .95rem; line-height: 1.5; transition: color .25s; }
.footer__col a:hover { color: var(--paper); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding-block: 28px; font-size: .85rem; color: rgba(255,255,255,.55); }
.footer__bottom .dot { opacity: .4; padding-inline: 8px; }

/* ----- Reveal animations ----- */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal="scale"] { transform: scale(.96); }
[data-reveal="left"] { transform: translateX(-30px); }
[data-reveal="right"] { transform: translateX(30px); }

/* hero on-load animation */
.hero [data-load] { opacity: 0; transform: translateY(20px); animation: rise .9s var(--ease) forwards; animation-delay: var(--ld, .1s); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* keyframes */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes spin404 { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* 404 */
.err-wrap { min-height: 80vh; display: grid; place-items: center; text-align: center; padding-top: var(--header-h); }
.err-code { font-family: var(--font-display); font-size: clamp(7rem, 26vw, 18rem); font-weight: 600; line-height: .9; letter-spacing: -.04em; }
.err-code .zero { display: inline-block; animation: spin404 9s linear infinite; }

/* ----- Responsive ----- */
@media (max-width: 980px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer__brand { grid-column: 1 / -1; }
  .legal-layout { grid-template-columns: 1fr; }
  .toc { position: static; display: none; }
}
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .nav, .nav__cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero__grid { grid-template-columns: 1fr; }
  .device-wrap { order: -1; margin-bottom: 10px; }
  .showcase__grid { grid-template-columns: 1fr; }
  .showcase__device { order: -1; }
  .cols-3, .cols-2 { grid-template-columns: 1fr; }
  .principle__d { display: none; }
  .principle { gap: 14px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .step { gap: 16px; }
}

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero [data-load] { opacity: 1 !important; transform: none !important; }
  .device { animation: none; }
}

/* print */
@media print {
  .site-header, .site-footer, .toc, .nav-toggle { display: none; }
  body { font-size: 12pt; }
}
