:root {
  --abyss: #03141c;
  --deep: #062433;
  --glass: rgba(186, 240, 230, 0.08);
  --line: rgba(186, 240, 230, 0.16);
  --foam: #e7f6f3;
  --mist: #b7d4d4;
  --sea: #9af3dc;
  --glow: #5ef0d0;
  --violet: #c4b5fd;
  --ink: #042028;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--foam);
  font-family: Figtree, "Segoe UI", sans-serif;
  font-size: 1.02rem;
  line-height: 1.55;
  background: var(--abyss);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: Newsreader, Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.05rem; font-family: Figtree, "Segoe UI", sans-serif; letter-spacing: 0; margin-top: 0.8rem; }
p { margin: 0; }
ul { margin: 0.45rem 0 0; padding-left: 1.1rem; }
li { color: var(--mist); }
.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--foam); color: var(--ink);
  padding: 0.45rem 0.7rem; z-index: 8;
}
.skip:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
::selection { background: var(--glow); color: var(--ink); }
[id] { scroll-margin-top: 7.2rem; }

.abyss-bg {
  position: fixed; inset: -8vh 0 auto; height: 80vh; z-index: 0; pointer-events: none;
  background:
    radial-gradient(420px 280px at 18% 40%, rgba(94, 240, 208, 0.1), transparent 70%),
    radial-gradient(520px 320px at 86% 10%, rgba(139, 124, 255, 0.12), transparent 72%);
}
.sounding { display: none; }

.top, .hero, .band .column, .band header, .band .map-grid,
section > header, .cards, .journey, .stages, .tide, .cases, .quotes, .faq, .harbor, footer {
  width: min(1080px, calc(100% - 1.5rem));
  margin-inline: auto;
}
.top, .hero, section, footer { position: relative; z-index: 1; }
.top {
  display: flex; flex-wrap: wrap; gap: 0.55rem 1rem; align-items: center;
  width: 100%; max-width: none; margin: 0;
  padding: 0.75rem max(0.75rem, calc((100% - 1080px) / 2));
  position: sticky; top: 0; z-index: 5;
  background: rgba(3, 20, 28, 0.82);
  backdrop-filter: blur(16px);
}
.top.is-solid { border-bottom: 1px solid var(--line); }
.logo { font-family: Newsreader, Georgia, serif; font-size: 1.45rem; text-decoration: none; margin-right: auto; }
.logo span { color: var(--glow); }
.top nav {
  display: flex; gap: 0.85rem; overflow-x: auto; flex: 1 1 100%; order: 3; min-width: 0;
  scrollbar-width: none;
}
.top nav::-webkit-scrollbar { display: none; }
.top a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.surface { margin-left: 0; border: 1px solid var(--line); border-radius: 999px; padding: 0 0.85rem; }

.hero { display: grid; gap: 1.6rem; padding: 1.4rem 0 2.4rem; }
.hero-sea { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.kicker, .tag {
  color: var(--sea); letter-spacing: 0.14em; text-transform: uppercase;
  font-size: 0.75rem; font-weight: 650;
}
.buoy { color: var(--glow); margin-top: 0.7rem; font-size: 0.92rem; }
.lead, .deck { color: var(--mist); margin-top: 0.85rem; max-width: 46rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.1rem 0; }
.btn {
  background: var(--glow); color: var(--ink); text-decoration: none; min-height: 48px;
  padding: 0.75rem 1.05rem; border-radius: 999px; display: inline-flex; align-items: center;
  font: inherit; font-weight: 700; border: 0; cursor: pointer;
}
.btn.line { background: transparent; color: var(--foam); border: 1px solid var(--line); }
.btn:hover { filter: brightness(1.08); }
.certs, .tide-table { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; padding: 0; margin: 0; }
.certs li { border: 1px solid rgba(94, 240, 208, 0.4); border-radius: 999px; padding: 0.3rem 0.7rem; color: var(--mist); }
.tide-table { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 1.1rem; }
.tide-table li {
  padding: 0.6rem 0.7rem; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--line);
}
.tide-table strong {
  display: block; font-family: Newsreader, Georgia, serif; font-size: 1.55rem; color: #e7fff8;
}
.tide-table span { color: var(--mist); font-size: 0.82rem; }

