/* FLEETING — THE ABYSS
   Off-black descent. Monochrome white. Light is rare and earned. */

@font-face {
  font-family: "Space Mono";
  src: url("fonts/SpaceMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("fonts/SpaceMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #070d14;
  --card: rgba(13, 19, 26, 0.72);
  --card-active: rgba(20, 28, 38, 0.85);
  --border: rgba(200, 235, 255, 0.10);
  --border-dim: rgba(200, 235, 255, 0.05);
  --accent: #a7f3ff;
  --accent-dim: rgba(167, 243, 255, 0.40);
  --accent-glow: rgba(167, 243, 255, 0.08);
  --accent-border: rgba(167, 243, 255, 0.22);
  --text: #f2f8fb;
  --text-sec: rgba(226, 240, 248, 0.55);
  --text-dim: rgba(226, 240, 248, 0.24);
  --ghost: rgba(226, 240, 248, 0.12);
  --solar: #ffd040;
  --solar-dim: rgba(255, 208, 64, 0.20);
  --wax: #b3402f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg); /* JS interpolates this darker as you descend */
  color: var(--text);
  font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s linear;
}

::selection { background: var(--accent); color: #000; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---- marine snow canvas ---- */
#snow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---- grain overlay ---- */
#grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  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'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- hide native scrollbar (the depth meter is the scrollbar) ---- */
html { scrollbar-width: none; }
::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* ---- depth meter ---- */
#depth-meter {
  position: fixed;
  right: 44px;
  top: 50%;
  transform: translateY(-50%);
  height: min(78vh, 760px);
  z-index: 10;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  pointer-events: none;
  user-select: none;
}
#depth-meter .track {
  width: 2px;
  height: 100%;
  background: var(--border-dim);
  position: relative;
}
#depth-meter .fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 0%;
  background: linear-gradient(var(--accent-dim), var(--accent));
  box-shadow: 0 0 12px var(--accent-glow);
}
#depth-meter .tick {
  position: absolute;
  right: 4px;
  width: 8px;
  height: 1px;
  background: var(--border);
  transform: translateY(-0.5px);
}
#depth-meter .tick.major {
  width: 16px;
  background: var(--ghost);
}
#depth-meter .tick.major span {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#depth-meter .probe {
  position: absolute;
  right: -18px;
  top: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  width: max-content;
  padding: 8px 12px;
  background: rgba(3, 8, 14, 0.82);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#depth-meter .probe-zone {
  color: var(--text-sec);
  font-size: 10px;
  letter-spacing: 0.3em;
  white-space: nowrap;
}
#depth-meter .probe-value {
  color: var(--accent);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px var(--accent-dim);
  line-height: 1;
}
#depth-meter .probe-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent), 0 0 40px var(--accent-dim);
  flex: none;
}

/* ---- layout ---- */
main { position: relative; z-index: 1; }

section {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 96px 24px 112px;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.label {
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 24px;
}

h1, h2 { font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }

h2 {
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1.22;
  margin-bottom: 20px;
}

.sub {
  color: var(--text-sec);
  font-size: 15px;
  max-width: 48ch;
  text-wrap: pretty;
}

.accent { color: var(--accent); }
.solar { color: var(--solar); }

/* ---- reveal on scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}
.reveal.on { opacity: 1; transform: none; }

/* ---- hero ---- */
#hero { min-height: 100dvh; position: relative; }

.drift-hero {
  width: clamp(140px, 26vw, 220px);
  height: auto;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 40px rgba(167, 243, 255, 0.18));
  animation: drift 7s ease-in-out infinite;
}

#hero .wordmark {
  font-size: clamp(40px, 10vw, 84px);
  font-weight: 700;
  letter-spacing: 0.28em;
  margin-right: -0.28em; /* optically recenter */
  text-shadow: 0 0 60px var(--accent-glow), 0 0 120px var(--accent-glow);
}

#hero .tagline {
  margin-top: 20px;
  color: var(--text-sec);
  font-size: clamp(14px, 2.4vw, 17px);
  max-width: 52ch;
}

#hero .tagline .accent { text-shadow: 0 0 24px var(--accent-dim); }

.cta-row {
  margin-top: 48px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: box-shadow 0.4s ease, background 0.4s ease, color 0.4s ease, transform 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #000;
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  box-shadow: 0 0 32px var(--accent-dim), 0 0 80px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-sec);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--ghost); }

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--text-dim);
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

/* ---- holo capsule card ---- */
.holo-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin-top: 44px;
  padding: 26px 26px 30px;
  text-align: left;
  border: 1px solid var(--accent-border);
  border-radius: 18px;
  background:
    radial-gradient(320px 200px at var(--mx, 70%) var(--my, 20%), rgba(167, 243, 255, 0.07), transparent 70%),
    var(--card);
  box-shadow: 0 0 60px var(--accent-glow), inset 0 0 40px rgba(167, 243, 255, 0.03);
  overflow: hidden;
  transform: rotate(-1.2deg);
}
.holo-sheen {
  position: absolute;
  inset: -60%;
  background: linear-gradient(115deg,
    transparent 42%,
    rgba(167, 243, 255, 0.06) 48%,
    rgba(255, 190, 240, 0.05) 52%,
    rgba(170, 255, 200, 0.05) 56%,
    transparent 62%);
  animation: sheen 6.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%, 100% { transform: translateX(-24%) rotate(0.001deg); }
  50% { transform: translateX(24%) rotate(0.001deg); }
}
.hc-top {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.hc-year { color: var(--accent); }
.hc-body {
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 22px;
}
.hc-meta {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: var(--text-sec);
  border-top: 1px solid var(--border-dim);
  padding-top: 16px;
}
.hc-meta div { display: flex; justify-content: space-between; gap: 12px; }
.hc-k { color: var(--text-dim); letter-spacing: 0.2em; font-size: 10.5px; }
.hc-stamp {
  position: absolute;
  right: 18px;
  bottom: 56px;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  padding: 4px 8px;
  transform: rotate(8deg);
}

/* ---- how it works ---- */
.steps {
  display: grid;
  gap: 18px;
  width: 100%;
  margin-top: 48px;
  text-align: left;
}

.step {
  position: relative;
  background:
    radial-gradient(280px 160px at var(--mx, 50%) var(--my, 0%), rgba(167, 243, 255, 0.05), transparent 70%),
    var(--card);
  border: 1px solid var(--border-dim);
  border-radius: 16px;
  padding: 26px 28px;
  max-width: 560px;
  transition: border-color 0.5s ease, background 0.5s ease;
}
.step.offset { margin-left: auto; }
.step:not(.offset) { margin-right: auto; }
.step:hover { border-color: var(--accent-border); }
.step .num {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--accent-dim);
  margin-bottom: 10px;
}
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--text-sec); font-size: 13.5px; }

