/* Benthic website v0. The app's own visual language: Inter Display (Regular 400 + Medium 500, Latin subset of the app's
 * assets/fonts), the app's tracking rule (-2% under 20 px, -3% at 20 px and up), the app's teal Main Button (web-button.css
 * .mb, copied below), and white glass over the live scene like the app's Home. Hierarchy = size, weight and space only:
 * no hairline strokes, no monospace, no uppercase labels. Mobile first (393 x 852), then desktop from 768 px. */

@font-face { font-family: 'Inter Display'; font-weight: 400; font-display: swap; src: url('assets/fonts/InterDisplay-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Inter Display'; font-weight: 500; font-display: swap; src: url('assets/fonts/InterDisplay-Medium.woff2') format('woff2'); }

:root {
  --ink: #000000;                       /* the app's --ui-ink (day) */
  --ink-2: rgba(0, 0, 0, 0.72);         /* body copy over glass / sky */
  --ink-3: #5c5c5c;                     /* small print; the app's #737373 darkened for contrast on glass */
  --teal: #1DABC7;                      /* Main Button base, success check */
  --error: #AA090C;                     /* the app's error red (tag name errors) */
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.15);   /* the app's Icon Button shadow (Figma 989:3258) */
  --field: #ffffff;
  --page: #E3F4F8;                      /* legal pages: the iOS settings page tint */
  --sky: #5FB9EB;
  --radius-card: 32px;
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--sky); color: var(--ink);
  font: 400 16px/24px 'Inter Display', system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid #0a6f84; outline-offset: 3px; }

/* ---------- THE SCENE (fixed behind everything) ---------- */
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--sky); }
.scene-poster, .scene-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.scene-video { opacity: 0; transition: opacity 0.6s ease-out; }
.scene-video.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .scene-video { display: none; } }

/* ---------- PAGE ---------- */
.page { position: relative; z-index: 1; padding: 0 var(--gutter); padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(120%); backdrop-filter: blur(20px) saturate(120%);
  box-shadow: var(--glass-shadow);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: var(--glass-strong); } }
.card { border-radius: var(--radius-card); padding: 24px 20px; }

/* hero = the first screen: brand at the top, the line in the sky, the waitlist card low over the sea */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; padding: max(24px, env(safe-area-inset-top)) 0 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 40px; height: 40px; border-radius: 9px; box-shadow: 0 2px 12px -2px rgba(0, 0, 0, 0.18); }
.brand-name { font-weight: 500; font-size: 20px; line-height: 28px; letter-spacing: -0.03em; }

.hero-copy { margin-top: 48px; max-width: 520px; }
.hero-line { font-weight: 500; font-size: 36px; line-height: 44px; letter-spacing: -0.03em; text-wrap: balance; }
.hero-sub { margin-top: 12px; font-size: 18px; line-height: 26px; letter-spacing: -0.02em; color: var(--ink-2); text-wrap: pretty; max-width: 440px; }

