/* ═══════════════════════════════════════════════════════════
   ARBOR — INDEX PAGE STYLES
   Page-specific styles for index.html only.
═══════════════════════════════════════════════════════════ */

/* ── LOADING SCREEN ── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #f7f5f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* Botanical SVG line-art */
.loader-botanical {
  opacity: 0;
  transform: translateY(8px);
  margin-bottom: 2rem;
}

/* Stroke draw animation via dasharray/dashoffset */
.ldr-trunk {
  stroke-dasharray: 85;
  stroke-dashoffset: 85;
  animation: drawLine 0.7s 0.1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.ldr-root {
  stroke-dasharray: 25;
  stroke-dashoffset: 25;
  animation: drawLine 0.4s 0.75s ease-out forwards;
}
.ldr-branch {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
}
.ldr-branch:nth-child(4) {
  animation: drawLine 0.35s 0.75s ease-out forwards;
}
.ldr-branch:nth-child(5) {
  animation: drawLine 0.35s 0.85s ease-out forwards;
}
.ldr-branch:nth-child(6) {
  animation: drawLine 0.3s 0.92s ease-out forwards;
}
.ldr-branch:nth-child(7) {
  animation: drawLine 0.3s 0.98s ease-out forwards;
}
.ldr-branch:nth-child(8) {
  animation: drawLine 0.25s 1.05s ease-out forwards;
}
.ldr-branch:nth-child(9) {
  animation: drawLine 0.25s 1.1s ease-out forwards;
}
.ldr-branch:nth-child(10) {
  animation: drawLine 0.25s 1.15s ease-out forwards;
}
.ldr-leaf {
  opacity: 0;
  transform-origin: center;
  transform: scale(0);
}
.ldr-leaf:nth-child(11) {
  animation: popLeaf 0.3s 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.ldr-leaf:nth-child(12) {
  animation: popLeaf 0.3s 1.18s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.ldr-leaf:nth-child(13) {
  animation: popLeaf 0.3s 1.24s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.ldr-leaf:nth-child(14) {
  animation: popLeaf 0.3s 1.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.ldr-leaf:nth-child(15) {
  animation: popLeaf 0.3s 1.36s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.ldr-leaf:nth-child(16) {
  animation: popLeaf 0.3s 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.ldr-leaf:nth-child(17) {
  animation: popLeaf 0.35s 1.44s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes popLeaf {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Wordmark */
.loader-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  transform: translateY(6px);
  margin-bottom: 2rem;
}
.loader-brand {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #052e16;
  line-height: 1;
}
.loader-tagline {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4ade80;
}

/* Progress bar */
.loader-bar {
  width: 160px;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
  opacity: 0;
}
.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #16a34a, #4ade80);
}

/* ── HERO ── */
/* Responsive background via CSS custom properties set by JS */
.hero.has-photo {
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
}
@media (max-width: 768px) {
  .hero.has-photo { background-image: var(--hero-bg-m); }
}
/* ── hero photo overlay ── */
.hero.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.35) 60%,
    rgba(0, 0, 0, 0.1) 100%
  );
  z-index: 0;
}
.hero.has-photo .hero-text {
  position: relative;
  z-index: 1;
}
/* ซ่อน SVG ต้นไม้เก่าและ bg circles เมื่อมีรูป */
.hero.has-photo .hero-visual,
.hero.has-photo .hero-bg-circle {
  display: none;
}
/* hero full-width เมื่อมีรูป (ไม่ต้องแบ่ง 2 คอลัมน์) */
.hero.has-photo {
  grid-template-columns: 1fr;
}
.hero.has-photo .hero-text {
  max-width: 680px;
}
.hero.has-photo .hero-tag {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.hero.has-photo .hero-tag svg {
  color: rgba(255, 255, 255, 0.8);
}
.hero.has-photo h1 {
  color: #fff;
}
.hero.has-photo h1 em {
  color: #86efac;
}
.hero.has-photo .hero-desc {
  color: rgba(255, 255, 255, 0.88);
}
.hero.has-photo .btn-ghost {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.hero.has-photo .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}
.hero.has-photo .scroll-hint {
  color: rgba(255, 255, 255, 0.6);
}

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 8rem 7vw 5rem;
  gap: 4rem;
  background: linear-gradient(160deg, var(--g50) 0%, #ffffff 55%, #f8fff8 100%);
  position: relative;
  overflow: hidden;
}
.hero-bg-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero-bg-circle-1 {
  width: 700px;
  height: 700px;
  right: -100px;
  top: -100px;
  background: radial-gradient(
    circle,
    rgba(34, 197, 94, 0.07) 0%,
    transparent 70%
  );
}
.hero-bg-circle-2 {
  width: 400px;
  height: 400px;
  left: -80px;
  bottom: 0;
  background: radial-gradient(
    circle,
    rgba(251, 191, 36, 0.05) 0%,
    transparent 70%
  );
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--g100);
  color: var(--g800);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--g200);
  opacity: 0;
}
.hero-tag svg {
  color: var(--g600);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 4.5vw, 4.5rem);
  line-height: 1.08;
  color: var(--g950);
  margin-bottom: 1.5rem;
  opacity: 0;
}
.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.15em;
  margin-bottom: -0.15em;
}
.hero h1 .word {
  display: inline-block;
}
.hero h1 em {
  font-style: italic;
  color: var(--g700);
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--s600);
  max-width: 460px;
  margin-bottom: 2.5rem;
  opacity: 0;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  opacity: 0;
}

