:root {
  --abyss: #0a1224;
  --deep-sea: #142e4d;
  --trench: #1c547a;
  --foam: #ebf5ff;
  --gold: #fab852;
  --aurora: #5ce6b8;
  --coral: #f57070;
  --biolume: #5cccf8;
  --muted: #7a9bb8;
  --line: rgba(235, 245, 255, 0.12);
  --glow: rgba(250, 184, 82, 0.35);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--foam);
  background: var(--abyss);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(92, 230, 184, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(250, 184, 82, 0.08), transparent 55%),
    linear-gradient(165deg, var(--abyss) 0%, var(--deep-sea) 45%, #0d1a30 100%);
  line-height: 1.6;
}

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--aurora);
}

img {
  max-width: 100%;
  display: block;
}

.skiplink {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--abyss);
  padding: 8px 16px;
  z-index: 999;
}

.skiplink:focus {
  left: 16px;
}

/* Header */
.site-mast {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(20px, 4vw, 48px);
  background: rgba(10, 18, 36, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.mast-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mast-mark svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.mast-mark span {
  font-size: 1.05rem;
}

.mast-waypoints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}

.mast-waypoints a {
  color: var(--muted);
  text-decoration: none;
}

.mast-waypoints a:hover {
  color: var(--foam);
}

/* Hero — coordinate ribbon */
.ribbon-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: clamp(40px, 8vw, 88px) clamp(20px, 4vw, 48px) 56px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .ribbon-hero {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
  }
}

.ribbon-coords {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aurora);
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.ribbon-coords span {
  padding: 4px 10px;
  border: 1px solid rgba(92, 230, 184, 0.35);
  border-radius: 4px;
  background: rgba(92, 230, 184, 0.06);
}

.ribbon-hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 12px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--foam) 20%, var(--gold) 85%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ribbon-sub {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 34ch;
}

.ribbon-tagline {
  font-size: 1.05rem;
  color: rgba(235, 245, 255, 0.88);
  margin: 0 0 28px;
  max-width: 42ch;
}

.ribbon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #e8942a);
  color: var(--abyss);
  box-shadow: 0 4px 24px var(--glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  color: var(--abyss);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--foam);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover {
  border-color: var(--aurora);
  color: var(--aurora);
}

.ribbon-visual {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.ribbon-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.sonar-ring {
  position: absolute;
  inset: auto 16px 16px 16px;
  padding: 12px 16px;
  background: rgba(10, 18, 36, 0.82);
  border: 1px solid rgba(92, 204, 248, 0.3);
  border-radius: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--biolume);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* Depth tier strip */
.depth-ledger {
  padding: 0 clamp(20px, 4vw, 48px) 64px;
  max-width: 1200px;
  margin: 0 auto;
}

.depth-ledger h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 20px;
}

.tier-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 700px) {
  .tier-rail {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tier-node {
  padding: 20px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), transparent);
  text-align: center;
}

.tier-node strong {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.tier-node span {
  font-size: 0.82rem;
  color: var(--muted);
}

.tier-node--sunlit strong { color: #7adbfa; }
.tier-node--twilight strong { color: #6aa8fa; }
.tier-node--midnight strong { color: #9e7ae6; }
.tier-node--abyssal strong { color: #3d3480; }

/* Toolkit band */
.toolkit-band {
  padding: 72px clamp(20px, 4vw, 48px);
  background: linear-gradient(180deg, transparent, rgba(20, 46, 77, 0.5) 30%, transparent);
}

.toolkit-band h2 {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 48px;
}

.toolkit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .toolkit-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.toolkit-panel {
  padding: 28px 24px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(10, 18, 36, 0.65);
  position: relative;
  overflow: hidden;
}

.toolkit-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--aurora));
  opacity: 0.7;
}

.toolkit-panel h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.toolkit-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Specimen gallery */
.specimen-wall {
  padding: 64px clamp(20px, 4vw, 48px) 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.specimen-wall h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin: 0 0 8px;
}

.specimen-wall > p {
  color: var(--muted);
  margin: 0 0 36px;
  max-width: 50ch;
}

.specimen-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}

@media (min-width: 800px) {
  .specimen-mosaic {
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    grid-template-rows: 1fr 1fr;
  }

  .specimen-frame--lead {
    grid-row: span 2;
  }
}

.specimen-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
}

.specimen-frame img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
}

.specimen-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: linear-gradient(transparent, rgba(10, 18, 36, 0.92));
  font-size: 0.78rem;
  font-family: "IBM Plex Mono", monospace;
  color: var(--aurora);
}

/* Legal sections */
.legal-dock {
  padding: 64px clamp(20px, 4vw, 48px) 48px;
  max-width: 800px;
  margin: 0 auto;
}

.legal-dock section {
  margin-bottom: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.legal-dock h2 {
  font-size: 1.6rem;
  margin: 0 0 20px;
  color: var(--gold);
}

.legal-dock h3 {
  font-size: 1.05rem;
  margin: 24px 0 10px;
}

.legal-dock p,
.legal-dock li {
  color: rgba(235, 245, 255, 0.82);
  font-size: 0.95rem;
}

.legal-dock ul {
  padding-left: 1.2rem;
}

.support-card {
  padding: 24px;
  border-radius: 12px;
  background: rgba(20, 46, 77, 0.45);
  border: 1px solid rgba(250, 184, 82, 0.25);
}

.support-card p {
  margin: 0 0 8px;
}

.support-card a {
  font-weight: 600;
}

/* Footer */
.site-keel {
  text-align: center;
  padding: 32px 20px 48px;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 600px) {
  .mast-waypoints {
    display: none;
  }
}
