/* ================================================================
   CORE STYLESHEET
   Every site includes this file, unmodified. It contains:
     - Design tokens (:root + [data-theme="dark"])
     - Reset / base / utility classes
     - Nav (incl. theme toggle)
     - Hero
     - Buttons
     - Footer
     - Scroll reveal
     - Responsive rules for all of the above

   Site-specific sections (services grid, portfolio carousel,
   testimonials, about, contact form, etc.) live in /mods and are
   included only if that site needs them. See mods/README.md.

   THEMING MODEL: secondary/muted text, borders, and overlays are
   written as rgba(var(--fg-rgb), X) rather than a hardcoded color,
   so flipping [data-theme="dark"] only requires redefining the
   handful of tokens below — no per-component dark overrides.
   Exception: the footer's background never flips with the theme,
   so footer text uses its own fixed --footer-fg-rgb token.

   TO RETHEME A NEW SITE: edit the :root block below. Nothing else
   in core.css or any mod file should need a color changed directly.
================================================================ */

:root {
  /* ---- Brand colors — Gloss Father Detailing (steeler yellow / silver / black) ---- */
  --accent1:          #FFC20E;
  --accent1-dark:     #D79D00;
  --accent1-deep:     #9A6E00;

  --accent2:          #ADB5BA;
  --accent2-soft:     #ECEEEF;

  --ink:              #141414;
  --paper:            #FFFFFF;

  --accent1-rgb:      255,194,14;
  --accent2-rgb:      173,181,186;

  --accent1-glow:     rgba(var(--accent1-rgb),0.22);
  --accent2-glow:     rgba(var(--accent2-rgb),0.28);

  /* ---- Surfaces ---- */
  --color-bg:         #FFFFFF;
  --color-bg-alt:     #F7F8F8;
  --color-bg-deep:    #ECEEEF;
  --color-card:       #FFFFFF;
  --color-border:     rgba(20,20,20,0.08);

  /* ---- Semantic text tokens (theme-driven, do not hardcode) ---- */
  --fg-rgb:           20,20,20;
  --text-color:       var(--ink);
  --navbar-bg:        rgba(255,255,255,0.86);
  --border-2:         var(--color-border);

  /* Footer surface is always dark regardless of theme, so its text
     uses a fixed token rather than --fg-rgb (which inverts). */
  --footer-fg-rgb:    255,255,255;

  /* ---- Fonts ---- */
  --font-display:     'Space Grotesk', sans-serif;
  --font-body:        'Inter', sans-serif;

  /* ---- Elevation — the "floating card" signature ---- */
  --shadow-card:      0 18px 40px -14px rgba(20,20,20,0.16), 0 4px 10px rgba(20,20,20,0.05);
  --shadow-hover:     0 30px 60px -16px rgba(20,20,20,0.24), 0 10px 24px rgba(var(--accent1-rgb),0.16);
  --shadow-sm:        0 6px 18px rgba(20,20,20,0.08);
  --shadow-glow:      0 0 44px var(--accent1-glow);

  --radius-sm:        10px;
  --radius-md:        18px;
  --radius-lg:        28px;

  --transition:       0.3s cubic-bezier(0.4,0,0.2,1);

  --section-pad:      clamp(56px,9vw,104px) clamp(16px,4vw,24px);
}

/* ================================================================
   RESET & BASE
================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.6;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---- Visible keyboard focus (accessibility) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent1);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Shared section-header utility classes (used by every mod) ---- */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent1);
  margin-bottom: 12px;
  display: block;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text-color);
}

.accent-bar {
  width: 52px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  border-radius: 4px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-glow);
}