/* ── HERO VISUAL ── */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 560px;
}
.hero-visual-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  background: radial-gradient(
    circle,
    rgba(34, 197, 94, 0.18) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}
.tree-wrap {
  position: relative;
  z-index: 2;
  width: 380px;
}
/* Individual tree parts for GSAP animation */
.tree-trunk {
  transform-origin: bottom center;
}
.tree-canopy-layer {
  transform-origin: center bottom;
  opacity: 0;
}
.tree-root {
  transform-origin: top center;
  opacity: 0;
}

/* Floating leaf particles */
.leaf {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50% 0 50% 0;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

/* ── STATS ── */
.stats {
  padding: 5rem 7vw;
  background: var(--white);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.stat-card {
  background: var(--g50);
  border: 1px solid var(--g100);
  border-radius: var(--r-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  cursor: default;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-green);
}
.stat-num {
  font-family: var(--serif);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--g700);
  line-height: 1;
  display: block;
}
.stat-unit {
  font-size: 1.5rem;
  color: var(--g500);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--s600);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ── FEATURES ── */
.features {
  background: var(--white);
  position: relative;
}
.features-intro {
  margin-bottom: 4rem;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feat-card {
  background: var(--white);
  border: 1px solid var(--s200);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition:
    transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.3s,
    border-color 0.3s;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.feat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--g50) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
}
.feat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--g200);
}
.feat-card:hover::after {
  opacity: 1;
}
.feat-icon {
  width: 52px;
  height: 52px;
  background: var(--g100);
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
  color: var(--g700);
  transition:
    background 0.3s,
    transform 0.3s;
}
.feat-card:hover .feat-icon {
  background: var(--g200);
  transform: scale(1.1);
}
.feat-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--g950);
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
}
.feat-card p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--s600);
  position: relative;
  z-index: 1;
}

