/* ═══════════════════════════════════════════
   Elvera — Base Design System
   Obsidian Assembly aesthetic: warm dark, modular type, 12-col grid
   ═══════════════════════════════════════════ */

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

:root {
  /* ── Color palette (warm cream primary, dark sections) ── */
  --c-bg: #f1eade;
  --c-dark: #151415;
  --c-cream: #f1eade;
  --c-brown: #7b5136;
  --c-stone: #242324;
  --c-grey: #3f383c;
  --c-accent: #4854AA;
  --c-accent-light: #5B68C0;
  --c-accent-glow: rgba(72,84,170,0.25);
  --c-stroke: #9faf9b;

  /* Legacy aliases */
  --ivory: #FAF8F4;
  --bone: var(--c-cream);
  --white: #FFFFFF;
  --charcoal: var(--c-bg);
  --graphite: var(--c-stone);
  --cobalt: var(--c-accent);
  --cobalt-light: var(--c-accent-light);
  --cobalt-glow: var(--c-accent-glow);
  --silver: #C0C0C0;
  --blush: #D4A99A;
  --copper: #B8753E;
  --text: var(--c-dark);
  --text-muted: rgba(21,20,21,0.5);

  /* ── Typography: modular 1.25 scale ── */
  --p: 1rem;
  --m: 0.8rem;
  --h6: 1.25rem;
  --h5: 1.5625rem;
  --h4: 1.953rem;
  --h3: 2.441rem;
  --h2: 3.052rem;
  --h1: 3.815rem;
  --h0: 4.768rem;
  --large: max(12.5vw, 4.768rem);

  /* ── Font stacks ── */
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Montserrat', 'Jost', system-ui, sans-serif;
  --logo: 'Montserrat', 'Jost', system-ui, sans-serif;

  /* ── Easing functions ── */
  --ease-standard: cubic-bezier(0.35, 0.35, 0, 1);
  --ease-in: cubic-bezier(0.69, 0, 0, 1);
  --ease-fast: cubic-bezier(0.2, 0.75, 0.35, 1);
  --ease-smooth: cubic-bezier(0.5, 0, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--p);
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--c-dark);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.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-to-content link ── */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  text-decoration: none;
  font-size: 14px;
}
.skip-link:focus {
  top: 0;
}


/* ═══════════════════════════════════════════
   12-COLUMN GRID SYSTEM
   ═══════════════════════════════════════════ */
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  padding: 0 2rem;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(6, 1fr);
    padding: 0 1rem;
  }
}

/* Span helpers */
.col-full  { grid-column: 1 / -1; }
.col-6     { grid-column: span 6; }
.col-4     { grid-column: span 4; }
.col-3-10  { grid-column: 3 / 11; }
.col-2-11  { grid-column: 2 / 12; }

@media (max-width: 768px) {
  .col-6, .col-4, .col-3-10, .col-2-11 { grid-column: 1 / -1; }
}


/* ═══════════════════════════════════════════
   CLIP-PATH TEXT REVEAL
   ═══════════════════════════════════════════ */
.reveal-text {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.5s var(--ease-standard);
  transform: translate3d(0,0,0);
}
.reveal-text.visible {
  clip-path: inset(0 0% 0 0);
}

/* Fade-up reveal */
.reveal-up {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 1s var(--ease-standard), transform 1s var(--ease-standard);
}
.reveal-up.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Staggered delays */
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.35s; }
.reveal-d4 { transition-delay: 0.5s; }

/* Legacy will-reveal class */
.will-reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.6s ease, transform 0.6s var(--ease-standard);
}
.will-reveal.in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}


/* ═══════════════════════════════════════════
   SCROLL-DRIVEN SCENE ANIMATION
   ═══════════════════════════════════════════ */
.scene {
  opacity: calc(var(--progress, 1));
  transform: translateY(calc((1 - var(--progress, 1)) * 30px)) translate3d(0,0,0);
  will-change: opacity, transform;
}


/* ═══════════════════════════════════════════
   MOUSE-REACTIVE SPOTLIGHT
   ═══════════════════════════════════════════ */
.spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(241, 234, 222, 0.06) 0%,
    rgba(123, 81, 54, 0.03) 30%,
    transparent 70%
  );
  transition: background 0.1s linear;
}


/* ═══════════════════════════════════════════
   NAV — floating pill
   ═══════════════════════════════════════════ */
