/* =====================================================
   EXOTIC CARS TECHNICIAN - BASE STYLES
   Reset, Typography, and Foundational Elements
   ===================================================== */

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

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  width: 100%;
  position: relative;
  /* Default cursor, hidden only when custom cursor is active via JS class if needed, 
       but currently relying on CSS. Ideally JS should toggle this. 
       Leaving as is for now but ensuring overflow is fixed. */
  cursor: none;
}

/* === SMOOTH SCROLL (Lenis Override) === */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* === IMAGES & MEDIA === */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

/* === TYPOGRAPHY === */
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-wide);
  text-transform: uppercase;
  color: var(--text-primary);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-5xl);
  letter-spacing: var(--tracking-wider);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  color: var(--text-secondary);
  max-width: 65ch;
  text-wrap: pretty;
}

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

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

em,
i {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
}

/* === ACCENT TEXT === */
.text-accent {
  color: var(--text-accent);
}

.text-display {
  font-family: var(--font-display);
  font-weight: var(--weight-regular);
  text-transform: none;
  letter-spacing: var(--tracking-normal);
  font-style: italic;
}

.text-elegant {
  font-family: var(--font-accent);
  text-transform: none;
  letter-spacing: var(--tracking-wide);
}

/* === LISTS === */
ul,
ol {
  list-style: none;
}

/* === FORMS === */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  cursor: none;
}

button {
  cursor: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* === FOCUS STATES === */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* === SELECTION === */
::selection {
  background: var(--color-gold);
  color: var(--color-black);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-light);
}

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-gold) var(--bg-secondary);
}

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

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container-fluid {
  width: 100%;
  padding-inline: var(--space-6);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-md);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container-wide {
  width: 100%;
  max-width: var(--container-2xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* === MAIN CONTENT PADDING === */
main,
#main-content {
  padding-inline: 10px;
  overflow-x: hidden;
}

/* === SECTION SPACING === */
.section {
  padding-block: var(--space-24);
  padding-inline: 10px;
  position: relative;
}

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

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

/* === FLEX UTILITIES === */
.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;
}

/* === GRID UTILITIES === */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

@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;
  }
}

/* === ASPECT RATIOS === */
.aspect-square {
  aspect-ratio: 1;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-portrait {
  aspect-ratio: 3 / 4;
}

/* === OVERFLOW === */
.overflow-hidden {
  overflow: hidden;
}

/* === POSITION === */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

/* === SEPARATOR === */
.separator {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--border-color) 20%,
    var(--color-gold) 50%,
    var(--border-color) 80%,
    transparent 100%
  );
}

.separator-vertical {
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--border-color) 20%,
    var(--color-gold) 50%,
    var(--border-color) 80%,
    transparent 100%
  );
}

/* === BADGE === */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--color-gold);
}

/* === CARD BASE === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color-light);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--metallic-shine);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

/* === GLASS CARD === */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
}

/* === CARBON TEXTURE === */
.carbon-bg {
  background-image: var(--carbon-pattern);
  background-color: var(--bg-secondary);
}
