:root {
  --bg-black: #060708;
  --bg-charcoal: #15171a;
  --bg-gray: #23262b;
  --brand-green: #2b8a57;
  --brand-green-hover: #359f66;
  --text-main: #f1f3f5;
  --text-muted: #9aa0a6;
  --header-surface: rgba(12, 14, 16, 0.62);
  --header-border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-black);
  color: var(--text-main);
}

body {
  min-height: 100vh;
  background: var(--bg-black);
  color: var(--text-main);
  font-family: "Space Grotesk", "Cairo", -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body {
  font-family: "Cairo", "Space Grotesk", sans-serif;
}

/* Whisper-Thin Top Reading Progress Hairline (GPU scaleX — 0 layout cost) */
.scroll-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  pointer-events: none;
  background: transparent;
}

.scroll-progress-bar {
  width: 100%;
  height: 100%;
  background: var(--brand-green);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

html[dir="rtl"] .scroll-progress-bar {
  transform-origin: right center;
}

/* ================================
   Splash Preloader (Flat Deep Green)
   ================================ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 48%, #1c1f23 0%, #0e1012 52%, #050607 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 1.55s cubic-bezier(0.22, 1, 0.36, 1) 0.15s,
              visibility 1.7s ease;
}

.splash.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-fog {
  position: absolute;
  inset: -12%;
  background:
    radial-gradient(ellipse 56% 38% at 32% 54%, rgba(130, 138, 148, 0.13) 0%, rgba(130, 138, 148, 0.04) 40%, transparent 72%),
    radial-gradient(ellipse 52% 36% at 68% 46%, rgba(110, 118, 128, 0.11) 0%, rgba(110, 118, 128, 0.03) 40%, transparent 72%),
    radial-gradient(ellipse 68% 42% at 50% 62%, rgba(95, 102, 112, 0.10) 0%, transparent 74%);
  animation: splashFogDrift 5s ease-in-out infinite alternate;
}

@keyframes splashFogDrift {
  0% {
    transform: translate3d(-2%, 1%, 0) scale(1);
    opacity: 0.72;
  }
  100% {
    transform: translate3d(2%, -1.5%, 0) scale(1.05);
    opacity: 0.98;
  }
}

.splash-inner {
  position: relative;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 1;
  transform: scale(1);
  filter: blur(0px);
  transition: opacity 1.35s cubic-bezier(0.25, 0.1, 0.25, 1),
              filter 1.35s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 1.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, filter, transform;
}

.splash.is-leaving .splash-inner {
  opacity: 0;
  filter: blur(20px);
  transform: scale(1.14);
}

.splash-logo {
  position: relative;
  width: min(320px, 66vw);
  height: auto;
  animation: splashLogoPulse 1.15s ease-in-out infinite;
}

.splash.is-leaving .splash-logo {
  animation-play-state: paused;
}

@keyframes splashLogoPulse {
  0%, 100% {
    transform: scale(0.965);
    opacity: 0.68;
  }
  50% {
    transform: scale(1.025);
    opacity: 1;
  }
}

.logo-part {
  opacity: 0;
  animation: logoSegmentIn 0.32s ease-out forwards;
}

.logo-part.p1 { animation-delay: 0.02s; }
.logo-part.p2 { animation-delay: 0.08s; }
.logo-part.p3 { animation-delay: 0.14s; }
.logo-part.p4 { animation-delay: 0.20s; }

@keyframes logoSegmentIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* ================================
   Ultra-Light Single-Layer Dark Fog Backdrop (Minimal GPU Compositing)
   ================================ */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 56% 36% at 72% 30%, rgba(145, 151, 160, 0.09) 0%, transparent 72%),
    radial-gradient(ellipse 74% 32% at 50% 90%, rgba(82, 88, 96, 0.14) 0%, transparent 74%),
    radial-gradient(ellipse 90% 70% at 50% 42%, #202328 0%, #111316 48%, #050607 100%);
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 48%, rgba(0, 0, 0, 0.72) 100%);
}

