/* ─── Brooklyn TCG — shared site chrome ──────────────────────────
   Tokens, base reset, nav, buttons, section primitives, and footer.
   Shared across index.html, 404.html, privacy-policy.html.
   Page-specific sections (hero, vault, ledger, hatches, breadcrumb,
   locked-door, policy) stay inline on each page. ─────────────────── */

@font-face { font-family: 'Big Shoulders'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('/assets/fonts/big-shoulders-variable.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('/assets/fonts/public-sans-variable.woff2') format('woff2'); }
@font-face { font-family: 'Martian Mono'; font-style: normal; font-weight: 300 800; font-display: swap; src: url('/assets/fonts/martian-mono-variable.woff2') format('woff2'); }

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

:root {
  --navy:         #001c44;   /* anteroom / nav — the vault's front room */
  --navy-vault:   #000f30;   /* THE VAULT — deposit-box chamber */
  --navy-footer:  #00040e;   /* deepest chamber */
  --brass:        #ff5910;
  --brass-deep:   #e04800;
  --ledger:       #f0f0f0;   /* ledger paper */
  --ledger-ink:   #2b2b2b;   /* ledger paper ink */
  --white:        #ffffff;
  --line-on-dark: rgba(255,255,255,.12);
  --muted-on-light: rgba(0,28,68,.65);  /* secondary labels on ledger paper and white panels: the lightest navy ink that clears 4.5:1 on paper */
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* anchor jumps land below the fixed nav: 72px bar + its 2px brass hairline */
html { scroll-behavior: smooth; scroll-padding-top: 74px; }
html, body { background: var(--navy); }

body {
  font-family: 'Public Sans', sans-serif;
  font-weight: 400;
  color: rgba(255,255,255,.82);
  background: var(--navy);
  overflow-x: hidden;
  caret-color: var(--brass);
}

::selection { background: var(--brass); color: var(--navy); }

/* brass on the navy chambers; light surfaces set --focus-ring to navy, since
   brass on paper is only 2.76:1 and a focus ring needs 3:1 */
:focus-visible { outline: 2px solid var(--focus-ring, var(--brass)); outline-offset: 3px; border-radius: 2px; }

a { text-decoration: none; text-underline-offset: .2em; }
/* no paragraph ends on one stranded word */
p, li, dd { text-wrap: pretty; }

/* webkit scrollbar */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--brass-deep); border: 3px solid var(--navy); border-radius: 8px; }
html { scrollbar-color: var(--brass-deep) var(--navy); scrollbar-width: thin; }

h1, h2, h3, .plate-label { font-family: 'Big Shoulders', sans-serif; letter-spacing: -0.01em; }
.mono { font-family: 'Martian Mono', monospace; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ─── NAV ─────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  height: 72px;
  background: var(--navy);
  border-bottom: 1px solid var(--line-on-dark);
  box-shadow: 0 1px 0 rgba(0,0,0,.4);
}
nav::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--brass);
  opacity: .9;
}

/* ─── BRAND LOCKUP ────────────────────────────────────────────
   The mark is an SVG plate (assets/brand/mark.svg at nav/footer
   scale, mark-full.svg above 64px); the wordmark is live Big
   Shoulders text so it stays crisp and matches the headings. */
.brand-lockup {
  display: inline-flex; align-items: center; gap: .6rem;
  /* the whole lockup scales off one size: the mark's edge length. */
  font-size: var(--lockup-size);
}
.brand-lockup img { display: block; height: 1em; width: 1em; }
.brand-word { font-family: 'Big Shoulders', sans-serif; line-height: .84; text-transform: uppercase; }
.brand-word span { display: block; font-weight: 900; font-size: .525em; }
.brand-word .bw-1 { color: var(--white); letter-spacing: -0.01em; }
/* TCG is tracked out to match BROOKLYN's width; the negative margin
   absorbs the trailing space letter-spacing adds after the G. */
