/* DeepSea — layout: a single descent. Fixed sea layer darkens with scroll; content sits in one 1120px column; each product panel glows in its own colour. */
:root {
  --surface: #195E6D;
  --mid: #054353;
  --abyss: #001A22;
  --ink: #003D4D;
  --cream: #F0EBE0;
  --cream-soft: #C9CFC9;
  --muted: #93AAAD;
  --cyan: #79C6CE;
  --line: rgba(121, 198, 206, 0.16);
  --panel: rgba(0, 26, 34, 0.42);
  --panel-edge: rgba(240, 235, 224, 0.09);

  --calo-a: #1F6FEB;
  --calo-b: #C026D3;
  --calo-c: #0E7C86;
  --relic-gold: #F2B84B;
  --relic-navy: #0B1640;
  --live: #5BE0A6;

  --f-display: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --f-body: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --step-4: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);

  --wrap: 1120px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --radius: 22px;
  --depth: 0;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--abyss);
  color: var(--cream);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--cyan); color: var(--abyss); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- the sea ---------- */
.sea { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.sea::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--surface) 0%, var(--mid) 55%, var(--abyss) 100%);
  opacity: calc(1 - var(--depth) * 0.82);
}
.shaft {
  position: absolute; top: -10%; height: 95%;
  background: linear-gradient(180deg, rgba(160, 225, 230, 0.20), rgba(160, 225, 230, 0) 85%);
  transform-origin: top center;
  opacity: calc(0.9 - var(--depth) * 1.2);
  animation: sway 14s ease-in-out infinite alternate;
  filter: blur(2px);
}
.shaft:nth-child(1) { left: 14%; width: 9%; transform: skewX(6deg); }
.shaft:nth-child(2) { left: 46%; width: 6%; transform: skewX(-4deg); animation-duration: 18s; }
.shaft:nth-child(3) { left: 70%; width: 4%; transform: skewX(3deg); animation-duration: 11s; }
.shaft:nth-child(4) { left: 84%; width: 7%; transform: skewX(-6deg); animation-duration: 16s; }
@keyframes sway { from { translate: -1.5vw 0; } to { translate: 1.5vw 0; } }
#particles { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* ---------- layout ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
section { padding-block: clamp(64px, 9vw, 120px); }
.eyebrow {
  font-family: var(--f-body); font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan); margin: 0 0 18px;
}
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-3); }
p { margin: 0; }
.lede { font-size: var(--step-1); color: var(--cream-soft); max-width: 56ch; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: rgba(0, 26, 34, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span { font-family: var(--f-display); font-size: 1.375rem; letter-spacing: -0.01em; }
.nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.nav a { text-decoration: none; font-size: 0.9375rem; color: var(--cream-soft); transition: color .2s; }
.nav a:hover { color: var(--cream); }
@media (max-width: 520px) { .nav a.opt { display: none; } }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 0.9375rem/1 var(--f-body); text-decoration: none; cursor: pointer;
  transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--cream); color: var(--abyss); }
.btn-primary:hover { box-shadow: 0 8px 30px rgba(240, 235, 224, 0.18); }
.btn-ghost { border-color: rgba(240, 235, 224, 0.28); color: var(--cream); }
.btn-ghost:hover { border-color: var(--cream); }
.btn-play { background: #000; color: #fff; border-color: rgba(255,255,255,.22); padding: 10px 20px 10px 16px; border-radius: 12px; }
.btn-play svg { width: 22px; height: 22px; }
.btn-play small { display: block; font-size: 0.625rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; opacity: .8; margin-bottom: 3px; }
.btn-play b { display: block; font-size: 1.0625rem; font-weight: 600; }
.btn-play span { line-height: 1; text-align: left; }
.link { color: var(--cyan); text-decoration: none; font-weight: 600; font-size: 0.9375rem; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--cream-soft);
}
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live { color: var(--live); border-color: rgba(91, 224, 166, .3); }
.pill.live i { box-shadow: 0 0 0 0 rgba(91,224,166,.6); animation: ping 2.4s infinite; }
.pill.soon { color: var(--relic-gold); border-color: rgba(242, 184, 75, .35); }
.pill.dev { color: var(--cyan); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(91,224,166,.55); } 80%, 100% { box-shadow: 0 0 0 8px rgba(91,224,166,0); } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(56px, 10vw, 128px) clamp(72px, 10vw, 140px); }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 40px; }
.hero-copy { display: grid; gap: 26px; min-width: 0; }
.hero h1 em { font-style: italic; color: var(--cyan); }
.tail { width: min(100%, 360px); justify-self: center; animation: bob 7s ease-in-out infinite; }
.tail path.fin { fill: #01303B; }
.tail path.ripple { fill: none; stroke: rgba(121, 198, 206, .35); stroke-width: 1.4; stroke-linecap: round; }
@keyframes bob { 50% { translate: 0 -10px; } }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .tail { order: -1; width: 180px; justify-self: start; }
}

