/* ============================================================
   REVLINE — styles.css
   Global reset, base typography, layout, utilities
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 100px;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text);
  background-color: var(--carbon);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Ambient background glow — soft red/yellow lighting, never flat */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60vw 60vw at 85% -10%, var(--red-glow-soft), transparent 60%),
    radial-gradient(50vw 50vw at 0% 100%, var(--yellow-glow-soft), transparent 55%),
    var(--carbon);
  pointer-events: none;
}

/* Subtle carbon grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.4;
  background-image: var(--carbon-fibre);
  background-size: var(--carbon-fibre-size);
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* --- HEADINGS --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--white);
  text-transform: uppercase;
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); letter-spacing: var(--ls-wide); }

p {
  color: var(--text-secondary);
  line-height: var(--lh-loose);
  margin-bottom: var(--sp-4);
}
p:last-child { margin-bottom: 0; }

a { color: var(--red-bright); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--red); }

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

ul, ol { list-style: none; }

strong { color: var(--white); font-weight: var(--fw-semibold); }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

/* Carbon-textured section variant */
.section--carbon {
  background-color: var(--graphite);
  background-image: var(--carbon-fibre);
  background-size: var(--carbon-fibre-size);
  background-blend-mode: overlay;
}
.section--graphite { background-color: var(--graphite); }

/* Hairline divider between sections */
.section--line { border-top: 1px solid var(--glass-border); }

/* --- SECTION HEADER --- */
.section-head {
  max-width: 720px;
  margin: 0 auto var(--sp-16);
  text-align: center;
}
.section-head--left { margin-inline: 0; text-align: left; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--sp-4);
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--grad-red);
}
.section-head--center .eyebrow,
.section-head:not(.section-head--left) .eyebrow { justify-content: center; }

.section-title {
  font-size: clamp(2rem, 5vw, var(--fs-3xl));
  margin-bottom: var(--sp-5);
}
.section-title .accent { color: var(--red); }
.section-title .accent-y { color: var(--yellow); }

.section-sub {
  font-size: var(--fs-md);
  color: var(--text-secondary);
}

/* --- GRID HELPERS --- */
.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* --- FLEX HELPERS --- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }

/* --- TEXT UTILITIES --- */
.text-center { text-align: center; }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-white { color: var(--white); }
.text-muted { color: var(--text-muted); }
.text-gradient {
  background: var(--grad-red-yellow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.mono {
  font-family: var(--font-display);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

/* --- MISC UTILITIES --- */
.relative { position: relative; }
.z-raised { position: relative; z-index: var(--z-raised); }
.overflow-hidden { overflow: hidden; }
.full-w { width: 100%; }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }
.mb-0 { margin-bottom: 0; }
.hide { display: none !important; }

/* Glass surface utility */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

/* Accessibility helpers */
.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;
}
.skip-link {
  position: absolute; top: -100px; left: var(--sp-4);
  background: var(--red); color: var(--white);
  padding: var(--sp-3) var(--sp-5); border-radius: var(--r-md);
  z-index: var(--z-toast); font-weight: var(--fw-bold);
  transition: top var(--t-base);
}
.skip-link:focus { top: var(--sp-4); color: var(--white); }

/* Selection + scrollbar */
::selection { background: var(--red); color: var(--white); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--carbon-deep); }
::-webkit-scrollbar-thumb { background: var(--graphite-lighter); border-radius: var(--r-pill); border: 2px solid var(--carbon-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--red-deep); }

/* Lucide icon sizing default */
[data-lucide] { width: 24px; height: 24px; stroke-width: 1.75; }