/* ================================
   Minimal Floating Top Header
   ================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px clamp(20px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(6, 7, 8, 0.78) 0%, rgba(6, 7, 8, 0.22) 68%, transparent 100%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--text-main);
  justify-self: start;
}

.brand-mark {
  width: 56px;
  height: auto;
  color: var(--brand-green);
  transition: opacity 0.2s ease;
}

.brand:hover .brand-mark {
  color: var(--brand-green-hover);
}

.brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--text-main);
}

.brand-eight {
  color: #ffffff;
}

.main-nav {
  display: inline-flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(13, 16, 20, 0.9);
  border: 1px solid var(--header-border);
}

.nav-link {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text-main);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand-green);
  transform: translateX(-50%) scale(0);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.nav-link.is-active::after {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
}

.icon-link svg {
  width: 17px;
  height: 17px;
}

.icon-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.07);
}

.header-right {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(13, 16, 20, 0.9);
  border: 1px solid var(--header-border);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text-main);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

/* Dark mode shows sun icon (click -> Light); Light mode shows moon icon (click -> Dark) */
.theme-toggle .icon-moon {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(13, 16, 20, 0.9);
  border: 1px solid var(--header-border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.lang-toggle:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.lang-opt {
  transition: color 0.2s ease;
}

.lang-opt.active {
  color: var(--brand-green-hover);
}

.lang-sep {
  opacity: 0.32;
}

/* ================================
   Unified Single 3D Stage
   ================================ */
.unified-stage {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100vh;
  min-height: 600px;
}

.scene-canvas {
  width: 100%;
  height: 100%;
  cursor: default;
  touch-action: pan-y;
}

.scene-canvas.is-hovering {
  cursor: grab;
}

.scene-canvas.is-dragging {
  cursor: grabbing;
}

.scene-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ================================
   Subtle Drag Hint & Vertical Scroll Hairline
   ================================ */
.stage-footer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.drag-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(241, 243, 245, 0.42);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

html[dir="rtl"] .drag-hint {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.78rem;
}

.drag-hint svg {
  width: 14px;
  height: 14px;
  color: var(--brand-green);
  opacity: 0.85;
}

.drag-hint.is-hidden {
  opacity: 0;
  transform: translateY(4px);
}

.scroll-indicator {
  position: relative;
  display: block;
  width: 24px;
  height: 40px;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.45s ease;
}

.scroll-indicator::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 2px;
}

.scroll-indicator.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Quiet Corner Replay Arrival Control on Hero */
.replay-intro-btn {
  position: absolute;
  bottom: 22px;
  inset-inline-end: clamp(18px, 3.6vw, 44px);
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(12, 14, 18, 0.72);
  color: rgba(209, 213, 219, 0.72);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.45s ease, transform 0.45s ease, color 0.2s ease, border-color 0.2s ease;
}

.replay-intro-btn.is-ready {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.replay-intro-btn:hover {
  color: #ffffff;
  border-color: rgba(43, 138, 87, 0.65);
}

.replay-intro-btn svg {
  width: 13px;
  height: 13px;
  color: var(--brand-green);
}

html[data-theme="light"] .replay-intro-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(18, 21, 26, 0.11);
  color: rgba(18, 21, 26, 0.72);
}

html[data-theme="light"] .replay-intro-btn:hover {
  color: #111317;
  border-color: rgba(43, 138, 87, 0.65);
}

/* Subtle Engineering Frequency Telemetry Readout */
.freq-readout {
  font-family: "Space Grotesk", ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(209, 213, 219, 0.78);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(10, 12, 15, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .freq-readout {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(18, 21, 26, 0.10);
  color: #3b424d;
}

.flower-freq-readout {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  font-family: "Space Grotesk", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(154, 160, 166, 0.78);
  white-space: nowrap;
  pointer-events: none;
}

html[data-theme="light"] .flower-freq-readout {
  color: rgba(85, 94, 108, 0.85);
}

.scroll-line {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  overflow: hidden;
  border-radius: 2px;
}

.scroll-line::after {
  content: "";
  position: absolute;
  top: -55%;
  left: 0;
  width: 100%;
  height: 55%;
  background: var(--brand-green);
  animation: scrollHairline 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scrollHairline {
  0% {
    top: -55%;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    top: 105%;
    opacity: 0;
  }
}

/* ================================
   Section 2: About FARM8OT
   ================================ */
.about-section {
  position: relative;
  z-index: 10;
  width: 100%;
  contain: layout style;
  padding: clamp(72px, 10vh, 112px) clamp(24px, 6vw, 88px) clamp(56px, 7vh, 84px);
}

.about-container {
  max-width: 1180px;
  margin: 0 auto;
}

.reveal {
  opacity: 1;
  transform: none;
}

.about-rule {
  position: relative;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
  margin-bottom: clamp(44px, 6vh, 72px);
}

.about-rule-accent {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 64px;
  height: 2px;
  background: var(--brand-green);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(210px, 0.42fr) 1fr;
  gap: clamp(28px, 5vw, 84px);
  align-items: start;
}

.about-heading-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-kicker {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-green);
}

html[dir="rtl"] .about-kicker {
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 0.84rem;
}

.about-title {
  font-size: clamp(2.65rem, 5vw, 4.15rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #ffffff;
}

html[dir="rtl"] .about-title {
  letter-spacing: 0;
  font-weight: 800;
  line-height: 1.25;
}

.about-body-col {
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 72ch;
}

.about-paragraph {
  font-size: clamp(1.02rem, 1.28vw, 1.18rem);
  font-weight: 400;
  line-height: 1.85;
  color: rgba(214, 219, 226, 0.82);
}

.about-lead {
  color: rgba(243, 245, 248, 0.94);
}

html[dir="rtl"] .about-paragraph {
  font-size: clamp(1.06rem, 1.35vw, 1.22rem);
  line-height: 2.05;
}

/* Clean Architectural 3-Pillar Hairline Strip */
.about-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.6vw, 48px);
  margin-top: clamp(56px, 8vh, 88px);
}

.pillar-item {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pillar-index {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brand-green);
}

.pillar-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
}

.pillar-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-muted);
}