/* ---------- apps ---------- */
.section-head { display: grid; gap: 14px; margin-bottom: clamp(36px, 5vw, 56px); max-width: 640px; }
.apps { display: grid; gap: 28px; }
.app {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center;
  padding: clamp(28px, 4.5vw, 56px);
  border-radius: var(--radius); background: var(--panel); border: 1px solid var(--panel-edge);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.app::before {
  content: ""; position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; border-radius: 50%;
  right: -18%; top: 50%; translate: 0 -50%; filter: blur(70px); opacity: .45; transition: opacity .5s;
}
.app:hover::before { opacity: .6; }
.app.calo::before { background: radial-gradient(circle, var(--calo-a), var(--calo-b) 55%, transparent 70%); }
.app.relic::before { background: radial-gradient(circle, var(--relic-gold), #7a4b10 50%, transparent 70%); left: -18%; right: auto; opacity: .35; }
.app.roam::before { background: radial-gradient(circle, var(--cyan), transparent 65%); opacity: .25; }
.app-copy { display: grid; gap: 18px; justify-items: start; min-width: 0; }
.app-title { display: flex; align-items: center; gap: 16px; }
.app-title img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.app-title .sub { font-size: var(--step--1); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 6px; display: block; font-family: var(--f-body); }
.app p { color: var(--cream-soft); max-width: 52ch; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; color: var(--cream-soft); font-size: 0.9688rem; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 12px; height: 1.5px; background: var(--cyan); }
.app.relic .ticks li::before { background: var(--relic-gold); }
.app.relic { grid-template-columns: 1fr 1.05fr; }
.app.relic .app-visual { order: -1; }
@media (max-width: 820px) {
  .app, .app.relic { grid-template-columns: minmax(0, 1fr); }
  .app.relic .app-visual { order: 0; }
}

/* Calo visual */
.calo-visual { position: relative; display: grid; place-items: center; min-height: 340px; }
.calo-visual .mark { width: 92%; max-width: 420px; height: auto; filter: drop-shadow(0 20px 50px rgba(31,111,235,.45)); }
.event-card {
  position: absolute; left: 4%; bottom: 8%; width: min(270px, 78%);
  background: rgba(10, 14, 28, .82); border: 1px solid rgba(255,255,255,.08); border-radius: 16px;
  padding: 14px 16px; display: grid; gap: 4px; box-shadow: 0 18px 40px rgba(0,0,0,.4);
  animation: float 6s ease-in-out infinite;
}
.event-card .chip { justify-self: start; font-size: 0.6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #E9D5FF; background: linear-gradient(90deg, rgba(31,111,235,.35), rgba(192,38,211,.35)); padding: 4px 8px; border-radius: 6px; margin-bottom: 6px; }
.event-card b { font-size: 1rem; font-weight: 600; }
.event-card span { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.event-card.two { left: auto; right: 2%; top: 8%; bottom: auto; width: min(220px, 64%); animation-delay: -3s; }
.event-card.two .chip { color: #CFFAFE; background: rgba(14,124,134,.45); }
@keyframes float { 50% { translate: 0 -8px; } }

/* Relic visual */
.relic-visual { position: relative; }
.relic-visual img { border-radius: 18px; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 0 1px rgba(242,184,75,.25); }
.relic-visual .stamp {
  position: absolute; right: 16px; bottom: 16px; background: rgba(11,22,64,.85); border: 1px solid rgba(242,184,75,.4);
  color: var(--relic-gold); font-size: 0.75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 8px 12px; border-radius: 10px;
}

/* Roam visual */
.roam-visual svg { width: 100%; height: auto; }
.roam-visual .route { fill: none; stroke: var(--cyan); stroke-width: 2; stroke-dasharray: 2 8; stroke-linecap: round; animation: dash 30s linear infinite; }
.roam-visual .pin { fill: var(--cream); }
.roam-visual .pin-ring { fill: none; stroke: var(--cyan); stroke-width: 1.5; opacity: .5; }
.roam-visual text { fill: var(--muted); font: 600 11px var(--f-body); letter-spacing: .14em; }
@keyframes dash { to { stroke-dashoffset: -400; } }

/* ---------- studio ---------- */
.studio .wrap { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.studio-copy { display: grid; gap: 22px; min-width: 0; }
.principles { display: grid; gap: 0; border-top: 1px solid var(--line); }
.principle { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding-block: 24px; border-bottom: 1px solid var(--line); }
.principle h4 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: var(--step-2); }
.principle p { color: var(--cream-soft); min-width: 0; }
@media (max-width: 820px) { .studio .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .principle { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- contact ---------- */
.contact .wrap { display: grid; gap: 28px; justify-items: start; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.email { font-family: var(--f-display); font-size: clamp(1.6rem, 1rem + 3vw, 3.25rem); text-decoration: none; border-bottom: 1px solid rgba(121,198,206,.4); line-height: 1.2; overflow-wrap: anywhere; }
.email:hover { border-color: var(--cyan); }
.copy-btn { background: none; border: 1px solid var(--line); color: var(--cream-soft); border-radius: 999px; padding: 8px 14px; font: 600 0.8125rem var(--f-body); cursor: pointer; }
.copy-btn:hover { border-color: var(--cyan); color: var(--cream); }
.socials { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.socials a { color: var(--cream-soft); text-decoration: none; font-size: 0.9375rem; }
.socials a:hover { color: var(--cream); }
.socials a span { color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 0.875rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.site-footer a { text-decoration: none; color: var(--muted); }
.site-footer a:hover { color: var(--cream); }

/* ---------- depth gauge ---------- */
.gauge { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); top: 50%; translate: 0 -50%; z-index: 10; display: grid; justify-items: end; gap: 10px; pointer-events: none; }
.gauge .bar { position: relative; width: 1px; height: 180px; background: var(--line); }
.gauge .bar::after { content: ""; position: absolute; left: -3px; top: calc(var(--depth) * 100%); width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); translate: 0 -50%; box-shadow: 0 0 12px var(--cyan); }
.gauge .read { font: 600 0.6875rem var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); writing-mode: vertical-rl; font-variant-numeric: tabular-nums; }
.gauge .read b { color: var(--cream-soft); font-weight: 600; }
@media (max-width: 1240px) { .gauge { display: none; } }

/* ---------- product pages ---------- */
.page-hero { padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 96px); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.feature { background: rgba(0, 26, 34, 0.86); padding: 28px; display: grid; gap: 10px; align-content: start; }
.feature h4 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.375rem; line-height: 1.2; }
.feature p { color: var(--cream-soft); font-size: 0.9688rem; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- legal ---------- */
.legal { padding-block: clamp(40px, 6vw, 80px); }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: var(--step-3); margin-bottom: 10px; }
.legal h2 { font-size: var(--step-2); margin: 44px 0 14px; }
.legal p, .legal li { color: var(--cream-soft); }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 20px; display: grid; gap: 8px; margin: 14px 0 0; }
.legal strong { color: var(--cream); font-weight: 600; }
.legal a { color: var(--cyan); }
.legal .meta { color: var(--muted); font-size: 0.9375rem; }
.legal table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 0.9375rem; }
.legal th, .legal td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--cream-soft); }
.legal th { color: var(--cream); font-weight: 600; }
.table-scroll { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- waitlist forms (shared) ---------- */
.signup { width: 100%; max-width: 460px; display: grid; gap: 8px; }
.signup label { font-weight: 600; font-size: .9375rem; }
.field { display: flex; gap: 8px; padding: 5px; border-radius: 14px; background: rgba(240,235,224,.06); border: 1px solid var(--line); }
.field:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(121,198,206,.14); }
.field input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--cream); font: 500 1rem var(--f-body); padding: 11px 12px; outline: none; }
.field input::placeholder { color: var(--muted); }
.field button { flex: none; border: 0; border-radius: 10px; padding: 11px 18px; cursor: pointer; background: var(--cream); color: var(--abyss); font: 700 .9375rem var(--f-body); }
.field button:hover { filter: brightness(1.05); }
.field button:disabled { opacity: .6; cursor: wait; }
.signup .fine { font-size: .8125rem; color: var(--muted); }
.signup .fine a { color: var(--cream-soft); }
.form-msg { min-height: 1.4em; font-size: .9375rem; font-weight: 500; }
.form-msg:empty { min-height: 0; }
.form-msg.ok { color: var(--live); }
.form-msg.err { color: #FF9A8A; }
.form-msg.note { color: var(--relic-gold); }
.signup.done .field { opacity: .55; }
@media (max-width: 359px) { .field { flex-direction: column; } .field button { width: 100%; } }

.app-visual { min-width: 0; }

.app-copy { grid-template-columns: minmax(0, 1fr); }
.app-copy > * { max-width: 100%; }
.signup { grid-template-columns: minmax(0, 1fr); }
.field input { width: 100%; flex: 1 1 0; }
