/* ============================================================
   BLACK ROCK DEFENSE — Core Design System
   Light surface architecture (EDGE-style): white page, light
   alternating bands, slate text, dark footer, full-bleed dark
   imagery. Brand gold and Oswald/Manrope carried over.
   ============================================================ */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Surfaces — light */
  --s-page:   #FFFFFF;
  --s-alt:    #F4F5F6;
  --s-sunk:   #EBEDEF;
  --s-line:   #E1E4E7;

  /* Surfaces — dark (footer, CTA band, imagery overlays) */
  --d-deep:   #101317;
  --d-base:   #171B20;
  --d-raise:  #22272E;

  /* Text on light.
     Every step clears 4.5:1 against the darkest light surface
     (--s-sunk), so secondary copy stays legible on any band. */
  --t-head:   #1E2227;   /* 15.99:1 on white */
  --t-body:   #454C54;   /*  8.70:1 on white */
  --t-muted:  #5F676F;   /*  5.74:1 white · 4.89:1 on --s-sunk */
  --t-faint:  #646C74;   /*  5.33:1 white · 4.54:1 on --s-sunk */

  /* Text on dark */
  --t-inv:      #F5F6F7;
  --t-inv-soft: #B3BAC1;
  --t-inv-dim:  #7D858D;

  /* Brand gold.
     --g-core  : decorative only (rules, borders, edge-draws). 3.82:1 on
                 white, which clears the 3:1 bar for non-text UI but NOT
                 the 4.5:1 bar for body copy.
     --g-text  : the text-safe gold. 5.26:1 on white, 4.82:1 on --s-alt.
                 Use for any gold text on a light surface, and as the
                 fill behind white button labels.
     --g-light : dark backgrounds only — it fails badly on white. */
  --g-deep:   #6F4E04;
  --g-core:   #AC7906;
  --g-text:   #8F6405;
  --g-mid:    #B88A3A;
  --g-light:  #E9BE69;
  --g-pale:   #F6EBD3;

  /* Signal */
  --sig-red:   #C0392B;
  --sig-green: #1E8E4E;
  --sig-blue:  #2C7BB6;

  /* Type */
  --f-display: 'Oswald', 'Arial Narrow', sans-serif;
  --f-body:    'Manrope', system-ui, -apple-system, sans-serif;

  /* Rhythm */
  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1400px;
  --sec-y: clamp(72px, 11vh, 148px);

  /* Motion */
  --e-out: cubic-bezier(0.22, 1, 0.36, 1);
  --e-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 0.25s;
  --t-med: 0.5s;
  --t-slow: 0.9s;

  /* Effects */
  --hairline: 1px solid var(--s-line);
  --hairline-gold: 1px solid rgba(172, 121, 6, 0.30);
  --shadow-sm: 0 1px 2px rgba(16, 19, 23, 0.05);
  --shadow-md: 0 10px 30px -12px rgba(16, 19, 23, 0.18);
  --shadow-lg: 0 26px 60px -20px rgba(16, 19, 23, 0.26);
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--s-page);
}

body {
  background: var(--s-page);
  color: var(--t-body);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }

::selection { background: var(--g-core); color: #fff; }

:focus-visible {
  outline: 2px solid var(--g-core);
  outline-offset: 3px;
}

/* ---------- 3. LAYOUT ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--sec-y); position: relative; }
.section--tight { padding-block: clamp(48px, 7vh, 88px); }

/* Alternating band — the EDGE rhythm */
.section--alt  { background: var(--s-alt); }
.section--sunk { background: var(--s-sunk); }

/* Dark band, used sparingly for emphasis */
.section--dark {
  background: var(--d-base);
  color: var(--t-inv-soft);
}
.section--dark .display,
.section--dark .h-xl,
.section--dark .h-lg,
.section--dark .h-md,
.section--dark .h-sm { color: var(--t-inv); }
.section--dark .lede { color: var(--t-inv-soft); }
.section--dark .eyebrow { color: var(--g-light); }

/* ---------- 4. TYPE ---------- */
.display {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--t-head);
}

.h-xl { font-size: clamp(2.75rem, 8.5vw, 7rem); }
.h-lg { font-size: clamp(2.1rem, 5.4vw, 4.25rem); }
.h-md { font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
.h-sm { font-size: clamp(1.25rem, 2.1vw, 1.65rem); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--g-text);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: '';
  width: clamp(28px, 5vw, 52px);
  height: 2px;
  background: var(--g-core);
}