html[dir="rtl"] .pillar-desc {
  font-size: 0.95rem;
  line-height: 1.85;
}

@media (max-width: 859px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .about-pillars {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ================================
   Section 3: Directed Acoustic Wave System
   ================================ */
.acoustic-section {
  position: relative;
  z-index: 10;
  width: 100%;
  contain: layout style;
  padding: clamp(32px, 5vh, 56px) clamp(24px, 6vw, 88px) clamp(88px, 12vh, 130px);
}

.section-container {
  max-width: 1180px;
  margin: 0 auto;
}

.acoustic-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 78ch;
  margin-bottom: clamp(44px, 6vh, 68px);
}

.acoustic-overview {
  margin-top: 8px;
  font-size: clamp(1.08rem, 1.4vw, 1.28rem);
  line-height: 1.85;
  color: rgba(243, 245, 248, 0.92);
}

html[dir="rtl"] .acoustic-overview {
  line-height: 2.02;
}

/* Mechanism Copy + Interactive 3D PCB Side-by-Side */
.acoustic-split {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(28px, 4.5vw, 64px);
  align-items: start;
}

.acoustic-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 12px;
}

.acoustic-subhead {
  font-size: clamp(1.32rem, 2vw, 1.65rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.pcb-stage-wrap {
  position: relative;
  width: 100%;
  height: clamp(440px, 56vh, 580px);
  margin-top: -56px;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.pcb-canvas {
  width: 100%;
  height: 100%;
  cursor: default;
  pointer-events: none;
}

.pcb-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.pcb-hint {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(241, 243, 245, 0.42);
  pointer-events: none;
  transition: opacity 0.5s ease;
}

html[dir="rtl"] .pcb-hint {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.78rem;
}

.pcb-hint svg {
  width: 13px;
  height: 13px;
  color: var(--brand-green);
}

.pcb-hint.is-hidden {
  opacity: 0;
}

/* Connected 5-Stage Signal Pipeline */
.pipeline-wrap {
  margin-top: clamp(56px, 8vh, 88px);
}

.pipeline-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 22px;
}

html[dir="rtl"] .pipeline-label {
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 0.85rem;
}

.pipeline-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

/* Subtle horizontal connecting signal line behind the 5 boxes */
.pipeline-rail {
  position: absolute;
  top: 26px;
  left: 4%;
  right: 4%;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.pipeline-pulse {
  position: absolute;
  top: 0;
  left: -22%;
  width: 22%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--brand-green), transparent);
  animation: signalFlowLTR 4.2s linear infinite;
}

html[dir="rtl"] .pipeline-pulse {
  left: auto;
  right: -22%;
  animation: signalFlowRTL 4.2s linear infinite;
}

@keyframes signalFlowLTR {
  0% { left: -22%; }
  100% { left: 105%; }
}

@keyframes signalFlowRTL {
  0% { right: -22%; }
  100% { right: 105%; }
}

.stage-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 18px 20px;
  border-radius: 12px;
  background: rgba(14, 17, 21, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.stage-node:hover {
  border-color: rgba(43, 138, 87, 0.65);
  background: rgba(18, 22, 27, 0.9);
  transform: translateY(-2px);
}

.stage-node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stage-num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brand-green);
}

