/* ============================================
   EPQ SITE : LUXURY EDITORIAL DESIGN SYSTEM
   Black · Cream · Gold
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Montserrat:wght@200;300;400;500;600&display=swap');

:root {
  --black:   #0a0a0a;
  --deep:    #111111;
  --charcoal:#1a1a1a;
  --cream:   #f5f0e8;
  --cream2:  #ede7d9;
  --gold:    #c9a84c;
  --gold2:   #e8c97a;
  --white:   #fafaf8;
  --muted:   #7a7570;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Montserrat', sans-serif;

  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--black);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── LOADING SCREEN ── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-eyebrow {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
}

.lights-row {
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

.light {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
  position: relative;
  transition: none;
}

.light.on {
  background: radial-gradient(circle at 35% 35%, #ff4444, #cc0000, #8a0000);
  border-color: #ff2222;
  box-shadow:
    0 0 20px rgba(220, 0, 0, 0.9),
    0 0 50px rgba(220, 0, 0, 0.5),
    0 0 90px rgba(220, 0, 0, 0.2),
    inset 0 1px 2px rgba(255,120,120,0.4);
}

.loader-line {
  width: 280px;
  height: 1px;
  background: var(--charcoal);
  position: relative;
  overflow: hidden;
}
.loader-line::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: scan 0.8s ease forwards;
  animation-delay: 1.8s;
}
@keyframes scan {
  to { left: 100%; }
}

.loader-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--cream);
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards;
  animation-delay: 2.1s;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── NAVIGATION ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.4rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(10,10,10,0.95), transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201,168,76,0.12);
}

.nav-brand {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--cream);
  text-decoration: none;
  text-transform: uppercase;
}
.nav-brand span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 2.4rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--cream); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--cream);
  transition: var(--transition);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 8rem 2rem 4rem;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(201,168,76,0.04) 0%, transparent 70%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(255,255,255,0.012) 40px,
      rgba(255,255,255,0.012) 41px
    );
}

.hero-carbon {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.015) 0px,
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 60px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.015) 0px,
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 60px
    );
  opacity: 0.5;
}

.hero-eyebrow {
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
  position: relative;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 5rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: 0.02em;
  color: var(--white);
  max-width: 900px;
  position: relative;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.4s;
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
}

.hero-rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 2.4rem auto;
  position: relative;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.6s;
}

.hero-meta {
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 2.2;
  position: relative;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.8s;
}

.hero-cta {
  margin-top: 3.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
  border: 1px solid rgba(201,168,76,0.5);
  padding: 1.1rem 2.4rem;
  transition: var(--transition);
  position: relative;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 1s;
  background: transparent;
}
.hero-cta:hover {
  color: var(--black);
  background: var(--gold);
  border-color: var(--gold);
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 1.4s;
}
.hero-scroll span {
  font-size: 0.5rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ── PAGE HEADER ── */
.page-header {
  padding: 10rem 3rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}
.page-header .eyebrow {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--white);
  max-width: 800px;
}
.page-header h1 em { font-style: italic; color: var(--gold); }

/* ── SECTIONS ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.section:last-of-type { border-bottom: none; }

.section-label {
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}

.section h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 2rem;
}
.section h2 em { font-style: italic; color: var(--gold); }

.section h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--cream);
  margin: 2.5rem 0 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--gold);
}

.section p {
  font-size: 0.88rem;
  line-height: 1.9;
  color: rgba(245,240,232,0.8);
  margin-bottom: 1.4rem;
  max-width: 720px;
}

.section p + p { margin-top: 0; }

/* ── PULL QUOTE ── */
.pull-quote {
  border-left: 3px solid var(--gold);
  padding: 1.5rem 2rem;
  margin: 3rem 0;
  background: rgba(201,168,76,0.04);
}
.pull-quote p {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.4;
  color: var(--cream);
  margin: 0;
  max-width: 100%;
}
.pull-quote cite {
  display: block;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 1rem;
  font-style: normal;
}

/* ── STAT CARDS ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.15);
  margin: 3rem 0;
}
.stat-card {
  background: var(--deep);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: background var(--transition);
}
.stat-card:hover { background: var(--charcoal); }
.stat-number {
  font-family: var(--serif);
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── CASE STUDY CARD ── */
.case-study {
  background: var(--deep);
  border: 1px solid rgba(201,168,76,0.2);
  padding: 3rem;
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}
.case-study::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--gold), transparent);
}
.case-study-label {
  font-size: 0.55rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.case-study h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--white);
  margin: 0 0 1.2rem;
  border: none;
  padding: 0;
}
.case-study p {
  font-size: 0.86rem;
  line-height: 1.9;
  color: rgba(245,240,232,0.75);
  max-width: 100%;
}

/* ── FORMULA BOX ── */
.formula-box {
  background: var(--charcoal);
  border: 1px solid rgba(201,168,76,0.3);
  padding: 3rem;
  margin: 3rem 0;
  text-align: center;
  position: relative;
}
.formula-box::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(201,168,76,0.1);
  pointer-events: none;
}
.formula-text {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.formula-text em { color: var(--gold); font-style: italic; }
.formula-sub {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── LIMITATION BOX ── */
.limitation {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-left: 2px solid rgba(201,168,76,0.4);
  padding: 1.8rem 2rem;
  margin: 2rem 0;
}
.limitation-label {
  font-size: 0.55rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.8rem;
}
.limitation p {
  font-size: 0.82rem;
  line-height: 1.8;
  color: rgba(245,240,232,0.55);
  margin: 0;
}

/* ── TWO-COLUMN LAYOUT ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin: 3rem 0;
}
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; gap: 2rem; } }

/* ── BIBLIOGRAPHY ── */
.bib-list {
  list-style: none;
  counter-reset: bib;
}
.bib-list li {
  counter-increment: bib;
  font-size: 0.78rem;
  line-height: 1.8;
  color: rgba(245,240,232,0.6);
  padding: 1.2rem 0 1.2rem 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  position: relative;
}
.bib-list li::before {
  content: counter(bib, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: var(--serif);
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 400;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid rgba(201,168,76,0.15);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-brand {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--cream2);
}
.footer-brand span { color: var(--gold); }
.footer-meta {
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  line-height: 2;
}

/* ── NAV ACTIVE ── */
.page-nav-indicator {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-left: 2rem;
}
.pni-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--muted);
  transition: var(--transition);
}
.pni-dot.active { background: var(--gold); transform: scale(1.4); }

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── MOBILE ── */
@media (max-width: 900px) {
  nav { padding: 1.2rem 1.5rem; }
  .nav-links { display: none; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; width: 72vw; max-width: 300px; background: var(--deep); padding: 5rem 2rem 2rem; gap: 2rem; z-index: 99; border-left: 1px solid rgba(201,168,76,0.2); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; z-index: 101; }
  .section { padding: 3rem 1.5rem; }
  .page-header { padding: 8rem 1.5rem 3rem; }
  footer { padding: 2rem 1.5rem; }
  .case-study { padding: 2rem 1.5rem; }
  .formula-box { padding: 2rem 1.5rem; }
}
