/* ============================================
   BUCK MARTINEZ — LEVEL OF EXCELLENCE  v3
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Libre+Franklin:wght@300;400;500;600&family=Bebas+Neue&display=swap');

:root {
  --bg:          #060910;
  --bg-subtle:   #0C1019;
  --surface:     #111622;
  --border:      #1A2236;
  --text:        #F0EBE3;
  --text-dim:    #8B95A8;
  --text-muted:  #4E5869;
  --blue:        #134A8E;
  --gold:        #C4A35A;
  --gold-light:  #D4BB7C;

  --display: 'Bebas Neue', sans-serif;
  --serif:   'Playfair Display', Georgia, serif;
  --body:    'Libre Franklin', 'Helvetica Neue', sans-serif;

  --max-w: 1100px;
  --pad: clamp(80px, 12vh, 140px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
::selection { background: var(--blue); color: var(--text); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 60px);
}

.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.12s; }
.reveal-d2 { transition-delay: 0.24s; }
.reveal-d3 { transition-delay: 0.36s; }

/* ===========================================
   HERO — stacked layers, image over text
   =========================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding-top: clamp(160px, 22vh, 260px);
  padding-bottom: clamp(3rem, 6vh, 5rem);
}

/* Grain */
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='512' height='512' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  z-index: 1; pointer-events: none;
}

.hero-stack {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  z-index: 3;
}

.hero-text-layer {
  position: relative;
  z-index: 2;
  text-align: left;
  padding: 0 clamp(24px, 5vw, 60px);
}

.hero-big-text {
  font-family: var(--display);
  line-height: 0.78;
  letter-spacing: -0.01em;
  color: var(--gold);
}

.hero-line1 {
  font-size: clamp(5.5rem, 15vw, 15rem);
  display: block;
  opacity: 0;
  animation: slamIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.hero-line2 {
  font-size: clamp(5.5rem, 15vw, 15rem);
  display: block;
  transform: scaleX(1.55) scaleY(1.8);
  transform-origin: left center;
  opacity: 0;
  animation: slamInBuck 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
}

/* Layer 2: The image with flash */

/* Flash overlay on the hero — triggered after image lands */
.hero-img {
  position: absolute;
  z-index: 4;
  bottom: -20%;
  left: 50%;
  transform: translateX(-50%) scale(1.15);
  width: clamp(340px, 62vw, 760px);
  filter: drop-shadow(0 10px 60px rgba(0,0,0,0.6));
  opacity: 0;
  animation: imgSlam 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards,
             imgFlash 0.6s ease 1.05s forwards;
  pointer-events: none;
}

/* Below the stack */
.hero-below {
  position: relative;
  z-index: 6;
  text-align: center;
  margin-top: clamp(5rem, 12vh, 10rem);
  padding: 0 1rem;
}

.hero-roles {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 700;
  color: var(--text);
  opacity: 0; animation: fadeUp 0.8s ease 0.7s forwards;
}

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

.hero-tag {
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  font-weight: 400;
  color: var(--text-dim);
  max-width: 480px;
  margin: 0 auto;
  opacity: 0; animation: fadeUp 0.8s ease 1.1s forwards;
}

.hero-yrs {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.5em;
  color: var(--text-dim);
  margin-top: 0.75rem;
  display: block;
  opacity: 0; animation: fadeUp 0.8s ease 1.3s forwards;
}

.hero-scroll {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  opacity: 0; animation: fadeUp 0.8s ease 1.6s forwards;
}
.hero-scroll span { font-size: 0.55rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-muted); }
.hero-scroll-bar {
  width: 1px; height: 32px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: pulse 2s ease-in-out infinite;
}

/* Audio button */
.audio-btn {
  position: absolute;
  top: clamp(1.25rem, 3vh, 2rem);
  right: clamp(1.25rem, 3vw, 2rem);
  z-index: 20;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(6,9,16,0.6);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.3s, background 0.3s;
  opacity: 0; animation: fadeUp 0.8s ease 1.8s forwards;
}
.audio-btn:hover { border-color: var(--gold); background: rgba(6,9,16,0.85); }
.audio-btn svg { width: 16px; height: 16px; fill: var(--gold); }
.audio-btn .audio-icon-play { margin-left: 2px; }
.audio-btn .audio-icon-pause { display: none; }
.audio-btn.playing .audio-icon-play { display: none; }
.audio-btn.playing .audio-icon-pause { display: block; }