.stage-dot-ind {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-green);
}

.stage-node-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
}

.stage-node-desc {
  font-size: 0.84rem;
  line-height: 1.72;
  color: var(--text-muted);
}

html[dir="rtl"] .stage-node-desc {
  font-size: 0.88rem;
  line-height: 1.85;
}

@media (max-width: 1080px) {
  .pipeline-track {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-inline-start: 22px;
  }

  .pipeline-rail {
    top: 16px;
    bottom: 16px;
    left: 6px;
    right: auto;
    width: 1.5px;
    height: auto;
  }

  html[dir="rtl"] .pipeline-rail {
    left: auto;
    right: 6px;
  }

  .pipeline-pulse {
    top: -22%;
    left: 0;
    right: auto;
    width: 100%;
    height: 22%;
    background: linear-gradient(180deg, transparent, var(--brand-green), transparent);
    animation: signalFlowVert 4s linear infinite;
  }

  html[dir="rtl"] .pipeline-pulse {
    right: auto;
    left: 0;
    animation: signalFlowVert 4s linear infinite;
  }

  @keyframes signalFlowVert {
    0% { top: -22%; }
    100% { top: 105%; }
  }
}

@media (max-width: 859px) {
  .acoustic-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .pcb-stage-wrap {
    height: 390px;
    margin-top: 0;
  }
}

/* ================================
   Section 3 — Stage 2: Interactive Acoustic Beam Demo
   ================================ */
.beam-demo-wrap {
  margin-top: clamp(64px, 9vh, 100px);
  padding-top: clamp(44px, 6vh, 64px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.beam-demo-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.beam-demo-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 64ch;
}

.beam-demo-title {
  font-size: clamp(1.42rem, 2.3vw, 1.85rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.beam-demo-lead {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-muted);
}

html[dir="rtl"] .beam-demo-lead {
  font-size: 0.98rem;
  line-height: 1.88;
}

/* Mode Segmented Switch (Directed vs Standard) */
.beam-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(12, 14, 17, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.09);
  flex-shrink: 0;
}

.mode-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease;
  white-space: nowrap;
}

.mode-btn:hover {
  color: #ffffff;
}

.mode-btn.active {
  background: var(--brand-green);
  color: #ffffff;
}

