/*
 * Base layer of the landing page (D60): tokens, type, layout, glass, buttons,
 * header, menu, reveal and reduced motion. Layout and motion follow the Space
 * reference (docs/design/reference-sites.md). Colour is monochrome (D37); glass
 * is used on cards too (Kai, 2026-10-15).
 */

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/google-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Google Sans Code";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/google-sans-code-latin.woff2") format("woff2");
}

:root {
  --bg: 247 248 250;
  --fg: 14 15 18;
  --muted: 104 109 120;
  --soft: 238 240 243;
  --line: 14 15 18;
  --font: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Google Sans Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-ui: cubic-bezier(0.22, 0.68, 0.35, 1);
  --shadow-ink: 15 17 22;
  --gutter: 20px;
  --header-h: 80px;
}
@media (min-width: 640px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: rgb(var(--bg));
  color: rgb(var(--fg));
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: rgb(var(--fg) / 0.88); color: rgb(var(--bg)); }
img, svg, canvas { display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; margin: -1px; padding: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 999px; background: rgb(var(--fg)); color: rgb(var(--bg));
}
.skip-link:focus { left: 16px; }
.focus-ring:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid rgb(var(--fg));
  outline-offset: 2px;
}

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: 64px 0; scroll-margin-top: 96px; }
@media (min-width: 640px) { .section { padding: 96px 0; } }
main, .site-footer { position: relative; z-index: 1; }

/* ---------- type ---------- */
.display {
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.display > span, .hero-title > span { display: block; }
.tone-1 { font-weight: 500; color: rgb(var(--fg)); }
.tone-2 { font-weight: 400; color: rgb(var(--muted)); }
.section-title {
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 500;
  text-wrap: balance;
}
.lead {
  margin-top: 20px;
  max-width: 30rem;
  font-size: 16px;
  line-height: 1.625;
  color: rgb(var(--muted));
  text-wrap: pretty;
}
@media (min-width: 640px) { .lead { font-size: 17px; } }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.center .lead { margin-left: auto; margin-right: auto; }
.eyebrow { font-size: 14px; color: rgb(var(--muted)); }
.mono { font-family: var(--mono); }

/* ---------- glass tiers (cards use glass too) ---------- */
.glass, .glass-strong, .glass-control {
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
.glass {
  --blur: blur(28px) saturate(1.4);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.76), rgb(255 255 255 / 0.58));
  border: 1px solid rgb(var(--shadow-ink) / 0.08);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.95), 0 24px 60px -28px rgb(var(--shadow-ink) / 0.28), 0 2px 4px rgb(var(--shadow-ink) / 0.04);
}
.glass-strong {
  --blur: blur(32px) saturate(1.5);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.9), rgb(255 255 255 / 0.78));
  border: 1px solid rgb(var(--shadow-ink) / 0.1);
  box-shadow: inset 0 1px 0 #fff, 0 32px 80px -32px rgb(var(--shadow-ink) / 0.4), 0 2px 6px rgb(var(--shadow-ink) / 0.06);
}
.glass-control {
  --blur: blur(20px) saturate(1.3);
  background: rgb(255 255 255 / 0.66);
  border: 1px solid rgb(var(--shadow-ink) / 0.09);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.9), 0 1px 2px rgb(var(--shadow-ink) / 0.05);
  transition: background-color .2s ease, border-color .2s ease;
}
.glass-control:hover { background: rgb(255 255 255 / 0.9); border-color: rgb(var(--shadow-ink) / 0.14); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 28px; border-radius: 999px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: opacity .2s ease, transform .5s var(--ease);
}
.btn-ink {
  background: rgb(var(--fg)); color: rgb(var(--bg));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.16), 0 8px 20px -10px rgb(var(--shadow-ink) / 0.5);
}
.btn-ink:hover { opacity: .86; }
.btn-sm { height: 40px; padding: 0 16px; }
.btn-md { height: 44px; padding: 0 24px; }
.btn-block { width: 100%; }
.arrow { width: 16px; height: 16px; transition: transform .3s ease; }
.group:hover .arrow { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  opacity: 0; transform: translateY(-16px);
  transition: opacity .6s var(--ease) .3s, transform .6s var(--ease) .3s;
}
.is-ready .site-header { opacity: 1; transform: none; }
.site-header::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 112px; pointer-events: none;
  -webkit-backdrop-filter: blur(20px) saturate(1.08); backdrop-filter: blur(20px) saturate(1.08);
  background: rgb(255 255 255 / 0.001);
  -webkit-mask-image: linear-gradient(180deg, #000 0, rgb(0 0 0 / .92) 38%, transparent);
  mask-image: linear-gradient(180deg, #000 0, rgb(0 0 0 / .92) 38%, transparent);
}
.header-row {
  position: relative; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter);
}
.logo {
  display: inline-flex; align-items: center; height: 52px; padding: 0 12px;
  border-radius: 999px; gap: 0; overflow: hidden; max-width: 52px;
  transition: max-width .45s var(--ease), gap .45s var(--ease);
}
.logo:hover, .logo:focus-visible { max-width: 260px; gap: 10px; }
.logo-mark { width: 26px; height: 26px; flex: none; object-fit: contain; transition: transform .5s var(--ease); }
.logo:hover .logo-mark { transform: scale(1.08); }
.logo-word { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; opacity: 0; transform: translateX(-12px); transition: opacity .35s ease, transform .45s var(--ease); }
.logo:hover .logo-word, .logo:focus-visible .logo-word { opacity: 1; transform: none; }
.header-cta { display: none; }
@media (min-width: 640px) { .header-cta { display: inline-flex; } }