/* ── ABOUT / BENTO ── */
.about {
  background: var(--g950);
  position: relative;
  overflow: hidden;
}
.about-noise {
  position: absolute;
  inset: 0;
  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)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.about .label-chip {
  color: var(--g400);
}
.about .label-chip::before {
  background: var(--g500);
}
.about .section-h {
  color: var(--white);
}
.about .section-sub {
  color: var(--g300);
}

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  gap: 1.25rem;
  margin-top: 3.5rem;
}
.bento-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition:
    background 0.3s,
    border-color 0.3s,
    transform 0.3s;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.bento-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(134, 239, 172, 0.25),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s;
}
.bento-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-3px);
}
.bento-card:hover::before {
  opacity: 1;
}
.bento-card.col2 {
  grid-column: span 2;
}
.bento-card h4 {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--g300);
  margin-bottom: 0.75rem;
}
.bento-card p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.55);
}
.bento-big {
  font-family: var(--serif);
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--g400);
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
}
.bento-icon {
  width: 44px;
  height: 44px;
  background: rgba(34, 197, 94, 0.12);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g400);
  margin-bottom: 1.25rem;
}

/* ── PARALLAX BAND ── */
.parallax-band {
  height: 420px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--g900); /* fallback — no white bleed */
}
.parallax-bg {
  position: absolute;
  inset: -160px; /* large buffer to cover full parallax travel */
  background: linear-gradient(160deg, var(--g800) 0%, var(--g950) 100%);
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 768px) {
  .parallax-bg { background-image: var(--bg-m); }
}

.parallax-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 5vw;
}
.parallax-content blockquote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-style: italic;
  color: var(--white);
  line-height: 1.4;
  max-width: 700px;
  margin: 0 auto 1rem;
}
.parallax-content cite {
  font-size: 0.875rem;
  color: var(--g300);
  font-style: normal;
  letter-spacing: 0.05em;
}

/* ── SPECIES MARQUEE ── */
.species {
  background: var(--s50);
  padding: 6rem 0;
  overflow: hidden;
}
.species-header {
  padding: 0 7vw;
  margin-bottom: 3rem;
}
.species-track-wrap {
  position: relative;
}
.species-track-wrap::before,
.species-track-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.species-track-wrap::before {
  left: 0;
  background: linear-gradient(to right, var(--s50), transparent);
}
.species-track-wrap::after {
  right: 0;
  background: linear-gradient(to left, var(--s50), transparent);
}

.species-track {
  display: flex;
  gap: 1.25rem;
  animation: slide 32s linear infinite;
  width: max-content;
}
.species-track:hover {
  animation-play-state: paused;
}
@keyframes slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}
.species-card {
  flex-shrink: 0;
  width: 200px;
  background: var(--white);
  border: 1px solid var(--s200);
  border-radius: var(--r);
  overflow: hidden;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  cursor: pointer;
}
.species-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-lg);
}
.sp-img {
  width: 100%;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-info {
  padding: 1rem;
}
.sp-info h5 {
  font-family: var(--serif);
  font-size: 0.975rem;
  color: var(--g900);
  margin-bottom: 0.3rem;
}
.sp-info p {
  font-size: 0.78rem;
  color: var(--s600);
  line-height: 1.5;
}
.sp-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--g700);
  background: var(--g100);
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  margin-top: 0.4rem;
}

/* ── TIMELINE ── */
.tl-section {
  background: var(--white);
}
.tl-wrap {
  position: relative;
  margin-top: 4rem;
  padding-left: 3rem;
}
.tl-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--g300), var(--g100), transparent);
  border-radius: 2px;
}
.tl-item {
  position: relative;
  padding: 0 0 3.5rem 2.5rem;
}
.tl-item:last-child {
  padding-bottom: 0;
}
.tl-dot {
  position: absolute;
  left: -1.75rem;
  top: 0.15rem;
  width: 36px;
  height: 36px;
  background: var(--g700);
  border: 3px solid var(--white);
  box-shadow:
    0 0 0 2px var(--g300),
    0 4px 12px rgba(21, 128, 61, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}
.tl-year {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--g700);
  background: var(--g100);
  padding: 0.2rem 0.7rem;
  border-radius: 99px;
  margin-bottom: 0.6rem;
  letter-spacing: 0.04em;
}
.tl-item h4 {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--g950);
  margin-bottom: 0.5rem;
}
.tl-item p {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--s600);
  max-width: 560px;
}