/* 2.5D Interactive Canvas Container */
.beam-stage-box {
  position: relative;
  width: 100%;
  height: clamp(340px, 46vh, 450px);
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(ellipse 85% 75% at 50% 55%, #171a1f 0%, #0d0f13 62%, #080a0c 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.beam-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.beam-status-bar {
  position: absolute;
  bottom: 14px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  flex-wrap: wrap;
}

.beam-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(10, 12, 15, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.beam-status-pill.is-hearing {
  border-color: rgba(43, 138, 87, 0.65);
  color: #f1f3f5;
}

.beam-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #525965;
  transition: background 0.25s ease;
}

.beam-status-pill.is-hearing .beam-status-dot {
  background: var(--brand-green);
}

.beam-control-note {
  font-size: 0.74rem;
  color: rgba(154, 160, 166, 0.72);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(10, 12, 15, 0.62);
}

.beam-caption {
  margin-top: 18px;
  max-width: 78ch;
  font-size: 0.94rem;
  line-height: 1.8;
  color: rgba(209, 213, 219, 0.78);
}

html[dir="rtl"] .beam-caption {
  font-size: 0.98rem;
  line-height: 1.95;
}

@media (max-width: 680px) {
  .beam-stage-box {
    height: 310px;
  }

  .beam-control-note {
    display: none;
  }
}

/* ================================
   Section 4: Pollination Biology — Frameless 3D Flower Side-by-Side
   ================================ */
.flower-section {
  position: relative;
  z-index: 10;
  width: 100%;
  contain: layout style;
  padding: clamp(32px, 5vh, 56px) clamp(24px, 6vw, 88px) clamp(96px, 13vh, 140px);
}

.flower-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4.5vw, 64px);
  align-items: center;
}

.flower-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.flower-lead {
  margin-top: 6px;
}

/* Folded Heterostyly Rows Inside the Text Column (Pure Architectural Hairlines) */
.flower-types-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.flower-type-row {
  background: none;
  border: none;
  border-inline-start: 2px solid rgba(255, 255, 255, 0.12);
  padding: 2px 0 2px 16px;
  padding-inline: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: start;
  font-family: inherit;
  cursor: pointer;
  opacity: 0.62;
  transition: border-color 0.24s ease, opacity 0.24s ease;
}

.flower-type-row:hover {
  opacity: 0.92;
  border-inline-start-color: rgba(43, 138, 87, 0.65);
}

.flower-type-row.active {
  opacity: 1;
  border-inline-start-color: var(--brand-green);
}

.type-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.type-row-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
}

.type-row-rate {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-green);
}

.type-row-desc {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-muted);
}

html[dir="rtl"] .type-row-desc {
  font-size: 0.89rem;
  line-height: 1.8;
}

/* Clean Minimal Switcher Centered Directly Above the Floating 3D Flower */
.flower-top-switch {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.flower-switch-sep {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.14);
}

.flower-buzz-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  border-bottom: 1.5px solid transparent;
  padding: 2px 0 5px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.22s ease, border-color 0.22s ease;
}

.flower-buzz-link:hover {
  color: #ffffff;
}

.flower-buzz-link.is-active {
  color: #ffffff;
  border-bottom-color: var(--brand-green);
}

.buzz-ind-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  transition: background 0.22s ease;
}

.flower-buzz-link.is-active .buzz-ind-dot {
  background: var(--brand-green);
}

/* Completely Frameless Floating 3D Stage (Blended into Page Mist — Like PCB!) */
.flower-stage-wrap {
  position: relative;
  width: 100%;
  height: clamp(460px, 58vh, 590px);
  overflow: visible;
}

.flower-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.flower-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Razor-Thin Architectural SVG Hairlines */
.flower-callout-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

.leader-group {
  transition: opacity 0.28s ease;
}

.leader-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.25s ease, stroke-width 0.25s ease;
}

.leader-dot {
  fill: rgba(241, 243, 245, 0.85);
  transition: fill 0.25s ease, r 0.25s ease;
}

.leader-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1;
  transition: stroke 0.25s ease, opacity 0.25s ease;
}

.leader-group.is-active .leader-line {
  stroke: var(--brand-green);
  stroke-width: 1.5;
}

.leader-group.is-active .leader-dot {
  fill: var(--brand-green);
}

.leader-group.is-active .leader-ring {
  stroke: rgba(43, 138, 87, 0.72);
}

.leader-group.is-dimmed {
  opacity: 0.14;
}

