/* === PALETTE REFERENCE ===
   #1e1e1e - Concrete Dark
   #2b2b2b - Concrete Bg
   #3a3a3a - Concrete Mid
   #a8a8a0 - Concrete Light
   #2d5a3d - Chlorophyll
   #4a7c59 - Canopy
   #7ab89a - Lichen
   #a3d9b1 - Spore
   #e8e4dc - Mycelium
*/

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

html {
  scroll-behavior: auto;
}

body {
  background: #1e1e1e;
  color: #a8a8a0;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
  font-size: clamp(0.875rem, 1.2vw, 1.1rem);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* Concrete noise overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  filter: url(#concrete-noise);
  opacity: 0.04;
  pointer-events: none;
  z-index: 9999;
}

/* === TYPOGRAPHY === */
h1, h2, h3 {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  color: #e8e4dc;
  letter-spacing: -0.03em;
  line-height: 0.9;
}

p {
  max-width: 65ch;
}

.botanical-label {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-style: italic;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #4a7c59;
  opacity: 0.7;
  display: block;
  margin-top: 0.5rem;
}

/* Accent colors for vine and active states */
.vine-accent { color: #2d5a3d; }
.spore-accent { color: #a3d9b1; }

/* === SKELETON SHIMMER === */
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes hero-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* === HERO SLAB === */
#hero {
  width: 100%;
  height: 100vh;
  background: #2b2b2b;
  position: relative;
  border-bottom: 2px solid #3a3a3a;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

#hero-content {
  position: relative;
  z-index: 2;
  padding-left: 8vw;
}

#hero-title {
  font-size: clamp(8rem, 18vw, 16rem);
  color: #e8e4dc;
  line-height: 0.85;
  letter-spacing: -0.03em;
  position: relative;
}

#hero-subtitle {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 300;
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: #7ab89a;
  margin-top: 1.5rem;
  letter-spacing: 0.1em;
}

#hero-sub-en {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: clamp(0.75rem, 1.2vw, 1rem);
  color: #a8a8a0;
  letter-spacing: 0.2em;
  margin-top: 0.5rem;
}

#hero-vine {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60%;
  height: 100%;
  z-index: 1;
  opacity: 0.6;
}

.hero-vine-path,
.hero-vine-branch {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: vine-draw 4s ease-out forwards;
}

.hero-vine-branch {
  animation-delay: 2s;
}

@keyframes vine-draw {
  to { stroke-dashoffset: 0; }
}

/* Hero shimmer */
#hero-shimmer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

#hero-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(122, 184, 154, 0.04), transparent);
  animation: hero-shimmer 8s ease-in-out infinite;
}

/* === F-BAR CORRIDOR === */
#f-bar {
  display: flex;
  width: 100%;
  border-bottom: 2px solid #3a3a3a;
}

.f-cell {
  flex: 1;
  border-right: 2px solid #3a3a3a;
  padding: 2rem 1.5rem;
  position: relative;
  overflow: hidden;
  cursor: default;
}

.f-cell:last-child {
  border-right: none;
}

.f-cell-content {
  position: relative;
  z-index: 2;
  transition: opacity 0.2s ease;
}

.f-cell-icon {
  display: block;
  margin-bottom: 1rem;
}

.f-cell-title {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  margin-bottom: 0.75rem;
  line-height: 1.1;
}

.f-cell-desc {
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.6;
  color: #a8a8a0;
}

/* Skeleton overlay for cells */
.f-cell-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 1.5rem;
}

.f-cell-skeleton::before,
.f-cell-skeleton::after {
  content: '';
  display: block;
  height: 1.2rem;
  border-radius: 0;
  background: linear-gradient(90deg, #3a3a3a 0%, #7ab89a 50%, #3a3a3a 100%);
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

.f-cell-skeleton::before {
  width: 60%;
  margin-top: 4rem;
}

.f-cell-skeleton::after {
  width: 90%;
}

.f-cell:hover .f-cell-content {
  opacity: 0;
}

.f-cell:hover .f-cell-skeleton {
  opacity: 1;
}

/* === GROWTH AREA === */
#growth-area {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Stem column */
#stem-column {
  width: 200px;
  min-width: 200px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 2px solid #3a3a3a;
  overflow: hidden;
  flex-shrink: 0;
}

#stem-vine {
  width: 100%;
  height: 200%;
  position: absolute;
  top: 0;
}

#main-vine {
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
  will-change: stroke-dashoffset;
}

.vine-node,
.vine-branch {
  transition: opacity 0.4s ease-out;
}

/* Growth nodes */
#growth-nodes {
  flex: 1;
  padding: 4rem 4rem 8rem;
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

.growth-node {
  position: relative;
  border: 2px solid #3a3a3a;
  padding: 2.5rem;
  max-width: 700px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.growth-node.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger horizontal positions */
.node-1 { margin-left: 0; }
.node-2 { margin-left: 8vw; }
.node-3 { margin-left: 2vw; }
.node-4 { margin-left: 12vw; }
.node-5 { margin-left: 4vw; }

.growth-node h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  margin-bottom: 1.2rem;
  line-height: 1.1;
}

.growth-node p {
  margin-bottom: 1rem;
  font-weight: 300;
}

.growth-node p:last-of-type {
  margin-bottom: 0;
}

.node-leaf {
  position: absolute;
  top: -15px;
  right: 20px;
  opacity: 0.6;
}

.node-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
}

/* Skeleton bars that appear on entry */
.growth-node.skeleton-active .node-skeleton {
  opacity: 1;
}

.growth-node.skeleton-active .node-content {
  opacity: 0;
}

.node-skeleton::before,
.node-skeleton::after {
  content: '';
  position: absolute;
  left: 2.5rem;
  height: 1rem;
  background: linear-gradient(90deg, #3a3a3a 0%, #7ab89a 50%, #3a3a3a 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.node-skeleton::before {
  top: 2.5rem;
  width: 40%;
}

.node-skeleton::after {
  top: 5rem;
  width: 70%;
  right: 2.5rem;
}

/* === ROOT SYSTEM === */
#root-system {
  border-top: 2px solid #3a3a3a;
  padding: 4rem 0 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#root-svg {
  width: 100%;
  max-height: 250px;
  opacity: 0.5;
}

#root-credits {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 300;
  color: #a8a8a0;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

#root-anchor {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 4rem);
  color: #e8e4dc;
  letter-spacing: -0.03em;
  margin-top: 3rem;
  padding-bottom: 2rem;
  opacity: 0.8;
}

/* === GRID SCARS (visible structural lines) === */
#f-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  width: 1px;
  height: 100%;
  background: #3a3a3a;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  #f-bar {
    flex-direction: column;
  }

  .f-cell {
    border-right: none;
    border-bottom: 2px solid #3a3a3a;
  }

  .f-cell:last-child {
    border-bottom: none;
  }

  #stem-column {
    display: none;
  }

  #growth-nodes {
    padding: 3rem 2rem 6rem;
  }

  .node-1, .node-2, .node-3, .node-4, .node-5 {
    margin-left: 0;
  }

  #root-credits {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  #hero-content {
    padding-left: 5vw;
  }
}