/* ── TIMELINE FILL LINE ── */
.tl-line-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 0%;
  background: var(--g600);
  border-radius: 2px;
  z-index: 1;
}

/* ── PROCESS CAROUSEL ── */
.process-pin-wrap {
  position: relative;
  overflow: hidden;
  height: min(72vh, 620px);
}
.process-h-track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.process-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.process-h-panel {
  width: 100%;
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 min(10vw, 140px);
  text-align: center;
  position: relative;
}
/* Fallback bg when no image */
.process-h-panel:nth-child(1) {
  background: var(--g50);
}
.process-h-panel:nth-child(2) {
  background: var(--g100);
}
.process-h-panel:nth-child(3) {
  background: var(--g200);
}
.process-h-panel:nth-child(4) {
  background: var(--g300);
}
.step-label {
  display: none;
}
.process-h-num {
  font-family: var(--serif);
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.process-h-panel:nth-child(1) .process-h-num {
  color: var(--g200);
}
.process-h-panel:nth-child(2) .process-h-num {
  color: var(--g300);
}
.process-h-panel:nth-child(3) .process-h-num {
  color: var(--g400);
}
.process-h-panel:nth-child(4) .process-h-num {
  color: var(--g500);
}
.process-h-icon {
  width: 64px;
  height: 64px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--g700);
  box-shadow: 0 4px 20px rgba(21, 128, 61, 0.15);
}
.process-h-panel h3 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2.25rem);
  color: var(--g950);
  margin-bottom: 0.75rem;
}
.process-h-panel p {
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  line-height: 1.75;
  color: var(--s700);
  max-width: 500px;
}
/* Photo panels — bg via CSS custom property for responsive swap */
.process-h-panel.has-img {
  background-image: var(--panel-bg);
  background-size: cover;
  background-position: center;
}
@media (max-width: 768px) {
  .process-h-panel.has-img { background-image: var(--panel-bg-m); }
}
.process-h-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5, 46, 22, 0.28) 0%,
    rgba(5, 46, 22, 0.48) 100%
  );
  pointer-events: none;
}
.process-h-panel.has-img .process-h-num,
.process-h-panel.has-img h3,
.process-h-panel.has-img p {
  position: relative;
  z-index: 1;
  color: #fff !important;
}
.process-h-panel.has-img .process-h-icon {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.process-h-panel.has-img p {
  opacity: 0.88;
}
/* Carousel arrows */
.process-prev,
.process-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g800);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.18);
  transition:
    background 0.2s,
    transform 0.2s,
    opacity 0.2s;
}
.process-prev {
  left: 1.5rem;
}
.process-next {
  right: 1.5rem;
}
.process-prev:hover,
.process-next:hover {
  background: var(--white);
  transform: translateY(-50%) scale(1.08);
}
.process-prev:disabled,
.process-next:disabled {
  opacity: 0.3;
  cursor: default;
}
/* Dots */
.process-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}
.process-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
  padding: 0;
}
.process-dot.active {
  background: #fff;
  transform: scale(1.35);
}
@media (max-width: 640px) {
  .process-pin-wrap {
    height: min(82vh, 540px);
  }
  .process-h-panel {
    padding: 0 1.5rem;
  }
  .process-prev {
    left: 0.75rem;
  }
  .process-next {
    right: 0.75rem;
  }
  .process-prev,
  .process-next {
    width: 40px;
    height: 40px;
  }
}

/* ── SCRUB CLIP REVEAL ── */
.clip-reveal-wrap {
  overflow: hidden;
}
.clip-reveal {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
}

/* ── SECTION BG SCRUB ── */
.features-bg-line {
  position: absolute;
  top: 0;
  left: 7vw;
  right: 7vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--g200), transparent);
  transform: scaleX(0);
  transform-origin: left;
}

