/* =========================================================================
   Rainfolio landing page — tokens follow rainfolio-web/apps/web (dark theme)
   ========================================================================= */
:root {
  color-scheme: dark;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 20px;
  --radius-sm: 12px;

  --bg: #090b0f;
  --bg-2: #0c0f15;
  --card: #11141b;
  --card-2: #161a23;
  --line: rgba(255, 255, 255, 0.065);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #eef1f6;
  --text-2: #a4acbb;
  --text-3: #6f7789;
  --accent: #5aa2ff;
  --accent-2: #8f7bff;
  --accent-soft: rgba(90, 162, 255, 0.14);
  --rain: #5aa2ff;
  --snow: #e6ecff;
  --sun: #ffc44d;
  --sun-fill: rgba(255, 196, 77, 0.16);
  --bolt: #ffd34d;
  --cloud-fill: rgba(170, 180, 196, 0.08);
  --warn: #ffb257;
  --ok: #6fd8c6;

  /* chart series (validated: dark, surface #11141b) */
  --s1: #4a93f7;
  --s2: #b8862f;

  --band-clear: #1a1f29;
  --band-partly: #242a36;
  --band-mostly: #2f3644;
  --band-drizzle: #2b4a75;
  --band-light-rain: #2f5c9e;
  --band-rain: #2f6fd6;
  --band-heavy-rain: #2552b8;
  --band-snow: #6b5fc4;

  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 60px rgba(0, 0, 0, 0.45);
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1160px;
}

/* =========================================================================
   Base
   ========================================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-feature-settings: "cv11", "ss01";
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.08;
  font-weight: 650;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: #06101f;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.ico {
  width: 1em;
  height: 1em;
  flex: none;
}

/* =========================================================================
   Nav
   ========================================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 11, 15, 0.6);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(9, 11, 15, 0.82);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand-mark {
  width: 24px;
  height: 24px;
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(90, 162, 255, 0.45));
}
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
  .nav-badge {
    margin-left: auto;
  }
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  padding: clamp(48px, 9vw, 112px) 0 clamp(48px, 7vw, 88px);
  overflow: hidden;
  isolation: isolate;
}
.hero-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.55;
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
}
.hero-glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 900px;
  z-index: -2;
  background:
    radial-gradient(40% 50% at 72% 35%, rgba(61, 139, 245, 0.28), transparent 70%),
    radial-gradient(30% 40% at 90% 10%, rgba(143, 123, 255, 0.2), transparent 70%),
    radial-gradient(35% 45% at 15% 20%, rgba(47, 92, 158, 0.18), transparent 70%);
  filter: blur(10px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(111, 216, 198, 0.6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(111, 216, 198, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 9px rgba(111, 216, 198, 0);
  }
}
.hero h1 {
  margin-top: 22px;
  font-size: clamp(42px, 6.4vw, 80px);
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.grad {
  background: linear-gradient(100deg, #8cc3ff 0%, #5aa2ff 40%, #a894ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  margin-top: 22px;
  max-width: 540px;
  color: var(--text-2);
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.6;
}

/* ---- Device mock ---- */
.hero-device {
  position: relative;
  perspective: 1400px;
}
.device {
  position: relative;
  max-width: 420px;
  margin-left: auto;
  padding: 22px 22px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(22, 26, 35, 0.92), rgba(13, 16, 22, 0.94));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), 0 0 0 8px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: rotateY(-6deg) rotateX(3deg);
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero-device:hover .device {
  transform: rotateY(0) rotateX(0);
}
.device-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-2);
}
.place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--text);
}
.place .ico {
  color: var(--accent);
}
.pill {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
}
.pill.is-model {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
}
.now {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}
.now-temp {
  font-size: 64px;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}