.join { margin-top: auto; }
.join-h { font-weight: 500; font-size: 20px; line-height: 28px; letter-spacing: -0.03em; }
.join-sub { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--ink-3); }
.join-row { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.field {
  width: 100%; height: 48px; padding: 0 20px; border: 0; border-radius: 200px; background: var(--field); color: var(--ink);
  font: 400 16px/24px 'Inter Display', system-ui, sans-serif; letter-spacing: -0.02em; -webkit-appearance: none; appearance: none;
  box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow 0.15s ease-out;
}
.field::placeholder { color: #8a8a8a; }
.field:focus { outline: none; box-shadow: inset 0 0 0 2px var(--teal); }
.field[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--error); }
.join-msg { min-height: 20px; margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--error); }
.join-msg:empty { min-height: 0; margin-top: 0; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* THE MAIN BUTTON, copied from the app's web-button.css .mb (Figma 737:1216, Type=Prim, Size 48). Change it there first. */
.mb {
  box-sizing: border-box; display: flex; align-items: center; justify-content: center; height: 48px; padding: 0 32px;
  border: 0; border-radius: 200px; cursor: pointer; -webkit-tap-highlight-color: transparent; -webkit-appearance: none; appearance: none;
  background: #1DABC7 linear-gradient(180deg, #3CC4DF 0%, #2FB8D3 17%, #35BED9 55%, #35BED9 75%, #39C2DD 83%, #41CAE5 92%, #43CCE7 100%);
  box-shadow: 0 4.8px 28.8px -2.4px rgba(0, 0, 0, 0.15);
  color: #fff; font: 500 16px/24px 'Inter Display', system-ui, sans-serif; letter-spacing: -0.02em; white-space: nowrap; text-align: center;
  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}
.mb:active { transform: scale(0.97); }
.mb[aria-busy="true"] { opacity: 0.7; cursor: progress; }

.join-done { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 4px; }
.join-done[hidden] { display: none; }
.done-check { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%;
  background: #1DABC7 linear-gradient(180deg, #3CC4DF 0%, #2FB8D3 17%, #35BED9 55%, #43CCE7 100%); box-shadow: 0 4.8px 28.8px -2.4px rgba(0, 0, 0, 0.15); }
.done-h { margin-top: 16px; font-weight: 500; font-size: 20px; line-height: 28px; letter-spacing: -0.03em; outline: none; }
.done-sub { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--ink-3); }

/* ---------- FEATURES ---------- */
.features { display: grid; gap: 8px; padding: 24px 0 0; }
.feature { padding: 20px; }
.feature-h { font-weight: 500; font-size: 20px; line-height: 28px; letter-spacing: -0.03em; }
.feature-p { margin-top: 4px; font-size: 16px; line-height: 24px; color: var(--ink-2); }

/* ---------- FOOTER ---------- */
.foot { padding: 40px 4px max(32px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-links a { font-weight: 500; font-size: 14px; line-height: 20px; text-decoration: none; padding: 12px 0; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-note { font-size: 14px; line-height: 20px; color: var(--ink-2); }

/* ---------- DESKTOP ---------- */
@media (min-width: 768px) {
  :root { --gutter: 40px; }
  .page { max-width: 1120px; margin: 0 auto; }
  .hero { min-height: 100vh; min-height: 100svh; padding-top: 32px; }
  .brand-icon { width: 44px; height: 44px; border-radius: 10px; }
  .hero-copy { margin: 14vh auto 0; text-align: center; max-width: 760px; }
  .hero-line { font-size: 64px; line-height: 72px; }
  .hero-sub { margin: 20px auto 0; font-size: 20px; line-height: 28px; letter-spacing: -0.03em; max-width: 520px; text-wrap: balance; }
  .join { margin: auto auto 8vh; width: 100%; max-width: 560px; padding: 28px 28px 24px; }
  .join-form, .join-done { text-align: center; }
  .join-row { flex-direction: row; gap: 8px; }
  .join-row .field { flex: 1 1 auto; min-width: 0; }
  .join-row .mb { flex: none; }
  .features { grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 0; }
  .feature { padding: 24px; }
  .foot { flex-direction: row; justify-content: space-between; align-items: center; padding: 48px 4px 40px; }
}
@media (min-width: 768px) and (max-height: 760px) { .hero-copy { margin-top: 8vh; } }

/* ---------- LEGAL PAGES (privacy, terms): plain reading pages, no scene ---------- */
body.doc { background: var(--page); }
.doc-wrap { max-width: 680px; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) var(--gutter) 48px; }
.doc .brand { text-decoration: none; }
.draft { margin-top: 24px; padding: 16px 20px; border-radius: 20px; background: #FFE7A8; color: #3d2a00; }
.draft-h { font-weight: 500; font-size: 16px; line-height: 24px; }
.draft-p { margin-top: 4px; font-size: 14px; line-height: 20px; }
.doc h1 { margin-top: 32px; font-weight: 500; font-size: 32px; line-height: 40px; letter-spacing: -0.03em; }
.doc .updated { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--ink-3); }
.doc-card { margin-top: 24px; padding: 24px 20px; border-radius: 24px; background: #fff; }
.doc h2 { font-weight: 500; font-size: 20px; line-height: 28px; letter-spacing: -0.03em; }
.doc-card p, .doc-card li { font-size: 16px; line-height: 24px; color: #262626; }
.doc-card p + p, .doc-card h2 + p, .doc-card h2 + ul, .doc-card p + ul, .doc-card ul + p { margin-top: 12px; }
.doc-card ul { margin: 0; padding-left: 20px; }
.doc-card li + li { margin-top: 8px; }
.todo { display: inline; padding: 1px 6px; border-radius: 6px; background: #FFE7A8; color: #3d2a00; font-weight: 500; font-size: 14px; }
.doc .foot { padding: 32px 4px 0; }
@media (min-width: 768px) { .doc-wrap { padding-top: 40px; } .doc h1 { font-size: 40px; line-height: 48px; } .doc-card { padding: 32px; } }