.brand-word .bw-2 { color: var(--brass); letter-spacing: .335em; margin-right: -.335em; }

.nav-logo { --lockup-size: 40px; min-height: 44px; }
.footer-brand .brand-lockup { --lockup-size: 52px; margin-bottom: 1rem; }

.nav-links { display: flex; gap: 2.25rem; list-style: none; }
.nav-links a {
  font-family: 'Big Shoulders', sans-serif;
  font-weight: 700; font-size: 1.05rem;
  letter-spacing: .04em; text-transform: uppercase;
  color: rgba(255,255,255,.85);
  transition: color .2s;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--brass); transition: right .25s var(--ease-out);
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { right: 0; }
/* the desktop links are 23px tall; an invisible ::before pads each tap area
   past 44px without touching the type (the 36px gaps keep them apart) */
@media (min-width: 48.0625em) {
  .nav-links a::before { content: ''; position: absolute; inset: -.7rem -.6rem; }
}

.nav-cta { display: flex; gap: .75rem; }

/* The menu wrapper exists for the mobile panel; on desktop it steps aside
   so the links and actions stay direct flex items of the nav. */
.nav-menu { display: contents; }

.btn {
  font-family: 'Big Shoulders', sans-serif;
  font-weight: 800; font-size: 1rem;
  letter-spacing: .03em; text-transform: uppercase;
  padding: .6rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: .5rem;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s, border-color .18s;
}
.btn-primary {
  background: var(--brass); color: var(--navy);
  border-color: var(--brass);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 20px -8px rgba(0,0,0,.55);
}
.btn-outline {
  background: transparent; color: var(--white);
  border-color: rgba(255,255,255,.45);
}
/* every action in a page's content is this one size; the nav keeps the
   compact .btn so its bar stays 72px */
.btn-lg { font-size: 1.05rem; padding: .85rem 1.9rem; }
/* Lifts only where a pointer really hovers: on a touchscreen a tap would
   leave the plate stuck in its lifted state after coming back from eBay. */
@media (hover: hover) {
  .btn-primary:hover { background: var(--brass-deep); border-color: var(--brass-deep); color: var(--navy-footer); transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 14px 28px -10px rgba(0,0,0,.6); }
  .btn-outline:hover { border-color: var(--brass); color: var(--brass); transform: translateY(-2px); }
}
.btn-outline.on-light { color: var(--navy); border-color: var(--navy); }
.btn-outline.on-light:hover { border-color: var(--brass-deep); color: var(--navy); }

/* Touch-size targets wherever a thumb is likely: narrow screens by width,
   touch-first tablets in the desktop layout by pointer. */
@media (max-width: 768px), (pointer: coarse) {
  .btn { min-height: 44px; }
}

.hamburger { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; min-width: 44px; min-height: 44px; }
.hamburger span { display: block; width: 26px; height: 3px; background: var(--white); border-radius: 2px; transition: transform .3s var(--ease-out), opacity .2s; }
/* open: the bars fold into an X (3px bars, 5px gaps: the outer two sit 8px off centre) */
nav.open .hamburger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
nav.open .hamburger span:nth-child(2) { opacity: 0; }
nav.open .hamburger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ─── SECTION SHARED ──────────────────────────────────────── */
section { padding: 6rem 5vw; }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head h2 {
  font-weight: 900; font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: .96; text-transform: uppercase;
  color: var(--white);
}
.section-head p { margin-top: 1rem; font-size: 1.05rem; line-height: 1.7; color: rgba(255,255,255,.65); }
.section-head.on-light h2 { color: var(--navy); }
.section-head.on-light p { color: rgba(43,43,43,.75); }

