/* ===========================================================
   Shared stylesheet — Deep Blue Exploration (DBE) + Wrecks & Riches (WnR)
   Companion sites. WnR is consumer-facing & cinematic.
   DBE is investor-facing & editorial.
   =========================================================== */

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }

/* ===========================================================
   SHARED FONT STACK
   Body: Manrope (both sites)
   Mono: JetBrains Mono
   WnR display: Anton
   DBE display: Cormorant Garamond
   =========================================================== */
:root {
  --font-sans: "Manrope", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* WnR scheme — gold + ocean (matched to badge logo) */
  --wnr-ink: #eaf4fa;
  --wnr-ink-soft: #b6cfdb;
  --wnr-ink-dim: #6c8896;
  --wnr-bg: #07182a;
  --wnr-bg-2: #0c2742;
  --wnr-bg-3: #14416a;
  --wnr-surface: #0e2c48;
  --wnr-line: rgba(214, 178, 100, 0.20);
  --wnr-accent: #e7c46a;        /* antique gold — primary brand */
  --wnr-accent-glow: #f4d98a;
  --wnr-ocean: #3a87b5;         /* mid ocean teal-blue from badge */
  --wnr-ocean-soft: #6fb1d6;
  --wnr-treasure: #e7c46a;
  --wnr-treasure-soft: #f4d98a;
  --wnr-font-display: "Cinzel", "Cormorant Garamond", "Trajan Pro", Georgia, serif;
  --wnr-font-condensed: "Anton", "Bebas Neue", Impact, sans-serif;

  /* DBE scheme — deep navy + brushed silver (matched to chrome crest) */
  --dbe-ink: #0d1f33;
  --dbe-ink-soft: #3a4f66;
  --dbe-ink-dim: #6a7c8e;
  --dbe-bg: #f3f5f8;          /* cool paper white */
  --dbe-bg-2: #e6ebf0;
  --dbe-paper: #fbfcfd;
  --dbe-navy: #15355f;        /* deep royal blue from DBE crest */
  --dbe-navy-2: #1f4a82;
  --dbe-line: rgba(13, 31, 51, 0.14);
  --dbe-accent: #1f4a82;       /* royal blue \u2014 primary highlight */
  --dbe-accent-2: #6e8398;     /* brushed steel / chrome */
  --dbe-silver: #b8c4d0;
  --dbe-chrome-grad: linear-gradient(180deg, #d8dee4 0%, #8a98a8 50%, #c8d0d8 100%);
  --dbe-font-display: "Cinzel", "Cormorant Garamond", "Trajan Pro", Georgia, serif;
  --dbe-font-serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
}

/* ===========================================================
   SITE: WnR
   =========================================================== */
body.wnr {
  background: var(--wnr-bg);
  color: var(--wnr-ink);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}
.wnr h1, .wnr h2, .wnr h3, .wnr .display {
  font-family: var(--wnr-font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.92;
  text-transform: uppercase;
  margin: 0;
}
.wnr .display-xl { font-size: clamp(64px, 10vw, 168px); }
.wnr .display-lg { font-size: clamp(48px, 6vw, 96px); }
.wnr .display-md { font-size: clamp(36px, 4.2vw, 64px); }
.wnr .display-sm { font-size: clamp(28px, 3vw, 44px); }
.wnr .eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 11px;
  color: var(--wnr-accent);
}
.wnr .eyebrow .dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--wnr-accent); border-radius: 50%;
  margin-right: 10px; transform: translateY(-2px);
  box-shadow: 0 0 12px var(--wnr-accent-glow);
}
.wnr .lead {
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--wnr-ink-soft);
  max-width: 62ch;
}
.wnr .container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}
.wnr section { position: relative; padding: clamp(60px, 9vw, 140px) 0; }
.wnr hr.divider {
  border: 0; height: 1px; background: var(--wnr-line); margin: 0;
}
.wnr .btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 11px; font-weight: 600;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.wnr .btn-primary {
  background: var(--wnr-accent); color: #042437;
}
.wnr .btn-primary:hover { background: var(--wnr-accent-glow); transform: translateY(-1px); }
.wnr .btn-ghost {
  border: 1px solid var(--wnr-line); color: var(--wnr-ink);
}
.wnr .btn-ghost:hover { border-color: var(--wnr-accent); color: var(--wnr-accent); }