.now-sub {
  margin-top: 6px;
  color: var(--text-2);
  font-size: 14px;
}
.now-icon {
  width: 72px;
  height: 72px;
  color: #c6cedb;
}
.next-line {
  margin-top: 18px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  min-height: 44px;
}
.next-label {
  display: block;
  margin-bottom: 2px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
[data-demo] {
  transition: opacity 0.35s ease;
}
.is-swapping [data-demo] {
  opacity: 0;
}
.minute-chart {
  position: relative;
  margin-top: 12px;
  height: 84px;
  border-bottom: 1px solid var(--line-strong);
  cursor: crosshair;
  touch-action: pan-y;
}
.minute-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.minute-svg .guide {
  stroke: var(--line);
  stroke-dasharray: 2 3;
}
.minute-svg .bar {
  fill: var(--rain);
  transition: y 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), height 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.6s ease, fill 0.6s ease;
}
.minute-svg.is-snow .bar {
  fill: #b9a9f2;
}
.minute-svg .cursor {
  stroke: var(--text);
  stroke-width: 1;
  opacity: 0;
}
.minute-chart:hover .cursor {
  opacity: 0.6;
}
.minute-guides {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 0;
  pointer-events: none;
  font-size: 10px;
  color: var(--text-3);
  text-align: right;
}
.minute-guides span:nth-child(1) {
  margin-top: 0;
}
.minute-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 5px 9px;
  border-radius: 8px;
  background: #1d2230;
  border: 1px solid var(--line-strong);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.minute-tip b {
  font-weight: 600;
}
.minute-tip span {
  color: var(--text-2);
}
.minute-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-3);
}
.hour-band {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2px;
  margin-top: 18px;
  height: 26px;
  border-radius: 8px;
  overflow: hidden;
}
.hour-band i {
  display: block;
  background: var(--band-clear);
  transition: background-color 0.6s ease;
}
.hour-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-3);
}
.demo-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 14px;
}
.demo-dots button {
  width: 28px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.demo-dots button::before {
  content: "";
  position: absolute;
  inset: 8px 4px;
  border-radius: 4px;
  background: var(--line-strong);
  transition: background-color 0.2s ease;
}
.demo-dots button[aria-selected="true"]::before {
  background: var(--accent);
}

/* ---- Stats ---- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: clamp(56px, 8vw, 96px) 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats > div {
  padding: 24px 20px;
  border-left: 1px solid var(--line);
}
.stats > div:first-child {
  border-left: 0;
  padding-left: 0;
}
.stats dt {
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
}
.stats dd {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 15px;
}
.stats b {
  color: var(--text);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-right: 2px;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .device {
    margin: 0 auto;
    transform: none;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats > div:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
  .stats > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

/* =========================================================================
   Sections
   ========================================================================= */
.section {
  position: relative;
  padding: clamp(72px, 10vw, 128px) 0;
}
.section-alt {
  background: linear-gradient(180deg, var(--bg-2), var(--bg) 85%);
  border-top: 1px solid var(--line);
}
.section-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section h2 {
  margin-top: 12px;
  font-size: clamp(32px, 4.4vw, 52px);
  letter-spacing: -0.035em;
}
.section-lede {
  margin-top: 18px;
  color: var(--text-2);
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.65;
}
.section-lede em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

/* =========================================================================
   Nowcast
   ========================================================================= */
.nowcast {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}
.radar-stage {
  position: relative;
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b0e14;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.radar-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.radar-hud {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.radar-time {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(9, 11, 15, 0.7);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
}
.radar-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(9, 11, 15, 0.7);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--text-3);
}
.radar-legend i {
  width: 72px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #88ddee, #0099cc, #005588, #ffee00, #ffaa00, #ff4400, #c10000);
}
.radar-readout {
  position: absolute;
  left: 16px;
  bottom: 14px;
  max-width: calc(100% - 32px);
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(9, 11, 15, 0.78);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-2);
  pointer-events: none;
}
.radar-readout b {
  color: var(--text);
  font-weight: 600;
}
.radar-readout:empty {
  display: none;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step {
  position: relative;
  display: flex;
  gap: 16px;
  width: 100%;
  padding: 20px 20px 20px 18px;
  text-align: left;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.step:hover {
  background: rgba(255, 255, 255, 0.03);
}
.step.is-active {
  border-color: rgba(90, 162, 255, 0.35);
  background: linear-gradient(180deg, rgba(90, 162, 255, 0.08), rgba(90, 162, 255, 0.02));
}
.step::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
}
.step.is-active.is-timing::after {
  animation: step-progress var(--step-ms, 6000ms) linear forwards;
}
@keyframes step-progress {
  to {
    width: 100%;
  }
}
.step-n {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-3);
  padding-top: 2px;
}
.step.is-active .step-n {
  color: var(--accent);
}
.step-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.step-body b {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.step-body span {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.55;
}

.nowcast-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.nowcast-notes p {
  color: var(--text-2);
  font-size: 15px;
  padding-top: 16px;
  border-top: 1px solid var(--line-strong);
}
.nowcast-notes b {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 520px) {
  .radar-legend {
    display: none;
  }
}
@media (max-width: 900px) {
  .nowcast {
    grid-template-columns: 1fr;
  }
  .radar-stage {
    min-height: 340px;
  }
  .nowcast-notes {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* =========================================================================
   Accuracy
   ========================================================================= */
.accuracy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.hero-number {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.hn-value {
  font-size: clamp(56px, 7vw, 80px);
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1;
}
.hn-label {
  color: var(--text-2);
  font-size: 16px;
  max-width: 220px;
}
.fine {
  margin-top: 24px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.6;
  max-width: 480px;
}
.chart-card {
  margin: 0;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.chart-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chart-title {
  font-weight: 600;
  font-size: 16px;
}
.chart-sub {
  color: var(--text-3);
  font-size: 13px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--text-2);
}
.legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
}
.chart {
  position: relative;
  margin-top: 8px;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart .grid line {
  stroke: var(--line);
}
.chart .grid text,
.chart .xaxis text {
  fill: var(--text-3);
  font-size: 12px;
  font-family: var(--font);
}
.chart .xaxis text {
  fill: var(--text-2);
  font-size: 13px;
}
.chart .baseline {
  stroke: var(--line-strong);
}
.chart .bar {
  transition: opacity 0.15s ease;
}
.chart .val {
  fill: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
}
.chart.has-hover .bar:not(.is-hover) {
  opacity: 0.45;
}
.chart .hit {
  fill: transparent;
  cursor: default;
}
.chart-tip {
  position: absolute;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 10px;
  background: #1d2230;
  border: 1px solid var(--line-strong);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
  white-space: nowrap;
}
.chart-tip .tt-h {
  color: var(--text-3);
  font-size: 12px;
  margin-bottom: 4px;
}
.chart-tip .tt-r {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-tip .tt-r i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--c);
}
.chart-tip .tt-r b {
  margin-left: auto;
  padding-left: 12px;
  font-weight: 600;
}
.table-view {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-2);
}
.table-view summary {
  cursor: pointer;
  color: var(--text-3);
  width: max-content;
}
.table-view summary:hover {
  color: var(--text);
}
.table-view table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.table-view th,
.table-view td {
  padding: 8px 6px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
.table-view th:first-child {
  text-align: left;
}
.table-view thead th {
  color: var(--text-3);
  font-weight: 500;
}
.table-view tbody th {
  font-weight: 500;
  color: var(--text);
}

@media (max-width: 900px) {
  .accuracy {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   Feature bento
   ========================================================================= */
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tile {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), #0e1117);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tile h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
}
.tile > p,
.map-copy > p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 15px;
}
.tile-wide {
  grid-column: span 2;
}

/* summary typer */
.tile-summary {
  background:
    radial-gradient(60% 90% at 100% 100%, rgba(90, 162, 255, 0.12), transparent 70%),
    linear-gradient(180deg, var(--card), #0e1117);
}
.typer {
  margin-top: auto;
  padding-top: 32px;
}
.typer-label {
  display: block;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.typer-text {
  display: block;
  margin-top: 8px;
  min-height: 2.3em;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 550;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 3px;
  vertical-align: -0.1em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* honest icons */
.honest {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 24px;
}
.honest-row {
  display: grid;
  grid-template-columns: 88px 48px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  font-size: 13px;
}
.honest-row.is-us {
  border-color: rgba(90, 162, 255, 0.3);
  background: rgba(90, 162, 255, 0.06);
}
.honest-tag {
  color: var(--text-3);
  font-weight: 500;
}
.honest-row.is-us .honest-tag {
  color: var(--accent);
}
.honest-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #c6cedb;
  font-size: 11px;
}
.honest-day svg {
  width: 30px;
  height: 30px;
}
.honest-row.is-them .honest-note {
  color: var(--text-3);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.25);
}
.honest-note {
  color: var(--text);
}

/* map tile */
.tile-map {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: stretch;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
}
.chip-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: 0;
  background: linear-gradient(135deg, #0099cc, #ffee00 60%, #ff4400);
}
.map-ramp[hidden] {
  display: none;
}
.chip.is-on {
  color: #04101f;
  background: var(--accent);
  border-color: var(--accent);
}
.map-view {
  position: relative;
  min-height: 280px;
  border-radius: 14px;
  overflow: hidden;
  background: #0b0e14;
  border: 1px solid var(--line);
}
.map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.map-ramp {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(9, 11, 15, 0.72);
  font-size: 10px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.map-ramp i {
  width: 64px;
  height: 5px;
  border-radius: 3px;
}
.timeline {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  padding: 10px 12px 8px;
  border-radius: 12px;
  background: rgba(9, 11, 15, 0.78);
  border: 1px solid var(--line);
}
.tl-track {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.tl-past {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4.1%;
  border-radius: 2px;
  background: #88ddee;
}
.tl-now {
  position: absolute;
  left: 4.1%;
  top: -3px;
  width: 1px;
  height: 10px;
  background: var(--text-2);
}
.tl-head {
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 3px rgba(90, 162, 255, 0.45);
}
.tl-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 10px;
  color: var(--text-3);
}
.tl-label {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* confidence */
.conf-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 80px;
  margin-top: auto;
  padding-top: 24px;
  box-sizing: content-box;
}
.conf-bars i {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: var(--rain);
}
.conf-key {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-strong);
  font-size: 12px;
  color: var(--text-3);
}

/* alerts */
.alert-mock {
  margin-top: auto;
  padding: 14px;
  margin-top: 24px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 178, 87, 0.12), rgba(255, 178, 87, 0.04));
  border: 1px solid rgba(255, 178, 87, 0.3);
}
.alert-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--warn);
}
.alert-head .ico {
  width: 18px;
  height: 18px;
}
.alert-meta {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 12px;
}
.alert-map {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 10px;
  border-radius: 8px;
  background: #0b0e14;
}
.am-roads {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1.5;
}
.am-poly {
  fill: rgba(255, 178, 87, 0.16);
  stroke: var(--warn);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.am-you {
  fill: var(--accent);
  stroke: #0b0e14;
  stroke-width: 2;
}

/* speed */
.speed {
  margin-top: auto;
  padding-top: 20px;
}
.speed-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-2);
}
.speed-row b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 960px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tile-map {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .bento {
    grid-template-columns: 1fr;
  }
  .tile-wide {
    grid-column: auto;
  }
  .tile {
    padding: 22px;
  }
}