/* ================================================================
   NAV BAR
================================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--navbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 20px rgba(18,24,26,0.05);
}

.navbar-brand { display: flex; align-items: center; text-decoration: none; font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;}
.navbar-brand img { height: 46px; width: auto; display: block; }

.navbar-brand .highlight {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.navbar-links { display: flex; list-style: none; gap: 30px; align-items: center; }
.navbar-links a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--fg-rgb), 0.6);
  text-decoration: none;
  transition: color var(--transition);
}
.navbar-links a.is-active { color: var(--accent1); }
.navbar-links a:hover { color: var(--accent1); }

.navbar-cta {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent1);
  border-radius: var(--radius-sm);
  color: var(--paper) !important;
  font-size: 0.78rem !important;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition) !important;
}
.navbar-cta:hover { background: var(--accent1-dark); box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 4px;
  transition: background var(--transition);
}
.nav-toggle:hover { background: var(--color-bg-alt); }
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-color);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-card);
  color: var(--text-color);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent2); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent1); outline-offset: 3px; }
.theme-toggle .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-light { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-dark { display: inline; }

/* ================================================================
   HERO
================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 64px;
  background: linear-gradient(220deg, var(--paper) 0%, var(--accent2-soft) 100%);
}

.hero-glow {
  position: absolute;
  top: -20%; right: -10%;
  width: 60vw; height: 60vw;
  max-width: 820px; max-height: 820px;
  background: radial-gradient(circle, var(--accent2-glow) 0%, transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}
.hero-glow--secondary {
  top: auto; bottom: -25%; left: -15%; right: auto;
  width: 46vw; height: 46vw;
  background: radial-gradient(circle, var(--accent1-glow) 0%, transparent 70%);
}

.hero-content { position: relative; z-index: 2; max-width: 700px; padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 40px); animation: heroFadeIn 1s 0.2s ease both; }

.hero-eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--accent1);
  margin-bottom: 20px; display: block;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-color);
  line-height: 1.05;
  margin-bottom: 24px;
}
.hero-title .highlight {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 400;
  color: rgba(var(--fg-rgb), 0.65);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.75;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(var(--fg-rgb), 0.35); font-size: 0.68rem; letter-spacing: 0.2em;
  text-transform: uppercase; animation: bounce 2s infinite;
}
.hero-scroll::after { content: ''; display: block; width: 1px; height: 36px; background: linear-gradient(to bottom, var(--accent2), transparent); }

/* ================================================================
   BUTTONS
================================================================ */
.btn-primary {
  display: inline-block; padding: 15px 34px;
  background: var(--accent1); color: var(--paper);
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.02em; text-decoration: none;
  border-radius: var(--radius-sm); border: none; cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent1-dark); box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.btn-ghost {
  display: inline-block; padding: 15px 34px;
  background: var(--paper); color: var(--text-color);
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.02em; text-decoration: none;
  border-radius: var(--radius-sm); border: 1.5px solid var(--color-border);
  cursor: pointer; transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--accent2); box-shadow: var(--shadow-hover); transform: translateY(-2px); }