/* WnR nav */
.wnr .nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(4,18,29,0.85), rgba(4,18,29,0));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.wnr .nav-logo {
  height: 38px; width: auto; filter: drop-shadow(0 2px 12px rgba(79,195,226,0.35));
}
.wnr .nav-links {
  display: flex; gap: clamp(14px, 2vw, 28px);
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.18em;
}
.wnr .nav-links a { color: var(--wnr-ink-soft); transition: color .2s; }
.wnr .nav-links a:hover { color: var(--wnr-accent); }

/* Density tweak hook */
.wnr[data-density="compact"] section { padding: clamp(40px, 6vw, 90px) 0; }
.wnr[data-density="spacious"] section { padding: clamp(80px, 12vw, 180px) 0; }

/* Light mode (parchment / aged map) */
.wnr[data-mode="light"] {
  --wnr-bg: #efe7d3;
  --wnr-bg-2: #e4d9bd;
  --wnr-bg-3: #d4c69f;
  --wnr-surface: #f8f1dc;
  --wnr-ink: #142a45;
  --wnr-ink-soft: #3a5878;
  --wnr-ink-dim: #6e8898;
  --wnr-line: rgba(20, 42, 69, 0.20);
}

/* ===========================================================
   SITE: DBE
   =========================================================== */
body.dbe {
  background: var(--dbe-bg);
  color: var(--dbe-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}
.dbe h1, .dbe h2, .dbe h3, .dbe .display {
  font-family: var(--dbe-font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0;
}
.dbe .display-xl { font-size: clamp(56px, 7vw, 116px); }
.dbe .display-lg { font-size: clamp(40px, 5vw, 76px); line-height: 1.02; }
.dbe .display-md { font-size: clamp(32px, 3.6vw, 52px); }
.dbe .display-sm { font-size: clamp(24px, 2.4vw, 36px); }
.dbe .display em { font-style: italic; color: var(--dbe-accent); }
.dbe .eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 10.5px;
  color: var(--dbe-accent);
  font-weight: 500;
}
.dbe .eyebrow .num {
  color: var(--dbe-ink-dim); margin-right: 12px;
}
.dbe .lead {
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--dbe-ink-soft);
  max-width: 64ch;
  line-height: 1.55;
}
.dbe .container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}
.dbe section { position: relative; padding: clamp(70px, 9vw, 140px) 0; }
.dbe .rule {
  height: 1px; background: var(--dbe-line); border: 0; margin: 0;
}

/* DBE nav */
.dbe .nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(244, 239, 230, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dbe-line);
}
.dbe .nav-links {
  display: flex; gap: clamp(14px, 2vw, 28px);
  font-family: var(--font-mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--dbe-ink-soft);
}
.dbe .nav-links a:hover { color: var(--dbe-accent); }

.dbe .btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 2px;
  font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.2em;
  font-size: 11px; font-weight: 600;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.dbe .btn-primary {
  background: var(--dbe-navy); color: var(--dbe-bg);
}
.dbe .btn-primary:hover { background: var(--dbe-navy-2); }
.dbe .btn-ghost {
  border: 1px solid var(--dbe-ink); color: var(--dbe-ink);
}
.dbe .btn-ghost:hover { background: var(--dbe-ink); color: var(--dbe-bg); }

.dbe[data-density="compact"] section { padding: clamp(50px, 6vw, 90px) 0; }
.dbe[data-density="spacious"] section { padding: clamp(90px, 12vw, 180px) 0; }

/* DBE dark mode — midnight navy with brushed chrome */
.dbe[data-mode="dark"] {
  --dbe-bg: #07182a;
  --dbe-bg-2: #0c2742;
  --dbe-paper: #102e4d;
  --dbe-navy: #c8d6e4;
  --dbe-navy-2: #aebbc9;
  --dbe-ink: #e9eef5;
  --dbe-ink-soft: #aebccc;
  --dbe-ink-dim: #6c7c8e;
  --dbe-line: rgba(200, 214, 228, 0.18);
  --dbe-accent: #b8c4d0;
}

/* ===========================================================
   Shared utilities
   =========================================================== */
.flex { display: flex; }
.grid { display: grid; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.gap-4 { gap: 16px; } .gap-5 { gap: 24px; } .gap-6 { gap: 32px; }
.gap-8 { gap: 48px; } .gap-10 { gap: 64px; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.relative { position: relative; }

/* Placeholder image slot */
.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.04) 0 14px,
      rgba(255,255,255,0.00) 14px 28px),
    rgba(255,255,255,0.03);
  border: 1px dashed currentColor;
  color: var(--wnr-ink-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  text-align: center; padding: 24px;
  border-radius: 2px;
}
.dbe .placeholder {
  color: var(--dbe-ink-dim);
  background:
    repeating-linear-gradient(135deg,
      rgba(14,28,42,0.05) 0 14px,
      rgba(14,28,42,0.00) 14px 28px),
    rgba(14,28,42,0.03);
}