/* =========================================================================
   Compare
   ========================================================================= */
.compare {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  overflow: hidden;
}
.cmp-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) minmax(0, 1fr);
  border-top: 1px solid var(--line);
}
.cmp-row:first-child {
  border-top: 0;
}
.cmp-row > span {
  padding: 18px 22px;
  font-size: 15px;
  color: var(--text-3);
}
.cmp-row > span[role="rowheader"] {
  color: var(--text);
  font-weight: 500;
}
.cmp-row > .cmp-us {
  display: flex;
  gap: 10px;
  color: var(--text);
  background: rgba(90, 162, 255, 0.05);
}
.cmp-us .ok {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--accent);
}
.cmp-head > span {
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}
.cmp-head .cmp-us-h {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  background: rgba(90, 162, 255, 0.08);
}
.cmp-head .brand-mark {
  width: 18px;
  height: 18px;
}

@media (max-width: 720px) {
  .cmp-head {
    display: none !important;
  }
  .cmp-row {
    grid-template-columns: 1fr 1fr;
  }
  .cmp-row > span[role="rowheader"] {
    grid-column: 1 / -1;
    padding-bottom: 4px;
  }
  .cmp-row > span {
    padding: 12px 16px;
    font-size: 14px;
  }
  .cmp-row > .cmp-us {
    background: none;
  }
  .cmp-row > span[role="cell"]:not(.cmp-us)::before {
    content: "Typical app";
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
  }
  .cmp-row > .cmp-us {
    flex-direction: column;
    gap: 2px;
  }
  .cmp-row > .cmp-us .ok {
    display: none;
  }
  .cmp-row > .cmp-us::before {
    content: "Rainfolio";
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
  }
}