/* ================================================================
   FOOTER
   NOTE: footer background is always a dark surface in both themes
   (--accent1-deep in light, --color-bg-deep in dark), so footer
   text intentionally uses --footer-fg-rgb (a fixed white token)
   rather than --fg-rgb (which inverts with the page theme).
================================================================ */
.site-footer { background: var(--accent1-deep); padding: 48px 24px 32px; }
.footer-inner { max-width: 1120px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer-brand { display: flex; align-items: center; font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.footer-brand .highlight {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.footer-brand img { height: 34px; width: auto; filter: brightness(0) invert(1); opacity: 0.9; }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { font-size: 0.78rem; color: rgba(var(--footer-fg-rgb), 0.55); text-decoration: none; letter-spacing: 0.04em; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent2); }
.footer-copy { font-size: 0.75rem; color: rgba(var(--footer-fg-rgb), 0.35); text-align: right; }

.footer-bottom {
  max-width: 1100px; margin: 20px auto 0; padding-top: 20px;
  border-top: 1px solid rgba(var(--footer-fg-rgb), 0.1);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-legal { display: flex; gap: 20px; list-style: none; flex-wrap: wrap; }
.footer-legal a { font-size: 0.72rem; color: rgba(var(--footer-fg-rgb), 0.5); text-decoration: none; transition: color var(--transition); }
.footer-legal a:hover { color: var(--accent2); }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(var(--footer-fg-rgb), 0.08); border: 1px solid rgba(var(--footer-fg-rgb), 0.14);
  display: flex; align-items: center; justify-content: center;
  color: rgba(var(--footer-fg-rgb), 0.7); text-decoration: none; font-size: 0.95rem;
  transition: color var(--transition), border-color var(--transition), transform var(--transition);
}
.footer-social a:hover { color: var(--accent2); border-color: var(--accent2); transform: translateY(-2px); }

/* ================================================================
   SCROLL REVEAL
   Any element with class="reveal" fades/slides in on first scroll
   into view. Used by mods too — no mod needs its own copy of this.
================================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes heroFadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ================================================================
   RESPONSIVE — core sections only
================================================================ */
@media (max-width: 940px) {
  .navbar-links { display: none; }
  .navbar-links.open {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--navbar-bg); padding: 24px; gap: 20px; border-bottom: 1px solid var(--border-2);
  }
  .nav-toggle { display: flex; }
}
@media (max-width: 680px) {
  .navbar-links { display: none; }
  .navbar-links.open {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--navbar-bg); padding: 24px; gap: 20px; border-bottom: 1px solid var(--border-2); box-shadow: var(--shadow-card);
  }
  .nav-toggle { display: flex; }
}
@media (max-width: 760px) {
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-copy { text-align: center; }
  .footer-links { flex-direction: column; align-items: center; gap: 14px; }
  .footer-bottom { flex-direction: column; justify-content: center; text-align: center; }
  .footer-legal { justify-content: center; }
  .footer-social { justify-content: center; }
}

/* ================================================================
   DARK MODE — manual toggle only (no prefers-color-scheme)
   Scoped to [data-theme="dark"] on <html>, set by the toggle
   button and persisted to localStorage. The <head> inline script
   applies the attribute before first paint so there's never a
   flash of the wrong theme.

   Because core (and every mod) reads --fg-rgb / --text-color
   instead of hardcoded colors, this block only needs to redefine
   surfaces + the two semantic text tokens — components need no
   per-component dark override to re-theme correctly.
================================================================ */
[data-theme="dark"] {
  --color-bg:         #121212;
  --color-bg-alt:     #1A1C1E;
  --color-bg-deep:    #090A0B;
  --color-card:       #1E2023;
  --color-border:     rgba(255,255,255,0.08);
  --border-2:         var(--color-border);

  --accent1-glow:     rgba(var(--accent1-rgb),0.18);
  --accent2-glow:     rgba(var(--accent2-rgb),0.16);

  --shadow-card:      0 18px 40px -16px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.04);
  --shadow-hover:     0 28px 60px -18px rgba(0,0,0,0.75), 0 0 28px var(--accent1-glow);
  --shadow-sm:        0 8px 22px rgba(0,0,0,0.45);

  --fg-rgb:           243,244,246;
  --text-color:       rgb(var(--fg-rgb));
  --navbar-bg:        rgba(18,18,18,0.82);
}
[data-theme="dark"] body { background: var(--color-bg); color: var(--text-color); }
[data-theme="dark"] .hero {
  background:
    radial-gradient(circle at top right, var(--accent1-glow) 0%, transparent 42%),
    linear-gradient(160deg, var(--color-bg-alt), var(--color-bg), var(--color-bg-deep));
}
[data-theme="dark"] .navbar { background: var(--navbar-bg); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .navbar-links.open { background: rgba(18,18,18,0.98); }
[data-theme="dark"] .navbar-links a.is-active { color: var(--accent1); }
[data-theme="dark"] .site-footer { background: var(--color-bg-deep); }
[data-theme="dark"] .btn-ghost { background: rgba(255,255,255,0.05); color: #f5f8f6; border: 1px solid rgba(255,255,255,0.1); }