/* ==========================================================================
   🌿 생태 탐험 (홈) — Drone Telemetry Hero & Climate Zone Ambiance Player
   ========================================================================== */

.scrub-hero {
  position: relative;
  height: 340vh; /* scroll distance driving frame scrub */
  background: var(--forest-950);
}
.scrub-hero .scrub-stage {
  position: sticky; top: 0; left: 0; height: 100vh; width: 100%;
  overflow: hidden;
}
.scrub-hero canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.scrub-hero .scrub-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none;
}
.scrub-hero .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,23,16,0.65) 0%, rgba(10,23,16,0.12) 35%, rgba(10,23,16,0.18) 65%, rgba(10,23,16,0.92) 100%);
  pointer-events: none;
}

/* Telemetry HUD Sitting Above Scrubbing Drone Image */
.scrub-hud {
  position: absolute; inset: 0; z-index: 5; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 120px 40px 56px;
}
.scrub-hud .wrap { width: 100%; padding: 0; max-width: var(--container); margin: 0 auto; }

.scrub-title { max-width: 780px; }
.scrub-title .eyebrow { color: var(--sage-300); }
.scrub-title .eyebrow::before { background: var(--sage-300); }
.scrub-title h1 {
  font-size: clamp(34px, 5.8vw, 64px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15;
  margin-top: 18px; text-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.scrub-title p {
  margin-top: 20px; font-size: 17px; color: var(--sage-200); max-width: 520px; line-height: 1.65;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.scrub-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

/* Telemetry Readout Strip */
.scrub-telemetry {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em; color: var(--sage-200);
  border-top: 1px solid rgba(255, 255, 255, 0.22); padding-top: 20px;
  background: rgba(10, 23, 16, 0.45); backdrop-filter: blur(12px); border-radius: var(--radius-sm);
  padding: 16px 24px; border: 1px solid rgba(255, 255, 255, 0.15);
}
.scrub-telemetry .t-item { display: flex; flex-direction: column; gap: 4px; min-width: 100px; }
.scrub-telemetry .t-label { opacity: 0.65; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; }
.scrub-telemetry .t-value { color: #fff; font-size: 14.5px; font-weight: 600; }
.scrub-telemetry .t-bar {
  flex: 1; min-width: 140px; height: 3px; background: rgba(255,255,255,0.2); position: relative; border-radius: 999px; overflow: hidden;
}
.scrub-telemetry .t-bar i {
  position: absolute; top: 0; left: 0; bottom: 0; width: 0%; background: var(--amber); border-radius: 999px;
  transition: width 0.05s linear; box-shadow: 0 0 10px var(--amber);
}

.scrub-scrolldown {
  position: absolute; right: 40px; bottom: 32px; z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
}
.scrub-scrolldown .line { width: 2px; height: 38px; background: linear-gradient(180deg, rgba(255,255,255,0.9), transparent); animation: scrolldown 1.6s ease-in-out infinite; border-radius: 999px; }
@keyframes scrolldown { 0% { transform: translateY(-6px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }

@media(max-width: 720px) {
  .scrub-hero { height: 280vh; }
  .scrub-hud { padding: 104px 20px 40px; }
  .scrub-telemetry { gap: 16px; padding: 12px 16px; }
  .scrub-telemetry .t-bar { display: none; }
  .scrub-scrolldown { display: none; }
}

/* -------------------- Ecosystem Tabs & Soundscape Ambiance Player -------------------- */
.eco-tabs-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-bottom: 36px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.eco-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.eco-tab {
  padding: 11px 22px; border-radius: var(--radius-full); border: 1px solid var(--line-strong); background: var(--paper-pure);
  font-size: 14.5px; font-weight: 600; color: var(--ink-soft); transition: all 0.2s ease; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.eco-tab:hover { border-color: var(--forest-600); color: var(--forest-800); transform: translateY(-1px); }
.eco-tab.is-active { background: var(--forest-800); color: #fff; border-color: var(--forest-800); box-shadow: var(--shadow-md); }

/* Ambiance Audio Toggle Switch */
.ambiance-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--radius-full);
  background: var(--paper-pure); border: 1px solid var(--line-strong); color: var(--forest-800); font-weight: 700; font-size: 13.5px;
  transition: all 0.2s ease; cursor: pointer; box-shadow: var(--shadow-sm);
}
.ambiance-btn:hover { background: var(--sage-200); border-color: var(--forest-600); }
.ambiance-btn.is-playing { background: var(--amber-light); border-color: var(--amber); color: var(--amber-deep); }
.ambiance-btn .sound-wave { display: inline-flex; gap: 3px; align-items: flex-end; height: 14px; }
.ambiance-btn .sound-wave span { width: 2px; height: 100%; background: currentColor; border-radius: 999px; }
.ambiance-btn.is-playing .sound-wave span:nth-child(1) { animation: wave 0.8s ease-in-out infinite alternate; }
.ambiance-btn.is-playing .sound-wave span:nth-child(2) { animation: wave 0.6s ease-in-out 0.2s infinite alternate; }
.ambiance-btn.is-playing .sound-wave span:nth-child(3) { animation: wave 1.0s ease-in-out 0.4s infinite alternate; }
@keyframes wave { 0% { height: 20%; } 100% { height: 100%; } }

.species-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; }
.species-feature .card-media { aspect-ratio: 16/11; }
.species-side { display: flex; flex-direction: column; gap: 20px; }
.species-side .card { display: flex; align-items: stretch; flex-direction: row; }
.species-side .card-media { width: 140px; aspect-ratio: auto; flex: none; }
.species-side .card-body { padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; }
@media(max-width: 820px) {
  .species-grid { grid-template-columns: 1fr; }
  .species-side .card { flex-direction: column; }
  .species-side .card-media { width: 100%; aspect-ratio: 16/9; }
}

/* Map Explorer Container */
.map-explore {
  position: relative; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line-strong);
  background: var(--forest-950); touch-action: none; user-select: none; box-shadow: var(--shadow-md);
}
.map-explore img { width: 100%; display: block; opacity: 0.92; transition: filter 0.4s ease; }
.map-pins { position: absolute; inset: 0; pointer-events: none; }
.map-pin {
  position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 0 6px rgba(226, 168, 75, 0.3); border: 2.5px solid #fff; padding: 0; cursor: pointer;
  pointer-events: auto; transform: translate(-50%, -50%); transition: transform 0.2s ease, background 0.2s ease;
}
.map-pin:hover { background: var(--amber-deep); transform: translate(-50%, -50%) scale(1.25); z-index: 10; }
.map-pin::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1.5px solid rgba(226, 168, 75, 0.6);
  animation: pulse 2.4s ease-out infinite; pointer-events: none;
}
@keyframes pulse { 0% { transform: scale(0.5); opacity: 0.9; } 100% { transform: scale(2.0); opacity: 0; } }

.map-pin-label {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: rgba(10, 23, 16, 0.92); color: #fff; font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: var(--radius-sm); white-space: nowrap;
  pointer-events: none; opacity: 0; transition: opacity .2s ease; backdrop-filter: blur(6px);
  box-shadow: var(--shadow-md);
}
.map-pin-label::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: rgba(10, 23, 16, 0.92);
}
.map-pin:hover .map-pin-label, .map-pin:focus-visible .map-pin-label { opacity: 1; }

.link-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; color: var(--forest-600); margin-top: 10px; }

/* Info Tiles */
.info-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.info-tile {
  background: var(--paper-pure); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 32px 28px;
  transition: all 0.25s ease; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.info-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.info-tile.is-highlight { border-color: var(--amber); background: linear-gradient(180deg, #fffcf5 0%, #ffffff 100%); }
.info-tile .tile-icon {
  width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--sage-200); color: var(--forest-800); margin-bottom: 18px;
}
.info-tile h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.info-tile p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }
@media(max-width: 820px) { .info-tiles { grid-template-columns: 1fr; } }
