/* Site-wide reset + shared components (header/nav, footer, buttons, badges). */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Keeps page content from running straight into the footer. `.section`
 * only adds a top gap by design (see below), so the bottom gap before
 * the footer belongs here rather than as a one-off margin on the footer
 * or a fix on any single page. */
main {
  padding-bottom: var(--section-gap);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-hover);
}

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

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/*
 * Vertical rhythm between page sections. Deliberately a longhand
 * (padding-top only) rather than a `padding` shorthand: elements combine
 * this with `.container` (class="container section") for the standard
 * "gap above + side gutters" section, and a shorthand here would win the
 * whole `padding` property in the cascade and silently zero out
 * `.container`'s left/right padding.
 */
.section {
  position: relative;
  padding-top: var(--section-gap);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: var(--fs-tiny);
  font-weight: 600;
  padding: 15px 26px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: #fff;
}

.btn-dark {
  background: var(--color-dark);
  color: #fff;
}

.btn-dark:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-border-strong);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

.btn-outline-light {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.btn-sm {
  padding: 10px 18px;
  font-size: var(--fs-nano);
}

/* ---------- Badges / pills ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-nano);
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
}

.badge-limited {
  color: var(--color-primary);
  background: var(--color-primary-soft-bg);
}

.badge-open {
  color: var(--color-success);
  background: var(--color-success-soft-bg);
}

.badge-dark {
  color: #fff;
  background: rgba(26, 29, 27, 0.82);
}

.tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--color-primary);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.eyebrow {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.eyebrow--on-dark {
  color: var(--color-accent);
}

/* ---------- Site header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 248, 244, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  padding: 14px var(--container-pad);
}

.site-header--overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  background: none;
  backdrop-filter: none;
  border-bottom: none;
}

.site-header--overlay .site-header__bar {
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand__logo {
  height: var(--logo-height, 40px);
  width: auto;
  display: block;
}

.site-header--overlay .brand__logo {
  --logo-height: 52px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 26px;
  font-size: var(--fs-small);
  font-weight: 600;
}

.site-nav a {
  color: var(--color-text);
}

.site-nav--overlay a {
  color: #fff;
}

.site-nav--overlay a:hover {
  color: var(--color-accent);
}

.site-nav .nav-cta {
  background: var(--color-primary);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-nano);
}

.site-nav .nav-cta:hover {
  background: var(--color-primary-hover);
  color: #fff;
}

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border-strong);
  background: var(--color-surface);
  cursor: pointer;
  flex: none;
}

.hamburger .bar {
  stroke: var(--color-text);
  transition: transform 280ms cubic-bezier(.2, .7, .3, 1), opacity 200ms ease;
  /* Anchor all three bars to the shared icon center (the SVG viewBox),
   * not each bar's own bounding box - browsers disagree on the default
   * here, and anchoring per-bar throws the two diagonals off-center so
   * they no longer cross, breaking the X shape. */
  transform-box: view-box;
  transform-origin: center;
}

.site-header--overlay .hamburger {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
}

.site-header--overlay .hamburger .bar {
  stroke: #fff;
}

/* Order matters: CSS applies the rightmost function first, so this reads
 * as "move onto the shared center, then spin in place". Written the other
 * way around, the bar rotates before it's in position and both diagonals
 * end up dragged off to one side instead of crossing at the center. */
.hamburger.is-open .bar-1 {
  transform: rotate(45deg) translateY(6px);
}

.hamburger.is-open .bar-2 {
  opacity: 0;
}

.hamburger.is-open .bar-3 {
  transform: rotate(-45deg) translateY(-6px);
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    box-sizing: border-box;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px var(--container-pad) 20px;
    background: var(--color-bg);
    z-index: 30;
  }

  .site-nav--overlay {
    background: var(--color-dark);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  /* Match the navbar itself to the open menu's background so there's no
   * seam between the two while the menu is expanded. */
  .site-header.is-open {
    background: var(--color-bg);
  }

  .site-header--overlay.is-open {
    background: var(--color-dark);
    backdrop-filter: none;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--color-dark-border);
  background: var(--color-dark);
}

.site-footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: 40px var(--container-pad);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: var(--fs-tiny);
  font-weight: 600;
}

.site-footer__nav a {
  color: var(--color-dark-nav-text);
}

.site-footer__nav a:hover {
  color: #fff;
}

.site-footer__copy {
  font-size: var(--fs-tiny);
  color: var(--color-text-faint);
}

/* ---------- Bands (dark/light rounded panels used across pages) ---------- */

.band {
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px) clamp(22px, 4vw, 48px);
}

.band--dark {
  background: var(--color-dark);
  color: var(--color-dark-text);
}

.band--dark .eyebrow {
  color: var(--color-accent-strong);
}

.band--light {
  background: var(--color-bg-alt);
}

.band--cta {
  background: var(--color-dark);
  color: var(--color-dark-text);
}

.cta-band {
  text-align: center;
}

.cta-band h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  text-wrap: balance;
}

.cta-band p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--color-dark-text-muted);
  margin: 0 auto 30px;
  max-width: 44em;
  text-wrap: pretty;
}

/* ---------- Scroll-reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
