/* ============================================================
   Protech-T website
   One stylesheet for the company page, the Diga product page,
   the invite fallback and the document pages.
   Tokens mirror the app (Design/Theme.swift); the company pages
   keep the teal of the PT mark, the Diga page switches to the
   gold of its icon via body.diga.
   ============================================================ */

:root {
  --bg: #050505;
  --surface: #0f0f10;
  --elevated: #161618;

  --accent: #1e6b84;
  --accent-light: #2a8fa8;
  --accent-bright: #3fb4d4;
  --accent-rgb: 42, 143, 168;

  --text-primary: #f2f2f2;
  --text-secondary: #8e8e93;
  --text-tertiary: #5a5a5e;
  --text-faint: #2c2c2e;

  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.035);
  --glass-strong: rgba(10, 10, 12, 0.62);

  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --nav-h: 60px;
  --gutter: clamp(20px, 5vw, 48px);
  --measure: 62ch;

  /* San Francisco on Apple devices, the app's own font; graceful fallbacks elsewhere */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* critically damped curves: quick start, no overshoot */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

body.diga {
  --accent: #a8812f;
  --accent-light: #d4a84b;
  --accent-bright: #ecc46b;
  --accent-rgb: 212, 168, 75;
}

/* ----------------------------- reset ----------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  position: relative;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: rgba(var(--accent-rgb), 0.35); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

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

/* ------------------------------ type ------------------------------ */
/* Tracking is size specific: display text tightens as it grows,
   small caps labels open up. Leading tracks size inversely. */