.nav {
  position: fixed; top: 16px; left: 50%;
  transform: translateX(-50%) translateY(-80px);
  z-index: 1000;
  display: flex; align-items: center; gap: 8px;
  background: rgba(21,20,21,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(241,234,222,0.08);
  border-radius: 50px;
  padding: 8px 10px 8px 20px;
  opacity: 0;
  transition: transform 0.5s var(--ease-standard), opacity 0.5s ease;
}
.nav.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.nav-logo {
  font-family: var(--logo); font-weight: 700; font-size: 17px;
  color: #c9a84c; letter-spacing: 0.3em; margin-right: 16px;
  text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 13px; font-weight: 400; color: rgba(241,234,222,0.5);
  padding: 6px 12px; border-radius: 50px;
  transition: color 0.2s, background 0.2s;
  display: inline-flex; align-items: center; gap: 5px;
}
.nav-links a svg { flex-shrink: 0; opacity: 0.7; }
.nav-links a:hover { color: var(--c-cream); background: rgba(241,234,222,0.08); }
.nav-cta {
  background: var(--c-accent) !important; color: #fff !important;
  font-weight: 600 !important; padding: 8px 18px !important;
  border-radius: 50px; font-size: 13px; transition: background 0.2s;
}
.nav-cta:hover { background: var(--c-accent-light) !important; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px; position: relative;
}
.nav-toggle span {
  display: block; width: 20px; height: 1.5px; background: var(--c-cream);
  position: absolute; left: 4px; transition: all 0.3s;
}
.nav-toggle span:nth-child(1) { top: 8px; }
.nav-toggle span:nth-child(2) { top: 13px; }
.nav-toggle span:nth-child(3) { top: 18px; }
.nav-toggle.open span:nth-child(1) { top: 13px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 13px; transform: rotate(-45deg); }

@media (max-width: 768px) {
  .nav { padding: 8px 14px; gap: 0; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column; position: absolute;
    top: 56px; left: 0; right: 0;
    background: rgba(21,20,21,0.95); backdrop-filter: blur(20px);
    border-radius: 20px; padding: 16px; gap: 4px;
    border: 1px solid rgba(241,234,222,0.06);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 15px; padding: 10px 16px; width: 100%; text-align: center; }
}


/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.site-footer {
  background: var(--c-stone);
  border-top: 0.5px solid rgba(201,168,76,0.15);
  padding: 40px 24px;
}
.footer-inner {
  max-width: 800px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-copy { font-size: 13px; color: rgba(241,234,222,0.4); letter-spacing: 0.05em; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: rgba(241,234,222,0.4); transition: color 0.2s; letter-spacing: 0.05em; }
.footer-links a:hover { color: var(--c-cream); }
@media (max-width: 768px) {
  .footer-inner { flex-direction: column; text-align: center; }
}


/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn-cobalt {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-accent); color: #fff;
  font-family: var(--sans); font-size: 17px; font-weight: 600;
  padding: 18px 48px; border-radius: 50px; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s var(--ease-fast), box-shadow 0.3s;
  text-decoration: none; letter-spacing: 0.3px;
  box-shadow: 0 4px 24px rgba(72,84,170,0.3);
}
.btn-cobalt:hover {
  background: var(--c-accent-light); transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(72,84,170,0.4);
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-cream); color: var(--c-bg);
  font-family: var(--sans); font-size: 17px; font-weight: 600;
  padding: 18px 48px; border-radius: 50px; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s var(--ease-fast), box-shadow 0.3s;
  text-decoration: none; letter-spacing: 0.3px;
  box-shadow: 0 4px 24px rgba(241,234,222,0.15);
}
.btn-primary:hover {
  background: #fff; transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(241,234,222,0.25);
}

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--c-cream);
  border: 1.5px solid rgba(241,234,222,0.25);
  font-family: var(--sans); font-size: 15px; font-weight: 400;
  padding: 16px 36px; border-radius: 50px; cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.btn-ghost:hover {
  color: #fff; border-color: rgba(241,234,222,0.5);
  background: rgba(241,234,222,0.06);
}

.btn-ghost-light {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--c-bg);
  border: 2px solid var(--c-bg);
  font-family: var(--sans); font-size: 16px; font-weight: 600;
  padding: 16px 36px; border-radius: 50px; cursor: pointer;
  text-decoration: none; transition: all 0.2s;
}
.btn-ghost-light:hover {
  color: #fff; background: var(--c-bg);
}


/* ═══════════════════════════════════════════
   SCROLL PROGRESS BAR
   ═══════════════════════════════════════════ */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px;
  background: var(--c-accent); z-index: 9999;
  width: 0; transition: none;
}


/* ═══════════════════════════════════════════
   GLOBAL FOCUS VISIBLE RING
   ═══════════════════════════════════════════ */
*:focus-visible {
  outline: 2px solid #6C63FF;
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #6C63FF;
  outline-offset: 2px;
}


/* ═══════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-snap-type: none; }
  .reveal-text { clip-path: none !important; }
  .reveal-up { opacity: 1 !important; transform: none !important; }
  .will-reveal { opacity: 1 !important; transform: none !important; }
  .scene { opacity: 1 !important; transform: none !important; }
  .spotlight { display: none; }
}