/* =========================================================================
   API
   ========================================================================= */
.api {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.ticks {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ticks li {
  display: flex;
  gap: 12px;
  color: var(--text-2);
  font-size: 15px;
}
.ticks b {
  color: var(--text);
  font-weight: 600;
}
.ticks .ico {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--accent);
}
.code {
  min-width: 0;
  border-radius: var(--radius);
  background: #0b0e14;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), 0 0 80px rgba(61, 139, 245, 0.08);
  overflow: hidden;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.code-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  flex: none;
}
.code-bar span {
  margin-left: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.code pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.code .k {
  color: #8cc3ff;
}
.code .s {
  color: #a6e3b8;
}
.code .n {
  color: #ffc98a;
}
.code .p {
  color: #6f7789;
}
.code .c {
  color: #5a6274;
  font-style: italic;
}

@media (max-width: 900px) {
  .api {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   Roadmap
   ========================================================================= */
.roadmap {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  position: relative;
}
.rm {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}
.rm.is-now {
  border-color: rgba(90, 162, 255, 0.35);
  background: linear-gradient(180deg, rgba(90, 162, 255, 0.1), var(--card) 60%);
}
.rm.is-explore {
  background: transparent;
  border-style: dashed;
  border-color: var(--line-strong);
}
.rm-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
}
.rm.is-now .rm-badge {
  color: #04101f;
  background: var(--accent);
}
.rm h3 {
  margin-top: 16px;
  font-size: 19px;
}
.rm ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rm li {
  position: relative;
  padding-left: 16px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.45;
}
.rm li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}
.rm.is-now li::before {
  background: var(--accent);
}

@media (max-width: 960px) {
  .roadmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .roadmap {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   CTA
   ========================================================================= */
.cta {
  position: relative;
  padding: clamp(80px, 11vw, 140px) 0;
  overflow: hidden;
  isolation: isolate;
  border-top: 1px solid var(--line);
  text-align: center;
}
.cta-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40% 60% at 50% 100%, rgba(61, 139, 245, 0.3), transparent 70%),
    radial-gradient(30% 40% at 30% 90%, rgba(143, 123, 255, 0.18), transparent 70%);
}
.cta-inner {
  max-width: 720px;
}
.cta-mark {
  width: 48px;
  height: 48px;
  color: var(--accent);
  filter: drop-shadow(0 0 24px rgba(90, 162, 255, 0.6));
}
.cta h2 {
  margin-top: 20px;
  font-size: clamp(32px, 4.6vw, 52px);
  letter-spacing: -0.035em;
}
.cta-inner > p {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 17px;
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
  padding: 48px 0 56px;
  border-top: 1px solid var(--line);
  background: #07090c;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px;
}
.footer-tag {
  margin-top: 10px;
  color: var(--text-3);
  font-size: 14px;
}
.attrib {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.6;
}
.attrib a {
  color: var(--text-2);
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 2px;
}
.attrib a:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   Reveal on scroll
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .live-dot,
  .caret,
  .step.is-active.is-timing::after {
    animation: none;
  }
  .device {
    transform: none;
    transition: none;
  }
}
