/* ============================================================================
   GARAGE GALS . BASE
   ----------------------------------------------------------------------------
   A modern, opinionated reset plus the global defaults every page inherits.
   Depends on tokens.css.
   ============================================================================ */

/* ---- Box model + reset --------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  scroll-behavior: smooth;
  /* Anchor jumps clear the fixed nav */
  scroll-padding-top: 6rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--weight-regular);
  line-height: var(--lh-body);
  color: var(--fg);
  background-color: var(--bg);
  background-image: var(--grad-paper);
  background-attachment: fixed;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  overflow-x: hidden;
  position: relative;
}

/* ---- Media defaults ------------------------------------------------------ */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img,
picture {
  -webkit-user-drag: none;
  user-select: none;
}

svg { fill: currentColor; }

/* ---- Form elements inherit type ------------------------------------------ */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

textarea { resize: vertical; }

/* ---- Typographic hygiene ------------------------------------------------- */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

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

strong,
b { font-weight: var(--weight-bold); }

/* ---- Selection + focus --------------------------------------------------- */
::selection {
  background: var(--selection-bg);
  color: var(--selection-fg);
  text-shadow: none;
}

:focus { outline: none; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-xs);
}

[data-theme="dark"] :focus-visible {
  box-shadow: var(--focus-ring-dark);
}

/* Visible focus for keyboard users on dark CTAs */
.btn:focus-visible {
  box-shadow: var(--focus-ring), var(--glow-red-sm);
}

/* ---- Skip link ----------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: var(--z-toast);
  padding: 0.7rem 1.1rem;
  background: var(--ink-900);
  color: var(--cream-50);
  border-radius: var(--r-sm);
  font-weight: var(--weight-semi);
  transform: translateY(-150%);
  transition: transform var(--dur-2) var(--ease-out-expo);
}
.skip-link:focus { transform: translateY(0); }

/* ---- Scrollbar (subtle, branded) ----------------------------------------- */
@supports (scrollbar-width: thin) {
  html {
    scrollbar-width: thin;
    scrollbar-color: var(--red-500) transparent;
  }
}
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--cream-200); }
::-webkit-scrollbar-thumb {
  background: var(--red-500);
  border-radius: var(--r-pill);
  border: 3px solid var(--cream-200);
}
::-webkit-scrollbar-thumb:hover { background: var(--red-400); }

/* ---- Reduced motion: global safety net ----------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Hidden but accessible ----------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

/* ---- Body lock while menu/modal is open ---------------------------------- */
body.is-locked {
  overflow: hidden;
  touch-action: none;
}

/* ---- Print: keep it sensible (we are web-first, never auto-PDF) ---------- */
@media print {
  .nav, .sticky-cta, .gg-cursor, .preloader, .marquee { display: none !important; }
  body { background: #fff; color: #000; }
}