/* ─── FOOTER ──────────────────────────────────────────────── */
footer { background: var(--navy-footer); padding: 3.5rem 5vw 2rem; border-top: 1px solid var(--line-on-dark); }
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 3rem; justify-content: space-between; align-items: flex-start; margin-bottom: 2.5rem; }
.footer-brand img { height: 52px; margin-bottom: 1rem; }
.footer-brand p { font-size: .9rem; color: rgba(255,255,255,.55); max-width: 260px; line-height: 1.6; }
.footer-col h2 { font-family: 'Big Shoulders', sans-serif; font-weight: 700; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brass); margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li + li { margin-top: .5rem; }
.footer-col a { font-size: .9rem; color: rgba(255,255,255,.55); transition: color .2s; }
.footer-col a:hover { color: var(--white); text-decoration: underline; }

.footer-bottom { max-width: 1280px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,.07); padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: .8rem; color: rgba(255,255,255,.55); text-wrap: balance; }

/* Footer links become 44px tap rows wherever a thumb is likely. */
@media (max-width: 768px), (pointer: coarse) {
  .footer-col h2 { margin-bottom: .25rem; }
  .footer-col li + li { margin-top: 0; }
  .footer-col a { display: flex; align-items: center; min-height: 44px; }
}

/* ─── MOBILE ──────────────────────────────────────────────── */
/* The nav folds into the menu button at 48em: 768px at the default text
   size, and wider for a reader who has set a larger one in the browser, so
   the desktop links never run past the window edge (at 200% they need
   about 980px). The page layout below keeps its 768px breakpoint. */
@media (max-width: 48em) {
  .nav-menu { display: none; }
  /* no working JS, no menu button: the footer carries every link instead */
  .js .hamburger { display: flex; }

  /* The open menu: one panel under the nav's brass hairline, links as
     full-width rows, then both actions stacked full width so no label
     length or zoom level pushes them off-screen. The page stays in view
     behind a scrim; tapping the scrim closes the menu. */
  nav.open::before {
    content: ''; position: fixed; left: 0; right: 0; top: 72px; bottom: 0;
    background: rgba(0,4,14,.62);
  }
  nav.open .nav-menu {
    display: flex; flex-direction: column;
    position: fixed; top: 72px; left: 0; right: 0;
    max-height: calc(100vh - 72px); max-height: calc(100dvh - 72px);
    overflow-y: auto; overscroll-behavior: contain;
    padding: .5rem 1.5rem 1.5rem;
    background: var(--navy);
    border-bottom: 1px solid var(--line-on-dark);
  }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links li + li { border-top: 1px solid var(--line-on-dark); }
  .nav-links a {
    display: flex; align-items: center; min-height: 56px; padding: .75rem 0;
    font-size: 1.5rem; font-weight: 800; letter-spacing: .02em; color: var(--white);
  }
  .nav-links a::after { display: none; }
  .nav-links a:hover { color: var(--brass); }
  .nav-cta { flex-direction: column; margin-top: .5rem; padding-top: 1.25rem; border-top: 1px solid var(--line-on-dark); }
  .nav-cta .btn { justify-content: center; min-height: 48px; }
}

@media (max-width: 768px) {
  section { padding: 4rem 6vw; }

  /* the link columns pair up, so 44px rows still leave a shorter footer;
     with enlarged text they stack rather than run off the edge */
  .footer-inner { display: flex; flex-wrap: wrap; gap: 2rem 1.5rem; }
  .footer-brand { flex: 1 1 100%; }
  .footer-col { flex: 1 1 8rem; }
}

/* The menu opens with a short drop rather than a hard cut. @starting-style
   gives an entry transition with no JS; browsers without it just show the
   menu. Closing stays instant, which is what a dismissal should feel like. */
@media (max-width: 48em) and (prefers-reduced-motion: no-preference) {
  nav.open .nav-menu { transition: opacity .2s var(--ease-out), transform .2s var(--ease-out); }
  nav.open::before { transition: opacity .2s var(--ease-out); }
  @starting-style {
    nav.open .nav-menu { opacity: 0; transform: translateY(-6px); }
    nav.open::before { opacity: 0; }
  }
}