.lede {
  font-size: clamp(1rem, 1.35vw, 1.1875rem);
  line-height: 1.75;
  color: var(--t-body);
  max-width: 62ch;
}

.muted { color: var(--t-muted); }
.gold  { color: var(--g-text); }

/* ---------- 5. BUTTONS ---------- */
.btn {
  --btn-pad-y: 16px;
  --btn-pad-x: 34px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  font-family: var(--f-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--t-fast) var(--e-out),
              border-color var(--t-fast) var(--e-out),
              background var(--t-fast) var(--e-out);
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--t-med) var(--e-out);
}
.btn:hover::after { transform: scaleX(1); transform-origin: left; }

/* Solid gold */
.btn--solid {
  background: var(--g-text);
  color: #FFFFFF;
  border-color: var(--g-text);
}
.btn--solid::after { background: var(--g-deep); }
.btn--solid:hover { color: #FFFFFF; border-color: var(--g-deep); }

/* Outline on light surfaces */
.btn--ghost {
  color: var(--t-head);
  border-color: rgba(30, 34, 39, 0.28);
}
.btn--ghost::after { background: var(--t-head); }
.btn--ghost:hover { color: #FFFFFF; border-color: var(--t-head); }

/* Outline on dark surfaces / over imagery */
.btn--inv {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.45);
}
.btn--inv::after { background: #FFFFFF; }
.btn--inv:hover { color: var(--t-head); border-color: #FFFFFF; }

.btn--sm { --btn-pad-y: 12px; --btn-pad-x: 24px; font-size: 0.6875rem; }

.btn .arw { transition: transform var(--t-fast) var(--e-out); }
.btn:hover .arw { transform: translateX(5px); }

/* ---------- 6. HEADER / NAV ---------- */
.hdr {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-inline: var(--gutter);
  height: 84px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: height var(--t-med) var(--e-out),
              background var(--t-med) var(--e-out),
              border-color var(--t-med) var(--e-out),
              box-shadow var(--t-med) var(--e-out);
}

/* Over a dark hero the header starts transparent with light text */
.hdr--over .nav__link,
.hdr--over .lang__btn { color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.35); }
.hdr--over .burger span { background: #FFFFFF; }

/* Once scrolled it becomes a solid white bar */
.hdr.is-stuck {
  height: 68px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--s-line);
  box-shadow: var(--shadow-sm);
}
.hdr.is-stuck .nav__link,
.hdr.is-stuck .lang__btn { color: var(--t-body); border-color: var(--s-line); }
.hdr.is-stuck .burger span { background: var(--t-head); }

/* Brand: the official logo, carried in two colourways.
   The white one shows while the header floats over the dark hero;
   the dark one takes over once the header becomes a solid white bar. */
.brand {
  position: relative;
  display: block;
  flex-shrink: 0;
  line-height: 0;
}
.brand__logo {
  height: 54px;
  width: auto;
  transition: height var(--t-med) var(--e-out),
              opacity var(--t-med) var(--e-out);
}
.brand__logo--light {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.hdr.is-stuck .brand__logo { height: 44px; }

/* Over dark imagery -> white logo */
.hdr--over .brand__logo--dark  { opacity: 0; }
.hdr--over .brand__logo--light { opacity: 1; }

/* Scrolled / solid white bar -> dark logo (wins over --over) */
.hdr.is-stuck .brand__logo--dark  { opacity: 1; }
.hdr.is-stuck .brand__logo--light { opacity: 0; }

@media (max-width: 480px) {
  .brand__logo { height: 44px; }
  .hdr.is-stuck .brand__logo { height: 38px; }
}

@media (max-width: 420px) {
}

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }

.nav__link {
  position: relative;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--t-head);
  padding-block: 8px;
  transition: color var(--t-fast) var(--e-out);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--g-core);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--t-med) var(--e-out);
}
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__link.is-active { color: var(--g-text); }
.hdr--over .nav__link.is-active { color: var(--g-light); }

.hdr__actions { display: flex; align-items: center; gap: 16px; }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  flex-shrink: 0;
}
.burger span {
  display: block;
  height: 2px;
  width: 26px;
  background: var(--t-head);
  transition: transform var(--t-fast) var(--e-out),
              opacity var(--t-fast) var(--e-out),
              background var(--t-fast);
}
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.burger.is-open span { background: var(--t-head) !important; }

/* Mobile drawer — light */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: var(--s-page);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 96px var(--gutter) 40px;
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform var(--t-slow) var(--e-in-out),
              visibility var(--t-slow);
}
.drawer.is-open { transform: translateY(0); visibility: visible; }