/* ---------- menu ---------- */
.menu {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 108px; border-radius: 26px; overflow: hidden;
  transition: width .45s var(--ease), box-shadow .35s ease, background-color .35s ease;
}
.menu[data-open] { width: min(520px, calc(100vw - 32px)); box-shadow: 0 30px 70px -24px rgb(0 0 0 / .25); background: rgb(255 255 255 / .92); }
.menu-toggle { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; font-size: 14px; font-weight: 500; }
.burger { position: relative; width: 15px; height: 10px; }
.burger i { position: absolute; left: 0; width: 15px; height: 1.6px; border-radius: 2px; background: currentColor; transition: transform .4s var(--ease), top .4s var(--ease); }
.burger i:first-child { top: 1px; }
.burger i:last-child { top: 7px; }
.menu[data-open] .burger i:first-child { top: 4px; transform: rotate(45deg); }
.menu[data-open] .burger i:last-child { top: 4px; transform: rotate(-45deg); }
.menu-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.menu[data-open] .menu-panel { grid-template-rows: 1fr; }
.menu-inner { min-height: 0; overflow: hidden; }
.menu-links { padding: 4px 28px 28px; display: grid; gap: 6px; }
.menu-links a {
  font-size: 24px; font-weight: 500; letter-spacing: -0.025em; padding: 4px 0;
  opacity: 0; transform: translateY(18px);
  transition: opacity .45s ease, transform .5s var(--ease), color .2s ease;
}
.menu-links a:hover { color: rgb(var(--fg) / .55); }
.menu[data-open] .menu-links a { opacity: 1; transform: none; transition-delay: calc(.14s + var(--i) * .045s); }
.menu-foot { padding: 0 28px 24px; }
.menu-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgb(var(--muted)); padding: 0 28px 8px; }

/* ---------- reveal ---------- */
.in-view { opacity: 0; transform: translate3d(0, 20px, 0); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.in-view[data-entered] { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 20px, 0); } to { opacity: 1; transform: none; } }
.rise { animation: rise 1.1s var(--ease) both; }
.no-js .in-view { opacity: 1; transform: none; }

/* ---------- background field ---------- */
.field { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.field canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; animation: fade-in 1.8s var(--ease) .15s forwards; }
@keyframes fade-in { to { opacity: 1; } }
.grain {
  position: absolute; inset: 0; opacity: .06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><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 1 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .rise { animation: none; }
}