.display {
  font-weight: 500;
  font-size: clamp(2.4rem, 2rem + 4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.title {
  font-weight: 500;
  font-size: clamp(1.7rem, 1.3rem + 2vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.subtitle {
  font-weight: 500;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.lede {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--text-secondary);
  max-width: var(--measure);
  text-wrap: pretty;
}
.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-light);
}
.micro {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.wordmark {
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ------------------------------ nav ------------------------------ */
/* Translucent layer, content scrolls beneath; a light top edge instead
   of a divider. The only glass surface at its level. */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-brand img { width: 28px; height: 28px; border-radius: 22%; }
.nav-brand .wordmark { font-size: 0.82rem; color: var(--text-primary); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text-primary); }
.nav-links a:active { background: rgba(255, 255, 255, 0.06); transition-duration: 0.08s; }
.nav-links a.nav-cta {
  color: var(--bg);
  background: var(--text-primary);
  margin-left: 6px;
}
.nav-links a.nav-cta:hover { background: #fff; }

/* ----------------------------- intro ----------------------------- */
#intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
html.intro #intro { display: flex; }
#intro video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: var(--bg);
}
/* The intro dissolve is an opt-in brand moment and keeps running under
   reduced motion; the !important protects it from the global kill switch. */
#intro.fade-out {
  opacity: 0;
  transform: scale(1.04);
  filter: blur(4px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease) !important;
  pointer-events: none;
}
.intro-skip {
  position: absolute;
  bottom: calc(22px + env(safe-area-inset-bottom));
  right: 22px;
  z-index: 101;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  color: var(--text-secondary);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.intro-skip:hover, .intro-skip:focus-visible { color: var(--text-primary); border-color: var(--text-secondary); }
html.hold .reveal { opacity: 0 !important; transform: translateY(12px) !important; transition: none !important; }

/* --------------------------- atmosphere --------------------------- */
.bg-clip {
  /* Scoped to the hero: scrolls away with it and fades out, so the sections
     below sit on plain black instead of a blurred photo. */
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 150svh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 45%, transparent 100%);
  mask-image: linear-gradient(#000 45%, transparent 100%);
}
.photo-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(5, 5, 5, 0.25), rgba(5, 5, 5, 0.86) 80%),
    url("/assets/bg-hero.jpg") center / cover no-repeat;
  filter: blur(6px);
  transform: translate(var(--px, 0px), var(--py, 0px));
  will-change: transform;
}
.glow {
  position: fixed;
  top: 30%;
  left: 50%;
  width: min(80vw, 760px);
  aspect-ratio: 1;
  transform: translate(calc(-50% + var(--gx, 0px)), calc(-50% + var(--gy, 0px)));
  background: radial-gradient(circle at center,
    rgba(var(--accent-rgb), 0.16) 0%,
    rgba(var(--accent-rgb), 0.05) 34%,
    transparent 68%);
  pointer-events: none;
  z-index: 1;
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ----------------------------- layout ----------------------------- */
.page {
  position: relative;
  z-index: 4;
  padding-top: var(--nav-h);
}
.wrap {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section {
  padding: clamp(64px, 10vw, 128px) 0;
}
.section + .section { border-top: 1px solid var(--line); }
.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head .eyebrow { margin-bottom: 14px; }
.section-head .title { margin-bottom: 16px; }

/* ------------------------------ hero ------------------------------ */
.hero {
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  align-items: center;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 80px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 20px; }
.hero-copy .display { margin-bottom: 22px; }
.hero-copy .lede { margin-bottom: 34px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
}
.hero-note {
  flex-basis: 100%;
  margin-top: 6px;
}
.hero-mark {
  width: 72px; height: 72px;
  border-radius: 22%;
  margin-bottom: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 60px rgba(var(--accent-rgb), 0.22);
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .hero-grid.reverse { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
  .hero-grid.reverse .hero-copy { order: 2; }
}

/* ---------------------------- buttons ---------------------------- */
/* Feedback lives on the press: instant scale, no waiting for release. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.12s var(--ease-out);
}
.btn:active { transform: scale(0.97); transition-duration: 0.06s; }
.btn svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary {
  color: var(--bg);
  background: var(--text-primary);
}
.btn-primary:hover { background: #fff; }
.btn-accent {
  color: #0a0804;
  background: var(--accent-light);
}
.btn-accent:hover { background: var(--accent-bright); }
.btn-ghost {
  color: var(--text-primary);
  background: var(--glass);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.22); }

/* ------------------------------ cards ------------------------------ */
/* One translucent surface, a bright top edge, never stacked on glass. */
.card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease-out);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  pointer-events: none;
}
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: rgba(var(--accent-rgb), 0.45); background: rgba(255, 255, 255, 0.05); transform: translateY(-2px); }
.card h3 {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.card p { font-size: 0.93rem; line-height: 1.55; color: var(--text-secondary); }
.card .icon {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  margin-bottom: 18px;
  color: var(--accent-light);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
}
.card .icon svg { width: 20px; height: 20px; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ------------------------- product panel ------------------------- */
.panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.panel::after {
  content: "";
  position: absolute;
  width: 60%;
  aspect-ratio: 1;
  right: -20%;
  bottom: -40%;
  background: radial-gradient(circle, rgba(212, 168, 75, 0.14), transparent 65%);
  pointer-events: none;
}
.panel {
  /* the product panel speaks Diga's gold even on the teal company page */
  --accent: #a8812f;
  --accent-light: #d4a84b;
  --accent-bright: #ecc46b;
  --accent-rgb: 212, 168, 75;
}
.panel-copy { position: relative; z-index: 1; }
.panel-copy .product-id {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.panel-copy .product-id img {
  width: 56px; height: 56px;
  border-radius: 22%;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.7), 0 0 30px rgba(212, 168, 75, 0.2);
}
.panel-copy .product-id .name { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.1; }
.panel-copy .product-id .kicker { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: #d4a84b; font-weight: 600; }
.panel-copy .title { margin-bottom: 16px; }
.panel-copy .lede { margin-bottom: 24px; font-size: 1.02rem; }
.panel-points {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 30px;
}
.panel-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.panel-points svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: #d4a84b; }
.panel-points strong { color: var(--text-primary); font-weight: 500; }
@media (min-width: 900px) {
  .panel { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); }
}

/* ---------------------------- devices ---------------------------- */
/* CSS iPhone frame around a real simulator capture (393 x 852 points). */
.device {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 393 / 852;
  margin: 0 auto;
  border-radius: 15.5% / 7.15%;
  background: #0c0c0d;
  padding: 2.9%;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 3px #1a1a1c,
    0 0 0 4px rgba(255, 255, 255, 0.05),
    0 40px 90px rgba(0, 0, 0, 0.75),
    0 0 80px rgba(var(--accent-rgb), 0.12);
}
.device-screen {
  width: 100%;
  height: 100%;
  border-radius: 13% / 6%;
  overflow: hidden;
  background: #000;
}
.device-screen img { width: 100%; height: 100%; object-fit: cover; }
.device::after {
  /* dynamic island */
  content: "";
  position: absolute;
  top: 5.2%;
  left: 50%;
  width: 29%;
  height: 3.6%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
}
.device-pair {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
}
.device-pair .device { position: absolute; }
.device-pair .device.back {
  width: min(250px, 62vw);
  transform: translate(-42%, -4%) rotate(-6deg);
  opacity: 0.92;
  filter: brightness(0.82);
}
.device-pair .device.front {
  width: min(280px, 70vw);
  transform: translate(28%, 6%) rotate(4deg);
}
@media (max-width: 899px) {
  /* stacked under the copy: give the tilted pair its full height so it
     never runs into the next section */
  .device-pair { min-height: 640px; margin-bottom: 8px; }
  .device-pair .device.back { transform: translate(-36%, -6%) rotate(-5deg); }
  .device-pair .device.front { transform: translate(24%, 4%) rotate(3deg); }
}
.device-caption {
  text-align: center;
  margin-top: 18px;
}

/* -------------------------- principles -------------------------- */
.principle .num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent-light);
  margin-bottom: 14px;
  letter-spacing: 0.08em;
}

/* ---------------------------- scenarios ---------------------------- */
.scenario {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
}
.scenario .icon { margin: 0; }
.scenario h3 { margin-bottom: 6px; }

/* ------------------------------ nots ------------------------------ */
.nots {
  list-style: none;
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--glass);
}
.nots li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding: 18px 22px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.nots li + li { border-top: 1px solid var(--line); }
.nots li strong { color: var(--text-primary); font-weight: 500; }
.nots svg { width: 20px; height: 20px; margin-top: 2px; color: var(--text-tertiary); }

