/* ==========================================================================
   GreenGuard Tech — homepage
   Warm paper background, tight grotesk headlines, mono labels,
   soft-cornered imagery, lime action colour.
   Team + Services use the white "card" style (Manrope titles, logo green).
   Product screenshots are always shown whole, inside a browser frame.
   ========================================================================== */

:root {
  --paper: #f3f1ea;
  --paper-2: #e9e6da;
  --paper-3: #dedacb;
  --ink: #1f2620;
  --ink-2: #4c544c;
  --ink-3: #7a8078;
  --forest: #16342a;
  --forest-2: #224a3b;
  --lime: #c8f27b;
  --lime-2: #b3e35c;
  --ember: #f0703c;
  --line: rgba(31, 38, 32, 0.14);

  /* card sections (team + services) */
  --surface: #ffffff;
  --surface-2: #e8ede3;
  --brand: #1e5b3e;
  --ember-soft: #ffe3d2;
  --card-line: rgba(19, 34, 26, 0.12);
  --shadow: 0 1px 2px rgba(14, 49, 34, .06), 0 12px 32px rgba(14, 49, 34, .08);
  --r-card: 28px;

  --f-head: "Inter Tight", "Inter", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-card: "Manrope", "Inter", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1376px;
  --r-lg: clamp(28px, 4vw, 48px);
  --r-xl: clamp(80px, 16vw, 240px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, ol, ul { margin: 0; }

.skip-link { position: absolute; left: -9999px; z-index: 999; padding: .5rem 1rem; background: var(--paper); color: var(--ink); }
.skip-link:focus { left: .5rem; top: .5rem; }
:focus-visible { outline: 2px solid var(--forest-2); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--f-mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  margin-bottom: 20px; display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--forest-2); }
.eyebrow--light { color: rgba(255,255,255,.85); }
.eyebrow--light::before { background: var(--lime); }

.display {
  font-family: var(--f-head); font-weight: 500;
  font-size: clamp(34px, 5vw, 64px); line-height: 1.02; letter-spacing: -0.035em;
  color: var(--ink); text-wrap: balance;
}
.display--light { color: #fff; }
.display--center { text-align: center; }

.body-lg { font-size: clamp(16px, 1.3vw, 18px); color: var(--ink-2); line-height: 1.6; max-width: 34em; }
.body-lg + .body-lg { margin-top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 48px; padding: 8px 10px 8px 20px; border-radius: 12px; border: 1px solid transparent;
  font-family: var(--f-mono); font-size: 14px; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.btn-dot svg { width: 13px; height: 13px; }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: var(--lime-2); }
.btn--lime .btn-dot { background: var(--ink); color: var(--lime); }
.btn--dark { background: var(--ink); color: #f6f5ef; }
.btn--dark:hover { background: var(--forest); }
.btn--dark .btn-dot { background: var(--lime); color: var(--ink); }
.btn--ghost { color: #fff; border-color: rgba(255,255,255,.55); padding-inline: 20px; backdrop-filter: blur(6px); background: rgba(255,255,255,.06); }
.btn--ghost:hover { background: rgba(255,255,255,.16); }
.btn--block { width: 100%; padding-inline: 20px; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Header (floating pill) ---------- */
.site-header { position: fixed; z-index: 50; top: 12px; left: 12px; right: 12px; }
.header-bar {
  display: flex; align-items: center; gap: 16px; max-width: 1416px; margin-inline: auto;
  padding: 10px 10px 10px 16px;
  background: rgba(236, 233, 222, .92);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-radius: 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 10px 30px rgba(20, 30, 20, .08);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo-mark { width: 40px; height: 40px; border-radius: 50%; }
.logo-wordmark { font-family: var(--f-head); font-weight: 600; font-size: 21px; letter-spacing: -0.03em; color: var(--ink); }
.logo-wordmark-tech { font-weight: 400; color: var(--ink-3); margin-left: 4px; }

.nav { display: flex; gap: 4px; margin-inline: auto; }
.nav-link { font-size: 15.5px; font-weight: 500; text-decoration: none; color: var(--ink); padding: 8px 14px; border-radius: 10px; transition: background .2s; }
.nav-link:hover { background: rgba(31,38,32,.06); }
.nav-link.is-active { background: rgba(31,38,32,.08); }

.header-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(31,38,32,.06); }
.lang-switch__opt { font-family: var(--f-mono); font-size: 12px; font-weight: 500; text-decoration: none; color: var(--ink-2); padding: 6px 9px; border-radius: 8px; line-height: 1; }
.lang-switch__opt.is-active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.header-cta { min-height: 44px; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--ink); cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { width: 18px; height: 1.5px; background: #fff; transition: transform .2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.nav-panel {
  margin-top: 8px; padding: 10px; background: rgba(236, 233, 222, .97);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: 18px; box-shadow: 0 16px 40px rgba(20,30,20,.14); display: grid;
}
.nav-panel[hidden] { display: none; }
.nav-panel a { font-family: var(--f-head); font-size: 22px; font-weight: 500; letter-spacing: -0.02em; text-decoration: none; padding: 12px; border-radius: 10px; }
.nav-panel a + a { border-top: 1px solid var(--line); }

@media (max-width: 959px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 379px) { .logo-wordmark { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; min-height: max(640px, 100svh);
  display: grid; place-items: center; padding: 140px var(--gutter) 180px;
  color: #fff; overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; background: #1d3a2a url("images/hero-poster.jpg") center/cover; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }
/* never show iOS's own play button over the background video */
.hero-video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
.hero-video::-webkit-media-controls { display: none !important; }
/* Low Power Mode fallback: a 6 s seamless animated loop of the same forest */
.hero-loop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(10, 24, 16, .45), transparent 70%),
    linear-gradient(180deg, rgba(10,24,16,.35) 0%, rgba(10,24,16,.15) 40%, rgba(10,24,16,.45) 100%);
}
.hero-content { text-align: center; max-width: 900px; position: relative; }
.hero-title { font-family: var(--f-head); font-weight: 500; font-size: clamp(44px, 7.4vw, 104px); line-height: .98; letter-spacing: -0.045em; text-shadow: 0 2px 30px rgba(0,0,0,.18); }
.hero-lead { margin: 28px auto 0; max-width: 32em; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; color: rgba(255,255,255,.9); }
.hero-ctas { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Trust (curved paper panel rising into the hero) ---------- */
.trust {
  position: relative; z-index: 2; margin-top: -110px;
  padding: 92px 0 clamp(64px, 8vw, 110px); background: var(--paper);
  border-radius: 50% 50% 0 0 / 110px 110px 0 0; text-align: center;
}
.trust-title { font-family: var(--f-head); font-weight: 500; font-size: clamp(26px, 3.6vw, 44px); letter-spacing: -0.03em; line-height: 1.1; padding-inline: var(--gutter); }
.marquee {
  margin-top: clamp(32px, 4vw, 56px); display: flex; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  list-style: none; padding: 0; margin: 0; display: flex; align-items: center; flex: none;
  gap: clamp(48px, 7vw, 110px); padding-right: clamp(48px, 7vw, 110px);
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track img { width: auto; filter: grayscale(1) contrast(1.1); opacity: .78; }
.marquee-track .logo-ei { height: 46px; }
.marquee-track .logo-fc { height: 48px; }
.marquee-track .logo-sbc { height: 30px; }
.marquee-track .logo-ndrc { height: 30px; }
.marquee-track .logo-itu { height: 36px; }
.marquee-track .logo-coillte { height: 30px; }
.marquee-track .logo-tod { height: 50px; }
/* white artwork: invert so it shows on paper */
.marquee-track .logo-fc, .marquee-track .logo-ndrc { filter: invert(1) grayscale(1); }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee-track[aria-hidden] { display: none; }
  .marquee { justify-content: center; flex-wrap: wrap; -webkit-mask-image: none; mask-image: none; }
}

/* ---------- Shapes ---------- */
.shape-arch { border-radius: var(--r-xl) var(--r-xl) var(--r-lg) var(--r-lg); overflow: hidden; }
.shape-leaf { border-radius: var(--r-xl) var(--r-lg) var(--r-xl) var(--r-lg); overflow: hidden; }

/* ---------- Story ---------- */
.story { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 96px); align-items: end; padding-block: clamp(40px, 6vw, 80px) clamp(64px, 9vw, 130px); }
.story .display { margin-bottom: 28px; }
.story-media { aspect-ratio: 4 / 4.4; }
.story-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 859px) {
  .story { grid-template-columns: 1fr; }
  .story-media { aspect-ratio: 4 / 3.4; order: -1; }
}

/* ---------- Section head ---------- */
.section-head { max-width: 820px; margin-bottom: clamp(40px, 6vw, 80px); }

/* ---------- Browser frame (screenshots always shown whole) ---------- */
.frame { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid rgba(19,34,26,.08); }
.frame-bar { display: flex; gap: 6px; padding: 10px 12px; background: #f1f3ef; border-bottom: 1px solid rgba(19,34,26,.08); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d3d9d2; }
.frame-bar i:first-child { background: #f39a6b; }
.frame img { width: 100%; height: auto; }

/* ---------- How it works: stepper ---------- */
.how { padding-top: clamp(80px, 11vw, 160px); }
.story + .how { padding-top: clamp(16px, 3vw, 40px); }
.stepper { display: grid; grid-template-columns: minmax(280px, 0.8fr) 1.4fr; gap: clamp(20px, 3vw, 40px); align-items: stretch; }
.stepper-list { display: flex; flex-direction: column; gap: 8px; }
.stepper-tab {
  position: relative; overflow: hidden; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: start;
  padding: 20px 22px; border-radius: 20px; border: 1px solid transparent;
  background: transparent; color: var(--ink-3); font: inherit;
  transition: background .3s, color .3s, border-color .3s;
}
.stepper-tab:hover { color: var(--ink); background: rgba(31,38,32,.04); }
.stepper-tab.is-active { background: var(--paper-2); color: var(--ink); border-color: var(--line); }
.stepper-num { font-family: var(--f-mono); font-size: 13px; padding-top: 6px; }
.stepper-tab.is-active .stepper-num { color: var(--forest-2); }
.stepper-title { display: block; font-family: var(--f-head); font-weight: 500; font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -0.03em; line-height: 1.15; }
.stepper-desc {
  display: block; overflow: hidden; max-height: 0; opacity: 0;
  color: var(--ink-2); font-size: 15.5px; line-height: 1.55;
  transition: max-height .45s ease, opacity .35s ease, margin .35s ease;
}
.stepper-tab.is-active .stepper-desc { max-height: 8em; opacity: 1; margin-top: 8px; }
.stepper-bar { position: absolute; left: 22px; right: 22px; bottom: 0; height: 2px; background: transparent; }
.stepper-bar i { display: block; height: 100%; width: 0; background: var(--forest-2); border-radius: 2px; }
.stepper.is-running .stepper-tab.is-active .stepper-bar i { animation: step-progress var(--step-ms, 6000ms) linear forwards; }
.stepper.is-paused .stepper-tab.is-active .stepper-bar i { animation-play-state: paused; }
@keyframes step-progress { to { width: 100%; } }

.stepper-stage {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--r-lg); background: var(--forest);
  display: grid; min-height: clamp(320px, 38vw, 560px);
}
.stage-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) brightness(.6); }
.stage-panel { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; padding: clamp(20px, 4vw, 52px); }
/* hidden panels keep their space (visibility, not display) so the stage never changes height */
.stage-panel[hidden] { display: flex; visibility: hidden; pointer-events: none; }
.stage-panel.is-active { animation: stage-in .6s cubic-bezier(.2,.7,.2,1); }
@keyframes stage-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.stage-panel .frame { width: 100%; box-shadow: 0 30px 70px rgba(5, 15, 10, .45); }
/* ---- steps 1 + 2: real photos from the field pilot, with live overlays ---- */
.stage-panel--pilot { gap: clamp(18px, 3vw, 40px); }
.pilot-photo {
  position: relative; flex: none; width: min(48%, 420px); aspect-ratio: 3 / 4;
  border-radius: 22px; overflow: hidden; box-shadow: 0 30px 70px rgba(5, 15, 10, .5);
}
.pilot-photo img { width: 100%; height: 100%; object-fit: cover; }
.pilot-tag {
  position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #fff;
  background: rgba(10, 20, 14, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 5px 10px;
}
.rec-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ember); animation: blink 1.2s ease-in-out infinite; }

/* step 1: detection box locks onto the node (positions are % of the photo) */
.lock-box { position: absolute; left: 27%; top: 28%; width: 35%; height: 34%; }
.lock-box i { position: absolute; width: 24%; height: 24%; border: 2.5px solid var(--lime); }
.lock-box i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.lock-box i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.lock-box i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.lock-box i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.stage-panel.is-active .lock-box { animation: lock-on .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes lock-on { from { transform: scale(1.25); opacity: 0; } to { transform: none; opacity: 1; } }
.lock-box .scan {
  position: absolute; left: 4%; right: 4%; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  box-shadow: 0 0 14px 2px rgba(200,242,123,.6);
  animation: scan 2.4s ease-in-out infinite alternate;
}
@keyframes scan { to { top: 100%; } }
.lock-box em {
  position: absolute; left: 0; bottom: calc(100% + 8px); font-style: normal;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); background: var(--lime); border-radius: 6px; padding: 3px 7px; white-space: nowrap;
}

/* readout cards beside the photo */
.readouts, .uplink { list-style: none; padding: 0; margin: 0; flex: 1; min-width: 0; max-width: 340px; display: grid; gap: 10px; }
.readout {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px;
  padding: 14px 16px; border-radius: 16px; color: #fff;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.readout-ic { grid-row: span 2; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(200,242,123,.16); color: var(--lime); }
.readout-ic svg { width: 20px; height: 20px; }
.readout-label { font-family: var(--f-head); font-weight: 500; font-size: 16px; }
.trace { width: 100%; height: 26px; overflow: hidden; }
.trace path { fill: none; stroke: var(--lime); stroke-width: 1.8; stroke-linejoin: round; vector-effect: non-scaling-stroke; animation: trace-scroll 4s linear infinite; }
.readout:nth-child(2) .trace path { animation-duration: 5s; }
.readout:nth-child(3) .trace path { animation-duration: 6s; }
@keyframes trace-scroll { to { transform: translateX(-120px); } }
.readout-status {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 4px 0;
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.8);
}
.readout-status .live-dot { background: var(--lime); }
.stage-panel.is-active .readout { animation: stage-in .6s cubic-bezier(.2,.7,.2,1) both; }
.stage-panel.is-active .readout:nth-child(2) { animation-delay: .1s; }
.stage-panel.is-active .readout:nth-child(3) { animation-delay: .2s; }

/* step 2: radio waves from the node (positions are % of the photo) */
.radio { position: absolute; left: 50%; top: 55%; width: 0; height: 0; }
.gw-label {
  position: absolute; left: 50%; top: 55%; transform: translate(-50%, -360%);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  color: var(--ink); background: var(--lime); border-radius: 6px; padding: 3px 7px;
}
.gw-label::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 22px; margin-left: -.75px; background: var(--lime); }
.radio i {
  position: absolute; left: -20px; top: -20px; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--lime); opacity: 0; animation: wave 2.4s ease-out infinite;
}
.radio i:nth-child(2) { animation-delay: .8s; }
.radio i:nth-child(3) { animation-delay: 1.6s; }
@keyframes wave { 0% { transform: scale(.6); opacity: .95; } 100% { transform: scale(5.5); opacity: 0; } }