/* Animated reveal helper */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* Cross-site footer link */
.cross-link {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 6px 12px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
}

/* ===========================================================
   WnR Footer (shared by wnrpost / members / merch)
   =========================================================== */
body.wnr .footer {
  background: var(--wnr-bg-2);
  padding: 80px 0 28px;
  border-top: 1px solid var(--wnr-line);
}
body.wnr .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
body.wnr .footer .ftr-brand img {
  height: 56px; margin-bottom: 18px;
}
body.wnr .footer .ftr-brand p { color: var(--wnr-ink-soft); font-size: 14px; max-width: 36ch; }
body.wnr .footer h5 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wnr-ink-dim);
  margin: 0 0 16px;
}
body.wnr .footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
body.wnr .footer ul a {
  color: var(--wnr-ink-soft);
  font-size: 14px;
  transition: color .2s;
}
body.wnr .footer ul a:hover { color: var(--wnr-accent); }
body.wnr .footer .bottom {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--wnr-line);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.14em; color: var(--wnr-ink-dim);
  flex-wrap: wrap; gap: 16px;
}
body.wnr .footer .cross-link {
  border: 1px solid var(--wnr-line);
  color: var(--wnr-accent);
}
body.wnr .footer .cross-link:hover { background: var(--wnr-accent); color: #04121d; }
@media (max-width: 900px) { body.wnr .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { body.wnr .footer-grid { grid-template-columns: 1fr; } }

/* ===========================================================
   WnR contrast pass — dark-on-dark legibility
   The base palette stays cinematic, but every card surface gets a
   touch more separation from the section background: a brighter
   border, a 1px top-edge highlight, and a soft outer shadow.
   =========================================================== */
body.wnr {
  --wnr-line: rgba(154, 211, 232, 0.22);
}
body.wnr .wreck-card,
body.wnr .crew-card,
body.wnr .science-card,
body.wnr .story,
body.wnr .watch-card,
body.wnr .social-card,
body.wnr .ep,
body.wnr .art-card,
body.wnr .art-detail {
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.025) 0%,
    rgba(255, 255, 255, 0) 30%
  ), var(--wnr-surface);
  border-color: rgba(154, 211, 232, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 6px 20px rgba(0, 0, 0, 0.28);
}
body.wnr .wreck-card:hover,
body.wnr .crew-card:hover,
body.wnr .story:hover,
body.wnr .watch-card:hover,
body.wnr .social-card:hover,
body.wnr .art-card:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 10px 28px rgba(0, 0, 0, 0.4);
}

/* ARTEMIS "Explore Full Catalog" link — was a ghost btn on a dark
   gradient background, basically invisible. Give it a treasure-tinted
   surface so it reads as the primary CTA in its section. */
body.wnr .artemis-explore {
  background: linear-gradient(180deg,
    rgba(212, 168, 74, 0.16) 0%,
    rgba(212, 168, 74, 0.08) 100%
  );
  border: 1px solid rgba(212, 168, 74, 0.55);
  color: var(--wnr-treasure-soft);
  box-shadow:
    0 1px 0 rgba(240, 208, 136, 0.18) inset,
    0 4px 12px rgba(0, 0, 0, 0.3);
}
body.wnr .artemis-explore:hover {
  background: linear-gradient(180deg,
    rgba(212, 168, 74, 0.28) 0%,
    rgba(212, 168, 74, 0.16) 100%
  );
  border-color: var(--wnr-treasure);
  color: #ffefd0;
  transform: translateY(-1px);
}

/* Catalog controls bar — was on `var(--wnr-bg)` inside a section that's
   also dark; add a hairline lift. */
body.wnr .art-controls {
  border-color: rgba(154, 211, 232, 0.26);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

/* Press list rows — separator lines were almost invisible */
body.wnr .press-list .row {
  border-top-color: rgba(154, 211, 232, 0.22);
}
body.wnr .press-list .row:last-child {
  border-bottom-color: rgba(154, 211, 232, 0.22);
}

/* Pagination buttons — match the new card chrome */
body.wnr .pg-btn {
  border-color: rgba(154, 211, 232, 0.28);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

body.wnr .art-card {
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.07) 100%
  ), var(--wnr-surface);
  border-color: rgba(154, 211, 232, 0.32);
}
body.wnr .art-card .art-body {
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.08) 100%
  );
}
body.wnr .art-card .art-name {
  color: #f3fbff;
}
body.wnr .art-card .art-meta {
  color: #c8dde5;
}
body.wnr .art-card:hover {
  border-color: var(--art-accent, var(--wnr-accent));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 12px 32px rgba(0, 0, 0, 0.42);
}

