/* Geist and Geist Mono, SIL Open Font License. Self-hosted, Latin subset. */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 300 600; font-display: swap; src: url(../fonts/geist-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(../fonts/geist-mono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Yapi Store theme — foundation: fonts, colour tokens, navigation, buttons, motion.
   Hand-written CSS, no framework. Light and dark follow the device, except on pages
   marked .light-only (cart, checkout, account). */

:root {
  color-scheme: light dark;

  --bg: #f5f5f3;
  --surface: #fcfcfb;
  --raised: #ffffff;
  --ink: #151513;
  --ink-hover: #2b2b28;
  --on-ink: #fbfaf8;
  --ink-2: #56544f;
  --ink-3: #6d6b65;
  --line: rgba(21, 21, 19, 0.1);
  --line-soft: rgba(21, 21, 19, 0.06);
  --shell: rgba(21, 21, 19, 0.035);
  --tint: rgba(21, 21, 19, 0.065);
  --glass: rgba(252, 252, 251, 0.72);
  --veil: rgba(245, 245, 243, 0.9);
  --hi: rgba(255, 255, 255, 0.8);
  --glow-a: rgba(221, 217, 209, 0.55);
  --glow-b: rgba(209, 215, 218, 0.5);
  --shadow: rgba(40, 40, 38, 0.4);
  --ghost: rgba(21, 21, 19, 0.075);
  --stroke: rgba(21, 21, 19, 0.38);
  --ok: #3f7d4e;
  --warn: #9a5b13;
  --accent: var(--ink);
  --accent-hover: var(--ink-hover);
  --on-accent: var(--on-ink);
  --grain-opacity: 0.055;
  --grain-blend: multiply;
  --grain-filter: none;
  --logo-filter: none;

  --sans: "Geist", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --pad: clamp(20px, 5vw, 56px);
  --max: 1280px;
  --section: clamp(96px, 13vw, 184px);
  --r-shell: 28px;
  --r-core: 22px;
  --r-btn: 14px;

  --z-content: 1;
  --z-bar: 20;
  --z-menu: 30;
  --z-nav: 40;
  --z-grain: 50;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light-only) {
    --bg: #0d0d0c;
    --surface: #161614;
    --raised: #1d1d1b;
    --ink: #f1efe9;
    --ink-hover: #ffffff;
    --on-ink: #121211;
    --ink-2: #a9a69e;
    --ink-3: #8d8a82;
    --line: rgba(241, 239, 233, 0.13);
    --line-soft: rgba(241, 239, 233, 0.07);
    --shell: rgba(241, 239, 233, 0.04);
    --tint: rgba(241, 239, 233, 0.09);
    --glass: rgba(24, 24, 22, 0.68);
    --veil: rgba(13, 13, 12, 0.9);
    --hi: rgba(255, 255, 255, 0.06);
    --glow-a: rgba(150, 112, 62, 0.2);
    --glow-b: rgba(84, 98, 78, 0.2);
    --shadow: rgba(0, 0, 0, 0.75);
    --ghost: rgba(241, 239, 233, 0.06);
    --stroke: rgba(241, 239, 233, 0.42);
    --ok: #74b584;
    --warn: #d9a45a;
    --grain-opacity: 0.07;
    --grain-blend: screen;
    --grain-filter: invert(1);
    --logo-filter: invert(1);
  }
}

:root.light-only { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--on-ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }

.skip { position: fixed; top: 12px; left: 12px; z-index: 60; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--on-ink); transform: translateY(-160%); transition: transform 0.5s var(--ease); }
.skip:focus { transform: none; }
.sr-only, .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
main, footer { position: relative; z-index: var(--z-content); }

/* ── Atmosphere: slow ambient light and a fixed film grain ─────────────── */
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ambient i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; background: radial-gradient(closest-side, var(--glow-a), transparent); }
.ambient i:nth-child(1) { top: -30vmax; right: -22vmax; animation: drift-a 38s var(--ease) infinite alternate; }
.ambient i:nth-child(2) { bottom: -38vmax; left: -26vmax; background: radial-gradient(closest-side, var(--glow-b), transparent); animation: drift-b 46s var(--ease) infinite alternate; }
@keyframes drift-a { to { transform: translate3d(-9vmax, 7vmax, 0) scale(1.12); } }
@keyframes drift-b { to { transform: translate3d(10vmax, -6vmax, 0) scale(0.92); } }

