/* ---------- Shared base: design tokens, fonts, page shell, header/nav ----------
   Used by every page (index.html, campaigns.html, …). Page-specific styles stay
   inline in each page. Fonts are loaded per page from Google Fonts. */

/* Tokens from Figma Foundations: Color Palette (61:152), Typography (57:828),
   Spacing Scale (53:509), Grid System Desktop (53:565) / Mobile (53:584) */
:root {
  /* Primary */
  --signal-orange: #ff4a1c;
  --signal-orange-dark: #cc1700; /* Primary/Signal Hover */
  --signal-tint: rgba(255, 74, 28, 0.15);
  /* Neutrals */
  --neutral-surface: #f1f0f0;
  --neutral-hairline: #9f9795;
  --text-secondary: #766b68;
  --text-primary: #2a1e1b;
  --neutral-bg: #0f0502;
  --black: #000000;

  --font-body: "Archivo", system-ui, sans-serif;
  --font-display: "Big Shoulders Display", Impact, sans-serif;

  /* Spacing scale */
  --space-xs: 8px;    /* tightly related items (eyebrow + headline) */
  --space-sm: 16px;   /* elements in a card, small component padding */
  --space-md: 24px;   /* default padding, paragraph gap */
  --space-lg: 40px;   /* distinct blocks within a section */
  --space-xl: 64px;   /* between sections */
  --space-2xl: 96px;  /* major section breaks, hero padding */
  --space-3xl: 128px; /* top/bottom of hero sections */

  /* Grid margins: desktop 120px, mobile 4-col full width */
  --page-margin: 120px;
  --touch-target: 44px;
}

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

body {
  margin: 0;
  background: var(--neutral-bg);
  color: var(--neutral-surface);
  font-family: var(--font-body);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header (Figma node 110:94) ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 150px;
  padding: var(--space-md) var(--page-margin);
  background: var(--neutral-bg);
}

.logo {
  display: flex;
  flex-shrink: 0;
  width: 84px;
}
.logo img {
  display: block;
  width: 84px;
  height: 61.1127px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 1 1063px;
  min-width: 530px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 5px;
  color: var(--neutral-surface);
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-link:hover,
.nav-link:focus-visible { color: var(--signal-orange); }
.nav-link:focus-visible { outline: 1px solid var(--signal-orange); outline-offset: 4px; }

/* Active link: text + 1px underline, 2px gap (29px stack) */
.nav-link[aria-current="page"] {
  color: var(--signal-orange);
}
.nav-link[aria-current="page"] span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-link[aria-current="page"] span::after {
  content: "";
  display: block;
  height: 1px;
  width: 100%;
  background: var(--signal-orange);
}

.nav-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 102px;
  height: 37px;
  padding: 12px 24px;
  border: 0.5px solid var(--signal-orange);
  border-radius: 4px;
  background: linear-gradient(to bottom, var(--signal-orange), var(--signal-orange-dark));
  color: var(--black);
  font-size: 16px;
  font-weight: 600;
  line-height: 26px;
  white-space: nowrap;
  text-decoration: none;
}
/* Hover (Figma 65:182): flat Signal Hover fill */
.nav-cta:not([aria-current]):hover {
  background: var(--signal-orange-dark);
  border-color: var(--signal-orange-dark);
}
/* Active (Figma 341:1262): outline only, gradient text */
.nav-cta[aria-current="page"] {
  background: transparent;
}
.nav-cta[aria-current="page"] span {
  background: linear-gradient(to bottom, var(--signal-orange), var(--signal-orange-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-cta:focus-visible { outline: 1px solid var(--neutral-surface); outline-offset: 3px; }

.menu-toggle { display: none; }


/* ---------- Signal Orange Button (Figma component set 79:200) ----------
   130×37 (widens for longer labels), 0.5px Signal Orange border (kept on every state), Body/S label.
   .btn--primary  Default: Signal Gradient fill, black label
                  Hover:   flat Signal Hover (#CC1700) fill
   .btn--dark     Dark:       no fill, Signal Gradient label
                  Dark Hover: 15% Signal Tint fill */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 130px;
  height: 37px;
  padding: 12px 10px;
  border: 0.5px solid var(--signal-orange);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}
.btn:focus-visible { outline: 1px solid var(--neutral-surface); outline-offset: 3px; }
.btn--primary {
  background: linear-gradient(to bottom, var(--signal-orange), var(--signal-orange-dark));
  color: var(--black);
}
.btn--primary:hover { background: var(--signal-orange-dark); }
.btn--dark { background: transparent; }
.btn--dark span {
  background: linear-gradient(to bottom, var(--signal-orange), var(--signal-orange-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.btn--dark:hover { background: var(--signal-tint); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  :root { --page-margin: 48px; }
}

/* Header: the full menu shows only while its links keep at least 24px
   between them (about 1110px wide); below that it becomes the hamburger */
@media (max-width: 1120px) {
  .site-header {
    position: relative;
    height: auto;
    padding: var(--space-sm) var(--space-md);
  }
  .logo, .logo img { width: 64px; height: auto; }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .menu-toggle span {
    display: block;
    height: 2px;
    background: var(--neutral-surface);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    min-width: 0;
    padding: var(--space-xs) var(--space-md) var(--space-md);
    background: var(--neutral-bg);
    border-bottom: 1px solid rgba(241, 240, 240, 0.08);
  }
  .nav.is-open { display: flex; }
  .nav-link { height: var(--touch-target); }
  .nav-cta { height: var(--touch-target); margin-top: var(--space-sm); }
}