/* Print niceties */
@media print {
  .nav, .tweaks-toggle { display: none !important; }
}

/* ===========================================================
   MOBILE / RESPONSIVE NAV (shared, both sites)
   Below 900px the link list collapses behind a hamburger button.
   Aria pattern: button toggles aria-expanded on a sibling .nav-links.
   =========================================================== */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  align-items: center; justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  padding: 0;
  z-index: 60;
}
.nav-toggle span {
  display: block; width: 16px; height: 1.5px;
  background: currentColor;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* ----- WnR nav mobile ----- */
@media (max-width: 900px) {
  .wnr .nav {
    flex-wrap: wrap;
    row-gap: 0;
    padding: 14px 20px;
  }
  .wnr .nav .nav-toggle {
    display: flex;
    color: var(--wnr-ink);
    border-color: var(--wnr-line);
    margin-left: auto;
    order: 2;
  }
  .wnr .nav-links {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    gap: 4px;
    margin-top: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--wnr-line);
  }
  .wnr .nav[data-open="true"] .nav-links {
    display: flex;
  }
  .wnr .nav-links a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--wnr-line);
    font-size: 13px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .wnr .nav-links a:last-child { border-bottom: 0; }
  .wnr .nav > .btn {
    order: 3;
    margin-top: 12px;
    flex-basis: 100%;
    justify-content: center;
    display: none;
  }
  .wnr .nav[data-open="true"] > .btn {
    display: inline-flex;
  }
}

/* ----- DBE nav mobile ----- */
@media (max-width: 900px) {
  .dbe .nav {
    flex-wrap: wrap;
    padding: 14px 20px;
  }
  .dbe .nav .nav-toggle {
    display: flex;
    color: var(--dbe-ink);
    border-color: var(--dbe-line);
    margin-left: auto;
    order: 2;
  }
  .dbe .nav-links {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    gap: 4px;
    margin-top: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--dbe-line);
  }
  .dbe .nav[data-open="true"] .nav-links { display: flex; }
  .dbe .nav-links a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--dbe-line);
    font-size: 12px;
    min-height: 44px;
    display: flex; align-items: center;
  }
  .dbe .nav-links a:last-child { border-bottom: 0; }
  .dbe .nav > .btn {
    order: 4;
    margin-top: 12px;
    flex-basis: 100%;
    justify-content: center;
    display: none;
  }
  .dbe .nav[data-open="true"] > .btn { display: inline-flex; }
  /* Hide the "Est..." crest sub-line on phone */
  .dbe .nav .crest .wordmark .sub { display: none; }
  /* Fluid wordmark, sized to always leave room for the hamburger. */
  .dbe .nav .crest .wordmark .top {
    font-size: clamp(14px, 3.6vw, 17px);
    letter-spacing: 0.08em;
    white-space: nowrap;
  }
  /* Structural guarantee the toggle stays on row 1: the brand takes only the
     space left over after the toggle (flex-basis 0 + grow), and clips rather
     than pushing the hamburger to a second line. */
  .dbe .nav-brand { flex: 1 1 0; min-width: 0; overflow: hidden; }
  .dbe .nav .crest { max-width: 100%; }
  .dbe .nav .nav-toggle { flex: 0 0 auto; }
}

/* ===========================================================
   MOBILE: misc shared tightenings
   =========================================================== */
@media (max-width: 600px) {
  /* Container side padding tighter, but breathing room preserved */
  .wnr .container, .dbe .container {
    padding-left: 18px;
    padding-right: 18px;
  }
  /* Lead text width unconstrained on phone */
  .wnr .lead, .dbe .lead { max-width: none; font-size: 16px; }

  /* Display sizes auto-clamp already; just ensure margins don't crush */
  .wnr h1, .dbe h1 { word-break: break-word; }

  /* Buttons more tap-friendly */
  .wnr .btn, .dbe .btn {
    padding: 13px 18px;
    font-size: 10.5px;
    min-height: 44px;
  }
  /* Reduce hero side padding only — keep heading scale clamps doing their job */
  .wnr .hero, .dbe .hero {
    padding-top: 90px;
  }
}

/* iOS form-zoom prevention (kept outside !important to avoid stomping focus styles) */
@media (max-width: 600px) {
  input[type="text"], input[type="email"], input[type="search"], textarea, select {
    font-size: 16px;
  }
}
