/* ==========================================================================
   Self-hosted font subsets (latin). Generated from Google Fonts css2.
   No unicode-range: one subset per face, so the browser loads it and
   falls back per-glyph for anything outside it (e.g. U+2192 arrow).
   ========================================================================== */

@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/oswald-500-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/oswald-700-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/playfair-display-400-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/playfair-display-400-italic-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/inter-400-700-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/jetbrains-mono-400-latin.woff2) format('woff2');
}
/* ==========================================================================
   THE CLOSER'S CODE — foundation
   Operations manual, not sales brochure.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   Contrast measured against --navy (#071020). Do not reassign these roles.

     --text      E8EDF5   17.4:1   body copy, any size
     --text-dim  8B9BB4    6.7:1   secondary copy, any size
     --text-mute 5A6B85    3.5:1   LARGE TEXT (>=24px, or >=19px bold) OR
                                   non-text UI only. Never body copy.
     --gold      D4A84C    8.6:1   safe at any size
     --red       D42626    3.9:1   LARGE TEXT ONLY as a foreground colour.
                                   As a button background with #fff text: 4.9:1 — safe.
   -------------------------------------------------------------------------- */

:root {
  --navy:      #071020;
  --navy-2:    #0d1f3c;
  --navy-3:    #12294a;
  --red:       #D42626;
  --red-hot:   #E23434;
  --gold:      #D4A84C;
  --white:     #FFFFFF;
  --text:      #E8EDF5;
  --text-dim:  #8B9BB4;
  --text-mute: #5A6B85;
  --hairline:  rgba(139, 155, 180, 0.2);
  --hairline-strong: rgba(139, 155, 180, 0.35);

  --font-display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --font-serif:   'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  /* Fluid type scale */
  --fs-hero:    clamp(44px, 8.5vw, 104px);
  --fs-h2:      clamp(30px, 4.6vw, 54px);
  --fs-h3:      clamp(20px, 2.2vw, 26px);
  --fs-lede:    clamp(17px, 1.5vw, 20px);
  --fs-body:    16px;
  --fs-small:   14px;
  --fs-marker:  13px;
  --fs-mono:    13.5px;

  /* Spacing */
  --gutter:     clamp(20px, 5vw, 48px);
  --section-y:  clamp(72px, 11vw, 140px);
  --stack:      24px;
  --measure:    68ch;

  --maxw:       1180px;
  --maxw-text:  760px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor targets clear the fixed nav */
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, video, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

/* --------------------------------------------------------------------------
   3. FOCUS — one system, everywhere. Never remove without replacing.
   -------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Older engines without :focus-visible still get a ring. */
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 200;
  background: var(--gold);
  color: var(--navy);
  padding: 12px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   4. AMBIENT FIELD
   Deep navy with slow radial glows and two faint diagonal light streaks.
   Fixed, behind everything, non-interactive.
   -------------------------------------------------------------------------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 820px 520px at 14% 8%,  rgba(30, 80, 160, 0.22), transparent 62%),
    radial-gradient(ellipse 900px 620px at 88% 38%, rgba(48, 30, 96, 0.16),  transparent 64%),
    radial-gradient(ellipse 720px 420px at 50% 96%, rgba(212, 168, 76, 0.05), transparent 70%);
}
.ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 44.6%, rgba(255,255,255,0.022) 45%, transparent 45.4%),
    linear-gradient(115deg, transparent 67.6%, rgba(255,255,255,0.015) 68%, transparent 68.4%);
}

/* --------------------------------------------------------------------------
   5. LAYOUT
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--text { max-width: calc(var(--maxw-text) + var(--gutter) * 2); }

.section { padding-block: var(--section-y); }

/* Gold hairline with a dot terminal — the cover's divider motif. */
.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-block: clamp(8px, 2vw, 20px);
}
.rule::before,
.rule::after {
  content: '';
  height: 1px;
  width: min(180px, 22vw);
  background: linear-gradient(90deg, transparent, rgba(212,168,76,0.55));
}
.rule::after { background: linear-gradient(90deg, rgba(212,168,76,0.55), transparent); }
.rule__dot {
  width: 5px; height: 5px;
  margin-inline: 10px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
}

/* --------------------------------------------------------------------------
   6. TYPOGRAPHY
   -------------------------------------------------------------------------- */

.marker {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-marker);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.marker::after {
  content: '';
  height: 1px;
  flex: 1;
  max-width: 120px;
  background: var(--hairline);
}

.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: 1.03;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--white);
  text-wrap: balance;
}
.h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
}

.lede {
  font-size: var(--fs-lede);
  line-height: 1.6;
  color: var(--text-dim);
  max-width: var(--measure);
  margin-top: 22px;
}
.lede--serif {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
}

.prose > * + * { margin-top: var(--stack); }
.prose { max-width: var(--measure); }

.label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

code, kbd, samp, pre { font-family: var(--font-mono); }

.kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 2px 7px;
  border: 1px solid var(--hairline-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--navy-2);
  color: var(--text);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   7. BUTTONS
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
              color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--red);
  color: var(--white);
}
.btn--primary:hover { background: var(--red-hot); }

.btn--ghost {
  border-color: var(--hairline-strong);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn--gold {
  background: var(--gold);
  color: var(--navy);
}
.btn--gold:hover { background: #E0B75E; }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   8. SURFACES
   -------------------------------------------------------------------------- */

.panel {
  background: var(--navy-2);
  border: 1px solid var(--hairline);
}
.panel--raised { background: linear-gradient(180deg, var(--navy-2), rgba(13,31,60,0.55)); }

/* --------------------------------------------------------------------------
   9. MOTION
   .reveal is progressive enhancement: it only hides content once JS has
   confirmed it can reveal it again (html.js). No JS -> nothing is hidden.
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   10. NAV — shared by both pages
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 16, 32, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  white-space: nowrap;
}
.nav__brand span { color: var(--red); }
.nav__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.18s var(--ease);
}
.nav__back:hover { color: var(--gold); }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
}
.nav__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.18s var(--ease);
}
.nav__links a:hover { color: var(--gold); }
.nav__links .nav__cta {
  padding: 0 18px;
  color: var(--navy);
  background: var(--gold);
  font-weight: 700;
}
.nav__links .nav__cta:hover { background: #E0B75E; color: var(--navy); }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  color: var(--text);
  border: 1px solid var(--hairline-strong);
}
.nav__toggle:hover { border-color: var(--gold); color: var(--gold); }
.nav__bars, .nav__bars::before, .nav__bars::after {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav__bars::before, .nav__bars::after { content: ''; position: absolute; }
.nav__bars::before { transform: translateY(-6px); }
.nav__bars::after  { transform: translateY(6px); }
.nav__toggle[aria-expanded="true"] .nav__bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__bars::before { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars::after  { transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; position: relative; }
  .nav__links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--navy);
    border-bottom: 1px solid var(--hairline);
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { min-height: 52px; }
  .nav__links .nav__cta { justify-content: center; margin-top: 10px; }
}

.nav__links .nav__command { color: var(--gold); border-bottom: 2px solid var(--gold); }
.nav__links .nav__command:hover { color: var(--white); border-color: var(--white); }
