/* =========================================================
   THE CAPTAIN COMPANY — marketing site design system
   Palette: Black #000 · Warm Gold #D4AF37 · White · Off-white #F8F8F8
   Type: Space Grotesk (display) · Montserrat (body)
   Light + dark themes via [data-theme]; bilingual via [data-lang].
   ========================================================= */

:root {
  --gold: #d4af37;
  --gold-deep: #b8912b;
  --gold-soft: rgba(212, 175, 55, 0.14);
  --black: #000;

  /* light theme (default) */
  --bg: #ffffff;
  --bg-alt: #f8f8f8;
  --surface: #ffffff;
  --text: #141414;
  --muted: #5b5b5b;
  --border: #e8e8e8;
  --header-bg: rgba(255, 255, 255, 0.88);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);

  --maxw: 1120px;
  --radius: 14px;
  --sp: 4px;
  --font-display: "Space Grotesk", "Montserrat", system-ui, sans-serif;
  --font-body: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #0b0b0b;
  --surface: #101010;
  --text: #f4f1e9;
  --muted: #b6b1a4;
  --border: #262319;
  --header-bg: rgba(0, 0, 0, 0.82);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px rgba(0, 0, 0, 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #000000; --bg-alt: #0b0b0b; --surface: #101010;
    --text: #f4f1e9; --muted: #b6b1a4; --border: #262319;
    --header-bg: rgba(0, 0, 0, 0.82);
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.55);
  }
}