.grain {
  position: fixed; inset: 0; z-index: var(--z-grain); pointer-events: none;
  opacity: var(--grain-opacity); mix-blend-mode: var(--grain-blend); filter: var(--grain-filter);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .75 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ── Floating island navigation ────────────────────────────────────────── */
.island { position: fixed; top: 16px; left: 0; right: 0; z-index: var(--z-nav); display: flex; justify-content: center; padding-inline: 16px; pointer-events: none; }
.island__bar {
  pointer-events: auto; position: relative; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; border-radius: 999px; overflow: hidden;
  background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: 0 0 0 1px var(--line-soft), inset 0 1px 0 var(--hi), 0 20px 44px -26px var(--shadow);
}
.brand { display: flex; align-items: center; gap: 9px; margin-right: 14px; font-weight: 500; letter-spacing: 0.03em; white-space: nowrap; }
.brand img { width: 26px; height: 26px; border-radius: 7px; filter: var(--logo-filter); }
.brand small { font-size: inherit; color: var(--ink-3); letter-spacing: 0; }
.island__links { display: flex; gap: 2px; }
.island__links a { display: block; padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-2); white-space: nowrap; transition: color 0.5s var(--ease), background-color 0.5s var(--ease); }
.island__links a:hover { color: var(--ink); }
.island__links a[aria-current] { color: var(--ink); background: var(--tint); }
.island__progress { position: absolute; left: 20px; right: 20px; bottom: 0; height: 1.5px; background: var(--ink); opacity: 0.5; transform: scaleX(0); transform-origin: left; }

.burger { display: none; position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--tint); }
.burger span { position: absolute; left: 11px; right: 11px; top: 50%; height: 1.5px; margin-top: -0.75px; background: var(--ink); transition: transform 0.6s var(--ease); }
.burger span:nth-child(1) { transform: translateY(-3.5px); }
.burger span:nth-child(2) { transform: translateY(3.5px); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: var(--z-menu); display: grid; align-content: center; gap: 4px; padding: 96px var(--pad) 48px;
  background: var(--veil); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px);
  opacity: 0; visibility: hidden; transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
}
.menu.open { opacity: 1; visibility: visible; transition-delay: 0s; }
.menu a { display: block; overflow: hidden; font-size: clamp(40px, 12vw, 76px); font-weight: 500; letter-spacing: -0.045em; line-height: 1.12; }
.menu a span { display: block; transform: translateY(110%); transition: transform 0.9s var(--ease-out); transition-delay: calc(var(--i) * 70ms + 80ms); }
.menu.open a span { transform: none; }
.menu__meta { margin-top: 36px; font: 500 12px/1.5 var(--mono); color: var(--ink-3); }

/* ── Buttons: a button with its own icon tile, echoing the logo's squircle ─ */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 7px 7px 22px; border-radius: var(--r-btn);
  background: var(--accent); color: var(--on-accent); font-size: 15.5px; font-weight: 500; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 16px 30px -18px var(--shadow);
  transition: transform 0.6s var(--ease), background-color 0.6s var(--ease), opacity 0.6s var(--ease);
}
.btn__icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--on-accent) 15%, transparent); transition: transform 0.6s var(--ease), background-color 0.6s var(--ease); }
.btn__icon svg { width: 16px; height: 16px; }
.btn:hover { background: var(--accent-hover); }
.btn:hover .btn__icon { transform: translate(3px, -1px) scale(1.06); background: color-mix(in srgb, var(--on-accent) 24%, transparent); }
.btn:active { transform: scale(0.975); }
.btn--sm { gap: 10px; padding: 4px 4px 4px 15px; border-radius: 999px; font-size: 14px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16); }
.btn--sm .btn__icon { width: 30px; height: 30px; border-radius: 50%; }
.btn--sm .btn__icon svg { width: 13px; height: 13px; }
.btn--light { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 var(--hi); }
.btn--light .btn__icon { background: var(--tint); }
.btn--light:hover { background: var(--raised); }
.btn--light:hover .btn__icon { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.btn--wide { display: flex; width: 100%; padding-block: 9px; }

.textlink { position: relative; display: inline-block; font-weight: 500; }
.textlink::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px; background: currentColor; transform-origin: right; transition: transform 0.7s var(--ease); }
.textlink:hover::after { transform: scaleX(0); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 11px; border-radius: 999px;
  background: var(--glass); box-shadow: 0 0 0 1px var(--line-soft); font: 500 12px/1 var(--mono); letter-spacing: 0.02em; color: var(--ink-2);
}
.dot { position: relative; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.dot--live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ping 2.6s var(--ease-out) infinite; }
@keyframes ping { to { transform: scale(3.4); opacity: 0; } }