/* uplink chain: node -> gateway -> cloud with travelling packets */
.uplink { gap: 0; }
.hop {
  display: flex; align-items: center; gap: 12px; color: #fff;
  padding: 12px 16px; border-radius: 16px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.hop-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(200,242,123,.16); color: var(--lime); flex: none; }
.hop-ic svg { width: 20px; height: 20px; }
.hop-label { font-family: var(--f-head); font-weight: 500; font-size: 16px; }
.hop--cloud { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.hop--cloud .hop-ic { background: rgba(31,38,32,.12); color: var(--ink); }
.link { position: relative; height: 44px; margin-left: 34px; width: 2px; background: repeating-linear-gradient(180deg, rgba(200,242,123,.6) 0 5px, transparent 5px 10px); }
.link b {
  position: absolute; left: -4px; top: -6px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 12px 3px rgba(200,242,123,.7);
  animation: packet 1.6s linear infinite;
}
.link b:nth-child(2) { animation-delay: .8s; }
.link + .hop + .link b { animation-delay: .4s; }
.link + .hop + .link b:nth-child(2) { animation-delay: 1.2s; }
@keyframes packet { from { top: -6px; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } to { top: calc(100% - 4px); opacity: 0; } }
.uplink-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.uplink-tags span {
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: #fff;
  border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 5px 10px;
}

/* ---- step 3: animated rebuild of the forecast dashboard ---- */
.stage-panel .frame.dash { width: 100%; max-width: 720px; background: #fff; }
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #111a14; color: #fff; }
.dash-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.dash-brand img { width: 22px; height: 22px; border-radius: 50%; }
.dash-tabs { display: flex; gap: 14px; font-size: 11.5px; color: rgba(255,255,255,.6); }
.dash-tabs b { font-weight: 500; padding-bottom: 3px; }
.dash-tabs b.on { color: #6fe39b; border-bottom: 2px solid #6fe39b; }
.dash-body { padding: clamp(12px, 2vw, 20px); display: grid; gap: 12px; background: #f6f8f5; color: #18231c; }
.dash-titlebar { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dash-title { font-weight: 700; font-size: clamp(14px, 1.5vw, 17px); }
.dash-sync { position: relative; font-size: 11.5px; color: #6b7a70; min-width: 110px; text-align: right; }
.dash-sync span { display: inline-flex; align-items: center; gap: 6px; }
.sync-busy i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #b8c7bd; border-top-color: #1e7a4c; animation: spin .8s linear infinite; }
.sync-done { position: absolute; right: 0; top: 0; color: #1e7a4c; opacity: 0; white-space: nowrap; }
.sync-done::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2fbf6c; }
.stage-panel.is-active .sync-busy { animation: show-then-hide 2.8s steps(1) both; }
.stage-panel.is-active .sync-done { animation: hide-then-show 2.8s steps(1) both; }
@keyframes show-then-hide { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hide-then-show { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

.dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid #e3e9e4; }
.kpi-k { font-size: 10.5px; color: #6b7a70; }
.kpi-v { font-weight: 700; font-size: clamp(12px, 1.2vw, 14px); line-height: 1.2; }
.kpi-v--amber { color: #e0761f; }
.kpi-ring { width: 36px; height: 36px; flex: none; transform: rotate(-90deg); }
.kpi-ring circle { fill: none; stroke-width: 5; }
.kr-bg { stroke: #eef1ee; }
.kr-fg { stroke: #f08a2c; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 58; }
.stage-panel.is-active .kr-fg { animation: ring-to-42 1.6s cubic-bezier(.2,.7,.2,1) .3s both; }
@keyframes ring-to-42 { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 58; } }
.kpi-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; }
.kpi-ic svg { width: 18px; height: 18px; }
.kpi-ic--amber { background: #fff1e4; color: #e0761f; }
.kpi-ic--green { background: #e6f6ec; color: #1e9b57; }
.stage-panel.is-active .kpi { animation: feed-in .5s ease both; }
.stage-panel.is-active .kpi:nth-child(2) { animation-delay: .15s; }
.stage-panel.is-active .kpi:nth-child(3) { animation-delay: .3s; }
@keyframes feed-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.dash-chart { background: #fff; border: 1px solid #e3e9e4; border-radius: 12px; padding: 12px 12px 8px; }
.chart-k { font-size: 11px; font-weight: 600; color: #3e4c43; margin-bottom: 8px; }
.dash-chart svg { width: 100%; height: clamp(110px, 14vw, 170px); display: block; }
.band--high { fill: #fdecea; } .band--mod { fill: #fff6e9; } .band--low { fill: #edf8f0; }
.area { fill: rgba(240, 138, 44, .09); opacity: 1; }
.line { fill: none; stroke: #f08a2c; stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; }
.pts circle { fill: #fff; stroke: #f08a2c; stroke-width: 2.5; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; }
.pts .peak { fill: #f08a2c; }
.stage-panel.is-active .line { animation: draw 1.9s cubic-bezier(.45,0,.25,1) .5s both; }
.stage-panel.is-active .area { animation: fade-in .8s ease 2s both; }
.stage-panel.is-active .pts circle { animation: pop .35s ease both; }
.stage-panel.is-active .pts circle:nth-child(1) { animation-delay: .6s; } .stage-panel.is-active .pts circle:nth-child(2) { animation-delay: .85s; }
.stage-panel.is-active .pts circle:nth-child(3) { animation-delay: 1.1s; }
.stage-panel.is-active .pts circle:nth-child(4) { animation: pop .35s ease 1.35s both, peak 1.6s ease-in-out 2.4s infinite; }
.stage-panel.is-active .pts circle:nth-child(5) { animation-delay: 1.6s; } .stage-panel.is-active .pts circle:nth-child(6) { animation-delay: 1.85s; }
.stage-panel.is-active .pts circle:nth-child(7) { animation-delay: 2.1s; }
@keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes peak { 50% { transform: scale(1.5); } }
.chart-days { display: flex; justify-content: space-between; padding: 6px 4px 0; font-size: 10.5px; color: #7b897f; }

.dash-inputs { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-inputs span {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: #3e4c43;
  padding: 5px 10px; border-radius: 999px; background: #fff; border: 1px solid #e3e9e4;
}
.dash-inputs span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2fbf6c; }
.stage-panel.is-active .dash-inputs span { animation: chip-flash 1s ease both; }
.stage-panel.is-active .dash-inputs span:nth-child(2) { animation-delay: .25s; }
.stage-panel.is-active .dash-inputs span:nth-child(3) { animation-delay: .5s; }
@keyframes chip-flash { 0% { opacity: 0; } 30% { opacity: 1; background: #dff7b9; border-color: #c8f27b; } 100% { opacity: 1; } }

/* ---- step 3: platform spread outlook + settlements to watch ---- */
.stage-panel, .frame.dash, .dash-body, .dash-split, .dash-split > *, .dash-titlebar { min-width: 0; }
.demo-chip { white-space: nowrap; margin-left: 8px; vertical-align: middle; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #6b7a70; background: #e9eee9; border-radius: 6px; padding: 2px 6px; }
.dash-split { display: grid; grid-template-columns: 1.55fr 1fr; gap: 10px; }

.spreadmap { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 400 / 260; background: #2b3b2c; }
.spreadmap .sm-sat { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.88) contrast(1.05); }
.stage-panel.is-active .spreadmap .sm-sat { animation: sat-in 1.2s ease both; }
.spreadmap > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sm-circle { fill: rgba(239,68,68,.06); stroke: #ef4444; stroke-width: 2.5; stroke-dasharray: 10 8; vector-effect: non-scaling-stroke; }
.sm-cone { fill: rgba(239,68,68,.22); stroke: #f87171; stroke-width: 1; vector-effect: non-scaling-stroke; transform-origin: 150px 150px; }
.sm-axis { fill: none; stroke: #b91c1c; stroke-width: 2.5; stroke-dasharray: 10 8; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sm-neck { fill: none; stroke: #dc2626; stroke-width: 9; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sm-tip { fill: #dc2626; stroke: #991b1b; stroke-width: 1; vector-effect: non-scaling-stroke; }
.sm-site { fill: none; stroke: #22c55e; stroke-width: 2.75; vector-effect: non-scaling-stroke; }
.stage-panel.is-active .sm-circle { animation: fade-in .5s ease .2s both; }
.stage-panel.is-active .sm-cone { animation: cone-open .9s cubic-bezier(.2,.7,.2,1) .7s both, cone-hover .4s ease 2.1s forwards; }
.stage-panel.is-active .sm-axis, .stage-panel.is-active .sm-neck, .stage-panel.is-active .sm-tip { animation: fade-in .4s ease 1.2s both; }
@keyframes cone-open { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cone-hover { to { fill: rgba(239,68,68,.4); stroke: #fecaca; stroke-width: 2; } }

.sm-dir, .sm-legend, .sm-compass {
  position: absolute; font-size: 10px; font-weight: 600; color: #fff;
  background: rgba(17, 24, 20, .72); border-radius: 6px; padding: 3px 7px; backdrop-filter: blur(4px);
}
.sm-dir { right: 3%; top: 5%; color: #fecaca; }
.stage-panel.is-active .sm-dir { animation: fade-in .4s ease 1.3s both; }
.sm-legend { left: 3%; bottom: 5%; display: inline-flex; align-items: center; gap: 5px; font-weight: 500; }
.sm-legend i { width: 12px; height: 8px; border-radius: 2px; }
.lg-circle { border: 1.5px dashed #ef4444; } .lg-cone { background: rgba(239,68,68,.55); margin-left: 4px; }
.sm-compass { right: 3%; bottom: 5%; width: 24px; height: 24px; padding: 0; border-radius: 50%; display: grid; place-items: center; }
.sm-compass b { font-size: 9px; position: relative; top: 1px; }
.sm-compass::before { content: ""; position: absolute; top: 3px; left: 50%; margin-left: -3px; border: 3px solid transparent; border-bottom: 5px solid #ef4444; border-top: 0; }

.sm-village {
  position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; color: #1f2a23; white-space: nowrap;
  background: rgba(255,255,255,.94); border-radius: 6px; padding: 2px 6px 2px 4px; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.sm-village i { width: 11px; height: 11px; background: #4b5a50; clip-path: polygon(50% 0, 100% 45%, 86% 45%, 86% 100%, 14% 100%, 14% 45%, 0 45%); }
.stage-panel.is-active .sm-village { animation: fade-in .4s ease .4s both; }
.stage-panel.is-active .sm-village--a, .stage-panel.is-active .sm-village--b { animation: fade-in .4s ease .4s both, village-hit 1.4s ease-in-out 2.3s infinite; }
.stage-panel.is-active .sm-village--a i, .stage-panel.is-active .sm-village--b i { animation: village-ic .01s linear 2.3s forwards; }
@keyframes village-hit { 0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.65), 0 1px 4px rgba(0,0,0,.3); } 50% { box-shadow: 0 0 0 7px rgba(239,68,68,0), 0 1px 4px rgba(0,0,0,.3); color: #b91c1c; } }
@keyframes village-ic { to { background: #ef4444; } }

.cursor { position: absolute; left: 90%; top: 92%; width: 20px; height: 20px; z-index: 3; opacity: 0; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.cursor svg { width: 100%; height: 100%; }
.stage-panel.is-active .cursor { animation: cursor-move 1.4s cubic-bezier(.5,0,.2,1) .7s forwards; }
@keyframes cursor-move { 0% { opacity: 0; left: 90%; top: 92%; } 15% { opacity: 1; } 100% { opacity: 1; left: 50%; top: 47%; } }

/* settlements to watch (same structure as the My Forest panel) */
.watch { display: flex; flex-direction: column; gap: 8px; }
.watch-k { font-size: 10px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.watch-list { border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; overflow: hidden; }
.watch-row { padding: 8px 10px; font-size: 11.5px; transition: background .3s; }
.watch-row + .watch-row { border-top: 1px solid #f3f4f6; }
.wr-top { display: flex; align-items: baseline; gap: 6px; }
.wr-top b { flex: 1; font-weight: 600; color: #111; }
.wr-top span { color: #6b7280; font-variant-numeric: tabular-nums; }
.wr-why { margin-top: 2px; color: #6b7280; }
.wr-approach { margin-top: 6px; padding-left: 8px; border-left: 2px solid #fde68a; font-size: 10.5px; }
.wr-approach p:first-child { color: #92400e; }
.wr-spot { color: #374151; margin-top: 2px; }
.wr-note { color: #9ca3af; font-size: 9.5px; margin-top: 2px; }
.watch-btn { text-align: center; font-size: 11.5px; font-weight: 600; color: #fff; background: #15803d; border-radius: 8px; padding: 8px 10px; }
.stage-panel.is-active .watch-row { animation: feed-in .4s ease both, row-hot .6s ease forwards; }
.stage-panel.is-active .watch-row--1 { animation-delay: 2.2s, 2.4s; }
.stage-panel.is-active .watch-row--2 { animation-delay: 2.45s, 2.65s; }
.stage-panel.is-active .watch-row--3 { animation-delay: 2.7s, 99s; }
@keyframes row-hot { to { background: #fef2f2; } }

@media (max-width: 639px) {
  .dash-split { grid-template-columns: 1fr; }
  .sm-village { font-size: 9px; }
  .sm-legend { display: none; }
}
@media (max-width: 379px) {
  .stage-panel--app { padding: 12px; }
  .dash-sync { min-width: 0; }
  .demo-chip { margin-left: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-panel.is-active :is(.sm-circle, .sm-cone, .sm-axis, .sm-neck, .sm-tip, .sm-dir, .sm-village, .sm-village i, .cursor, .watch-row) { animation: none; }
  .cursor { opacity: 1; left: 50%; top: 47%; }
  .sm-village--a i, .sm-village--b i { background: #ef4444; }
}

/* ---- step 4: dashboard flags the risk, SMS goes to a phone ---- */
.respond { position: relative; width: 100%; display: flex; align-items: center; min-height: 440px; }
.stage-panel .frame.respond-dash { width: 74%; box-shadow: 0 30px 70px rgba(5, 15, 10, .45); }
.shot { position: relative; overflow: hidden; }
.shot img { width: 100%; height: auto; }
.hotspot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 0 rgba(240,112,60,.7); animation: hot 1.6s ease-out infinite; }
@keyframes hot { 0% { box-shadow: 0 0 0 0 rgba(240,112,60,.75); } 100% { box-shadow: 0 0 0 26px rgba(240,112,60,0); } }
.send-pill {
  position: absolute; left: 76%; top: 37%; transform: translate(-85%, -150%);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: var(--ember); border-radius: 999px; padding: 5px 9px; box-shadow: 0 8px 20px rgba(240,112,60,.4);
}
.send-pill svg { width: 12px; height: 12px; }
.stage-panel.is-active .send-pill { animation: pill-in .45s cubic-bezier(.2,.9,.25,1.2) .4s both; }
@keyframes pill-in { from { opacity: 0; transform: translate(-85%, -100%) scale(.8); } to { opacity: 1; transform: translate(-85%, -150%); } }

.flight { position: absolute; left: 56%; top: 6%; width: 26%; height: 34%; overflow: visible; pointer-events: none; }
.flight-path { fill: none; stroke: rgba(200,242,123,.55); stroke-width: 2; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.flight-comet { fill: none; stroke: var(--lime); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 10 100; stroke-dashoffset: -100; filter: drop-shadow(0 0 6px rgba(200,242,123,.9)); }
.stage-panel.is-active .flight-comet { animation: comet 1.2s cubic-bezier(.5,0,.3,1) 1s both; }
@keyframes comet { from { stroke-dashoffset: 10; } to { stroke-dashoffset: -100; } }

.phone {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: clamp(190px, 30%, 230px); aspect-ratio: 9 / 18.5;
  border-radius: 34px; padding: 10px; background: #0d1410;
  box-shadow: 0 0 0 2px #2b332e inset, 0 30px 70px rgba(0,0,0,.55);
  display: flex; flex-direction: column; overflow: hidden;
}
.phone-notch { position: absolute; left: 50%; top: 14px; width: 70px; height: 20px; margin-left: -35px; border-radius: 12px; background: #000; z-index: 2; }
.phone-head { margin-top: 38px; display: grid; justify-items: center; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; }
.ph-avatar img { width: 34px; height: 34px; border-radius: 50%; }
.ph-name { font-weight: 600; font-size: 12.5px; }
.ph-sub { font-size: 10px; color: rgba(255,255,255,.5); }
.phone-thread { flex: 1; padding: 12px 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: #0d1410; }
.typing { display: inline-flex; gap: 4px; padding: 9px 11px; border-radius: 16px; background: #26302a; opacity: 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); animation: dots 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { transform: translateY(-3px); opacity: .4; } }
.stage-panel.is-active .typing { animation: typing-window 3.5s steps(1) both; }
@keyframes typing-window { 0% { opacity: 0; } 68% { opacity: 1; } 100% { opacity: 0; height: 0; padding: 0; margin: 0; } }
.bubble {
  max-width: 92%; padding: 9px 11px; border-radius: 16px 16px 16px 4px;
  background: #26302a; color: #eef3ef; font-size: 11.5px; line-height: 1.45;
}
.bubble p + p { margin-top: 2px; }
.bubble .hi { color: #ff8a57; }
.stage-panel.is-active .bubble { animation: bubble-in .45s cubic-bezier(.2,.9,.25,1.2) 3.5s both; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(10px) scale(.95); transform-origin: left bottom; } to { opacity: 1; transform: none; } }
.delivered { font-size: 9.5px; color: rgba(255,255,255,.45); padding-left: 4px; }
.stage-panel.is-active .delivered { animation: fade-in .4s ease 4.1s both; }

.phone-banner {
  position: absolute; left: 8px; right: 8px; top: 40px; z-index: 3;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 14px; background: rgba(240,240,236,.96); color: #111;
  box-shadow: 0 10px 24px rgba(0,0,0,.4);
}
.pb-ic img { width: 24px; height: 24px; border-radius: 6px; }
.pb-text { display: grid; font-size: 10.5px; line-height: 1.25; }
.pb-text b { font-size: 11px; }
.pb-time { font-size: 9.5px; color: #777; align-self: start; }
.stage-panel.is-active .phone-banner { animation: banner 2.6s cubic-bezier(.2,.9,.25,1) 2.2s both; }
@keyframes banner { 0% { opacity: 0; transform: translateY(-60px); } 18% { opacity: 1; transform: none; } 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-60px); } }

@media (max-width: 639px) {
  .dash-kpis { grid-template-columns: 1fr; gap: 6px; }
  .dash-tabs b:not(.on) { display: none; }
  .respond { flex-direction: column; min-height: 0; gap: 18px; }
  .stage-panel .frame.respond-dash { width: 100%; }
  .flight { display: none; }
  .send-pill { font-size: 9.5px; padding: 4px 8px; }
  .phone { position: relative; right: auto; top: auto; transform: none; width: 210px; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-panel.is-active :is(.sync-busy, .sync-done, .kr-fg, .kpi, .line, .area, .pts circle, .dash-inputs span,
    .send-pill, .flight-comet, .typing, .bubble, .delivered, .phone-banner) { animation: none; }
  .sync-busy { opacity: 0; } .sync-done { opacity: 1; }
  .hotspot, .sync-busy i, .typing i { animation: none; }
}

@media (max-width: 1099px) {
  .stepper { grid-template-columns: 1fr; }
  .stepper-stage { min-height: 0; }
  .stepper-tab { padding: 16px 18px; }
}
@media (max-width: 639px) {
  .stage-panel--pilot { flex-direction: column; align-items: stretch; }
  .pilot-photo { width: min(100%, 300px); align-self: center; }
  .readouts, .uplink { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-panel.is-active, .stage-panel.is-active .lock-box, .stage-panel.is-active .readout,
  .lock-box .scan, .trace path, .radio i, .link b, .rec-dot { animation: none; }
  .radio i:first-child { opacity: .8; transform: scale(1.6); }
}

/* ---------- Stats (each card animates its own little visual) ---------- */
.stats { padding-top: clamp(80px, 11vw, 160px); }
.stat-grid { margin-top: clamp(40px, 5vw, 72px); display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 24px); }
.stat-card {
  position: relative; overflow: hidden;
  background: var(--paper-2); border-radius: 36px; padding: clamp(24px, 2.4vw, 36px);
  min-height: clamp(240px, 23vw, 320px); display: flex; flex-direction: column; justify-content: flex-end; gap: 18px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), background .35s;
}
.stat-card:hover { transform: translateY(-6px); background: #e3dfd0; }
.stat-val {
  font-family: var(--f-head); font-weight: 500; font-size: clamp(48px, 5vw, 80px); letter-spacing: -0.05em; line-height: 1;
  font-variant-numeric: tabular-nums; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .12em;
}
.stat-unit { font-size: .42em; letter-spacing: -0.02em; color: var(--ink-2); }
.stat-label {
  align-self: flex-start; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase;
  background: var(--paper-3); border-radius: 10px; padding: 9px 12px;
}
.live-pill {
  align-self: center; margin-left: 10px; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--forest-2); background: rgba(200,242,123,.45); border-radius: 999px; padding: 4px 9px;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--forest-2); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* visuals sit in the top-right corner of each card */
.viz { position: absolute; top: clamp(20px, 2.2vw, 30px); right: clamp(20px, 2.2vw, 30px); width: clamp(64px, 6vw, 84px); height: clamp(64px, 6vw, 84px); }

/* 95% — ring fills */
.viz-ring { transform: rotate(-90deg); }
.viz-ring circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: var(--paper-3); }
.ring-fg { stroke: var(--forest-2); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s cubic-bezier(.2,.7,.2,1) .2s; }
.stats.is-visible .ring-fg { stroke-dashoffset: 5; }

/* 7 days — forecast bars grow, one day spikes */
.viz-bars { display: flex; align-items: flex-end; gap: 4px; }
.viz-bars i { flex: 1; height: calc(var(--h) * 100%); border-radius: 3px; background: var(--forest-2); opacity: .75; transform: scaleY(0); transform-origin: bottom; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.viz-bars i.hot { background: var(--ember); opacity: 1; }
.stats.is-visible .viz-bars i { transform: scaleY(1); }
.viz-bars i:nth-child(2) { transition-delay: .08s; } .viz-bars i:nth-child(3) { transition-delay: .16s; }
.viz-bars i:nth-child(4) { transition-delay: .24s; } .viz-bars i:nth-child(5) { transition-delay: .32s; }
.viz-bars i:nth-child(6) { transition-delay: .40s; } .viz-bars i:nth-child(7) { transition-delay: .48s; }

/* 24/7 — clock hand keeps sweeping */
.clock-face { fill: none; stroke: var(--paper-3); stroke-width: 5; }
.clock-ticks path { stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; }
.clock-hand { stroke: var(--forest-2); stroke-width: 3; stroke-linecap: round; transform-origin: 32px 32px; animation: sweep 6s linear infinite; }
.clock-dot { fill: var(--lime); stroke: var(--forest-2); stroke-width: 2; }
@keyframes sweep { to { transform: rotate(360deg); } }

/* 10+ years — battery charges cell by cell */
.viz-battery {
  height: clamp(36px, 3.4vw, 44px); display: flex; gap: 4px; padding: 5px;
  border: 2.5px solid var(--ink-2); border-radius: 9px;
}
.viz-battery::after { content: ""; position: absolute; right: -8px; top: 30%; width: 5px; height: 40%; border-radius: 0 3px 3px 0; background: var(--ink-2); }
.viz-battery .cell { flex: 1; border-radius: 3px; background: var(--forest-2); opacity: .12; transition: opacity .3s, background .3s; }
.stats.is-visible .viz-battery .cell { opacity: 1; }
.viz-battery .cell:nth-child(1) { transition-delay: .2s; } .viz-battery .cell:nth-child(2) { transition-delay: .45s; }
.viz-battery .cell:nth-child(3) { transition-delay: .7s; } .viz-battery .cell:nth-child(4) { transition-delay: .95s; }
.viz-battery .cell:nth-child(5) { transition-delay: 1.2s; background: var(--lime); }

@media (max-width: 959px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 479px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { border-radius: 26px; min-height: 180px; }
}
@media (prefers-reduced-motion: reduce) {
  .clock-hand, .live-dot { animation: none; }
  .ring-fg, .viz-bars i, .viz-battery .cell { transition: none; }
}

/* ==========================================================================
   Card sections — Services + Team (kept from the card design)
   ========================================================================== */
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--brand); text-decoration: none; }
.link-arrow span { transition: transform .2s; }
.svc-card:hover .link-arrow span, .link-arrow:hover span { transform: translateX(3px); }

/* Team */
.team { padding-top: clamp(80px, 11vw, 160px); }
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 24px); }
.member {
  display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: start;
  background: var(--surface); border: 1px solid var(--card-line); border-radius: var(--r-card); padding: clamp(20px, 2.4vw, 28px);
}
.member-photo { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 20%; border-radius: 18px; }
.member-role { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--brand); margin-bottom: 4px; }
.member-name { font-family: var(--f-card); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; margin-bottom: 10px; }
.member-body p:not(.member-role) { color: var(--ink-2); font-size: 15px; line-height: 1.6; margin-bottom: 14px; }
@media (max-width: 1023px) { .team-grid { grid-template-columns: 1fr; } }
@media (max-width: 519px) { .member { grid-template-columns: 1fr; } .member-photo { max-width: 180px; } }

/* ==========================================================================
   GridGuard — the page falls into night and the grid lights up
   ========================================================================== */
/* The lights go out: a fixed veil darkens the whole page as GridGuard approaches,
   and lifts again after it. --night (0..1) is set on <html> by the reveal script. */
.night-veil { position: fixed; inset: 0; z-index: 40; background: #070b09; opacity: var(--night, 0); pointer-events: none; }
.gg {
  --night: #070b09; --night-2: #0d1310; --night-3: #141c17;
  --amber: #f59e0b; --amber-2: #fbbf24; --fire: #ef4444;
  position: relative; z-index: 41; margin-top: clamp(80px, 11vw, 160px); color: #e8eee9;
  overflow-x: clip; /* the full-bleed night behind the stepper must not cause sideways scroll */
}
/* after the stepper, night melts back into paper */
.gg::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 40vh; background: linear-gradient(to bottom, var(--night), rgba(7,11,9,0)); pointer-events: none; }

.gg-reveal { --p: 0; height: 330vh; position: relative; }
.gg-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }

/* the network: hair-thin, draws slowly while the camera pulls back */
.gg-net {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform: scale(calc(1.22 - .22 * clamp(0, (var(--p) - .12) / .55, 1)));
  transform-origin: 62% 56%;
  opacity: calc(1 - clamp(0, (var(--p) - .93) / .07, 1) * .6);
  will-change: transform, opacity; backface-visibility: hidden;
}
.gg-dust { opacity: clamp(0, (var(--p) - .1) / .2, 1); }
.gg-dust circle { fill: #fde68a; opacity: var(--a, .5); }
/* stars stay still: 70 twinkling circles made the whole full-screen SVG repaint every
   frame, which made the pinned stage stutter while scrolling */
/* the flow pulses and the spark pause while the page is scrolling (the script sets
   .is-scrolling on <html>), so a scroll frame only repaints what the scroll changes */
.is-scrolling .gg-flowlines path, .is-scrolling .gg-spark { animation-play-state: paused; }
.gg-lines path {
  fill: none; stroke: var(--amber); stroke-width: .9; stroke-linecap: round; stroke-linejoin: round; opacity: .6;
  stroke-dasharray: 1; stroke-dashoffset: calc(1 - clamp(0, (var(--p) - .16) / .4, 1));
}
.gg-flowlines path {
  fill: none; stroke: #fff7d6; stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: .012 .188;
  opacity: calc(clamp(0, (var(--p) - .62) / .1, 1) * .9); filter: drop-shadow(0 0 3px #fbbf24);
  animation: flow 4s linear infinite;
}
.gg-flowlines path:nth-child(2) { animation-duration: 3.2s; } .gg-flowlines path:nth-child(3) { animation-duration: 2.6s; }
.gg-risk path {
  fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - clamp(0, (var(--p) - .66) / .16, 1));
}
.gg-risk .r-amber { stroke: var(--amber-2); filter: drop-shadow(0 0 4px rgba(251,191,36,.9)); }
.gg-risk .r-red { stroke: #ff5a4f; filter: drop-shadow(0 0 6px rgba(239,68,68,1)) drop-shadow(0 0 14px rgba(239,68,68,.6)); }
.gg-towers rect { fill: none; stroke: var(--amber); stroke-width: .9; opacity: calc(clamp(0, (var(--p) - .3) / .2, 1) * .9); }
.gg-subs rect { fill: var(--night); stroke: var(--amber-2); stroke-width: 1.2; opacity: calc(clamp(0, (var(--p) - .34) / .2, 1)); filter: drop-shadow(0 0 6px rgba(251,191,36,.5)); }
.gg-spark { fill: #fff; opacity: calc(clamp(0, (var(--p) - .8) / .05, 1)); filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 16px var(--fire)); animation: spark 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spark { 50% { transform: scale(1.8); } }
.gg-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40% 35% at 64% 58%, rgba(239,68,68,.2), transparent 70%), radial-gradient(60% 50% at 50% 50%, rgba(245,158,11,.07), transparent 70%);
  opacity: calc(clamp(0, (var(--p) - .62) / .2, 1));
}

/* the title resolves out of the dark, then drifts away as you move on */
.gg-intro {
  --out: clamp(0, (var(--p) - .9) / .1, 1);
  position: relative; z-index: 1; isolation: isolate; text-align: center; padding: 0 var(--gutter); max-width: 900px;
  opacity: calc(1 - var(--out)); transform: translate3d(0, calc(var(--out) * -48px), 0);
}
.gg-intro::before { content: ""; position: absolute; inset: -18% -12%; z-index: -1; background: radial-gradient(closest-side, rgba(7,11,9,.9), rgba(7,11,9,.6) 55%, transparent); opacity: clamp(0, (var(--p) - .3) / .1, 1); }
.gg-eyebrow {
  --t: clamp(0, (var(--p) - .34) / .09, 1);
  font-family: var(--f-mono); font-size: 13px; text-transform: uppercase; color: var(--amber-2); letter-spacing: .3em;
  opacity: var(--t); filter: blur(calc((1 - var(--t)) * 6px)); transform: translate3d(0, calc((1 - var(--t)) * 8px), 0);
  will-change: opacity, filter, transform;
}
.gg-word {
  --t: clamp(0, (var(--p) - .41) / .16, 1);
  display: inline-flex; align-items: center; gap: .18em; margin-top: 14px;
  font-family: var(--f-head); font-weight: 500; line-height: 1;
  font-size: clamp(56px, 11vw, 150px); color: #fff;
  opacity: var(--t);
  letter-spacing: -0.05em;
  filter: blur(calc((1 - var(--t)) * 16px));
  transform: translate3d(0, 0, 0) scale(calc(1.05 - .05 * var(--t)));
  will-change: opacity, filter, transform;
  text-shadow: 0 0 calc(10px + 40px * var(--t)) rgba(245,158,11,calc(.15 + .25 * var(--t)));
}
.gg-word img { width: .62em; height: .62em; border-radius: 50%; box-shadow: 0 0 30px rgba(245,158,11,.4); }
.gg-line {
  --t: clamp(0, (var(--p) - .54) / .09, 1);
  margin-top: 18px; font-family: var(--f-head); font-weight: 500; font-size: clamp(22px, 3vw, 36px); letter-spacing: -0.03em; color: #fde68a;
  opacity: var(--t); filter: blur(calc((1 - var(--t)) * 8px)); transform: translate3d(0, calc((1 - var(--t)) * 14px), 0);
  will-change: opacity, filter, transform;
}
.gg-sub {
  --t: clamp(0, (var(--p) - .6) / .08, 1);
  margin: 16px auto 0; max-width: 34em; font-size: clamp(15px, 1.3vw, 18px); color: rgba(232,238,233,.75);
  opacity: var(--t); transform: translate3d(0, calc((1 - var(--t)) * 10px), 0);
}
@media (max-width: 759px) { .gg-reveal { height: 260vh; } }
/* Phones and touch screens: same sequence, lighter to draw. Moving blur and glow
   filters, a zooming full-screen SVG and twinkling dust make mobile scrolling stutter. */
@media (max-width: 759px), (hover: none) and (pointer: coarse) {
  /* no pinning on phones: the stage scrolls like any section and the reveal plays by
     itself (the script adds .gg-auto). A pinned, scroll-scrubbed stage flickered on iPhone. */
  .gg-reveal.gg-auto { height: auto; }
  .gg-auto .gg-sticky { position: relative; }
  .night-veil { transition: opacity .6s ease; }
  .gg-net { transform: none; will-change: auto; }
  .gg-eyebrow, .gg-word, .gg-line { will-change: auto; }
  .gg-risk path, .gg-flowlines path, .gg-subs rect, .gg-spark { filter: none; }
  .gg-flowlines path { animation-duration: 6s; }
  .gg-reveal .gg-dust circle { animation: none; }
  .gg-eyebrow, .gg-word, .gg-line { filter: none; }
  .gg-word { text-shadow: 0 0 24px rgba(245,158,11,.3); }
  .gg-spark { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gg-reveal { height: auto; } .gg-sticky { position: relative; min-height: 90vh; }
  .gg-spark, .gg-flowlines path, .gg-reveal .gg-dust circle { animation: none; }
}

/* GridGuard stepper — dark variant of the forest stepper */
.gg-how { position: relative; padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 10vw, 140px); }
.gg-how::before { content: ""; position: absolute; inset: 0 -100vw; z-index: -1; background: var(--night); }
.stepper--dark .stepper-tab { color: rgba(232,238,233,.45); }
.stepper--dark .stepper-tab:hover { color: #fff; background: rgba(255,255,255,.04); }
.stepper--dark .stepper-tab.is-active { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #fff; }
.stepper--dark .stepper-tab.is-active .stepper-num { color: var(--amber-2); }
.stepper--dark .stepper-desc { color: rgba(232,238,233,.72); }
.stepper--dark .stepper-bar i { background: var(--amber); }
.gg-stage { background: radial-gradient(70% 60% at 70% 80%, rgba(239,68,68,.12), transparent 70%), var(--night-2); border: 1px solid rgba(255,255,255,.08); }
.gg-panel { padding: clamp(14px, 3vw, 36px); }

.ggapp { width: 100%; max-width: 720px; display: grid; gap: 10px; padding: 12px; border-radius: 18px; background: #0f1512; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 0 1px rgba(245,158,11,.04); color: #e8eee9; }
.stage-panel.is-active .ggapp { animation: app-in .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes app-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---- shared map pieces ---- */
.ggmap { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 400 / 230; background: radial-gradient(120% 90% at 30% 20%, #1f2823, #151c18); border: 1px solid rgba(255,255,255,.06); }
.ggmap--tall { aspect-ratio: 400 / 260; }
.ggmap > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
/* satellite base, pushed into night so the amber network stays the hero */
.ggmap .gm-sat { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.3) saturate(.75) brightness(.5) contrast(1.12); }
.stage-panel.is-active .ggmap .gm-sat { animation: sat-in 1.2s ease both; }
@keyframes sat-in { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
.gm-contours path { fill: none; stroke: rgba(255,255,255,.05); stroke-width: 1; vector-effect: non-scaling-stroke; }
.gm-sea { fill: #13202d; }
.gm-lines path { fill: none; stroke: var(--amber); stroke-width: 1; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; opacity: .8; }
.gm-trans path { stroke-width: 1.8; opacity: 1; filter: drop-shadow(0 0 3px rgba(245,158,11,.55)); }
.gm-towers rect { fill: #0f1512; stroke: var(--amber); stroke-width: .9; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; }
.gm-subs rect { fill: #0f1512; stroke: var(--amber-2); stroke-width: 1.3; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 5px rgba(251,191,36,.6)); }
.gm-sensors circle { fill: #22c55e; stroke: #0f1512; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.gm-chip { position: absolute; right: 8px; top: 8px; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: rgba(232,238,233,.7); background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.12); border-radius: 6px; padding: 3px 6px; z-index: 2; }
.gm-chip--sim { color: #fecaca; border-color: rgba(239,68,68,.45); top: auto; bottom: 8px; right: auto; left: 8px; }
.gm-legend { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; color: rgba(232,238,233,.75); background: rgba(0,0,0,.5); border-radius: 6px; padding: 3px 7px; }
.gm-legend i { width: 9px; height: 9px; }
.lg-sub { border: 1.5px solid var(--amber-2); border-radius: 2px; } .lg-tow { border: 1.2px solid var(--amber); margin-left: 4px; }
.lg-line { width: 14px !important; height: 2px !important; background: var(--amber); margin-left: 4px; }
.lg-sen { border-radius: 50%; background: #22c55e; margin-left: 4px; }

/* ---- 1: the network comes alive ---- */
.ggapp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ggapp-kpis > div { position: relative; overflow: hidden; padding: 10px 12px; border-radius: 10px; background: var(--night-3); border: 1px solid rgba(255,255,255,.06); display: grid; gap: 2px; }
.ggapp-kpis b { font-family: var(--f-head); font-weight: 600; font-size: clamp(16px, 1.8vw, 22px); font-variant-numeric: tabular-nums; }
.ggapp-kpis small { font-size: .6em; color: rgba(232,238,233,.6); font-weight: 500; }
.ggapp-kpis > div > span { font-size: 10.5px; color: rgba(232,238,233,.6); }
.ggapp-kpis .hot b { color: var(--amber-2); }
.ggapp-kpis .hot::after { content: ""; position: absolute; inset: 0; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(251,191,36,.5); opacity: 0; }
.stage-panel.is-active .ggapp-kpis > div { animation: feed-in .5s ease both; }
.stage-panel.is-active .ggapp-kpis > div:nth-child(2) { animation-delay: .1s; } .stage-panel.is-active .ggapp-kpis > div:nth-child(3) { animation-delay: .2s; } .stage-panel.is-active .ggapp-kpis > div:nth-child(4) { animation-delay: .3s; }
.stage-panel.is-active .ggapp-kpis .hot::after { animation: kpi-flash 1.6s ease-in-out 2.1s 2; }
@keyframes kpi-flash { 50% { opacity: 1; } }

.stage-panel.is-active .gm-trans path { animation: draw-1 1.5s cubic-bezier(.45,0,.25,1) .2s both; }
.stage-panel.is-active .gm-dist path { animation: draw-1 1.1s cubic-bezier(.45,0,.25,1) both; }
.stage-panel.is-active .gm-dist path:nth-child(1) { animation-delay: .6s; } .stage-panel.is-active .gm-dist path:nth-child(2) { animation-delay: .8s; }
.stage-panel.is-active .gm-dist path:nth-child(3) { animation-delay: .95s; } .stage-panel.is-active .gm-dist path:nth-child(4) { animation-delay: 1.05s; }
.stage-panel.is-active .gm-dist path:nth-child(5) { animation-delay: 1.15s; } .stage-panel.is-active .gm-dist path:nth-child(6) { animation-delay: 1.25s; }
@keyframes draw-1 { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.stage-panel.is-active .gm-towers rect { animation: pop-in .35s cubic-bezier(.2,.9,.25,1.4) var(--d, 1s) both; }
@keyframes pop-in { from { transform: scale(0); } to { transform: scale(1); } }
.stage-panel.is-active #gg-panel-1 .gm-subs, #gg-panel-1.is-active .gm-subs { animation: fade-in .5s ease 1.4s both; }
/* current flowing along the lines */
.gm-flow path { fill: none; stroke: #fff7d6; stroke-width: 1.5; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: .015 .185; opacity: 0; filter: drop-shadow(0 0 3px #fbbf24); }
.stage-panel.is-active .gm-flow path { animation: fade-in .4s ease 1.8s forwards, flow 3.2s linear 1.8s infinite; }
.stage-panel.is-active .gm-flow path:nth-child(2) { animation-duration: .4s, 2.6s; } .stage-panel.is-active .gm-flow path:nth-child(3) { animation-duration: .4s, 2.2s; }
.stage-panel.is-active .gm-flow path:nth-child(4) { animation-duration: .4s, 2.8s; }
@keyframes flow { to { stroke-dashoffset: -.2; } }
/* sensor radar pings */
.gm-sensors .ping { fill: none; stroke: #22c55e; stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
.stage-panel.is-active .gm-sensors .ping { animation: ping 2s ease-out 1.6s infinite; }
.stage-panel.is-active .gm-sensors .ping--2 { animation-delay: 2.6s; }
@keyframes ping { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(5); opacity: 0; } }
.stage-panel.is-active #gg-panel-1 .gm-sensors, #gg-panel-1.is-active .gm-sensors { animation: fade-in .4s ease 1.5s both; }

/* ---- 2: AI scan scores every span ---- */
.gm-score path { fill: none; stroke: #3b4640; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.stage-panel.is-active .gm-score path { animation: score-in .5s ease var(--d) forwards; }
.stage-panel.is-active .gm-score .rk-low { animation-name: to-low; } .stage-panel.is-active .gm-score .rk-mod { animation-name: to-mod; }
.stage-panel.is-active .gm-score .rk-high { animation-name: to-high; } .stage-panel.is-active .gm-score .rk-ext { animation-name: to-ext; }
@keyframes to-low { to { stroke: #a3e635; } } @keyframes to-mod { to { stroke: #f59e0b; } }
@keyframes to-high { to { stroke: #f97316; filter: drop-shadow(0 0 4px rgba(249,115,22,.7)); } }
@keyframes to-ext { to { stroke: #ef4444; filter: drop-shadow(0 0 6px rgba(239,68,68,.9)); } }
.stage-panel.is-active .gm-score .seg-hit { animation: to-ext .5s ease var(--d) forwards, seg-glow 1.1s ease-in-out 3s infinite; }
@keyframes seg-glow { 50% { stroke-width: 4.5; } }
.scanbar {
  position: absolute; top: 0; bottom: 0; left: 0; width: 22%; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,.04) 60%, rgba(251,191,36,.22) 99%, #fde68a 100%);
  border-right: 1px solid #fde68a; box-shadow: 6px 0 18px rgba(251,191,36,.35);
}
.stage-panel.is-active .scanbar { animation: scan-x 2.1s cubic-bezier(.4,0,.4,1) .2s both; }
@keyframes scan-x { 0% { opacity: 1; transform: translateX(-100%); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateX(460%); } }
.sc-chip {
  position: absolute; transform: translate(-50%, -100%); font-family: var(--f-mono); font-size: 9.5px; font-weight: 500;
  color: #fff; padding: 2px 5px; border-radius: 5px; opacity: 0; pointer-events: none;
}
.sc-chip--high { background: #c2410c; } .sc-chip--ext { background: #dc2626; box-shadow: 0 0 10px rgba(239,68,68,.7); }
.stage-panel.is-active .sc-chip { animation: chip-pop .35s cubic-bezier(.2,.9,.25,1.4) var(--d) forwards; }
@keyframes chip-pop { from { opacity: 0; transform: translate(-50%, -60%) scale(.6); } to { opacity: 1; transform: translate(-50%, -100%) scale(1); } }
.gg-cursor { left: 94%; top: 96%; }
.stage-panel.is-active .gg-cursor { animation: gg-cursor-move 1.1s cubic-bezier(.5,0,.2,1) 2.2s forwards; }
@keyframes gg-cursor-move { 0% { opacity: 0; left: 94%; top: 96%; } 15% { opacity: 1; } 100% { opacity: 1; left: 64%; top: 45%; } }
.seg-tip {
  position: absolute; left: 50%; top: 56%; width: 150px; padding: 9px 10px; border-radius: 10px;
  background: #0f1512; border: 1px solid rgba(239,68,68,.5); box-shadow: 0 14px 30px rgba(0,0,0,.5);
  font-size: 10.5px; opacity: 0; z-index: 2;
}
.stage-panel.is-active .seg-tip { animation: tip-in .35s cubic-bezier(.2,.9,.25,1.2) 2.95s both; }
@keyframes tip-in { from { opacity: 0; transform: translateY(6px) scale(.95); } to { opacity: 1; transform: none; } }
.st-head { display: flex; justify-content: space-between; color: rgba(232,238,233,.6); }
.st-head em { font-style: normal; font-weight: 700; color: #fca5a5; text-transform: uppercase; font-size: 9.5px; letter-spacing: .06em; }
.st-id { font-family: var(--f-mono); font-size: 15px; color: #fff; margin-top: 2px; }
.st-k { margin-top: 6px; color: rgba(232,238,233,.6); }
.st-score { color: rgba(232,238,233,.6); } .st-score b { font-family: var(--f-head); font-size: 24px; color: #fff; margin-right: 2px; font-variant-numeric: tabular-nums; }
.gm-scale { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; color: rgba(232,238,233,.75); background: rgba(0,0,0,.5); border-radius: 6px; padding: 3px 7px; }
.gm-scale i { width: 70px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, #a3e635, #f59e0b, #f97316, #ef4444); }

/* ---- 3: the score builds up from its factors ---- */
.ggapp--panel { max-width: 540px; }
.why { padding: 6px; display: grid; gap: 12px; }
.why-top { display: flex; align-items: center; gap: 18px; }
.gauge { position: relative; width: 150px; flex: none; margin-bottom: 30px; }
.gauge svg { width: 100%; display: block; overflow: visible; }
.g-track, .g-fill { fill: none; stroke-width: 6; stroke-linecap: round; }
.g-track { stroke: rgba(255,255,255,.08); }
.g-fill { stroke: url(#gg-gauge-grad); stroke-dasharray: 100; stroke-dashoffset: 26; }
.g-needle { stroke: #fff; stroke-width: 1.6; stroke-linecap: round; transform-origin: 60px 62px; transform: rotate(43deg); }
.g-hub { fill: #fff; }
.stage-panel.is-active .g-fill { animation: gauge-fill 2.2s cubic-bezier(.3,0,.2,1) .3s both; }
.stage-panel.is-active .g-needle { animation: gauge-needle 2.2s cubic-bezier(.3,0,.2,1) .3s both, needle-jitter .5s ease-in-out 2.5s 3; }
@keyframes gauge-fill { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 26; } }
@keyframes gauge-needle { from { transform: rotate(-90deg); } to { transform: rotate(43deg); } }
@keyframes needle-jitter { 50% { transform: rotate(40deg); } }
.g-val { position: absolute; left: 0; right: 0; top: 100%; margin-top: 2px; text-align: center; line-height: 1; }
.g-val b { font-family: var(--f-head); font-size: 30px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.g-val span { color: rgba(232,238,233,.6); font-size: 12px; margin-left: 2px; }
.why-k { font-size: 10.5px; color: rgba(232,238,233,.6); }
.why-id { font-family: var(--f-mono); font-size: 22px; color: #fff; }
.why-badge { display: inline-block; margin-top: 4px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fca5a5; background: rgba(239,68,68,.15); border-radius: 5px; padding: 2px 7px; opacity: 0; }
.stage-panel.is-active .why-badge { animation: chip-pop2 .4s cubic-bezier(.2,.9,.25,1.4) 2.4s forwards; }
@keyframes chip-pop2 { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.why-q { font-family: var(--f-head); font-weight: 500; font-size: 16px; color: #fff; }
.why-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.why-bars li { display: grid; grid-template-columns: minmax(130px, 1fr) 1.2fr 34px; align-items: center; gap: 10px; font-size: 12px; color: rgba(232,238,233,.8); }
.why-bars i { display: block; height: 5px; border-radius: 3px; width: calc(var(--w) * 100%); background: linear-gradient(90deg, #f59e0b, #ef4444); transform-origin: left; box-shadow: 0 0 10px rgba(239,68,68,.25); }
.why-bars em { font-style: normal; font-family: var(--f-mono); font-size: 11px; color: var(--amber-2); text-align: right; }
.stage-panel.is-active .why-bars li { animation: feed-in .3s ease var(--d) both; }
.stage-panel.is-active .why-bars i { animation: grow-x .45s cubic-bezier(.2,.7,.2,1) var(--d) both; }
.stage-panel.is-active .why-bars em { animation: chip-pop2 .3s ease calc(var(--d) + .35s) both; }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.why-note { font-size: 10.5px; color: rgba(232,238,233,.5); }
.why-act { display: grid; gap: 3px; padding: 10px 12px; border-radius: 10px; background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); font-size: 12px; color: #fde68a; }
.why-act b { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--amber-2); }
.stage-panel.is-active .why-act { animation: feed-in .5s ease 2.6s both; }

/* ---- 4: fire front grows over the grid ---- */
#gg-panel-4 .ggapp { grid-template-columns: 1.5fr 1fr; align-items: stretch; }
.heat rect { opacity: 0; transform-box: fill-box; transform-origin: center; }
.heat .h3 { fill: #ef4444; } .heat .h2 { fill: #f97316; } .heat .h1 { fill: #f59e0b; }
.stage-panel.is-active .heat rect { animation: cell-in .5s ease var(--d) forwards, cell-flicker 1.8s ease-in-out calc(var(--d) + .5s) infinite; }
.stage-panel.is-active .heat .h1 { animation-name: cell-in-1, cell-flicker-1; }
@keyframes cell-in { from { opacity: 0; transform: scale(.3); } to { opacity: .62; transform: none; } }
@keyframes cell-in-1 { from { opacity: 0; transform: scale(.3); } to { opacity: .38; transform: none; } }
@keyframes cell-flicker { 50% { opacity: .45; } } @keyframes cell-flicker-1 { 50% { opacity: .26; } }
.fire-origin { fill: #fff; stroke: #ef4444; stroke-width: 2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: spark 1s ease-in-out infinite; }
.fire-ring { fill: none; stroke: #ef4444; stroke-width: 1.2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; opacity: 0; }
.stage-panel.is-active .fire-ring { animation: ping 1.4s ease-out .2s 3; }
.safe-assets rect { fill: #0f1512; stroke: var(--amber); stroke-width: .9; vector-effect: non-scaling-stroke; }
.hit-assets rect { fill: #0f1512; stroke: var(--amber); stroke-width: 1; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; }
.hit-assets .hit-sub { stroke: var(--amber-2); stroke-width: 2; }
.stage-panel.is-active .hit-assets rect { animation: asset-hit .4s ease var(--d) forwards, asset-pulse 1.2s ease-in-out calc(var(--d) + .4s) infinite; }
@keyframes asset-hit { to { stroke: #ef4444; fill: #3a0d0d; stroke-width: 1.6; } }
@keyframes asset-pulse { 50% { transform: scale(1.35); filter: drop-shadow(0 0 6px #ef4444); } }
.fire-clock { position: absolute; left: 8px; top: 8px; height: 22px; min-width: 52px; overflow: hidden; font-family: var(--f-mono); font-size: 11px; color: #fecaca; background: rgba(0,0,0,.55); border: 1px solid rgba(239,68,68,.4); border-radius: 6px; z-index: 2; }
.fire-clock i { position: absolute; left: 0; right: 0; top: 0; line-height: 20px; text-align: center; font-style: normal; opacity: 0; }
.fire-clock i:first-child { opacity: 1; }
.stage-panel.is-active .fire-clock i { animation: clock-tick 1s steps(1) both; }
.stage-panel.is-active .fire-clock i:nth-child(1) { animation: clock-out .01s linear 1.4s forwards; }
.stage-panel.is-active .fire-clock i:nth-child(2) { animation: clock-in .01s linear 1.4s forwards, clock-out .01s linear 2.4s forwards; }
.stage-panel.is-active .fire-clock i:nth-child(3) { animation: clock-in .01s linear 2.4s forwards, clock-out .01s linear 3.4s forwards; }
.stage-panel.is-active .fire-clock i:nth-child(4) { animation: clock-in .01s linear 3.4s forwards; }
@keyframes clock-in { to { opacity: 1; } } @keyframes clock-out { to { opacity: 0; } }

.ignite { position: relative; padding: 12px; border-radius: 12px; background: #1a0f0f; border: 1px solid rgba(239,68,68,.35); display: grid; gap: 6px; align-content: start; font-size: 11.5px; }
.stage-panel.is-active .ignite { animation: feed-in .5s ease .6s both; }
.ig-k { font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #fca5a5; }
.ig-k--sub { color: rgba(232,238,233,.6); margin-top: 4px; }
.ig-title { font-family: var(--f-head); font-weight: 600; font-size: 15px; color: #fff; }
.ig-row { display: flex; justify-content: space-between; color: rgba(232,238,233,.7); }
.ig-row b { color: #fff; font-weight: 600; }
.ignite ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; color: rgba(255,255,255,.85); }
.ignite li::before { content: "■ "; color: #ef4444; font-size: 9px; }
.ignite li b { font-family: var(--f-head); font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.ig-act { margin-top: 4px; padding: 7px 9px; border-radius: 8px; background: rgba(245,158,11,.12); color: #fde68a; }
.stage-panel.is-active .ig-act { animation: feed-in .4s ease 3.4s both; }
.crew-toast {
  margin-top: 4px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px;
  background: #0f2a1a; border: 1px solid rgba(34,197,94,.45); color: #dcfce7; opacity: 0;
}
.crew-toast b { display: block; font-size: 12px; } .crew-toast small { display: block; font-size: 10px; color: rgba(220,252,231,.7); }
.ct-ic { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #22c55e; color: #052e16; }
.ct-ic svg { width: 14px; height: 14px; }
.stage-panel.is-active .crew-toast { animation: toast-up .5s cubic-bezier(.2,.9,.25,1.2) 4s forwards; }
@keyframes toast-up { from { opacity: 0; transform: translateY(12px) scale(.95); } to { opacity: 1; transform: none; } }

@media (max-width: 639px) {
  .ggapp-kpis { grid-template-columns: 1fr 1fr; }
  #gg-panel-4 .ggapp { grid-template-columns: 1fr; }
  .why-top { gap: 12px; } .gauge { width: 120px; }
  .why-bars li { grid-template-columns: 1fr 34px; gap: 4px 8px; }
  .why-bars li span { grid-column: 1 / -1; }
  .seg-tip { left: 6px; right: auto; top: auto; bottom: 6px; width: 128px; padding: 7px 8px; }
  .gm-scale { bottom: auto; top: 8px; }
  .gm-legend { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gg .stage-panel.is-active *, .gg .stage-panel.is-active, .fire-origin { animation: none !important; }
  .seg-tip, .gg-cursor, .sc-chip, .crew-toast, .why-badge { opacity: 1; }
  .gg-cursor { left: 64%; top: 45%; }
  .heat rect { opacity: .5; }
  .hit-assets rect { stroke: #ef4444; }
  .gm-score .rk-low { stroke: #a3e635; } .gm-score .rk-mod { stroke: #f59e0b; } .gm-score .rk-high { stroke: #f97316; } .gm-score .rk-ext { stroke: #ef4444; }
  .fire-clock i { opacity: 0; } .fire-clock i:last-child { opacity: 1; }
}

.sat-credit { margin-top: 2px; font-size: 9.5px; color: #8a978e; text-align: right; }
.sat-credit--dark { margin-top: 14px; font-size: 11px; color: rgba(232,238,233,.4); }

/* ---------- Contact ---------- */
.contact { padding-block: clamp(80px, 11vw, 160px) clamp(16px, 2vw, 24px); }
.contact-panel {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: var(--r-xl) var(--r-xl) var(--r-lg) var(--r-lg);
  padding: clamp(48px, 7vw, 110px) clamp(20px, 5vw, 80px) clamp(20px, 5vw, 80px);
  display: grid; grid-template-columns: 1fr minmax(320px, 520px); gap: clamp(32px, 5vw, 80px);
  align-items: end; color: #fff;
}
.contact-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.contact-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(160deg, rgba(14,34,24,.88), rgba(14,34,24,.55)); }
.contact-copy { align-self: center; }
.contact-intro { margin-top: 24px; font-size: 18px; color: rgba(255,255,255,.88); max-width: 30em; }
.contact-alt { margin-top: 18px; color: rgba(255,255,255,.75); font-size: 15px; }
.contact-alt a { color: var(--lime); }
.contact-card { background: var(--paper); color: var(--ink); border-radius: 28px; padding: clamp(20px, 2.6vw, 36px); }
.contact-form { display: grid; gap: 14px; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row { display: grid; gap: 6px; }
.form-row label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.req { color: var(--ember); }
.form-row input, .form-row select, .form-row textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: #fbfaf6;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%;
}
.form-row textarea { resize: vertical; min-height: 110px; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: 2px solid var(--forest-2); outline-offset: 0; border-color: transparent; }
.contact-form .btn { margin-top: 6px; }
.form-thanks { font-family: var(--f-head); font-size: 22px; letter-spacing: -0.02em; padding: 24px 4px; }
@media (max-width: 959px) { .contact-panel { grid-template-columns: 1fr; } }
@media (max-width: 479px) { .form-pair { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #e9e7df; margin-top: clamp(64px, 8vw, 120px); padding-top: clamp(56px, 7vw, 96px); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 40px; }
.footer-logo { width: 64px; height: 64px; border-radius: 50%; }
.footer-tagline { font-family: var(--f-head); font-weight: 500; font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.035em; line-height: 1.05; margin-top: 24px; max-width: 10ch; }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col a { text-decoration: none; color: #cfd3c9; }
.footer-col a:hover { color: var(--lime); }
.footer-h { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #8d948a; margin-bottom: 6px; }
.footer-base { margin-top: clamp(48px, 6vw, 80px); padding-block: 24px; border-top: 1px solid rgba(255,255,255,.1); font-family: var(--f-mono); font-size: 12px; letter-spacing: .05em; color: #8d948a; }
@media (max-width: 859px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand, .footer-col:last-child { grid-column: 1 / -1; }
}

/* ---------- Reveal ---------- */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.fade-in.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade-in { opacity: 1; transform: none; transition: none; } }