/* --- Hero impact animations --- */
@keyframes slamIn {
  0%   { opacity: 0; transform: scale(1.6) translateY(-20px); }
  60%  { opacity: 1; transform: scale(0.97) translateY(2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slamInBuck {
  0%   { opacity: 0; transform: scaleX(1.55) scaleY(1.8) translateY(-20px); }
  60%  { opacity: 1; transform: scaleX(1.55) scaleY(0.97) translateY(2px); }
  100% { opacity: 1; transform: scaleX(1.55) scaleY(1) translateY(0); }
}

@keyframes imgSlam {
  0%   { opacity: 0; transform: translateX(-50%) scale(1.15); }
  50%  { opacity: 1; transform: translateX(-50%) scale(0.98); }
  100% { opacity: 1; transform: translateX(-50%) scale(1); }
}

@keyframes imgFlash {
  0%   { filter: drop-shadow(0 10px 60px rgba(0,0,0,0.6)) brightness(1); }
  8%   { filter: drop-shadow(0 10px 80px rgba(255,255,255,0.4)) brightness(4); }
  25%  { filter: drop-shadow(0 10px 60px rgba(0,0,0,0.6)) brightness(1.3); }
  40%  { filter: drop-shadow(0 10px 60px rgba(255,255,255,0.2)) brightness(2); }
  100% { filter: drop-shadow(0 10px 60px rgba(0,0,0,0.6)) brightness(1); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse { 0%,100% { opacity: 0.2; } 50% { opacity: 1; } }



/* ===========================================
   THE CASE
   =========================================== */
.the-case { padding: var(--pad) 0; border-bottom: 1px solid var(--border); }
.sec-label {
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-bottom: 1.25rem;
  display: block;
  text-align: center;
}
.case-text {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.9;
  color: var(--text-dim);
  max-width: 660px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.case-text strong { color: var(--text); font-weight: 600; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat-val {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  color: var(--gold); line-height: 1;
}
.stat-lbl {
  font-size: 0.65rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted); margin-top: 0.15rem;
}


/* ===========================================
   TIMELINE — centered
   =========================================== */
.timeline-section { padding: var(--pad) 0; border-bottom: 1px solid var(--border); }

.sec-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700; line-height: 1.15;
  margin-bottom: 3rem;
  text-align: center;
}

.timeline {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}
.timeline::before {
  content: ''; position: absolute;
  left: 20px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, var(--border), var(--gold) 15%, var(--gold) 85%, var(--border));
}

.era { position: relative; padding-left: 56px; margin-bottom: clamp(3rem, 5vh, 4.5rem); }
.era::before {
  content: ''; position: absolute;
  left: 14px; top: 0.4rem;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--gold);
}
.era-years {
  font-family: var(--display); font-size: 0.7rem;
  letter-spacing: 0.4em; color: var(--gold); margin-bottom: 0.3rem;
}
.era-name {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 700; margin-bottom: 0.6rem;
}
.era-body {
  color: var(--text-dim);
  font-size: clamp(0.85rem, 0.95vw, 0.92rem);
  line-height: 1.85; max-width: 580px; margin-bottom: 1rem;
}
.era-img {
  max-width: 500px; border-radius: 3px;
  overflow: hidden; border: 1px solid var(--border); margin-bottom: 1rem;
}
.era-img img { width: 100%; transition: transform 0.6s; }
.era-img:hover img { transform: scale(1.03); }
.era-cap {
  font-size: 0.65rem; color: var(--text-muted);
  padding: 0.5rem 0.75rem; background: var(--bg-subtle);
}

@media (max-width: 600px) {
  .timeline::before { left: 10px; }
  .era { padding-left: 36px; }
  .era::before { left: 4px; }
}


/* ===========================================
   CLIPS — 2-up grid
   =========================================== */
.clips-section { padding: var(--pad) 0; border-bottom: 1px solid var(--border); }

.clips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (max-width: 640px) {
  .clips-grid { grid-template-columns: 1fr; }
}

.clip-wrap {
  position: relative; width: 100%;
  aspect-ratio: 16/9; background: var(--bg-subtle);
  border-radius: 3px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--border);
}
.clip-thumb { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s, opacity 0.3s; }
.clip-wrap:hover .clip-thumb { transform: scale(1.04); opacity: 0.75; }
.clip-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(196,163,90,0.9);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s;
}
.clip-wrap:hover .clip-play { transform: translate(-50%,-50%) scale(1.08); }
.clip-play svg { width: 18px; height: 18px; fill: var(--bg); margin-left: 2px; }
.clip-wrap.loaded .clip-thumb, .clip-wrap.loaded .clip-play { display: none; }
.clip-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.clip-info { margin-top: 0.5rem; }
.clip-info h3 { font-family: var(--serif); font-size: clamp(0.85rem, 1.1vw, 1rem); font-weight: 600; }
.clip-info p { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.1rem; }


/* ===========================================
   CARDS — grid
   =========================================== */
.cards-section { padding: var(--pad) 0; border-bottom: 1px solid var(--border); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 1rem;
}

@media (max-width: 768px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

.card {
  cursor: pointer; transition: transform 0.4s;
}
.card:hover { transform: translateY(-6px) scale(1.02); }
.card img {
  width: 100%; border-radius: 3px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  border: 1px solid var(--border);
}
.card figcaption {
  margin-top: 0.4rem; font-size: 0.6rem;
  color: var(--text-muted); text-align: center;
}


/* ===========================================
   FOOTER
   =========================================== */
.footer { padding: var(--pad) 0 3rem; text-align: center; }
.footer-hl {
  font-family: var(--display);
  font-size: clamp(3.5rem, 10vw, 8rem);
  letter-spacing: 0.01em;
  color: var(--gold); line-height: 0.85;
  margin-bottom: 2rem;
}
.share-row { display: flex; justify-content: center; gap: 0.75rem; margin-bottom: 2rem; }
.share-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border); border-radius: 3px;
  font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim); background: transparent;
  cursor: pointer; text-decoration: none; transition: all 0.3s;
}
.share-btn:hover { border-color: var(--gold); color: var(--gold); }
.share-btn svg { width: 13px; height: 13px; fill: currentColor; }
.footer-note { font-size: 0.6rem; color: var(--text-muted); line-height: 1.7; margin-top: 2rem; }
.footer-patch {
  margin: 2.5rem auto 2rem;
  width: clamp(140px, 18vw, 220px);
  animation: organicFloat 6s ease-in-out infinite;
}
.footer-patch img {
  width: 100%;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
  transition: transform 0.4s;
}
.footer-patch img:hover {
  transform: scale(1.05) rotate(2deg);
}

@keyframes organicFloat {
  0%   { transform: translateY(0) rotate(0deg) scale(1); }
  20%  { transform: translateY(-8px) rotate(1.2deg) scale(1.015); }
  40%  { transform: translateY(-4px) rotate(-0.8deg) scale(1.008); }
  60%  { transform: translateY(-10px) rotate(0.5deg) scale(1.02); }
  80%  { transform: translateY(-3px) rotate(-1deg) scale(1.005); }
  100% { transform: translateY(0) rotate(0deg) scale(1); }
}

.footer-credit {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  letter-spacing: 0.05em;
}

/* Lightbox */
.lb {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(6,9,16,0.96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.35s;
}
.lb.on { opacity: 1; pointer-events: auto; }
.lb img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 3px; }
.lb-x {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 40px; height: 40px;
  background: none; border: 1px solid var(--border); border-radius: 50%;
  color: var(--text); font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.3s;
}
.lb-x:hover { border-color: var(--gold); }

/* ===========================================
   ACCESSIBILITY — reduced motion
   =========================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .footer-patch { animation: none; }
  .hero-scroll-bar { animation: none; opacity: 0.5; }
}