/* ── SCROLL PROGRESS BAR (index-specific gradient) ── */
#scroll-progress {
  background: linear-gradient(90deg, var(--g500), var(--g300), var(--amber-l));
}

/* ── SECTION COUNTER ── */
#section-counter {
  position: fixed;
  right: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  opacity: 0;
}
.sc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--s400);
  transition:
    background 0.3s,
    transform 0.3s;
  cursor: pointer;
}
.sc-dot.active {
  background: var(--g600);
  transform: scale(1.6);
}
.sc-dot[data-label]::before {
  content: attr(data-label);
  position: absolute;
  right: 1.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--g700);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition:
    opacity 0.2s,
    transform 0.2s;
  pointer-events: none;
}
.sc-dot:hover[data-label]::before {
  opacity: 1;
  transform: translateX(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 6rem;
    text-align: center;
  }
  .hero-desc {
    margin-inline: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-visual {
    display: none;
  }
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  .bento {
    grid-template-columns: 1fr;
  }
  .bento-card.col2 {
    grid-column: auto;
  }
}

/* ── MOBILE ── */
@media (max-width: 640px) {
  section {
    padding: 5rem 1.25rem 4rem;
    scroll-margin-top: 70px;
  }
  section[id] {
    scroll-margin-top: 70px;
  }
  .stats {
    padding: 4rem 1.25rem 3rem;
  }

  /* Hero */
  .hero {
    padding: 5.5rem 1.25rem 3.5rem;
    gap: 2rem;
    min-height: 100svh;
  }
  .hero-tag {
    font-size: 0.7rem;
    padding: 0.35rem 0.85rem;
  }
  .hero h1 {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 1.1rem;
  }
  .hero-desc {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
  }
  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }
  .btn-primary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1.5rem;
  }
  .scroll-hint {
    display: none;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .stat-card {
    padding: 1.5rem 1rem;
  }
  .stat-num {
    font-size: 2.2rem;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .feat-card {
    padding: 1.5rem;
  }

  /* Section labels & headings */
  .section-h {
    font-size: 1.75rem;
  }
  .section-sub {
    font-size: 0.95rem;
  }

  /* Bento */
  .bento {
    gap: 1rem;
  }
  .bento-card {
    padding: 1.5rem;
  }
  .bento-big {
    font-size: 3.5rem;
  }

  /* Parallax quote */
  .parallax-band {
    height: auto;
    min-height: 280px;
  }
  .parallax-content {
    padding: 3.5rem 1.5rem;
  }
  .parallax-content blockquote {
    font-size: 1.25rem;
    line-height: 1.5;
  }

  /* Species */
  .species {
    padding: 4rem 0;
  }
  .species-header {
    padding: 0 1.25rem;
    margin-bottom: 2rem;
  }
  .species-card {
    width: 170px;
  }
  .sp-img {
    height: 110px;
  }

  /* Timeline */
  .tl-section {
    padding: 5rem 1.25rem 4rem;
  }
  .tl-wrap {
    padding-left: 2.5rem;
  }
  .tl-item {
    padding: 0 0 2.5rem 2rem;
  }
  .tl-dot {
    left: -1.5rem;
    width: 30px;
    height: 30px;
  }
  .tl-dot svg {
    width: 13px;
    height: 13px;
  }
  .tl-item h4 {
    font-size: 1.05rem;
  }
  .tl-item p {
    font-size: 0.875rem;
  }

  /* CTA */
  .cta-btns {
    flex-direction: column;
    gap: 0.75rem;
  }
  .btn-cta-main,
  .btn-cta-ghost {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.5rem;
  }
}

/* ── SMALL MOBILE (iPhone SE etc.) ── */
@media (max-width: 390px) {
  .hero h1 {
    font-size: 2.1rem;
  }
  .stat-num {
    font-size: 1.9rem;
  }
  .hero-tag {
    font-size: 0.65rem;
  }
}

@media (max-width: 768px) {
  #section-counter {
    display: none;
  }
}