/* Pure Typographic Organ Labels (NO Boxes, NO Borders, NO Pills) */
.flower-callouts {
  position: absolute;
  top: 56px;
  bottom: 76px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 6;
  pointer-events: none;
}

.flower-callouts-left {
  left: 0;
  align-items: flex-start;
}

.flower-callouts-right {
  right: 0;
  align-items: flex-end;
}

.flower-callout {
  pointer-events: auto;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  padding: 4px 2px 5px;
  color: rgba(226, 232, 240, 0.8);
  font-family: inherit;
  cursor: pointer;
  transition: color 0.24s ease, border-color 0.24s ease, opacity 0.26s ease, transform 0.24s ease;
}

.flower-callouts-left .flower-callout {
  text-align: left;
  padding-right: 10px;
}

.flower-callouts-right .flower-callout {
  text-align: right;
  padding-left: 10px;
}

.callout-name {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.25;
  white-space: nowrap;
}

html[dir="rtl"] .callout-name {
  font-size: 0.9rem;
  letter-spacing: 0;
}

.flower-callout:hover,
.flower-callout:focus-visible,
.flower-callout.is-active {
  outline: none;
  color: #ffffff;
  border-bottom-color: var(--brand-green);
}

.flower-stage-wrap.has-active-part .flower-callout:not(.is-active) {
  opacity: 0.34;
}

/* Quiet Single-Line Scientific Caption Below Floating Flower on Hover */
.flower-hover-note {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 44ch);
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.78);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.26s ease;
  z-index: 6;
}

.flower-hover-note.is-visible {
  opacity: 1;
}

html[dir="rtl"] .flower-hover-note {
  font-size: 0.88rem;
  line-height: 1.75;
}

