/* ------------------------------------------------------------
   Tokens, reset, typography, shared components, fixed ocean layers
   ------------------------------------------------------------ */
:root {
  --sky-top: #24386b;
  --sky-mid: #8b6aa0;
  --sky-low: #f2a07b;
  --horizon: #ffd9a6;
  --sea-top: #2b7f99;
  --shallow: #0f5e78;
  --deep: #062a45;
  --abyss: #020c19;
  --sand: #e9d3a8;
  --coral: #ff8f6b;
  --gold: #ffc982;
  --foam: #e6fbff;
  --ink: #eaf6fb;
  --ink-soft: rgba(234, 246, 251, .74);
  --ink-dim: rgba(234, 246, 251, .5);
  --glass: rgba(255, 255, 255, .06);
  --glass-line: rgba(255, 255, 255, .14);
  --radius: 22px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--shallow);
  color: var(--ink);
  font: 400 17px/1.7 var(--font-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr, .defs { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--gold); color: #1a1a1a; border-radius: 10px; }
.skip:focus { top: 16px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(3.2rem, 9vw, 7.2rem); font-weight: 300; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 300; max-width: 18ch; }
h3 { font-size: 1.45rem; }
h1 em, h2 em { font-style: italic; color: var(--gold); }
p { margin: 0 0 1.1em; color: var(--ink-soft); }
.eyebrow { font-size: .78rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 1.2em; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.narrow { max-width: 62ch; }
.small { font-size: .9rem; }
.dim { color: var(--ink-dim); }
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; position: relative; z-index: 2; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 15px 28px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 .95rem/1 var(--font-body); letter-spacing: .02em; text-decoration: none;
  color: #20140c; background: linear-gradient(120deg, var(--gold), var(--coral));
  box-shadow: 0 10px 30px -10px rgba(255, 143, 107, .7);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -12px rgba(255, 143, 107, .85); }
.btn-ghost { background: rgba(255, 255, 255, .1); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); backdrop-filter: blur(6px); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7); }
.btn-sm { padding: 10px 20px; font-size: .85rem; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); filter: blur(6px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease), filter 1.4s var(--ease); transition-delay: calc(var(--i, 0) * 140ms); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Fixed ocean layers ---------- */
.ocean { position: fixed; inset: 0; z-index: -3; background: var(--shallow); transition: background-color .2s linear; }
.particles { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.rays { position: fixed; inset: -10% 0 0; z-index: -2; pointer-events: none; mix-blend-mode: screen; opacity: var(--rays, 1); }
.rays i {
  position: absolute; top: -10%; width: 14vw; height: 120%;
  background: linear-gradient(180deg, rgba(200, 245, 255, .28), rgba(200, 245, 255, 0) 75%);
  filter: blur(18px); transform-origin: top center;
  animation: sway 14s ease-in-out infinite alternate;
}
.rays i:nth-child(1) { left: 6%; transform: rotate(14deg); animation-duration: 17s; }
.rays i:nth-child(2) { left: 26%; width: 8vw; transform: rotate(9deg); animation-duration: 12s; animation-delay: -4s; }
.rays i:nth-child(3) { left: 46%; width: 18vw; transform: rotate(4deg); animation-duration: 19s; animation-delay: -8s; }
.rays i:nth-child(4) { left: 66%; width: 9vw; transform: rotate(-2deg); animation-duration: 15s; animation-delay: -2s; }
.rays i:nth-child(5) { left: 82%; width: 12vw; transform: rotate(-8deg); animation-duration: 21s; animation-delay: -11s; }
@keyframes sway { from { rotate: -4deg; opacity: .55; } to { rotate: 5deg; opacity: 1; } }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  transition: background .6s var(--ease), padding .6s var(--ease), box-shadow .6s;
}
.nav.scrolled { background: rgba(4, 30, 50, .55); backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 var(--glass-line); padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--font-display); font-size: 1.15rem; }
.brand img { border-radius: 50%; background: #fff; }
.brand em { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); }
.nav-links a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; }
.nav-links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform .5s var(--ease); }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.nav-toggle { display: none; }

/* ---------- Depth gauge ---------- */
.gauge {
  position: fixed; right: clamp(12px, 2vw, 30px); top: 50%; z-index: 40; translate: 0 -50%;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-dim);
  opacity: var(--gauge-op, 0); transition: opacity .6s;
}
.gauge-track { width: 2px; height: 34vh; background: rgba(255, 255, 255, .15); border-radius: 2px; position: relative; }
.gauge-track b { position: absolute; left: 50%; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px var(--gold); top: var(--gauge, 0%); }
.gauge-value { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0; text-transform: none; color: var(--ink); min-width: 4ch; text-align: center; }

@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav-toggle { display: grid; gap: 6px; place-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); cursor: pointer; }
  .nav-toggle span:not(.sr) { width: 20px; height: 2px; background: var(--ink); transition: transform .4s var(--ease); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
  .nav-links {
    position: fixed; inset: 0 0 auto; padding: 90px 24px 32px; flex-direction: column; gap: 22px;
    background: rgba(3, 24, 40, .94); backdrop-filter: blur(16px);
    transform: translateY(-105%); transition: transform .7s var(--ease); z-index: -1;
  }
  .nav-links.open { transform: none; }
  .nav-links a:not(.btn) { font-family: var(--font-display); font-size: 1.6rem; }
  .gauge { top: auto; bottom: 16px; translate: none; flex-direction: row; right: 16px; padding: 6px 14px; border-radius: 999px; background: rgba(3, 20, 36, .6); backdrop-filter: blur(10px); }
  .gauge-track { width: 18vw; height: 2px; }
  .gauge-label { display: none; }
  .gauge-track b { top: 50%; left: var(--gauge, 0%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}
