/* =========================================================
   Strength Auto Glass — Design System
   ========================================================= */

:root {
  /* Brand — black + gold direction (default) */
  --ink: #0B0B0C;
  --ink-2: #17171A;
  --ink-3: #22222A;
  --line: rgba(255,255,255,0.10);
  --line-strong: rgba(255,255,255,0.22);

  --gold: #C9A14A;
  --gold-2: #B8903A;
  --gold-glow: rgba(201, 161, 74, 0.35);

  --cream: #F5E9D0;
  --cream-2: #ECDDB9;
  --paper: #FAF7F0;

  --text: #0B0B0C;
  --text-muted: #5B544A;
  --text-inv: #F5E9D0;
  --text-inv-muted: rgba(245, 233, 208, 0.65);

  /* Type */
  --font-display: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Space */
  --density: 1;
  --space-1: calc(4px * var(--density));
  --space-2: calc(8px * var(--density));
  --space-3: calc(12px * var(--density));
  --space-4: calc(16px * var(--density));
  --space-5: calc(24px * var(--density));
  --space-6: calc(32px * var(--density));
  --space-7: calc(48px * var(--density));
  --space-8: calc(64px * var(--density));
  --space-9: calc(96px * var(--density));
  --space-10: calc(128px * var(--density));

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 24px;

  --container: 1240px;
}

/* Color scheme variants — set on <html data-scheme="..."> */
html[data-scheme="blue"] {
  --gold: #D9B55A;
  --gold-2: #C9A14A;
  --ink: #0A1A2E;
  --ink-2: #0F2441;
  --ink-3: #163255;
}
html[data-scheme="cream"] {
  --gold: #9A7425;
  --gold-2: #7E5D1C;
  --ink: #1E1610;
  --ink-2: #2B1F17;
  --ink-3: #3B2C20;
}

/* Light mode — flip inverses */
html[data-mode="light"] {
  --page-bg: var(--paper);
  --page-fg: var(--text);
  --surface: #FFFFFF;
  --surface-2: var(--cream);
  --surface-alt: var(--ink);
  --surface-alt-fg: var(--text-inv);
  --rule: rgba(11,11,12,0.10);
  --rule-strong: rgba(11,11,12,0.22);
}
html[data-mode="dark"] {
  --page-bg: var(--ink);
  --page-fg: var(--text-inv);
  --surface: var(--ink-2);
  --surface-2: var(--ink-3);
  --surface-alt: var(--cream);
  --surface-alt-fg: var(--text);
  --rule: rgba(245,233,208,0.10);
  --rule-strong: rgba(245,233,208,0.22);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--page-fg);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  text-wrap: pretty;
}

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

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

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---------- Typography utilities ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.display {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.serif { font-family: var(--font-display); }
.mono { font-family: var(--font-mono); }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--space-6);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}
.btn-primary:hover { background: #D8B25C; box-shadow: 0 8px 24px var(--gold-glow); }

.btn-ghost-light {
  background: transparent;
  color: var(--text-inv);
  border-color: var(--line-strong);
}
.btn-ghost-light:hover { background: rgba(245,233,208,0.08); border-color: var(--gold); }

.btn-ghost-dark {
  background: transparent;
  color: var(--text);
  border-color: rgba(11,11,12,0.22);
}
.btn-ghost-dark:hover { border-color: var(--ink); }

.btn-dark {
  background: var(--ink);
  color: var(--text-inv);
}
.btn-dark:hover { background: var(--ink-2); }

/* ---------- Fleur Hairline Divider ---------- */
.fleur-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--gold);
}
.fleur-rule::before,
.fleur-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
  max-width: 120px;
}

/* ---------- Gold hairline ---------- */
.gold-rule {
  height: 1px;
  background: var(--gold);
  opacity: 0.45;
}

/* ---------- Chip / Badge ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ---------- Section rhythm ---------- */
section { padding-block: var(--space-9); }
section.tight { padding-block: var(--space-8); }

.section-head {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  max-width: 780px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}

/* ---------- Ornaments ---------- */
.ornament-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: var(--gold);
}
.ornament-bar hr {
  border: 0;
  border-top: 1px solid currentColor;
  opacity: 0.35;
}

/* ---------- Placeholder imagery ---------- */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      rgba(201,161,74,0.08) 0 12px,
      rgba(201,161,74,0.02) 12px 24px),
    var(--surface);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--text-muted);
}
.ph.dark {
  background:
    repeating-linear-gradient(135deg,
      rgba(201,161,74,0.10) 0 12px,
      rgba(201,161,74,0.02) 12px 24px),
    var(--ink-2);
  color: var(--text-inv-muted);
}
.ph-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(0,0,0,0.4);
  color: var(--cream);
  border: 1px solid var(--gold);
}

/* Glass "shimmer" placeholder for hero photo when illustration mode is off */
.ph-windshield {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.08) 0%, transparent 50%),
    linear-gradient(135deg, #1a2840 0%, #0a1220 60%, #050810 100%);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: var(--space-6);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim-fade-up { animation: fadeInUp .6s ease both; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Icons: thin-line, gold ---------- */
.icn {
  width: 28px; height: 28px;
  stroke: var(--gold); stroke-width: 1.5;
  fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Scroll niceties ---------- */
html { scroll-behavior: smooth; }

/* ---------- Forms ---------- */
.field {
  display: grid;
  gap: 6px;
  /* Allow grid items to shrink below their intrinsic (input) content size so
     the 3-column Year/Make/Model row can't blow past its container. */
  min-width: 0;
}
.field > label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
html[data-mode="dark"] .field > label { color: var(--text-inv-muted); }

.field input,
.field select,
.field textarea {
  border: 1px solid var(--rule-strong);
  background: transparent;
  padding: 12px 14px;
  border-radius: 2px;
  outline: none;
  transition: border .15s ease;
  /* Fill the grid cell and include padding/border in the width calc so the
     native control can't push its parent wider than the form card. */
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ---------- Tweaks panel ---------- */
.tweaks-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  background: #0B0B0C;
  color: #F5E9D0;
  border: 1px solid rgba(201,161,74,0.4);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  width: 280px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  display: none;
}
.tweaks-panel.show { display: block; }
.tweaks-panel h4 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #C9A14A;
  display: flex; justify-content: space-between; align-items: center;
}
.tweaks-panel .row { display: grid; gap: 6px; margin-bottom: 10px; }
.tweaks-panel .row > label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}
.tweaks-panel .opts { display: flex; gap: 4px; flex-wrap: wrap; }
.tweaks-panel .opt {
  border: 1px solid rgba(245,233,208,0.2);
  background: transparent;
  color: #F5E9D0;
  padding: 6px 10px;
  border-radius: 2px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.tweaks-panel .opt.active {
  background: #C9A14A;
  color: #0B0B0C;
  border-color: #C9A14A;
}

/* Page-nav tabs */
.pagenav {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--page-bg);
  border-bottom: 1px solid var(--rule);
}

/* Reveal on intersect */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Marquee */
.marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: inline-flex;
  gap: 48px;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
}

/* Social ads grid — collapse on narrow screens */
@media (max-width: 1100px) {
  .ad-set-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 720px) {
  .ad-set-grid { grid-template-columns: 1fr !important; }
  .ad-set-grid > div > div:nth-child(2) { width: 100% !important; height: auto !important; aspect-ratio: 1/1; }
}