/* ------------------------------ steps ------------------------------ */
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
}
.steps li { counter-increment: step; }
.steps .card { padding-left: 72px; min-height: 100px; }
.steps .card::after {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 24px;
  top: 26px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-light);
}
@media (min-width: 980px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ------------------------------ specs ------------------------------ */
.specs {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--glass);
}
.specs > div {
  padding: 20px 22px;
  border-top: 1px solid var(--line);
}
.specs > div:first-child { border-top: 0; }
.specs dt {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.specs dd {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.5;
}
.specs dd span { color: var(--text-secondary); }
@media (min-width: 720px) {
  .specs { grid-template-columns: 1fr 1fr; }
  .specs > div:nth-child(2) { border-top: 0; }
  .specs > div:nth-child(odd) { border-right: 1px solid var(--line); }
}

/* ------------------------------- faq ------------------------------- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--glass);
  overflow: hidden;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.005em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--text-secondary);
  font-weight: 300;
  transition: transform 0.25s var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  padding: 0 22px 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 68ch;
}

/* ---------------------------- waitlist ---------------------------- */
.waitlist-block {
  text-align: center;
  padding: clamp(40px, 6vw, 72px) var(--gutter);
  border-radius: var(--radius-xl);
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--accent-rgb), 0.14), transparent 60%), var(--glass);
  border: 1px solid var(--line);
}
.waitlist-block .title { margin-bottom: 12px; }
.waitlist-block .lede { margin: 0 auto 30px; }
.waitlist { width: min(440px, 100%); margin: 0 auto; }
.field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.field:focus-within {
  border-color: rgba(var(--accent-rgb), 0.7);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.14);
  background: rgba(255, 255, 255, 0.07);
}
.field input[type="email"] {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.98rem;
  padding: 10px 0;
}
.field input::placeholder { color: var(--text-tertiary); }
.field button {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.12s var(--ease-out);
}
.field button:hover { background: #fff; }
.field button:active { transform: scale(0.92); transition-duration: 0.06s; }
.field button.loading { pointer-events: none; opacity: 0.6; }
.field button.loading svg { animation: spin 0.8s linear infinite; }
.status {
  font-size: 0.86rem;
  min-height: 1.2em;
  margin-top: 14px;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.status.show { opacity: 1; transform: none; }
.status.error { color: #e0655e; }
.status.ok { color: var(--accent-bright); }
.waitlist.done .field { display: none; }
.waitlist.done .status { font-size: 1rem; }
.waitlist-fine { margin-top: 18px; font-size: 0.78rem; color: var(--text-tertiary); }

/* ----------------------------- footer ----------------------------- */
.footer {
  position: relative;
  z-index: 4;
  border-top: 1px solid var(--line);
  padding: clamp(40px, 6vw, 64px) 0 calc(28px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; text-decoration: none; }
.footer-brand img { width: 28px; height: 28px; border-radius: 22%; }
.footer-brand .wordmark { font-size: 0.8rem; }
.footer p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; max-width: 36ch; }
.footer h4 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 600;
  margin-bottom: 14px;
}
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer ul a {
  font-size: 0.92rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.footer ul a:hover { color: var(--text-primary); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--text-tertiary);
}

/* ------------------------- document pages ------------------------- */
.doc-wrap {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(56px, 8vw, 96px);
}
.prose .eyebrow { margin-bottom: 14px; }
.prose h1 {
  font-weight: 500;
  font-size: clamp(2rem, 1.6rem + 2.4vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
  text-wrap: balance;
}
.prose .updated { font-size: 0.8rem; color: var(--text-tertiary); margin-bottom: 40px; }
.prose h2 {
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.012em;
  margin: 40px 0 12px;
}
.prose h3 {
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.008em;
  margin: 28px 0 10px;
}
.prose p, .prose li { font-size: 0.98rem; line-height: 1.7; color: var(--text-secondary); }
.prose p { margin-bottom: 14px; }
.prose ul, .prose ol { margin: 0 0 16px 1.2em; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text-primary); font-weight: 500; }
.prose a { color: var(--accent-light); text-decoration: none; }
.prose a:hover, .prose a:focus-visible { text-decoration: underline; }
.prose code {
  font-family: var(--mono);
  font-size: 0.84em;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 5px;
  word-break: break-all;
}

/* ------------------------- invite fallback ------------------------- */
.invite-wrap {
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  place-items: center;
  padding: clamp(40px, 6vw, 80px) var(--gutter);
}
.invite-card {
  width: min(520px, 100%);
  text-align: center;
  padding: clamp(32px, 5vw, 48px);
}
.invite-card img {
  width: 84px; height: 84px;
  margin: 0 auto 22px;
  border-radius: 22%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 50px rgba(212, 168, 75, 0.2);
}
.invite-card .eyebrow { margin-bottom: 12px; }
.invite-card h1 { margin-bottom: 14px; }
.invite-card p { color: var(--text-secondary); font-size: 0.96rem; line-height: 1.6; }
.invite-card ol {
  text-align: left;
  margin: 24px 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.invite-card ol li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 0.94rem;
}
.invite-card ol li span {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--accent-light);
  padding-top: 3px;
}
.invite-card .fine { margin-top: 20px; font-size: 0.8rem; color: var(--text-tertiary); }

/* ------------------------------ motion ------------------------------ */
/* Scroll reveals: short, critically damped, no overshoot. Elements are
   visible by default so the page is complete without JS; the observer
   adds .pending before first paint and .in on entry. */
.reveal.pending { opacity: 0; transform: translateY(14px); }
.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 720px) { .hero-mark { width: 84px; height: 84px; } }

/* ------------------------- user preferences ------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal.pending { opacity: 0; transform: none; }
  .reveal.in { transition: opacity 0.25s ease; transform: none; }
  .btn, .card, .nav-links a, .field button { transition: none; }
  .btn:active, .field button:active { transform: none; }
  .btn:hover svg { transform: none; }
  .photo-bg { transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: #0a0a0b; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .card, .nots, .specs, .faq details, .waitlist-block, .panel { background: var(--surface); }
  .intro-skip { background: #141416; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --line: rgba(255, 255, 255, 0.28); --line-strong: rgba(255, 255, 255, 0.45); --text-secondary: #b8b8bd; --text-tertiary: #8e8e93; }
  .nav { background: #000; }
  .card, .nots, .specs, .faq details, .waitlist-block, .panel { background: #000; }
}
