/* assets/css/global.css */

/* ─── Fonts ─────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800;900&family=Barlow:wght@400;500;600&display=swap');

/* ─── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --color-bg:            oklch(0.07 0.000 0);
  --color-surface:       oklch(0.11 0.000 0);
  --color-surface-hover: oklch(0.16 0.000 0);
  --color-border:        oklch(0.20 0.000 0);
  --color-primary:       oklch(0.50 0.228 25);
  --color-primary-dark:  oklch(0.42 0.220 25);
  --color-primary-dim:   oklch(0.50 0.228 25 / 0.12);
  --color-ink:           oklch(0.97 0.000 0);
  --color-muted:         oklch(0.62 0.000 0);

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'Barlow', sans-serif;

  --space-section: clamp(5rem, 10vw, 8rem);
  --max-width:     80rem;
  --gutter:        clamp(1rem, 5vw, 3rem);

  --z-sticky:   100;
  --z-dropdown: 200;
}

/* ─── Reset / Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* ─── Typography helpers ─────────────────────────────────────────────────── */
.font-display {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.text-muted { color: var(--color-muted); }

/* ─── Section wrapper ────────────────────────────────────────────────────── */
.section-wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-pad {
  padding-block: var(--space-section);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.875rem 2.5rem;
  border: none;
  cursor: pointer;
  transition: background 200ms ease-out, color 200ms ease-out;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-ink);
}
.btn-primary:hover { background: var(--color-primary-dark); }

.btn-outline {
  background: transparent;
  color: var(--color-ink);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); }

.btn-white {
  background: var(--color-ink);
  color: var(--color-primary-dark);
}
.btn-white:hover { background: oklch(0.88 0.000 0); }

/* Keyboard focus — WCAG 2.1 AA */
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* ─── Card ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border-top: 4px solid var(--color-primary);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

/* ─── Divider ────────────────────────────────────────────────────────────── */
.red-rule {
  display: block;
  width: 3.75rem;
  height: 2px;
  background: var(--color-primary);
  margin-bottom: 1.5rem;
}

/* ─── CTA Banner ─────────────────────────────────────────────────────────── */
.cta-banner {
  background: var(--color-primary);
  padding-block: clamp(4rem, 8vw, 6rem);
  text-align: center;
}

.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  text-wrap: balance;
  margin-bottom: 0.75rem;
}

.cta-banner p {
  color: oklch(0.97 0.000 0 / 0.75);
  margin-bottom: 2rem;
  font-size: 1.0625rem;
}

/* ─── Page hero (inner pages) ────────────────────────────────────────────── */
.page-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  background: var(--color-surface);
  min-height: 40vh;
  padding-block: clamp(3rem, 8vw, 5rem);
  border-bottom: 1px solid var(--color-border);
}

/* .page-hero is a flex container, so its .section-wrap child shrank to fit its
   content and margin-inline:auto then re-centred it — a hero with a short H1
   (e.g. /faq) drifted 48px inward and no longer lined up with the sections
   below it. Pin the wrap to full width so hero alignment is content-independent. */
.page-hero > .section-wrap { width: 100%; }

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--color-ink);
  text-wrap: balance;
}

/* ─── Scroll reveal ──────────────────────────────────────────────────────── */
[data-reveal].is-hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal] {
  opacity: 1;
  transform: none;
}

/* ─── Nav responsive ─────────────────────────────────────────────────────── */
@media (min-width: 768px) { .hidden-mobile { display: flex !important; } .show-mobile { display: none !important; } }
@media (max-width: 767px) {
  .hidden-mobile { display: none !important; }
  .show-mobile { display: flex !important; }
  #site-nav .section-wrap { display: flex !important; justify-content: space-between !important; align-items: center !important; }
  #hero-ctas { margin-top: 4rem; }
  #hero-ctas .btn { flex: 1 1 100%; text-align: center; justify-content: center; }
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-ink) !important; }
.nav-link[aria-current="page"] { border-bottom: 2px solid var(--color-primary); padding-bottom: 2px; }

/* ─── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  [data-reveal].is-hidden,
  [data-reveal],
  .hero-word {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
