/* ============================================
   IMAGINARYINCH — Base Styles & Reset
   Agent: Aria (Design Lead)
   ============================================ */

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

html {
  scroll-behavior: auto; /* Lenis handles smooth scroll */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--clr-ivory);
  background-color: var(--clr-forest);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  color: var(--clr-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 {
  color: var(--clr-pistachio);
  max-width: 65ch;
}

a {
  color: var(--clr-gold);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-smooth);
}

a:hover {
  color: var(--clr-pistachio);
}

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

ul, ol {
  list-style: none;
}

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

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

/* ---- Selection ---- */
::selection {
  background-color: var(--clr-emerald);
  color: var(--clr-white);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--clr-forest);
}
::-webkit-scrollbar-thumb {
  background: var(--clr-emerald);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--clr-sage);
}

/* ---- Utility Classes ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 6rem);
}

.accent-text {
  font-family: var(--ff-accent);
  font-style: italic;
  color: var(--clr-gold);
}

.section-label {
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--clr-gold);
  margin-bottom: var(--sp-md);
  display: inline-block;
}

.section-title {
  font-size: var(--fs-h2);
  margin-bottom: var(--sp-md);
}

.section-description {
  font-size: var(--fs-body);
  max-width: 55ch;
}

.gold-line {
  width: 60px;
  height: 2px;
  background: var(--clr-gold);
  margin: var(--sp-lg) 0;
}

/* ---- Reveal Animation Base ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  will-change: transform, opacity;
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  will-change: transform, opacity;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  will-change: transform, opacity;
}

/* ---- Preloader ---- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: var(--z-toast);
  background: var(--clr-forest);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--sp-md);
  transition: opacity 0.6s var(--ease-smooth), visibility 0.6s;
}

.preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__logo {
  font-family: var(--ff-display);
  font-size: 2rem;
  color: var(--clr-white);
  letter-spacing: var(--ls-wide);
}

.preloader__bar {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.preloader__fill {
  width: 0%;
  height: 100%;
  background: var(--clr-gold);
  border-radius: var(--radius-full);
  transition: width 0.3s var(--ease-smooth);
}

/* ---- Screen Reader Only ---- */
.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;
}
