@import './variables.css';

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-body);
  font-size: var(--fz-body);
  line-height: 1.6;
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  overflow-x: hidden;
  min-height: 100vh;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; background: none; border: none; outline: none; }
ul, ol { list-style: none; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg-dark); }
::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 4px; }

/* Selection */
::selection { background: var(--color-primary); color: #fff; }

/* Skip link */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--color-primary); color: #fff;
  padding: 8px 16px; z-index: 9999;
  transition: top 200ms;
}
.skip-link:focus { top: 0; }

/* Focus state */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
h1 { font-size: var(--fz-h1); }
h2 { font-size: var(--fz-h2); }
h3 { font-size: var(--fz-h3); }
h4 { font-size: var(--fz-h4); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fz-small);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.eyebrow--accent { color: var(--color-primary); }

/* Layout */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--wide { max-width: 1680px; }

section { position: relative; padding: var(--space-8) 0; }
@media (max-width: 767px) { section { padding: var(--space-7) 0; } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 0 rgba(225, 6, 0, 0);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.btn--secondary {
  background: transparent;
  color: var(--color-text-on-dark);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.btn--secondary:hover {
  border-color: var(--color-text-on-dark);
  background: rgba(255, 255, 255, 0.05);
}
.btn--light {
  background: var(--color-bg-light);
  color: var(--color-bg-dark);
}
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,255,255,0.15); }
.btn .arrow {
  width: 18px; height: 12px;
  transition: transform var(--transition-medium);
}
.btn:hover .arrow { transform: translateX(6px); }

/* Section headers */
.section-head { margin-bottom: var(--space-6); }
.section-head .eyebrow { margin-bottom: var(--space-2); }

/* Reveal animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 800ms var(--ease-out-expo), transform 800ms var(--ease-out-expo);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

[data-reveal-mask] { overflow: hidden; }
[data-reveal-mask] > * {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1000ms var(--ease-out-expo);
}
[data-reveal-mask].is-visible > * { transform: translateY(0); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal], [data-reveal-mask] > * { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* Hide on mobile / desktop */
.only-desktop { display: block; }
.only-mobile { display: none; }
@media (max-width: 767px) {
  .only-desktop { display: none; }
  .only-mobile { display: block; }
}

/* Light section */
.section--light {
  background: var(--color-bg-light);
  color: var(--color-text-on-light);
}
.section--light .eyebrow { color: var(--color-text-muted); }
