/* ============================================================
   CODE 1 STUDIOS — HIGH-VIS RESCUE DESIGN SYSTEM
   Global tokens shared across every site in the family.
   ============================================================ */

:root {
  /* -- CORE PALETTE ------------------------------------------ */
  --c1-void:        #08090b;   /* deepest bg */
  --c1-carbon:      #101215;   /* app bg */
  --c1-graphite:    #181b20;   /* section bg */
  --c1-steel:       #262a31;   /* raised surface */
  --c1-line:        #2f343d;   /* hairline / divider */
  --c1-line-strong: #454b56;
  --c1-mute:        #8a919d;   /* secondary text */
  --c1-fog:         #c6ccd6;   /* body text */
  --c1-snow:        #f4f6fa;   /* headings */

  /* -- SIGNAL ACCENTS (HIGH-VIS RESCUE) --------------------- */
  --c1-hivis:       #f5c518;   /* hi-vis amber — primary CTA */
  --c1-hivis-hot:   #ffdd47;   /* highlight/hover */
  --c1-rescue:      #ff2a2a;   /* rescue red — pulse + alerts */
  --c1-rescue-deep: #a30000;
  --c1-beacon-blue: #1e6dff;   /* beacon blue — from studio icon */
  --c1-medic:       #26d07c;   /* medic green — status/ok */
  --c1-siren:       linear-gradient(90deg, var(--c1-rescue), var(--c1-hivis));

  /* -- BRANDED APP HUES (for family bar highlights) --------- */
  --app-code1:      #ff2a2a;
  --app-shiftkit:   #26d07c;
  --app-bullion:    #f5c518;
  --app-agent:      #1e6dff;
  --app-receipt:    #ff8a1e;
  --app-neon:       #ff6ac1;

  /* -- TYPE ------------------------------------------------- */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* -- SCALE ----------------------------------------------- */
  --text-2xs: 0.6875rem;   /* 11 */
  --text-xs:  0.75rem;     /* 12 */
  --text-sm:  0.875rem;    /* 14 */
  --text-base:1rem;        /* 16 */
  --text-lg:  1.125rem;    /* 18 */
  --text-xl:  1.375rem;    /* 22 */
  --text-2xl: 1.75rem;     /* 28 */
  --text-3xl: 2.25rem;     /* 36 */
  --text-4xl: 3rem;        /* 48 */
  --text-5xl: 4rem;        /* 64 */
  --text-hero:clamp(2.5rem, 6vw + 1rem, 6.5rem);

  /* -- SPACING --------------------------------------------- */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10:40px; --s-12:48px; --s-14:56px;
  --s-16:64px; --s-20:80px; --s-24:96px; --s-32:128px;

  /* -- RADII / SHADOW ------------------------------------- */
  --r-xs: 6px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-2xl: 40px;
  --shadow-1: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 20px rgba(0,0,0,0.35);
  --shadow-2: 0 1px 0 rgba(255,255,255,0.05) inset, 0 24px 60px -20px rgba(0,0,0,0.55);
  --shadow-hivis: 0 0 0 1px rgba(245,197,24,0.35), 0 12px 30px -10px rgba(245,197,24,0.5);
  --shadow-rescue: 0 0 0 1px rgba(255,42,42,0.35), 0 14px 30px -10px rgba(255,42,42,0.55);

  /* -- MOTION ---------------------------------------------- */
  --ease-out: cubic-bezier(.2,.65,.2,1);
  --ease-in:  cubic-bezier(.6,.05,.7,.2);
  --dur-fast: 140ms;
  --dur-med:  260ms;
  --dur-slow: 480ms;

  --hazard: repeating-linear-gradient(
    45deg,
    var(--c1-hivis) 0 22px,
    var(--c1-void) 22px 44px
  );
}

/* ============================================================
   RESET + BASE
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c1-void);
  color: var(--c1-fog);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient rescue-glow backdrop */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60vw 60vw at 85% -10%, rgba(255,42,42,0.10), transparent 60%),
    radial-gradient(70vw 50vw at 10% 90%, rgba(30,109,255,0.09), transparent 65%),
    radial-gradient(50vw 40vw at 50% 50%, rgba(245,197,24,0.04), transparent 70%);
}

main, header, footer, section { position: relative; z-index: 1; }

img, svg, video { display: block; max-width: 100%; height: auto; }

a { color: var(--c1-hivis); text-decoration: none; }
a:hover { color: var(--c1-hivis-hot); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--c1-snow);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 var(--s-4);
}
h1 { font-size: var(--text-hero); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3vw + 0.5rem, var(--text-4xl)); }
h3 { font-size: var(--text-2xl); letter-spacing: -0.015em; }
h4 { font-size: var(--text-xl); }

p { margin: 0 0 var(--s-4); }
p.lede { font-size: clamp(1.125rem, 1.5vw + 0.5rem, var(--text-xl)); color: var(--c1-fog); line-height: 1.5; }

.mono { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--c1-mute); }

/* ============================================================
   LAYOUT
   ============================================================ */

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 44px); }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 32px); }

.section {
  padding: clamp(72px, 8vw, 128px) 0;
  position: relative;
}
.section--tight { padding: clamp(48px, 5vw, 80px) 0; }

/* Hazard-tape rule */
.hazard-tape {
  height: 14px;
  background: var(--hazard);
  border-top: 1px solid rgba(0,0,0,0.4);
  border-bottom: 1px solid rgba(0,0,0,0.4);
  width: 100%;
}

/* Eyebrow chip */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--c1-line);
  background: rgba(255,255,255,0.02);
  color: var(--c1-hivis);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c1-rescue);
  box-shadow: 0 0 0 3px rgba(255,42,42,0.18);
  animation: pulse 1.6s var(--ease-out) infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(255,42,42,0.18); }
  50%     { box-shadow: 0 0 0 7px rgba(255,42,42,0.04); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), color var(--dur-fast) var(--ease-out);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--c1-hivis); color: #0b0d10; box-shadow: var(--shadow-hivis); }
.btn--primary:hover { background: var(--c1-hivis-hot); color: #0b0d10; }
.btn--ghost { background: transparent; color: var(--c1-snow); border-color: var(--c1-line-strong); }
.btn--ghost:hover { border-color: var(--c1-hivis); color: var(--c1-hivis); }
.btn--rescue { background: var(--c1-rescue); color: #fff; box-shadow: var(--shadow-rescue); }
.btn--rescue:hover { background: #ff4444; color: #fff; }

/* Card */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.25)), var(--c1-graphite);
  border: 1px solid var(--c1-line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.5vw, 32px);
  transition: border-color var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}
.card:hover { border-color: var(--c1-line-strong); transform: translateY(-2px); }

/* Grid helpers */
.grid { display: grid; gap: var(--s-6); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-4-tight { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--c1-hivis);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Selection */
::selection { background: rgba(245,197,24,0.35); color: #0b0d10; }

/* Small helpers */
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.row   { display: flex; gap: var(--s-4); flex-wrap: wrap; align-items: center; }
.center{ text-align: center; }
.muted { color: var(--c1-mute); }
.hivis { color: var(--c1-hivis); }
.rescue{ color: var(--c1-rescue); }