/* Responsive Tablet / Mobile Layout for Section 4 */
@media (max-width: 960px) {
  .flower-split {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .flower-stage-wrap {
    height: 440px;
  }
}

@media (max-width: 620px) {
  .flower-stage-wrap {
    height: auto;
    display: flex;
    flex-direction: column;
  }

  .flower-top-switch {
    position: static;
    transform: none;
    justify-content: center;
    margin-bottom: 4px;
  }

  .flower-freq-readout {
    position: static;
    transform: none;
    text-align: center;
    margin-bottom: 6px;
  }

  .flower-canvas {
    position: relative;
    height: 310px;
  }

  .flower-callout-svg {
    top: 56px;
    height: 310px;
  }

  .flower-callouts {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 20px;
    margin-top: 10px;
    pointer-events: auto;
  }

  .flower-callouts-left .flower-callout,
  .flower-callouts-right .flower-callout {
    text-align: center;
    padding: 4px 2px 5px;
  }

  .flower-hover-note {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 12px;
    min-height: 2.6em;
  }
}

/* ================================
   Minimal Architectural Footer
   ================================ */
.site-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 40px clamp(24px, 6vw, 88px) 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-brand .brand-mark {
  width: 42px;
}

.footer-brand .brand-name {
  font-size: 0.92rem;
}

.footer-contact-group {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-email,
.footer-social {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(241, 243, 245, 0.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  padding-bottom: 3px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-email:hover,
.footer-social:hover {
  color: #ffffff;
  border-bottom-color: var(--brand-green);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(154, 160, 166, 0.72);
}

@media (max-width: 620px) {
  .footer-top {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}

/* ================================
   Architectural Light Mode (Soft Gallery Stone Mist)
   ================================ */
html[data-theme="light"] {
  --bg-black: #eaedf1;
  --bg-charcoal: #e2e6ec;
  --bg-gray: #d4dae2;
  --text-main: #12151a;
  --text-muted: #555e6c;
  --header-surface: rgba(246, 248, 250, 0.86);
  --header-border: rgba(18, 21, 26, 0.11);
}

html[data-theme="light"] .splash {
  background: radial-gradient(circle at 50% 48%, #f7f8fa 0%, #eaedf2 55%, #dfe3ea 100%);
}

html[data-theme="light"] .atmosphere {
  background:
    radial-gradient(ellipse 58% 38% at 72% 28%, rgba(255, 255, 255, 0.72) 0%, transparent 72%),
    radial-gradient(ellipse 74% 34% at 50% 90%, rgba(190, 198, 210, 0.34) 0%, transparent 74%),
    radial-gradient(ellipse 92% 72% at 50% 42%, #f7f8fa 0%, #eceff4 50%, #e1e5ec 100%);
}

html[data-theme="light"] .vignette {
  background: radial-gradient(circle at 50% 50%, transparent 56%, rgba(15, 23, 42, 0.08) 100%);
}

html[data-theme="light"] .site-header {
  background: linear-gradient(to bottom, rgba(242, 245, 248, 0.90) 0%, rgba(242, 245, 248, 0.42) 70%, transparent 100%);
}

html[data-theme="light"] .brand-name,
html[data-theme="light"] .brand-eight,
html[data-theme="light"] .about-title,
html[data-theme="light"] .pillar-title,
html[data-theme="light"] .acoustic-subhead,
html[data-theme="light"] .stage-node-title,
html[data-theme="light"] .beam-demo-title,
html[data-theme="light"] .type-row-title {
  color: #111317;
}

html[data-theme="light"] .main-nav,
html[data-theme="light"] .lang-toggle,
html[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(18, 21, 26, 0.11);
}

html[data-theme="light"] .lang-toggle:hover,
html[data-theme="light"] .theme-toggle:hover {
  border-color: rgba(18, 21, 26, 0.28);
  color: #111317;
}

html[data-theme="light"] .icon-link:hover {
  background: rgba(18, 21, 26, 0.06);
}

html[data-theme="light"] .drag-hint {
  color: rgba(18, 21, 26, 0.56);
}

html[data-theme="light"] .scroll-line {
  background: linear-gradient(to bottom, rgba(18, 21, 26, 0.34), transparent);
}

html[data-theme="light"] .about-rule {
  background: rgba(18, 21, 26, 0.12);
}

html[data-theme="light"] .about-paragraph,
html[data-theme="light"] .beam-caption {
  color: rgba(34, 40, 49, 0.82);
}

html[data-theme="light"] .about-lead,
html[data-theme="light"] .acoustic-overview {
  color: rgba(17, 20, 25, 0.94);
}

html[data-theme="light"] .pillar-item,
html[data-theme="light"] .beam-demo-wrap,
html[data-theme="light"] .site-footer {
  border-color: rgba(18, 21, 26, 0.11);
}

html[data-theme="light"] .pipeline-rail {
  background: rgba(18, 21, 26, 0.12);
}

html[data-theme="light"] .stage-node {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(18, 21, 26, 0.10);
}

html[data-theme="light"] .stage-node:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(43, 138, 87, 0.55);
}

html[data-theme="light"] .stage-node-head {
  border-bottom-color: rgba(18, 21, 26, 0.08);
}

html[data-theme="light"] .beam-mode-switch {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(18, 21, 26, 0.11);
}

html[data-theme="light"] .mode-btn:hover {
  color: #111317;
}

html[data-theme="light"] .mode-btn.active {
  color: #ffffff;
}

html[data-theme="light"] .beam-stage-box {
  background: radial-gradient(ellipse 85% 75% at 50% 55%, #ffffff 0%, #eef1f5 62%, #e4e8ef 100%);
  border-color: rgba(18, 21, 26, 0.11);
}

html[data-theme="light"] .beam-status-pill {
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(18, 21, 26, 0.11);
  color: #4b5360;
}

html[data-theme="light"] .beam-status-pill.is-hearing {
  color: #111317;
  border-color: rgba(43, 138, 87, 0.65);
}

html[data-theme="light"] .beam-control-note {
  background: rgba(255, 255, 255, 0.76);
  color: #555e6c;
}

/* Section 4 Light Mode (Frameless Typographic Callouts + Crisp Charcoal Hairlines) */
html[data-theme="light"] .flower-type-row {
  border-inline-start-color: rgba(18, 21, 26, 0.16);
}

html[data-theme="light"] .flower-switch-sep {
  background: rgba(18, 21, 26, 0.18);
}

html[data-theme="light"] .flower-buzz-link:hover,
html[data-theme="light"] .flower-buzz-link.is-active {
  color: #111317;
}

html[data-theme="light"] .buzz-ind-dot {
  background: rgba(18, 21, 26, 0.24);
}

html[data-theme="light"] .flower-buzz-link.is-active .buzz-ind-dot {
  background: var(--brand-green);
}

html[data-theme="light"] .flower-callout {
  color: rgba(18, 21, 26, 0.78);
  border-bottom-color: rgba(18, 21, 26, 0.26);
}

html[data-theme="light"] .flower-callout:hover,
html[data-theme="light"] .flower-callout:focus-visible,
html[data-theme="light"] .flower-callout.is-active {
  color: #111317;
  border-bottom-color: var(--brand-green);
}

html[data-theme="light"] .leader-line {
  stroke: rgba(18, 21, 26, 0.28);
}

html[data-theme="light"] .leader-dot {
  fill: rgba(18, 21, 26, 0.78);
}

html[data-theme="light"] .leader-ring {
  stroke: rgba(18, 21, 26, 0.24);
}

html[data-theme="light"] .leader-group.is-active .leader-line {
  stroke: var(--brand-green);
}

html[data-theme="light"] .leader-group.is-active .leader-dot {
  fill: var(--brand-green);
}

html[data-theme="light"] .leader-group.is-active .leader-ring {
  stroke: rgba(43, 138, 87, 0.75);
}

html[data-theme="light"] .flower-hover-note {
  color: rgba(18, 21, 26, 0.80);
}

html[data-theme="light"] .footer-email,
html[data-theme="light"] .footer-social {
  color: #111317;
  border-bottom-color: rgba(18, 21, 26, 0.22);
}

html[data-theme="light"] .footer-bottom {
  border-top-color: rgba(18, 21, 26, 0.08);
}

html[data-theme="light"] .footer-copy {
  color: rgba(85, 94, 108, 0.85);
}

/* ================================
   Polished Mobile Phone Experience (<= 859px & <= 620px)
   ================================ */
@media (max-width: 859px) {
  .unified-stage {
    height: 100svh;
    min-height: 620px;
    max-height: 860px;
  }

  /* Clean 2-row Mobile Header: Row 1 (Brand + Controls), Row 2 (Centered Slim Nav Pill) */
  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 10px;
    column-gap: 10px;
    padding: 12px 16px 10px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    gap: 9px;
  }

  .brand-mark {
    width: 36px;
  }

  .brand-name {
    font-size: 0.88rem;
    letter-spacing: 0.16em;
  }

  .header-right {
    grid-column: 2;
    grid-row: 1;
    gap: 6px;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
  }

  .lang-toggle {
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    gap: 14px;
    padding: 6px 16px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .about-section,
  .acoustic-section,
  .flower-section {
    padding-inline: 20px;
  }

  .about-section {
    padding-top: 56px;
    padding-bottom: 44px;
  }

  .about-title {
    font-size: clamp(2.05rem, 8.2vw, 2.75rem);
  }

  .pcb-stage-wrap {
    height: 330px;
    margin-top: 0;
  }

  .beam-demo-top {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .beam-mode-switch {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mode-btn {
    padding: 9px 10px;
    font-size: 0.8rem;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .flower-callouts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
    margin-top: 8px;
  }

  .flower-callouts-left .flower-callout,
  .flower-callouts-right .flower-callout {
    width: 100%;
    text-align: center;
    padding: 6px 2px 6px;
  }

  .callout-name {
    font-size: 0.82rem;
  }

  .stage-footer {
    bottom: 14px;
  }

  .beam-stage-box {
    height: 290px;
  }

  .beam-status-bar {
    bottom: 10px;
    left: 12px;
    right: 12px;
    justify-content: center;
  }
}