/* ---------- bilingual visibility ---------- */
:root[data-lang="en"] .t-fr { display: none !important; }
:root[data-lang="fr"] .t-en { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 600; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 600; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }

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

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.narrow { max-width: 760px; }
.eyebrow {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.72rem; font-weight: 600; color: var(--gold-deep);
}
:root[data-theme="dark"] .eyebrow { color: var(--gold); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); }
.center { text-align: center; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--gold); color: #000; padding: .5rem .9rem; border-radius: 8px; z-index: 100; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  padding: 0.8rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: #111; }
.btn-primary:hover { background: var(--gold-deep); box-shadow: 0 8px 22px rgba(212, 175, 55, 0.35); }
.btn-ghost { border-color: currentColor; color: var(--text); }
.btn-ghost:hover { background: var(--text); color: var(--bg); }
.on-dark .btn-ghost { color: #f4f1e9; }
.on-dark .btn-ghost:hover { background: #f4f1e9; color: #000; }
.btn .ic { width: 18px; height: 18px; fill: currentColor; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 1rem; height: 68px; }
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-badge { width: 38px; height: 38px; border-radius: 9px; }
.brand-word { font-family: var(--font-display); font-weight: 700; line-height: 0.92; letter-spacing: 0.02em; }
.brand-word .b-the { display: block; font-size: 0.52rem; letter-spacing: 0.32em; font-weight: 500; color: var(--muted); }
.brand-word .b-main { font-size: 1.02rem; }
.brand-word .b-co { color: var(--gold-deep); }
:root[data-theme="dark"] .brand-word .b-co { color: var(--gold); }
.nav-links { display: flex; gap: 1.3rem; margin-left: auto; }
.nav-links a { font-size: 0.92rem; color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-tools { display: flex; align-items: center; gap: 0.5rem; margin-left: 1rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600;
  font-family: var(--font-display); font-size: 0.8rem; transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold-deep); }
.icon-btn .ic { width: 18px; height: 18px; fill: currentColor; }
.nav-cta { margin-left: 0.3rem; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
}

/* ---------- sections ---------- */
section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.bg-alt { background: var(--bg-alt); }

/* ---------- hero (always dark) ---------- */
.hero {
  background: radial-gradient(1200px 600px at 70% -10%, rgba(212,175,55,0.16), transparent 60%), #000;
  color: #f4f1e9; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(212,175,55,0.08) 1px, transparent 1px);
  background-size: 26px 26px; opacity: 0.5; pointer-events: none;
}
.hero { padding-block: clamp(4.5rem, 12vw, 8rem); }
.hero .container { position: relative; z-index: 1; max-width: 900px; text-align: center; }
.hero .eyebrow { display: block; margin-bottom: 1.1rem; }
.hero h1 { color: #fff; margin-inline: auto; }
.hero .grad { color: var(--gold); }
.hero .lede { color: #cfc9bb; max-width: 56ch; margin: 1.3rem auto 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; justify-content: center; }
/* gold hairline compass tick under the eyebrow — the page's quiet signature */
.hero .tick { width: 54px; height: 2px; background: var(--gold); margin: 0 auto 1.6rem; position: relative; }
.hero .tick::before, .hero .tick::after { content: ""; position: absolute; top: 50%; width: 6px; height: 6px; border: 1.5px solid var(--gold); transform: translateY(-50%) rotate(45deg); }
.hero .tick::before { left: -12px; } .hero .tick::after { right: -12px; }

/* ---------- cards grid ---------- */
.grid { display: grid; gap: 1.2rem; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .grid-4, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); position: relative; transition: transform .18s, border-color .2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--gold); }
.card .num { font-family: var(--font-display); font-weight: 700; color: var(--gold); font-size: 0.85rem; letter-spacing: 0.1em; }
.card h3 { margin-top: 0.4rem; }
.card p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* product cards */
.product { display: flex; flex-direction: column; }
.product .p-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.8rem; }
.product h3 { margin: 0; }
.badge {
  font-family: var(--font-display); font-size: 0.66rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.09em; padding: 0.25rem 0.6rem; border-radius: 999px; white-space: nowrap;
}
.badge-live { background: var(--gold); color: #111; }
.badge-soon { background: var(--gold-soft); color: var(--gold-deep); border: 1px solid var(--gold); }
:root[data-theme="dark"] .badge-soon { color: var(--gold); }
.product .p-link { margin-top: auto; padding-top: 1rem; font-family: var(--font-display); font-weight: 600; color: var(--gold-deep); font-size: 0.9rem; }
:root[data-theme="dark"] .product .p-link { color: var(--gold); }
.product .p-link .arrow { transition: transform .2s; display: inline-block; }
.product a.product:hover .arrow { transform: translateX(4px); }
.product.is-soon { opacity: 0.92; }

/* ---------- mission band ---------- */
.mission { background: #000; color: #f4f1e9; }
.mission .container { max-width: 760px; margin-inline: auto; text-align: center; }
.mission .eyebrow { display: block; margin-bottom: 0.8rem; }
.mission h2 { color: #fff; }
.mission p { color: #cfc9bb; margin-inline: auto; max-width: 62ch; }
.mission .foundation { margin-top: 1.4rem; font-size: 0.95rem; color: var(--gold); font-family: var(--font-display); font-weight: 500; }

/* responsive safety: let flex/grid children shrink, wrap long words */
.nav > *, .grid > *, .hero .container > *, .mission .container > *, .footer-grid > *, .r-links > *, .hero-cta > * { min-width: 0; }
h1, h2, h3, p, a, .link-chip { overflow-wrap: break-word; }
.hero-art img { height: auto; }

/* ---------- crew / CTA routing ---------- */
.route { display: flex; flex-direction: column; gap: 0.7rem; }
.route .r-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--gold-soft); display: flex; align-items: center; justify-content: center; }
.route .r-ico .ic { width: 22px; height: 22px; fill: var(--gold-deep); }
:root[data-theme="dark"] .route .r-ico .ic { fill: var(--gold); }
.route .r-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.4rem; }
.link-chip { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; color: var(--gold-deep); border: 1px solid var(--border); padding: 0.45rem 0.8rem; border-radius: 999px; }
:root[data-theme="dark"] .link-chip { color: var(--gold); }
.link-chip:hover { border-color: var(--gold); }
.link-chip .ic { width: 16px; height: 16px; fill: currentColor; }

/* ---------- footer ---------- */
.site-footer { background: #000; color: #cfc9bb; padding-block: 3rem 2rem; border-top: 3px solid var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.footer-brand img { width: 34px; height: 34px; border-radius: 8px; }
.footer-brand .fw { font-family: var(--font-display); font-weight: 700; color: #fff; letter-spacing: 0.02em; }
.footer-brand .fw .b-co { color: var(--gold); }
.footer-tag { font-size: 0.9rem; color: #9c968a; max-width: 34ch; }
.footer-h { font-family: var(--font-display); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); margin: 0 0 0.8rem; }
.footer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-list a { color: #cfc9bb; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.45rem; }
.footer-list a:hover { color: var(--gold); }
.footer-list .ic { width: 16px; height: 16px; fill: currentColor; opacity: 0.9; }
.footer-bottom { border-top: 1px solid #1c1a13; margin-top: 2rem; padding-top: 1.3rem; font-size: 0.82rem; color: #8a857a; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- legal pages ---------- */
.legal { padding-block: clamp(2.5rem, 6vw, 4rem); }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.legal h2 { font-size: 1.25rem; margin-top: 2rem; }
.legal p, .legal li { color: var(--muted); }
.legal .updated { font-style: italic; font-size: 0.9rem; }
.back-link { display: inline-block; margin-bottom: 1.2rem; font-weight: 600; font-family: var(--font-display); color: var(--gold-deep); }
:root[data-theme="dark"] .back-link { color: var(--gold); }

/* ---------- floating whatsapp ---------- */
.wa-fab { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,0.25); z-index: 60; }
.wa-fab svg { width: 30px; height: 30px; fill: #fff; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .btn:hover, .card:hover { transform: none; } }

/* ===================================================================
   Design pass — UI Designer · Brand Guardian · UX Architect
   =================================================================== */

/* AA-passing gold for text on light surfaces (fills stay #D4AF37) */
:root { --gold-ink: #92701a; }
.eyebrow, .product .p-link, .link-chip, .back-link { color: var(--gold-ink); }
:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] .product .p-link,
:root[data-theme="dark"] .link-chip,
:root[data-theme="dark"] .back-link { color: var(--gold); }

/* Type scale to the brand guide (H1 72 / H3 24) */
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }

/* Buttons: guide = rounded rectangle (not full pill), with trailing arrow */
.btn { border-radius: 10px; }
.link-chip { border-radius: 8px; }
.btn-arrow { display: inline-block; transition: transform .18s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* Spacing snapped to the 4px scale */
.grid { gap: 1.5rem; }
.section-head { margin-bottom: 3rem; }

/* Keyboard focus — a visible gold ring everywhere (was missing) */
.btn:focus-visible,
.icon-btn:focus-visible,
.link-chip:focus-visible,
.nav-links a:focus-visible,
.footer-list a:focus-visible,
a.product:focus-visible,
.hero-note a:focus-visible,
[data-theme-toggle]:focus-visible,
[data-lang-toggle]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
:root[data-theme="dark"] .btn-primary:focus-visible { outline-color: #fff; }

/* Feature the one live product (Captain.Food) vs the two "coming soon" */
a.product:not(.is-soon) {
  border-color: var(--gold);
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 12px 30px rgba(212,175,55,.16);
}
a.product:not(.is-soon):hover {
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 16px 40px rgba(212,175,55,.24);
}

/* "How we build" cards: gold top-accent wipes in on hover (replaces 01–04) */
#how .card { overflow: hidden; }
#how .card::before {
  content: ""; position: absolute; top: 0; left: 1.5rem; right: 1.5rem; height: 2px;
  background: var(--gold); border-radius: 0 0 2px 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .28s ease;
}
#how .card:hover::before { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { #how .card::before { display: none; } }

/* Mission: a distinct dark band in both themes (gold hairline + faint radial) */
.mission {
  background: radial-gradient(900px 480px at 50% -20%, rgba(212,175,55,.15), transparent 60%), #000;
  border-block: 1px solid rgba(212,175,55,.30);
  position: relative; overflow: hidden;
}

/* Hero support note — Captain.Food demoted to proof, not the primary CTA */
.hero-note { margin-top: 1.2rem; font-size: 0.9rem; color: #cfc9bb; }
.hero-note a { color: var(--gold); font-family: var(--font-display); font-weight: 600; }

/* Keep a persistent router CTA on the mobile header (was hidden < 860px) */
@media (max-width: 860px) {
  .nav-tools { margin-left: auto; }
  .nav-cta { display: inline-flex; padding: 0.55rem 0.95rem; font-size: 0.85rem; }
}
@media (max-width: 520px) { .brand-word { display: none; } }

/* Flag language toggle */
.lang-btn { padding: 0; }
.lang-btn .flag { width: 22px; height: 15px; border-radius: 3px; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
:root[data-theme="dark"] .lang-btn .flag { box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