/* ── Section scaffolding ───────────────────────────────────────────────── */
.sec { padding-block: var(--section); }
.sec--flush { padding-top: 0; }
.sec__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
.sec__head { grid-column: 1 / 5; align-self: start; position: sticky; top: 120px; }
.sec__body { grid-column: 6 / 13; }
.sec__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px 48px; margin-bottom: clamp(36px, 5vw, 72px); }
.sec__top p { max-width: 34ch; color: var(--ink-2); text-wrap: pretty; }
.label { display: block; margin-bottom: 20px; font: 500 12px/1 var(--mono); color: var(--ink-3); }
.h2 { font-size: clamp(34px, 4.6vw, 64px); font-weight: 500; line-height: 1.02; letter-spacing: -0.04em; text-wrap: balance; }
.sec__note { margin-top: 22px; max-width: 30ch; color: var(--ink-2); text-wrap: pretty; }

/* A machined tray (shell) holding a plate (core) */
.shell { padding: 6px; border-radius: var(--r-shell); background: var(--shell); box-shadow: 0 0 0 1px var(--line-soft); }
.core { position: relative; height: 100%; overflow: hidden; border-radius: var(--r-core); background: var(--surface); box-shadow: inset 0 1px 0 var(--hi), 0 1px 2px rgba(21, 21, 19, 0.05); }

/* Footer basics */
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-block: 24px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.foot__row nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.foot__mark { overflow: hidden; margin-top: clamp(16px, 4vw, 48px); text-align: center; font-size: clamp(120px, 31vw, 500px); font-weight: 300; letter-spacing: 0.02em; line-height: 0.74; color: var(--ghost); user-select: none; white-space: nowrap; }
.foot__mark span { display: block; transform: translateY(8%); }
.foot__mark span::before { content: attr(data-mark); }

/* ── Motion ────────────────────────────────────────────────────────────── */
.js [data-reveal] { opacity: 0; transform: translateY(34px); filter: blur(8px); transition: opacity 1s var(--ease-out), transform 1.15s var(--ease-out), filter 1s var(--ease-out); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].in { opacity: 1; transform: none; filter: none; }
.js [data-load] { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: calc(var(--d, 0) * 110ms + 420ms); }
.js.loaded [data-load] { opacity: 1; transform: none; }
.line { display: block; overflow: hidden; padding: 0 0.1em 0.2em; margin: 0 -0.1em -0.2em; }
.line > span { display: block; }
.js .line > span { transform: translateY(108%); transition: transform 1.25s var(--ease-out); transition-delay: calc(var(--i) * 110ms + 120ms); }
.js.loaded .line > span { transform: none; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @supports (animation-timeline: view()) {
    .island__progress { animation: grow linear both; animation-timeline: scroll(root); }
    .foot__mark span { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    [data-parallax] { animation: parallax linear both; animation-timeline: view(); }
  }
}
@keyframes grow { to { transform: scaleX(1); } }
@keyframes rise { from { transform: translateY(60%); } to { transform: translateY(8%); } }
@keyframes parallax { from { transform: translateY(-6%) scale(1.16); } to { transform: translateY(6%) scale(1.16); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js .line > span, .js [data-load] { opacity: 1; transform: none; filter: none; }
}

/* ── Smaller screens ───────────────────────────────────────────────────── */
@media (max-width: 959px) {
  .sec__head { grid-column: 1 / -1; position: static; margin-bottom: clamp(32px, 6vw, 56px); }
  .sec__body { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .island { justify-content: stretch; }
  .island__bar { width: 100%; justify-content: space-between; padding-left: 14px; }
  .island__links, .island__bar > .btn.nav-cta { display: none; }
  .burger { display: block; }
  .foot__row { flex-direction: column; }
}
