/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  --bg: #0a0a0b;
  --bg-elevated: #141416;
  --fg: #f5f2ed;
  --fg-muted: #8a8680;
  --accent: #e85d3b;
  --accent-glow: rgba(232, 93, 59, 0.4);
  --card: #1a1a1d;
  --card-hover: #222225;
  --border: #2a2a2d;
}

/* ============================================
   BASE RESET & TYPOGRAPHY
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

.font-display {
  font-family: Impact, 'Arial Narrow Bold', 'Helvetica Neue Condensed', sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ============================================
   BACKGROUND ATMOSPHERE
   ============================================ */
.bg-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(232, 93, 59, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(232, 93, 59, 0.04) 0%, transparent 40%),
    var(--bg);
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================
   FLOATING CLIMBING HOLDS
   ============================================ */
.holds-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  transition: transform 0.1s ease-out; 
}

.climbing-hold {
  position: absolute;
  opacity: 0;
  animation: float-in 2s ease-out forwards, float-hold var(--float-duration, 20s) ease-in-out infinite;
  animation-delay: 0s, var(--float-delay, 0s);
  will-change: transform, opacity;
}

@keyframes float-in {
  from { opacity: 0; transform: translateY(40px) scale(0.9); }
  to { opacity: var(--hold-opacity, 0.25); transform: translateY(0) scale(1); }
}

@keyframes float-hold {
  0%, 100% { transform: translate(0, 0) rotate(var(--start-rotation, 0deg)); }
  25% { transform: translate(var(--drift-x, 10px), var(--drift-y, -15px)) rotate(calc(var(--start-rotation, 0deg) + 5deg)); }
  50% { transform: translate(calc(var(--drift-x, 10px) * -0.5), calc(var(--drift-y, -15px) * -1)) rotate(calc(var(--start-rotation, 0deg) - 3deg)); }
  75% { transform: translate(calc(var(--drift-x, 10px) * -1), calc(var(--drift-y, -15px) * 0.5)) rotate(calc(var(--start-rotation, 0deg) + 2deg)); }
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 2rem;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
  transition: background 0.3s ease;
}

.site-header.scrolled {
  background: rgba(10, 10, 11, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--fg);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--fg);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  position: relative; /* Create stacking context */
  z-index: 10;        /* Sit above backgrounds */
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 10rem 2rem 4rem;
}

.hero-title {
  font-size: clamp(4rem, 15vw, 10rem);
  line-height: 0.85;
  color: var(--fg);
  margin-bottom: 2rem;
}

.hero-title span {
  display: block;
}

.hero-title .accent-line {
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(0.875rem, 2vw, 1.125rem);
  color: var(--fg-muted);
  max-width: 450px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.6;
}

/* ============================================
   MOVE CARD
   ============================================ */
.move-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: block;
  color: var(--fg);
  /* Force cards to be a specific width so they align nicely */
  width: 100%; 
  max-width: 400px; 
}

.move-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.move-card:hover {
  background: var(--card-hover);
  border-color: rgba(232, 93, 59, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.25);
}

.move-card-content {
  padding: 1.5rem;
}

.move-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.move-card-title svg {
  color: var(--fg-muted);
  transition: transform 0.3s ease, color 0.3s ease;
}

.move-card:hover .move-card-title svg {
  transform: translateX(4px);
  color: var(--accent);
}

.move-card-desc {
  color: var(--fg-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ============================================
   DETAIL PAGE LAYOUT
   ============================================ */
.detail-page {
  position: relative; /* Create stacking context */
  z-index: 10;        /* Sit above the background layers (z-index 0-2) */
  padding: 8rem 2rem 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.detail-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.detail-title {
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 0.9;
  margin-bottom: 1rem;
}

.detail-intro {
  color: var(--fg-muted);
  font-size: 1.125rem;
  max-width: 600px;
  line-height: 1.7;
}

/* ============================================
   VARIATIONS ACCORDION
   ============================================ */
.variations-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 4rem;
}

.variation-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.variation-item[open] {
  border-color: rgba(232, 93, 59, 0.4);
}

.variation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.variation-header::-webkit-details-marker {
  display: none;
}

.variation-header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.variation-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fg);
}

.variation-header .variation-tag {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.375rem 0.75rem;
  background: var(--bg);
  border-radius: 100px;
  color: var(--accent);
  font-weight: 600;
}

.chevron-icon {
  color: var(--fg-muted);
  transition: transform 0.3s ease;
}

.variation-item[open] .chevron-icon {
  transform: rotate(180deg);
}

.variation-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.1);
}

.variation-media {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--bg-elevated);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 1.5rem;
}

.variation-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.variation-media .gif-static { z-index: 2; }
.variation-media .gif-animated { z-index: 1; }

.variation-item:hover .variation-media .gif-static { opacity: 0; }
.variation-item:hover .variation-media .gif-animated { opacity: 1; }

.variation-media .play-overlay {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.variation-item:hover .play-overlay {
  opacity: 0;
}

.variation-details {
  padding-top: 1.5rem;
  color: var(--fg-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.variation-details p {
  margin-bottom: 1rem;
}

/* Responsive Accordion */
@media (max-width: 768px) {
  .variation-body {
    grid-template-columns: 1fr;
  }
}

/* Crop Utilities */
.align-top { object-position: top center; }
.align-bottom { object-position: bottom center; }

/* ============================================
   DESCRIPTION BLOCK
   ============================================ */
.description-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.description-block h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--fg-muted);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.description-block p {
  color: var(--fg);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.description-block p:last-child {
  margin-bottom: 0;
}

.description-block strong {
  color: var(--accent);
  font-weight: 500;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 2rem;
  transition: color 0.2s ease;
}

.back-link:hover { color: var(--fg); }

.back-link svg {
  transition: transform 0.2s ease;
}

.back-link:hover svg {
  transform: translateX(-4px);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  position: relative;
  z-index: 10;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .site-header { padding: 1rem 1.5rem; }
  .hero-section { padding: 8rem 1.5rem 3rem; }
  .moves-section { padding: 2rem 1.5rem 6rem; }
  .detail-page { padding: 7rem 1.5rem 3rem; }
  .description-block { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .move-card { transition: opacity 0.3s ease; transform: none !important; }
  .move-card:hover { transform: none; }
  .climbing-hold { animation: none; opacity: 0.4; }
}

/* ============================================
   MOVES SECTION (Clean Block)
   ============================================ */
.moves-section {
  position: relative; /* Create stacking context */
  z-index: 10;        /* Sit above backgrounds */
  padding: 4rem 2rem 8rem;
  max-width: 1500px;
  margin: 0 auto;
}

.category-section {
  margin-top: 5rem;
  width: 100%;
}



.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  width: 100%;
  justify-content: center;
  justify-items: center;
}



.category-title {
  font-family: Impact, 'Arial Narrow Bold', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
  margin: 0 0 2rem 0;
  padding: 0 0 1rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
}

.category-section {
    overflow: visible;
    position: relative;
    clear: both;
}

/* ============================================
   FIX: FORCE CONTENT ABOVE BACKGROUND
   ============================================ */
.main-content {
  position: relative;
  z-index: 10;
  /* Optional: ensures background doesn't hide footer if needed */
  pointer-events: auto; 
}

/* Also apply to moves section on the homepage */
.moves-section {
  position: relative;
  z-index: 10;
}