/* ---- fishing ---- */
.fishing-scene {
  position: relative;
  margin-bottom: 28px;
}
.fishing-scene img {
  width: clamp(240px, 44vw, 380px);
  height: auto;
  filter: drop-shadow(0 0 36px rgba(167, 243, 255, 0.12));
}
.line-anchor {
  position: absolute;
  right: 8%;
  top: 4%;
  bottom: 0;
  width: 1px;
}
.fish-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(rgba(226, 240, 248, 0.3), rgba(167, 243, 255, 0.12));
}
.bobber {
  position: absolute;
  left: -3px;
  bottom: -6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  animation: tug 3.4s ease-in-out infinite;
}
@keyframes tug {
  0%, 78%, 100% { transform: translateY(0); }
  84% { transform: translateY(7px); }
  90% { transform: translateY(-3px); }
}

/* ---- drift ---- */
.drift-img {
  width: 180px;
  height: auto;
  margin-bottom: 32px;
  filter: drop-shadow(0 0 44px rgba(167, 243, 255, 0.16));
  animation: drift 8s ease-in-out infinite;
}
.drift-img.sm { width: 120px; margin-bottom: 24px; }

/* ---- receipt ---- */
.receipt {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin-top: 44px;
  padding: 26px 24px 30px;
  text-align: left;
  color: rgba(20, 24, 28, 0.9);
  background: #eef0ec;
  border-radius: 3px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  transform: rotate(1.4deg);
  /* perforated bottom edge */
  -webkit-mask:
    radial-gradient(6px at 8px 100%, transparent 98%, #000) -8px 0 / 16px 100%;
  mask:
    radial-gradient(6px at 8px 100%, transparent 98%, #000) -8px 0 / 16px 100%;
}
.r-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-variant-numeric: tabular-nums;
}
.r-title {
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 11px;
  padding-bottom: 8px;
}
.r-note {
  justify-content: center;
  color: rgba(20, 24, 28, 0.55);
  font-size: 10px;
  letter-spacing: 0.18em;
  padding-top: 8px;
  text-align: center;
}
.r-rule {
  border-top: 1px dashed rgba(20, 24, 28, 0.35);
  margin: 8px 0;
}
.wax {
  position: absolute;
  right: -14px;
  bottom: -14px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #d4553f, var(--wax) 55%, #7e2b1f);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), inset 0 0 0 5px rgba(0, 0, 0, 0.12);
  display: grid;
  place-items: center;
  transform: rotate(-12deg);
}
.wax span {
  color: rgba(255, 235, 225, 0.85);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  border: 1px solid rgba(255, 235, 225, 0.4);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
}

/* ---- echo card ---- */
.echo-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-top: 48px;
  background:
    radial-gradient(300px 180px at var(--mx, 50%) var(--my, 0%), rgba(255, 208, 64, 0.05), transparent 70%),
    var(--card);
  border: 1px solid var(--solar-dim);
  border-radius: 16px;
  padding: 30px 30px 26px;
  text-align: left;
  box-shadow: 0 0 60px rgba(255, 208, 64, 0.05);
}
.echo-card .meta {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.echo-card .meta .surfaced { color: var(--solar); }
.echo-card blockquote {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}
.echo-card .sig {
  margin-top: 22px;
  font-size: 12px;
  color: var(--text-sec);
}

/* ---- footer ---- */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-dim);
  padding: 48px 24px 56px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}
footer nav {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
footer nav a { color: var(--text-sec); font-size: 12px; letter-spacing: 0.08em; }
footer nav a:hover { color: var(--accent); text-decoration: none; }

/* ---- legal pages ---- */
.legal {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 96px 24px 64px;
}
.legal h1 { font-size: 30px; margin-bottom: 8px; }
.legal .updated { color: var(--text-dim); font-size: 12px; margin-bottom: 40px; }
.legal h2 { font-size: 18px; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--text-sec); font-size: 14px; margin-bottom: 12px; }
.legal ul { padding-left: 22px; }
.legal .back {
  display: inline-block;
  margin-bottom: 48px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}
.legal .back:hover { color: var(--accent); text-decoration: none; }

@media (max-width: 640px) {
  #depth-meter { display: none; }
  section { padding: 72px 20px 88px; }
  .step.offset { margin-left: 0; }
  .wax { right: -6px; }
}

@media (prefers-reduced-motion: reduce) {
  .drift-hero, .drift-img, .scroll-hint, .holo-sheen, .bobber { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  body { transition: none; }
}
