/* ==========================================================================
   prod-igy design system · v0.2
   Tokens mirror the Figma file "playground / prod-igy" → Website → design system.
   One blue, a lot of white. Inter for reading, IBM Plex Mono for the meta voice.
   ========================================================================== */

:root {
  /* primitives */
  --blue-50: #EEF1FD;
  --blue-100: #D9DFFA;
  --blue-500: #2A44D6;
  --blue-600: #0021C5;
  --blue-700: #001A9C;
  --blue-900: #000E57;
  --gray-0: #FFFFFF;
  --gray-50: #F7F7F7;
  --gray-100: #EFEFEF;
  --gray-200: #D9D9D9;
  --gray-400: #A3A3A3;
  --gray-500: #737373;
  --gray-700: #404040;
  --gray-900: #0A0A0A;

  /* semantic */
  --bg-page: var(--gray-0);
  --bg-surface: var(--gray-50);
  --bg-subtle: var(--gray-100);
  --bg-accent: var(--blue-600);
  --bg-accent-hover: var(--blue-700);
  --bg-accent-subtle: var(--blue-50);
  --bg-inverse: var(--gray-900);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-500);
  --text-tertiary: var(--gray-400);
  --text-inverse: var(--gray-0);
  --text-accent: var(--blue-600);
  --border-default: var(--gray-200);
  --border-strong: var(--gray-900);
  --border-accent: var(--blue-600);

  /* type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* spacing (4px base) */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --space-24: 96px; --space-32: 128px;

  /* radius */
  --radius-sm: 8px; --radius-md: 16px; --radius-lg: 24px; --radius-full: 999px;

  /* layout */
  --col: 640px;
  --wide: 1024px;

  /* motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: 160ms;
  --dur: 320ms;
  --dur-slow: 700ms;

  /* surface (glass card effect from Figma "Surface") */
  --surface-shadow:
    0 1px 0 rgba(255,255,255,.9) inset,
    0 1px 2px rgba(10,10,10,.04),
    0 8px 24px -8px rgba(10,10,10,.10),
    0 24px 48px -24px rgba(0,33,197,.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--blue-600); color: #fff; }

/* tactile paper: faint dot grid + grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(10,10,10,.07) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.35) 60%, rgba(0,0,0,.15) 100%);
}
body::after {
  content: "";
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 100;
  opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
main, header, footer { position: relative; z-index: 1; }

/* ---------- type styles ---------- */
.t-display { font-weight: 600; font-size: clamp(44px, 7vw, 64px); line-height: 1.05; letter-spacing: -0.03em; margin: 0; }
.t-h1 { font-weight: 600; font-size: clamp(32px, 4.4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
.t-h2 { font-weight: 500; font-size: 24px; line-height: 31px; letter-spacing: -0.01em; margin: 0; }
.t-body-lg { font-size: 18px; line-height: 29px; letter-spacing: -0.005em; }
.t-body { font-size: 16px; line-height: 26px; }
.t-body-sm { font-size: 14px; line-height: 21px; }
.t-label { font-weight: 500; font-size: 15px; line-height: 15px; }
.t-meta { font-family: var(--font-mono); font-size: 12px; line-height: 17px; letter-spacing: .02em; }
.t-meta-strong { font-family: var(--font-mono); font-weight: 500; font-size: 12px; line-height: 17px; letter-spacing: .02em; text-transform: uppercase; }
.c-secondary { color: var(--text-secondary); }
.c-tertiary { color: var(--text-tertiary); }
.c-accent { color: var(--text-accent); }

/* ---------- layout ---------- */
.col { width: min(var(--col), calc(100% - 48px)); margin-inline: auto; }
.wide { width: min(var(--wide), calc(100% - 48px)); margin-inline: auto; }
.section { padding-block: var(--space-24); }
.rule { height: 1px; background: var(--border-default); border: 0; margin: 0; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4);
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out);
}
.nav.is-scrolled { border-bottom-color: var(--border-default); }
/* ---------- wordmark: Inter Bold filled with the prod-igy fingerprint ---------- */
.wordmark {
  font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.02em; line-height: .92;
  background-image: url("/assets/img/fingerprint-fill.jpg");
  background-size: cover; background-position: var(--bx, 50%) var(--by, 50%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  display: inline-block; white-space: nowrap; padding-bottom: .06em; /* keeps the descender of g/y inside the clip */
}
.nav__logo { display: inline-flex; align-items: center; text-decoration: none; font-size: 24px; }
.nav__logo .wordmark { transition: background-position 1.2s var(--ease-out), transform var(--dur) var(--ease-spring); }
.nav__logo:hover .wordmark { --bx: 20%; --by: 80%; transform: scale(1.04); }
.nav__links { display: flex; align-items: center; gap: var(--space-1); }
.nav__link {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em;
  text-decoration: none; color: var(--text-secondary);
  padding: 8px 12px; border-radius: var(--radius-full);
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nav__link:hover { color: var(--text-primary); background: var(--bg-subtle); }
.nav__link[aria-current="page"] { color: var(--text-accent); background: var(--bg-accent-subtle); }
.nav__right { display: flex; align-items: center; gap: var(--space-2); }

/* sound toggle */
.sound {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em;
  color: var(--text-secondary); background: none; border: 0; cursor: pointer;
  padding: 8px 10px; border-radius: var(--radius-full);
}
.sound:hover { background: var(--bg-subtle); color: var(--text-primary); }
.sound__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.sound__bars i { width: 2px; background: currentColor; height: 3px; border-radius: 1px; transition: height var(--dur) var(--ease-out); }
.sound[aria-pressed="true"] { color: var(--text-accent); }
.sound[aria-pressed="true"] .sound__bars i { animation: eq 1s ease-in-out infinite; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%,100% { height: 3px; } 50% { height: 12px; } }

/* ---------- buttons ---------- */
.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 22px;
  font-family: var(--font-sans); font-weight: 500; font-size: 15px; line-height: 15px;
  text-decoration: none; white-space: nowrap;
  border-radius: var(--radius-full); border: 1px solid transparent; cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur) var(--ease-spring), box-shadow var(--dur) var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--bg-accent); color: var(--text-inverse); box-shadow: 0 6px 16px -6px rgba(0,33,197,.55); }
