/* ============================================================
   CarBrandish — style.css
   Base: variables, reset, layout utilities, buttons, splash
   ============================================================ */

/* ── CSS Custom Properties ── */
:root {
  /* Core Palette */
  --color-primary:       #F97316;
  --color-primary-hover: #FB923C;
  --color-primary-dark:  #EA580C;
  --color-accent:        #FFB066;

  /* Backgrounds */
  --color-bg:            #050505;
  --color-surface:       #0D0D0D;
  --color-surface-alt:   #141414;
  --color-surface-glass: rgba(10, 10, 10, 0.4);

  /* Text */
  --color-text:          #F5F5F5;
  --color-text-muted:    #A3A3A3;
  --color-text-dim:      #666666;

  /* Borders & Dividers */
  --color-border:        rgba(255, 255, 255, 0.06);
  --color-border-hover:  rgba(255, 255, 255, 0.12);
  --color-divider:       rgba(255, 255, 255, 0.04);

  /* Utility */
  --color-overlay:       rgba(5, 5, 5, 0.7);

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Montserrat', sans-serif;

  /* Type Scale */
  --text-hero:    5vw;
  --text-h1:      3.5vw;
  --text-h2-2:      3vw;
  --text-h2:      2.5vw;
  --text-h3:      1.7vw;
  --text-h4:      1.3vw;
  --text-lg:      1.15vw;
  --text-base:    1.05vw;
  --text-sm:      0.9vw;
  --text-xs:      0.78vw;

  /* Line Heights */
  --leading-tight:   1.15;
  --leading-normal:  1.6;
  --leading-relaxed: 1.75;

  /* Letter Spacing */
  --tracking-tight:  -0.02em;
  --tracking-normal:  0;
  --tracking-wide:    0.04em;
  --tracking-wider:   0.08em;

  /* Font Weights */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  /* Spacing */
  --space-section:     8vw;
  --space-section-sm:  5.5vw;
  --space-xl:    4vw;
  --space-lg:    2.8vw;
  --space-md:    1.8vw;
  --space-sm:    1vw;
  --space-xs:    0.5vw;

  /* Layout */
  /* --container-max:     1120px; */
  --container-max:     80vw;
  --container-padding: 3vw;

  /* Border Radius */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:    0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md:    0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg:    0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow:  0 0 24px rgba(249, 115, 22, 0.12);

  /* Transitions */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast:    150ms;
  --duration-normal:  300ms;
  --duration-slow:    500ms;
  --duration-slower:  800ms;

  /* Z-Index */
  --z-base:     1;
  --z-dropdown: 100;
  --z-sticky:   500;
  --z-header:   1000;
  --z-modal:    2000;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

main {
  overflow: clip;
  overflow-clip-margin: content-box;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-loading {
  overflow: hidden;
}

body.is-loading > *:not(.splash-screen) {
  opacity: 0;
}

body > *:not(.splash-screen) {
  transition: opacity 0.6s var(--ease-out);
}

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.section {
  padding-block: var(--space-section);
}

.section-alt {
  background: var(--color-surface);
}

/* ── Eyebrow ── */
.eyebrow {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  display: block;
}
.eyebrow.eyebrowhero {
  font-size: var(--text-h2);
}
/* ── Se}ction Header ── */
.section-header {
  text-align: center;
  margin-inline: auto;
  margin-bottom: var(--space-xl);
}

.section-header h2 {
  font-size: var(--text-h1);
  margin-bottom: var(--space-md);
}

.gradient-word {
  background: linear-gradient(90deg, var(--color-primary) 0%, #FFB066 60%, #FFD4A3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.gradient-word::after {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  filter: blur(24px);
  opacity: 0.25;
  z-index: -1;
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

.section-subheading,
.section-header .section-subheading {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: var(--tracking-wide);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.35vw;
  padding: 0.7vw 1.6vw;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-primary:active {
  background: var(--color-primary-dark);
  transform: translateY(0);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.35vw;
  padding: 0.7vw 1.6vw;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
}

.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-lg {
  padding: 0.85vw 2vw;
  font-size: var(--text-base);
}

/* ── Splash / Loading Screen ── */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  transition: opacity 0.6s var(--ease-out);
}

.splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.loader-ring {
  display: inline-block;
  position: relative;
  width: 64px;
  height: 64px;
}

.loader-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 50px;
  height: 50px;
  margin: 7px;
  border: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: loader-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: var(--color-primary) transparent transparent transparent;
}

.loader-ring div:nth-child(1) { animation-delay: -0.45s; }
.loader-ring div:nth-child(2) { animation-delay: -0.3s; }
.loader-ring div:nth-child(3) { animation-delay: -0.15s; }

@keyframes loader-ring {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.splash-text {
  font-size: 0.7rem;
  font-weight: var(--weight-medium);
  color: var(--color-text-dim);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  animation: splash-pulse 2s ease-in-out infinite;
}

@keyframes splash-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ── GSAP Reveal — initial hidden state ── */
.reveal,
.reveal-left,
.reveal-right {
  visibility: hidden;
}

/* ── 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;
  }
}

/* ── Base Responsive ── */
@media (max-width: 1023px) {
  :root {
    --text-hero:    6.5vw;
    --text-h1:      5vw;
    --text-h2:      4vw;
    --text-h3:      2.8vw;
    --text-h4:      2.2vw;
    --text-lg:      1.9vw;
    --text-base:    1.75vw;
    --text-sm:      1.55vw;
    --text-xs:      1.3vw;
    --space-section:     9vw;
    --space-section-sm:  6.5vw;
    --space-xl:    5.5vw;
    --space-lg:    4vw;
    --space-md:    2.5vw;
    --space-sm:    1.5vw;
    --space-xs:    0.8vw;
    --container-padding: 4vw;
  }
}

@media (max-width: 767px) {
  :root {
    --text-hero:    8.7vw;
    --text-h1:      7.2vw;
    --text-h2-2:      6vw;
    --text-h2:      5.7vw;
    --text-h3:      4.7vw;
    --text-h4:      3.7vw;
    --text-lg:      3.4vw;
    --text-base:    3.2vw;
    --text-sm:      2.9vw;
    --text-xs:      2.4vw;
    --space-section:     10vw;
    --space-section-sm:  7.5vw;
    --space-xl:    7vw;
    --space-lg:    5.5vw;
    --space-md:    4vw;
    --space-sm:    2.5vw;
    --space-xs:    1.5vw;
    --container-padding: 5vw;
  }
  .container {
    max-width: 100%;
  }
  .btn-primary,
  .btn-ghost {
    padding: 3.5vw 6vw;
    gap: 1.5vw;
  }

  .btn-lg {
    padding: 4vw 7vw;
  }
  .eyebrow {
  font-size: var(--text-h2);
  }
}

@media (min-width: 1440px) {
  :root {
    --text-base:    1vw;
    --text-sm:      0.85vw;
    --space-section: 7.5vw;
  }

  .container {
    max-width: 80vw;
  }
}