.drawer a {
  font-family: var(--f-display);
  font-size: clamp(1.9rem, 8vw, 3.2rem);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--t-head);
  padding-block: 10px;
  border-bottom: var(--hairline);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-med) var(--e-out),
              transform var(--t-med) var(--e-out),
              color var(--t-fast);
}
.drawer.is-open a { opacity: 1; transform: translateY(0); }
.drawer.is-open a:nth-child(1) { transition-delay: 0.14s; }
.drawer.is-open a:nth-child(2) { transition-delay: 0.20s; }
.drawer.is-open a:nth-child(3) { transition-delay: 0.26s; }
.drawer.is-open a:nth-child(4) { transition-delay: 0.32s; }
.drawer.is-open a:nth-child(5) { transition-delay: 0.38s; }
.drawer.is-open a:nth-child(6) { transition-delay: 0.44s; }
.drawer a:hover { color: var(--g-text); }

/* ---------- 7. SCROLL REVEAL ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.85s var(--e-out), transform 0.85s var(--e-out);
  will-change: opacity, transform;
}
[data-reveal].is-in { opacity: 1; transform: none; }

[data-reveal-group] > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--e-out), transform 0.75s var(--e-out);
}
[data-reveal-group].is-in > * { opacity: 1; transform: none; }
[data-reveal-group].is-in > *:nth-child(1) { transition-delay: 0.00s; }
[data-reveal-group].is-in > *:nth-child(2) { transition-delay: 0.07s; }
[data-reveal-group].is-in > *:nth-child(3) { transition-delay: 0.14s; }
[data-reveal-group].is-in > *:nth-child(4) { transition-delay: 0.21s; }
[data-reveal-group].is-in > *:nth-child(5) { transition-delay: 0.28s; }
[data-reveal-group].is-in > *:nth-child(6) { transition-delay: 0.35s; }
[data-reveal-group].is-in > *:nth-child(7) { transition-delay: 0.42s; }
[data-reveal-group].is-in > *:nth-child(8) { transition-delay: 0.49s; }

.rise { display: block; overflow: hidden; }
.rise > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1s var(--e-out);
}
.is-in .rise > span,
.rise.is-in > span { transform: translateY(0); }
.rise:nth-child(2) > span { transition-delay: 0.09s; }
.rise:nth-child(3) > span { transition-delay: 0.18s; }

/* ---------- 8. FOOTER (dark, EDGE-style) ---------- */
.ftr {
  background: var(--d-base);
  color: var(--t-inv-soft);
  padding-block: clamp(56px, 8vh, 96px) 0;
}
.ftr__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: clamp(32px, 4vw, 64px);
}
.ftr__brand { display: flex; align-items: center; gap: 15px; margin-bottom: 22px; }
.ftr__logo { height: 78px; width: auto; }

.ftr__tag { font-size: 0.875rem; color: var(--t-inv-dim); line-height: 1.8; max-width: 40ch; }

.ftr__title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--g-light);
  margin-bottom: 22px;
}
.ftr__links li { margin-bottom: 12px; }
.ftr__links a {
  font-size: 0.875rem;
  color: var(--t-inv-dim);
  transition: color var(--t-fast), padding-left var(--t-fast);
}
.ftr__links a:hover { color: var(--g-light); padding-left: 6px; }

.ftr__bottom {
  margin-top: clamp(40px, 6vh, 72px);
  padding-block: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--t-inv-dim);
}

/* ---------- 9. UTILITIES ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  top: -100px; left: var(--gutter);
  z-index: 300;
  background: var(--g-text);
  color: #FFFFFF;
  padding: 12px 22px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: top var(--t-fast) var(--e-out);
}
.skip:focus { top: 12px; }

.no-scroll { overflow: hidden; }

.rule {
  height: 1px;
  background: linear-gradient(90deg, var(--g-core), transparent);
  border: 0;
}

/* ---------- 10. RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .ftr__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .burger { display: flex; }
  .hdr__actions .btn { display: none; }
}

@media (max-width: 560px) {
  .ftr__grid { grid-template-columns: 1fr; gap: 40px; }
  .ftr__bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- 11. MOTION SAFETY ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal],
  [data-reveal-group] > * { opacity: 1 !important; transform: none !important; }
  .rise > span { transform: none !important; }
}

/* ---------- 12. PRINT ---------- */
@media print {
  .hdr, .drawer, .burger, .ftr { display: none; }
  body { background: #fff; color: #000; }
}