.btn--primary:hover { background: var(--bg-accent-hover); transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(0,33,197,.6); }
.btn--secondary { background: var(--bg-page); color: var(--text-primary); border-color: var(--border-strong); }
.btn--secondary:hover { background: var(--text-primary); color: var(--text-inverse); }
.btn--text { height: auto; padding: 0; color: var(--text-accent); border-radius: 0; background: none; }
.btn--text:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn--sm { --h: 34px; padding: 0 16px; font-size: 14px; }
.btn .arrow { transition: transform var(--dur) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- meta line / breadcrumb ---------- */
.meta-line { display: flex; flex-wrap: wrap; gap: 6px; color: var(--text-secondary); margin: 0 0 var(--space-6); }
.meta-line span:not(:last-child)::after { content: " /"; color: var(--text-tertiary); }

/* ---------- pagination dots ---------- */
.dots { display: flex; justify-content: center; gap: 6px; }
.dot {
  width: 8px; height: 8px; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--radius-full); background: var(--gray-200);
  transition: width var(--dur) var(--ease-out), background var(--dur) var(--ease-out);
}
.dot:hover { background: var(--gray-400); }
.dot.is-active { width: 20px; background: var(--bg-accent); }

/* ---------- embed frame ---------- */
.embed-frame {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  overflow: hidden;
  box-shadow: var(--surface-shadow);
}

/* ---------- reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out), filter var(--dur-slow) var(--ease-out); transition-delay: var(--d, 0ms); }
[data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* ---------- footer ---------- */
.footer { padding: var(--space-24) 0 var(--space-12); border-top: 1px solid var(--border-default); background: linear-gradient(to bottom, rgba(247,247,247,.6), rgba(255,255,255,0)); }
.footer__grid { display: grid; grid-template-columns: 1.5fr .8fr 1fr; gap: var(--space-12); align-items: end; }
.footer__founders { display: flex; flex-direction: column; gap: 10px; }
.founder { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border-default); }
.founder:last-child { border-bottom: 1px solid var(--border-default); }
.founder__name { font-weight: 500; font-size: 17px; letter-spacing: -0.01em; }
.founder__links { display: flex; gap: 4px; font-family: var(--font-mono); font-size: 12px; color: var(--text-tertiary); }
.founder__links a { display: inline-flex; text-decoration: none; color: var(--text-secondary); padding: 2px 6px; border-radius: 6px; transition: color var(--dur-fast), background var(--dur-fast); }
.founder__links a:hover { color: var(--text-accent); background: var(--bg-accent-subtle); }
.founder__links a[hidden] { display: none; }
.footer__mark { display: block; text-decoration: none; }
.footer__mark .wordmark { font-size: clamp(56px, 7.4vw, 108px); line-height: 1.15; filter: grayscale(1) contrast(.85) brightness(1.15); opacity: .38; transition: filter .6s var(--ease-out), opacity .6s var(--ease-out), background-position 2s var(--ease-out); }
.footer__mark:hover .wordmark { filter: none; opacity: 1; --bx: 30%; --by: 70%; }
.footer__links { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.footer__link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 24px; line-height: 40px; font-weight: 500; letter-spacing: -0.01em;
  text-decoration: none; color: var(--text-primary);
}
.footer__link .t-meta { color: var(--text-tertiary); transition: color var(--dur-fast); }
.footer__link .arrow { display: inline-block; transition: transform var(--dur) var(--ease-out); color: var(--text-tertiary); }
.footer__link:hover { color: var(--text-accent); }
.footer__link:hover .arrow { transform: translate(3px, -3px); color: var(--text-accent); }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-16); color: var(--text-tertiary); }
.footer__bottom a { text-decoration: none; }
.footer__bottom a:hover { color: var(--text-accent); }

@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .nav__link--hide-sm { display: none; }
  .sound__label { display: none; }
}

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

:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 3px; border-radius: 6px; }

[hidden] { display: none !important; }
.footer__link.is-soon { color: var(--text-tertiary); cursor: default; }
.footer__link.is-soon .arrow { display: none; }
.footer__link.is-soon::after { content: "soon"; font-family: var(--font-mono); font-size: 11px; line-height: 18px; letter-spacing: .04em; padding: 2px 8px; border: 1px solid var(--border-default); border-radius: 999px; }
.btn.is-soon { display: none; }
.founder__links a:not([hidden]) ~ a:not([hidden])::before { content: "/"; color: var(--text-tertiary); margin-right: 8px; }
