/* SYNAX — hero pour animation and 3D plant tour (ported from the previous build) */

/* ---------- Hero with the pour animation ---------- */
/* The pour animation draws its own light background, so the hero stage is white like the old site:
   no card, no navy, nothing for the canvas to sit "inside". */
.hero.hero-scroll { position: relative; padding: 0; background: #fff; color: var(--ink); }
.hero.hero-scroll::before, .hero.hero-scroll::after { display: none; }
.hero.hero-scroll h1 { color: var(--navy); }
.hero.hero-scroll .lead { color: var(--muted); }
.hero-stage { position: relative; z-index: 1; background: #fff; }
.p3-fallback { display: none; }
.p3.p3-failed + .p3-fallback { display: block; margin-top: 16px; }
html.pour-hold, html.pour-hold body { touch-action: pinch-zoom; overscroll-behavior-y: none; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 64px); align-items: center;
  /* sized by its content (the 640px canvas), not the viewport: a viewport-high white hero left a blank band */
  padding-top: clamp(24px, 3vw, 48px); padding-bottom: clamp(48px, 5vw, 72px);
}
.hero.hero-scroll { border-bottom: 1px solid var(--line); }
.hw { display: inline-block; color: rgba(11, 42, 82, 0.42); transition: color 0.5s ease; }
.hw.on { color: var(--navy); }
.hero-canvas { position: relative; height: min(76vh, 640px); }
#pour-canvas { width: 100%; height: 100%; display: block; }
.scroll-cue {
  position: absolute; left: var(--gutter); bottom: 18px; display: flex; align-items: center; gap: 12px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  transition: opacity 0.4s; z-index: 2;
}
.scroll-cue i { width: 1px; height: 40px; background: rgba(11, 42, 82, 0.18); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--teal); animation: cue 1.8s ease infinite; }
.scroll-cue.gone { opacity: 0; }
@keyframes cue { to { top: 110%; } }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; padding-top: 20px; padding-bottom: 32px; min-height: 0; }
  .hero-canvas { order: -1; height: auto; width: 100%; aspect-ratio: 2 / 1; max-height: 420px; }
  .scroll-cue { display: none; }
}

/* ---------- 3D plant tour ---------- */
.p3 { position: relative; }
.p3-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.p3-bar .sp { flex: 1; }
.p3-stations { display: flex; flex-wrap: wrap; gap: 8px; }
.p3-stations button, .p3-auto, .p3-reset {
  border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 9px 14px;
  font: 700 0.86rem/1 var(--font); color: var(--navy); cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.p3-stations button i { font-style: normal; color: var(--teal); font-size: 0.72rem; letter-spacing: 0.08em; }
.p3-stations button:hover, .p3-auto:hover, .p3-reset:hover { border-color: var(--navy); }
.p3-stations button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.p3-stations button[aria-pressed="true"] i { color: #8FD3CC; }
.p3-auto[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.p3-auto svg { width: 11px; height: 11px; }
.p3-stage {
  position: relative; aspect-ratio: 16 / 9; max-height: 720px; width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 40%, #FFFFFF 0%, #EEF2F5 70%, #E2E8EF 100%);
}
.p3-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; cursor: grab; }
.p3-stage canvas:active { cursor: grabbing; }
.p3-loading {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 20px;
}
.p3-failed .p3-loading::after { content: " The 3D model could not load. The six stations below describe every step."; display: block; letter-spacing: 0; text-transform: none; font-weight: 600; }
.p3-tip {
  position: absolute; left: 0; top: 0; pointer-events: none; padding: 6px 10px; background: var(--navy); color: #fff;
  border-radius: 6px; font-size: 0.8rem; font-weight: 700; opacity: 0; transition: opacity 0.15s; white-space: nowrap; z-index: 3;
}
.p3-tip.on { opacity: 1; }
.p3-card { margin-top: 12px; min-height: 112px; background: #fff; border-radius: var(--radius-sm); padding: 16px 20px 14px; border: 1px solid var(--line); border-left: 4px solid var(--teal); }
.p3-card[hidden] { display: block; }
.p3-card .lbl { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teal); margin: 0 0 6px; }
.p3-card h3 { font-size: 1.25rem; margin: 0 0 6px; }
.p3-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.p3-card .fact { margin-top: 8px; font-size: 0.78rem; font-weight: 700; color: var(--navy); }
.p3-back { border: 0; background: none; padding: 8px 0 0; font: 700 0.86rem/1 var(--font); color: var(--teal); cursor: pointer; }
.p3-hint {
  position: absolute; right: 14px; bottom: 14px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); background: rgba(255, 255, 255, 0.85); padding: 7px 10px; border-radius: 6px; pointer-events: none; z-index: 2;
}
@media (max-width: 760px) {
  .p3-stage { aspect-ratio: 1; }
  .p3-hint { display: none; }
  .p3-stations button { padding: 9px 10px; font-size: 0.78rem; }
}
