/* ============================================
   BASE STYLES — Detailing Studio 2026
   Reset + Typography + Layout primitives
   ============================================ */

/* ---- RESET ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* When Lenis is active */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--c-text);
  background-color: var(--c-bg);
  overflow-x: hidden;
  position: relative;
}

/* Noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Body scroll lock for modal */
body.modal-open {
  overflow: hidden;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  color: var(--c-pure-white);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p {
  margin-bottom: var(--sp-md);
  color: var(--c-text-muted);
}

p:last-child { margin-bottom: 0; }

a {
  color: var(--c-accent);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--c-pure-white);
}

strong, b {
  font-weight: var(--fw-semibold);
  color: var(--c-text);
}

ul, ol {
  list-style: none;
}

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

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

::selection {
  background: var(--c-accent);
  color: var(--c-black);
}

/* ---- LAYOUT CONTAINERS ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ---- SECTION RHYTHM ---- */
.section {
  padding-block: var(--sp-section);
  position: relative;
}

.section--dark {
  background-color: var(--c-graphite);
}

.section--accent {
  background-color: var(--c-accent);
  color: var(--c-black);
}

.section--accent h2,
.section--accent h3,
.section--accent h4 {
  color: var(--c-black);
}

.section--accent p {
  color: var(--c-charcoal);
}

/* ---- SECTION HEADER ---- */
.section__header {
  margin-bottom: var(--sp-3xl);
}

.section__label {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-ultra);
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--sp-md);
  padding: var(--sp-2xs) var(--sp-sm);
  border: 1px solid var(--c-accent);
  border-radius: var(--radius-xs);
}

.section__title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-tight);
  text-transform: uppercase;
  margin-bottom: var(--sp-lg);
}

.section__desc {
  font-size: var(--fs-body);
  color: var(--c-text-muted);
  max-width: 600px;
  line-height: var(--lh-loose);
}

/* ---- GRID UTILITIES ---- */
.grid {
  display: grid;
  gap: var(--gutter);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

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

@media (max-width: 640px) {
  .grid--4,
  .grid--3,
  .grid--2 { grid-template-columns: 1fr; }
}

/* ---- FLEX UTILITIES ---- */
.flex { display: flex; }
.flex--center { align-items: center; justify-content: center; }
.flex--between { align-items: center; justify-content: space-between; }
.flex--col { flex-direction: column; }
.flex--wrap { flex-wrap: wrap; }
.gap-xs  { gap: var(--sp-xs); }
.gap-sm  { gap: var(--sp-sm); }
.gap-md  { gap: var(--sp-md); }
.gap-lg  { gap: var(--sp-lg); }
.gap-xl  { gap: var(--sp-xl); }

/* ---- TEXT UTILITIES ---- */
.text-accent { color: var(--c-accent); }
.text-muted { color: var(--c-text-muted); }
.text-center { text-align: center; }
.text-upper { text-transform: uppercase; }
.text-mono { font-family: var(--ff-mono); }
.text-lg { font-size: var(--fs-h4); }

/* ---- VISIBILITY ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---- BREADCRUMBS ---- */
.breadcrumbs {
  padding: var(--sp-md) 0;
  font-size: var(--fs-small);
  color: var(--c-text-muted);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-xs);
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

.breadcrumbs__item::after {
  content: '/';
  color: var(--c-gray-700);
}

.breadcrumbs__item:last-child::after {
  display: none;
}

.breadcrumbs__link {
  color: var(--c-text-muted);
  transition: color var(--dur-fast) var(--ease-out);
}

.breadcrumbs__link:hover {
  color: var(--c-accent);
}

.breadcrumbs__current {
  color: var(--c-text);
}

/* ---- DIVIDERS ---- */
.divider {
  width: 100%;
  height: 1px;
  background: var(--c-border);
  border: none;
}

.divider--accent {
  height: 2px;
  background: var(--c-accent);
  max-width: 80px;
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