.porthole { margin: 0; justify-self: center; text-align: center; position: relative; }
.porthole img {
  width: min(260px, 70vw); height: min(260px, 70vw); object-fit: cover; object-position: center 18%;
  border-radius: 50%; border: 6px solid rgba(94, 240, 208, 0.45);
  box-shadow: 0 0 0 14px rgba(8, 50, 64, 0.55), 0 24px 50px rgba(0, 0, 0, 0.4);
  position: relative; z-index: 1;
}
.ring {
  position: absolute; left: 50%; top: calc(min(260px, 70vw) / 2);
  width: min(300px, 80vw); height: min(300px, 80vw);
  transform: translate(-50%, -50%); border-radius: 50%;
  border: 1px dashed rgba(94, 240, 208, 0.5);
  box-shadow: 0 0 0 10px rgba(139, 124, 255, 0.08);
  animation: spin 48s linear infinite; pointer-events: none;
}
figcaption { margin-top: 0.85rem; display: grid; position: relative; z-index: 1; }
figcaption span { color: var(--mist); }
.tech { display: flex; justify-content: center; gap: 0.4rem; list-style: none; padding: 0.55rem 0 0; margin: 0; position: relative; z-index: 1; }
.tech img { width: 34px; height: 34px; background: white; border-radius: 50%; padding: 5px; }
.orb { position: absolute; border-radius: 50%; }
.orb-a { width: 160px; height: 160px; left: -30px; top: 30px; background: rgba(94, 240, 208, 0.16); filter: blur(2px); box-shadow: 0 0 40px rgba(94, 240, 208, 0.25); }
.orb-b { width: 110px; height: 110px; right: 6%; top: 18%; background: rgba(139, 124, 255, 0.2); filter: blur(1px); }
.orb-c { width: 8px; height: 8px; left: 42%; bottom: 18%; background: #f3fffb; box-shadow: 0 0 14px var(--glow); }
.orb-d { width: 5px; height: 5px; left: 18%; bottom: 28%; background: var(--violet); box-shadow: 0 0 12px var(--violet); }

section { padding: 1.2rem 0 2.2rem; }
.band { background: linear-gradient(180deg, rgba(6, 36, 51, 0.92), rgba(3, 20, 28, 0.2)); padding: 2rem 0; }
.column { list-style: none; padding: 0; margin: 1.2rem auto 0; display: grid; gap: 0.7rem; position: relative; }
.column::before {
  content: ""; position: absolute; left: 0.15rem; top: 0.8rem; bottom: 0.8rem; width: 2px;
  background: linear-gradient(var(--glow), #1a6a86 42%, #7c6cf0 78%, #041018);
}
.column > li {
  display: grid; grid-template-columns: 4.4rem 1fr; gap: 0.85rem;
  margin-left: 1rem; padding: 0.95rem 1rem; border-radius: 20px;
  background: rgba(4, 22, 32, 0.55); border: 1px solid var(--line);
}
.column > li:nth-child(2) { background: rgba(4, 28, 40, 0.62); }
.column > li:nth-child(3) { background: rgba(8, 20, 40, 0.7); }
.column > li:nth-child(4) { background: rgba(6, 10, 24, 0.82); }
.meters { font-family: Newsreader, Georgia, serif; color: var(--sea); text-align: right; padding-top: 0.2rem; }
.column h3 { margin-bottom: 0.35rem; }
.cards { display: grid; gap: 0.9rem; margin-top: 1.1rem; }
article.cards, .cards > article, .seal-list article, .stack-map section, .stages > li, .case, blockquote, .faq details, .harbor form {
  background: var(--glass); border: 1px solid var(--line); border-radius: 22px;
}
.cards > article, .seal-list article, .stack-map section, .stages > li { padding: 0.85rem; }
.cards img, .case img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 14px; }
.cards h3, .case h3 { margin-top: 0.75rem; }
.cards p, .case p, .stages p, .seal-list p { color: var(--mist); margin-top: 0.4rem; }

.map-grid, .seal-list, .stack-map { display: grid; gap: 0.75rem; }
.map-grid { margin-top: 1.1rem; }
.stack-map { grid-template-columns: 1fr 1fr; }
.stack-map h3 { font-size: 1.05rem; }
.stack-map ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.stack-map li {
  border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.55rem; color: var(--foam);
}
.journey {
  list-style: none; padding: 0; margin: 1.1rem auto 0; display: grid; gap: 0.8rem;
}
.journey li { padding-top: 0.55rem; border-top: 2px solid rgba(94, 240, 208, 0.35); }
.journey h3 { font-size: 1.25rem; }
.journey p { color: var(--mist); margin-top: 0.35rem; }
.stages { list-style: none; padding: 0; margin: 1rem auto 0; display: grid; gap: 0.8rem; }
.stages span { color: var(--sea); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }

.tide { display: grid; gap: 1rem; }
.sim-label, .stats p { display: flex; justify-content: space-between; gap: 0.6rem; align-items: baseline; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; margin-top: 0.6rem; }
.stats p:has([data-status]) { grid-column: 1 / -1; }
.stats p {
  margin: 0; padding: 0.55rem 0.65rem; border-radius: 14px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
}
.stats span, .sim-label label { color: var(--mist); font-size: 0.82rem; }
output, .stats strong { color: var(--sea); font-family: Newsreader, Georgia, serif; font-size: 1.35rem; white-space: nowrap; }
.stats [data-status] {
  font-family: Figtree, "Segoe UI", sans-serif; font-size: 1rem; line-height: 1.25;
  text-align: right; white-space: normal;
}
.stats [data-status][data-level="warn"] { color: #fde68a; }
.stats [data-status][data-level="hot"] { color: #ffc1cc; }
input[type="range"] { width: 100%; height: 44px; accent-color: var(--glow); }
[data-status][data-level="warn"] { color: #fde68a; }
[data-status][data-level="hot"] { color: #ffc1cc; }
.fine, .form-note, .note, .who { color: var(--sea); font-size: 0.88rem; }
.note, .who { display: block; margin-top: 0.75rem; }
.who { font-family: Figtree, "Segoe UI", sans-serif; letter-spacing: 0.02em; }
.current-frame {
  position: relative; border-radius: 20px; overflow: hidden; min-height: 210px;
  border: 1px solid var(--line);
  background:
    radial-gradient(140px 90px at 18% 80%, rgba(94, 240, 208, 0.16), transparent 70%),
    linear-gradient(#031820, #07283a);
}
.current-frame canvas { width: 100%; height: 220px; display: block; }
.tide.is-rise .current-frame { box-shadow: inset 0 0 36px rgba(253, 224, 71, 0.12); }
.tide.is-storm .current-frame { box-shadow: inset 0 0 42px rgba(255, 140, 170, 0.16); }
.depth-axis {
  display: flex; justify-content: space-between; color: var(--mist);
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 0.45rem 0;
}
.sim-nodes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.sim-node {
  border-radius: 16px; padding: 0.55rem;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
}
.sim-node.is-dim { opacity: 0.38; }
.sim-node-title { font-size: 0.72rem; color: var(--mist); letter-spacing: 0.04em; }
.sim-pods { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; margin-top: 0.4rem; }
.sim-pod {
  position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 10px;
  background: #0b2430; border: 1px solid rgba(186, 240, 230, 0.08);
}
.sim-pod.is-on {
  background: radial-gradient(circle at 32% 30%, #f4fffb, var(--glow) 42%, #14627a 78%);
  box-shadow: 0 0 calc(8px + var(--energy, 0.2) * 22px) rgba(94, 240, 208, 0.85), 0 0 18px rgba(139, 124, 255, 0.35);
  animation: biolume 2.6s ease-in-out infinite;
}
.sim-pod.is-on::after {
  content: ""; position: absolute; width: 160%; height: 45%; left: -30%; top: 28%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  transform: translateX(-120%);
  animation: trail 1.8s linear infinite;
}
.sim-pod:nth-child(2).is-on::after { animation-delay: 0.35s; }
.sim-pod:nth-child(3).is-on { animation-delay: 0.4s; }
.sim-pod:nth-child(4).is-on::after { animation-delay: 0.7s; }
.legend { display: flex; gap: 0.8rem; align-items: center; color: var(--mist); font-size: 0.82rem; margin-top: 0.55rem; }
.legend i { width: 0.7rem; height: 0.7rem; border-radius: 4px; display: inline-block; }
.legend .on { background: var(--glow); box-shadow: 0 0 8px var(--glow); }
.legend .off { background: #0b2430; border: 1px solid var(--line); }

.cases { display: grid; gap: 1rem; margin-top: 1rem; }
.case { display: grid; gap: 0.9rem; padding: 0.85rem; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin: 0.8rem 0; }
.metrics div { background: rgba(0, 0, 0, 0.22); border-radius: 12px; padding: 0.45rem 0.55rem; }
.metrics dt { color: var(--mist); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
.metrics dd { margin: 0.15rem 0 0; font-family: Newsreader, Georgia, serif; font-size: 1.25rem; }
.quotes { display: grid; gap: 0.8rem; margin-top: 1rem; }
blockquote { margin: 0; padding: 1rem 1rem 1rem 1.1rem; border-left: 3px solid var(--glow); }
blockquote p:first-child {
  font-family: Newsreader, Georgia, serif; font-style: italic; font-size: 1.28rem;
  line-height: 1.3; color: var(--foam);
}
.faq { display: grid; gap: 0.6rem; margin-top: 1rem; }
.faq details { padding: 0.35rem 0.9rem; }
.faq summary { cursor: pointer; list-style: none; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--glow); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq summary h3 { font-size: 1.2rem; }
.faq details p { color: var(--mist); padding-bottom: 0.8rem; }

.harbor { padding-bottom: 2.4rem; }
.harbor form { padding: 1rem; margin-top: 1rem; }
.field { display: grid; gap: 0.3rem; margin-bottom: 0.75rem; }
label { font-size: 0.9rem; }
input, select {
  width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(3, 16, 24, 0.8); color: var(--foam); font: inherit; padding: 0.55rem 0.7rem;
}
.split { display: grid; gap: 0.5rem; }
.form-note { min-height: 1.4em; }
footer { padding-bottom: 2.4rem; color: var(--mist); }
.pager { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.pager a { text-decoration: none; }
.pager ol { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; padding: 0; margin: 0; }
.pager ol a {
  width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line);
}
.pager [aria-current="page"] { background: var(--glow); color: var(--ink); }

.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (min-width: 860px) {
  [id] { scroll-margin-top: 4.6rem; }
  .logo { margin-right: 0.4rem; }
  .top nav { flex: 0 1 auto; order: 0; width: auto; }
  .surface { margin-left: auto; }
  .hero { grid-template-columns: 1.15fr 0.85fr; align-items: center; padding-top: 2rem; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .map-grid { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
  .stack-map { grid-template-columns: 1fr 1fr 1fr; }
  .journey { grid-template-columns: repeat(5, 1fr); gap: 0.8rem; }
  .stages { grid-template-columns: repeat(3, 1fr); }
  .tide { grid-template-columns: 0.86fr 1.14fr; align-items: center; }
  .sim-nodes { grid-template-columns: repeat(4, 1fr); }
  .case { grid-template-columns: 0.82fr 1.18fr; align-items: center; }
  .quotes { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1400px) {
  .sounding {
    display: flex; flex-direction: column; align-items: center; gap: 0.45rem;
    position: fixed; left: 1.1rem; top: 50%; transform: translateY(-50%);
    z-index: 4; color: var(--mist); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  }
  .sounding-track { width: 2px; height: 150px; background: rgba(183, 212, 212, 0.25); position: relative; }
  .sounding-fill {
    position: absolute; left: -1px; top: 0; width: 4px; height: calc(var(--depth, 0) * 100%);
    background: var(--glow); box-shadow: 0 0 10px var(--glow);
  }
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes biolume {
  50% { filter: brightness(1.15); }
}
@keyframes trail { to { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  .ring { animation: none; }
}
