:root {
  color-scheme: light;
  --ink: #152329;
  --muted: #65757b;
  --paper: #fffaf2;
  --soft: #f6efe4;
  --line: rgba(30, 55, 61, 0.13);
  --teal: #2c8b83;
  --teal-dark: #17645f;
  --coral: #df7e6c;
  --mist: #e9f3f1;
  --shadow: 0 24px 70px rgba(37, 54, 57, 0.13);
  --card-bg: rgba(255, 255, 255, 0.58);
  --card-border: var(--line);
  --header-bg: rgba(255, 250, 242, 0.72);
  --code-bg: #152329;
  --code-color: #f9fff9;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8ede9;
  --muted: #8fa3a0;
  --paper: #0f1a1e;
  --soft: #162428;
  --line: rgba(200, 220, 215, 0.1);
  --teal: #3cb8a8;
  --teal-dark: #2da89a;
  --coral: #e89882;
  --mist: #1a2e2c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  --card-bg: rgba(22, 36, 40, 0.7);
  --card-border: rgba(200, 220, 215, 0.08);
  --header-bg: rgba(15, 26, 30, 0.8);
  --code-bg: #1a2e2c;
  --code-color: #c8e6e0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", system-ui,
    sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.52) 0 1px, transparent 2px),
    radial-gradient(circle at 28% 42%, rgba(44, 139, 131, 0.16) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 20%, rgba(255, 255, 255, 0.42) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 64%, rgba(44, 139, 131, 0.14) 0 1px, transparent 2px),
    linear-gradient(105deg, transparent 0 23px, rgba(255, 255, 255, 0.22) 24px 25px, transparent 26px 86px);
  background-size: 240px 260px, 310px 360px, 360px 280px, 280px 320px, 180px 240px;
  opacity: 0.46;
  mix-blend-mode: soft-light;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(16px);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 8px -14px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: var(--header-bg);
  box-shadow: 0 14px 40px rgba(20, 33, 38, 0.08);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--teal), var(--teal-dark));
  box-shadow: 0 10px 24px rgba(23, 100, 95, 0.24);
}

.nav {
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  transition: color 180ms ease;
}

.nav a:hover {
  color: var(--teal-dark);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 1.1fr);
  align-items: center;
  gap: 28px;
  width: 100%;
  min-height: calc(100vh - 74px);
  margin: -74px auto 0;
  padding: 160px max(20px, calc((100% - 1160px) / 2)) 92px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(17, 25, 30, 0.88), rgba(17, 25, 30, 0.55) 42%, rgba(17, 25, 30, 0.2) 72%),
    linear-gradient(180deg, rgba(17, 25, 30, 0.2), rgba(17, 25, 30, 0.26)),
    url("./rain-letter-bg-sm.jpg") center / cover no-repeat;
}

.rain-scene {
  display: none;
}

.rain-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(24, 65, 72, 0.2), rgba(255, 255, 255, 0.12)),
    linear-gradient(180deg, rgba(62, 115, 124, 0.18), rgba(255, 250, 242, 0.46));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), var(--shadow);
}

.rain-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    105deg,
    transparent 0 18px,
    rgba(255, 255, 255, 0.58) 19px 20px,
    transparent 21px 42px
  );
  opacity: 0.42;
}

.rain-line,
.window-glow,
.letter-sheet {
  position: absolute;
  display: block;
}

.rain-line {
  width: 2px;
  height: 72%;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.76), transparent);
  transform: rotate(13deg);
}

.line-a {
  left: 18%;
  top: 10%;
}

.line-b {
  left: 55%;
  top: 4%;
  height: 80%;
}

.line-c {
  left: 76%;
  top: 18%;
  height: 58%;
}

.window-glow {
  right: 34px;
  bottom: 42px;
  width: 148px;
  height: 184px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 248, 228, 0.36)),
    linear-gradient(135deg, rgba(44, 139, 131, 0.35), rgba(223, 126, 108, 0.2));
  box-shadow: 0 24px 70px rgba(223, 126, 108, 0.25);
}

.letter-sheet {
  right: 18px;
  bottom: 22px;
  width: 118px;
  height: 78px;
  border-radius: 6px;
  background: #fffaf0;
  box-shadow: 0 14px 30px rgba(37, 54, 57, 0.18);
  transform: rotate(-7deg);
}

.letter-sheet::before,
.letter-sheet::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  height: 1px;
  background: rgba(23, 100, 95, 0.2);
}

.letter-sheet::before {
  top: 27px;
}

.letter-sheet::after {
  top: 43px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  color: #fff8ec;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffe0c8;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 4.4vw, 56px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-lead {
  margin-bottom: 14px;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 700;
  line-height: 1.32;
}

.hero-text {
  max-width: 500px;
  color: rgba(255, 248, 236, 0.86);
  font-size: 17px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.primary {
  color: #fff;
  background: var(--teal-dark);
  box-shadow: 0 16px 32px rgba(23, 100, 95, 0.22);
}

.secondary {
  color: var(--teal-dark);
  border: 1px solid rgba(23, 100, 95, 0.18);
  background: var(--card-bg);
}

.phone-demo {
  position: relative;
  z-index: 1;
  justify-self: end;
  align-self: end;
  width: min(270px, 100%);
  margin: 250px 0 0 auto;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 250, 242, 0.82);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  transform: translateX(34px);
  overflow: hidden;
}

.phone-top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px 8px;
  color: #24454a;
  font-size: 14px;
  font-weight: 700;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(44, 139, 131, 0.12);
}

.status-text {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.chat-stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: auto;
  padding: 12px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(252, 248, 239, 0.9), rgba(236, 246, 243, 0.9)),
    var(--soft);
}

.bubble {
  max-width: 86%;
  padding: 8px 11px;
  border-radius: 15px;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 8px 24px rgba(37, 54, 57, 0.08);
}

.bubble.user {
  align-self: flex-end;
  color: #fff;
  border-bottom-right-radius: 6px;
  background: var(--teal);
}

.bubble.ai {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
}

.phone-note {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 13px 10px;
  color: var(--muted);
  font-size: 12px;
}

.section {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 92px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

h2 {
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.intro-grid article,
.memory-card,
.dialogue-panel,
.web-portal,
.deploy-card,
.deploy-notes,
.final-cta {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: 0 18px 44px rgba(37, 54, 57, 0.08);
}

.intro-grid article {
  min-height: 220px;
  padding: 28px;
  border-radius: 8px;
}

.intro-grid p,
.memory-card p,
.dialogue-panel p,
.web-portal p,
.deploy-card p,
.deploy-notes p,
.final-cta p {
  color: var(--muted);
  line-height: 1.85;
}

.memory-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.memory-card {
  padding: 28px;
  border-radius: 8px;
}

.memory-card.active {
  color: #fff;
  background: linear-gradient(145deg, var(--teal-dark), #2c7770);
}

.memory-card.active p,
.memory-card.active span {
  color: rgba(255, 255, 255, 0.78);
}

.memory-card span {
  display: inline-flex;
  margin-bottom: 26px;
  color: var(--teal-dark);
  font-weight: 800;
}

.dialogue-panel {
  padding: 28px;
  border-radius: 8px;
}

.dialogue-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.dialogue-row:last-of-type {
  border-bottom: 0;
}

.speaker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-height: 32px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(44, 139, 131, 0.1);
  font-size: 14px;
  font-weight: 800;
}

.ai-row .speaker {
  color: #fff;
  background: var(--teal);
}

.dialogue-row p {
  margin: 0;
  font-size: 18px;
}

.tags,
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags {
  margin-top: 24px;
}

.tags span,
.stack-list li {
  list-style: none;
  border: 1px solid rgba(23, 100, 95, 0.13);
  border-radius: 999px;
  padding: 8px 12px;
  color: #31585d;
  background: rgba(233, 243, 241, 0.72);
  font-size: 13px;
}

.deploy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.deploy-card {
  min-height: 290px;
  padding: 26px;
  border-radius: 8px;
}

.step {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--coral);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.deploy-card code {
  display: block;
  margin-top: 12px;
  padding: 12px 14px;
  overflow-wrap: anywhere;
  border-radius: 8px;
  color: var(--code-color);
  background: var(--code-bg);
  font-family: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
}

.deploy-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 18px;
  padding: 28px;
  border-radius: 8px;
}

.stack-list {
  margin: 24px 0 0;
  padding: 0;
}

.final-cta {
  margin-bottom: 70px;
  padding: 44px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 100, 95, 0.1), rgba(223, 126, 108, 0.12)),
    rgba(255, 255, 255, 0.64);
}

.final-cta p {
  max-width: 680px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 38px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
  }

  .nav {
    gap: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 140px;
    background-position: 58% center;
  }

  .hero-copy {
    max-width: 620px;
  }

  .phone-demo {
    justify-self: start;
    width: min(320px, 100%);
    margin: 16px 0 0;
  }

  .intro-grid,
  .memory-layout,
  .deploy-grid,
  .deploy-notes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-header,
  .section,
  .hero,
  .site-footer {
    width: min(100% - 28px, 1160px);
  }

  .site-header {
    position: static;
  }

  .nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-bottom: 56px;
  }

  h1 {
    font-size: 42px;
    line-height: 1.08;
  }

  .hero-lead {
    font-size: 20px;
  }

  .hero-text {
    font-size: 16px;
  }

  .chat-stream {
    padding: 16px;
  }

  .section {
    padding: 60px 0;
  }

  .dialogue-row {
    grid-template-columns: 1fr;
  }

  .deploy-card,
  .deploy-notes,
  .final-cta,
  .dialogue-panel {
    padding: 22px;
  }

  .site-footer {
    flex-direction: column;
  }
}

/* ========== Emotional Bridge ========== */

.emotional-bridge {
  text-align: center;
  padding: 100px 0;
  background: linear-gradient(180deg, var(--paper), var(--soft));
}

.bridge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.bridge-item {
  padding: 36px 24px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 32px rgba(37, 54, 57, 0.06);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.bridge-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(37, 54, 57, 0.12);
}

.bridge-quote {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.7;
  font-style: italic;
}

.bridge-cta {
  color: var(--muted);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
}

/* ========== Card Icon ========== */

.card-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

/* ========== Features Section ========== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  min-height: 220px;
  padding: 28px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: 0 12px 36px rgba(37, 54, 57, 0.06);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(37, 54, 57, 0.1);
}

.feature-num {
  display: inline-flex;
  color: var(--coral);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 20px;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.85;
}

/* ========== Memory Commands ========== */

.memory-commands {
  margin-top: 32px;
  padding: 32px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}

.memory-commands h3 {
  margin-bottom: 20px;
  font-size: 20px;
}

.command-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.cmd-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.cmd-item code {
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-family: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  font-size: 14px;
}

/* ========== Web Chat ========== */

.web-chat {
  width: 100%;
  padding: 100px max(20px, calc((100% - 1160px) / 2));
  background:
    linear-gradient(180deg, rgba(233, 243, 241, 0.74), rgba(255, 250, 242, 0.9)),
    url("./rain-letter-bg-sm.jpg") center / cover fixed;
}

.portal-layout {
  display: grid;
}

.web-portal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(320px, 1.14fr);
  gap: 26px;
  align-items: center;
  min-height: 420px;
  padding: 34px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(233, 243, 241, 0.42)),
    rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(24px);
}

.web-portal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 224, 200, 0.5), transparent 24%),
    radial-gradient(circle at 12% 86%, rgba(44, 139, 131, 0.18), transparent 26%);
}

.portal-copy,
.portal-preview {
  position: relative;
  z-index: 1;
}

.portal-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 8px 13px;
  border: 1px solid rgba(44, 139, 131, 0.2);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 800;
}

.portal-copy h3 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
}

.portal-copy p {
  max-width: 420px;
  font-size: 17px;
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.portal-preview {
  justify-self: end;
  width: min(560px, 100%);
}

.preview-window {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 28px 80px rgba(20, 33, 38, 0.18);
  backdrop-filter: blur(18px);
}

.preview-top {
  display: flex;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.preview-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(23, 100, 95, 0.3);
}

.preview-body {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  min-height: 260px;
}

.preview-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(233, 243, 241, 0.5);
}

.preview-sidebar span {
  display: block;
  height: 30px;
  border-radius: 999px;
  background: rgba(44, 139, 131, 0.15);
}

.preview-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.44), rgba(233, 243, 241, 0.56));
}

.preview-bubble {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  box-shadow: 0 10px 24px rgba(37, 54, 57, 0.08);
}

.preview-bubble.ai {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
}

.preview-bubble.user {
  align-self: flex-end;
  color: #fff;
  border-bottom-right-radius: 6px;
  background: var(--teal);
}

@media (max-width: 900px) {
  .web-chat {
    padding-right: 20px;
    padding-left: 20px;
    background-attachment: scroll;
  }

  .web-portal {
    grid-template-columns: 1fr;
  }

  .portal-preview {
    justify-self: stretch;
  }
}

@media (max-width: 620px) {
  .web-chat {
    padding: 60px 14px;
  }

  .web-portal {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px;
  }

  .portal-actions .button {
    width: 100%;
  }

  .preview-body {
    grid-template-columns: 1fr;
  }

  .preview-sidebar {
    display: none;
  }

  .preview-chat {
    padding: 20px;
  }
}

/* ========== Section Sub ========== */

.section-sub {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
  margin-top: 8px;
}

/* ========== Typing Indicator ========== */

@keyframes blink {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

.typing-indicator .dot {
  animation: blink 1.4s infinite;
}

.typing-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* ========== Scroll Reveal Animation ========== */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal.delay-1 { transition-delay: 100ms; }
.reveal.delay-2 { transition-delay: 200ms; }
.reveal.delay-3 { transition-delay: 300ms; }
.reveal.delay-4 { transition-delay: 500ms; }
.reveal.delay-5 { transition-delay: 700ms; }

/* Hero bubbles always visible */
.hero .reveal {
  opacity: 1;
  transform: none;
}

/* ========== Responsive: Emotional Bridge ========== */

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

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .phone-demo {
    max-width: 340px;
  }
}

@media (max-width: 620px) {
  .bridge-grid {
    gap: 14px;
  }

  .bridge-item {
    padding: 24px 18px;
  }

  .bridge-quote {
    font-size: 15px;
  }

  .bridge-cta {
    font-size: 17px;
  }

  .command-examples {
    flex-direction: column;
  }

  .phone-demo {
    max-width: 100%;
  }

  .pain-grid {
    grid-template-columns: 1fr;
  }

  .compare-table {
    font-size: 13px;
  }

  .compare-cell {
    padding: 10px 12px;
  }
}

/* ========== Hero Tags ========== */

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #ffe0c8;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

/* ========== Pain Grid ========== */

.pain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.pain-card {
  padding: 28px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  box-shadow: 0 8px 32px rgba(37, 54, 57, 0.05);
  transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}

.pain-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(223, 126, 108, 0.12);
  border-color: rgba(223, 126, 108, 0.18);
}

.pain-card h3 {
  margin-bottom: 10px;
  color: var(--coral);
  font-size: 19px;
  font-weight: 700;
}

.pain-card p {
  color: var(--muted);
  line-height: 1.85;
}

.pain-num {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--coral);
  font-size: 26px;
  font-weight: 900;
  opacity: 0.5;
}

/* ========== Compare Table ========== */

.compare-table {
  margin-bottom: 40px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(37, 54, 57, 0.05);
}

.compare-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
}

.compare-row:not(:last-child) {
  border-bottom: 1px solid var(--line);
}

.compare-header {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.compare-header .compare-cell {
  padding: 14px 20px;
  background: var(--soft);
}

.compare-cell {
  padding: 14px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.compare-highlight {
  color: var(--teal-dark);
  font-weight: 600;
  background: rgba(44, 139, 131, 0.05);
}

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

  .compare-row {
    grid-template-columns: 1fr;
  }

  .compare-header {
    display: none;
  }

  .compare-cell {
    padding: 10px 16px;
  }

  .compare-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
  }
}

/* ========== Theme Toggle ========== */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  background: var(--card-bg);
  cursor: pointer;
  font-size: 16px;
  transition: transform 200ms ease, background 200ms ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

:root:not([data-theme="dark"]) .theme-toggle .icon-moon {
  display: inline;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: inline;
}

/* Dark mode specific adjustments */
:root[data-theme="dark"] .phone-demo {
  background: rgba(22, 36, 40, 0.92);
  border-color: rgba(200, 220, 215, 0.1);
}

:root[data-theme="dark"] .phone-top {
  color: var(--ink);
}

:root[data-theme="dark"] .bubble.user {
  background: var(--teal);
}

:root[data-theme="dark"] .bubble.ai {
  background: rgba(30, 50, 54, 0.9);
  color: var(--ink);
}

:root[data-theme="dark"] .chat-stream {
  background: linear-gradient(180deg, rgba(18, 32, 36, 0.9), rgba(22, 40, 44, 0.9)), var(--soft);
}

:root[data-theme="dark"] .web-chat {
  background:
    linear-gradient(180deg, rgba(15, 26, 30, 0.78), rgba(15, 26, 30, 0.92)),
    url("./rain-letter-bg-sm.jpg") center / cover fixed;
}

:root[data-theme="dark"] .web-portal,
:root[data-theme="dark"] .preview-window {
  background:
    linear-gradient(135deg, rgba(22, 36, 40, 0.82), rgba(26, 46, 44, 0.6)),
    rgba(22, 36, 40, 0.72);
}

:root[data-theme="dark"] .preview-top,
:root[data-theme="dark"] .portal-status {
  background: rgba(15, 26, 30, 0.5);
}

:root[data-theme="dark"] .preview-sidebar {
  background: rgba(26, 46, 44, 0.54);
}

:root[data-theme="dark"] .preview-chat {
  background:
    radial-gradient(circle at 18% 8%, rgba(60, 184, 168, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(18, 32, 36, 0.78), rgba(22, 40, 44, 0.9));
}

:root[data-theme="dark"] .preview-bubble.ai {
  color: var(--ink);
  background: rgba(30, 50, 54, 0.9);
}

:root[data-theme="dark"] .memory-card.active {
  background: linear-gradient(145deg, var(--teal-dark), #1a5e58);
}

:root[data-theme="dark"] .cmd-item {
  background: var(--soft);
  border-color: var(--card-border);
}

:root[data-theme="dark"] .final-cta {
  background: linear-gradient(135deg, rgba(23, 100, 95, 0.15), rgba(223, 126, 108, 0.1)), var(--card-bg);
}

:root[data-theme="dark"] .hero-copy {
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

/* Smooth theme transition */
body,
.site-header::before,
.intro-grid article,
.memory-card,
.dialogue-panel,
.web-portal,
.preview-window,
.deploy-card,
.deploy-notes,
.final-cta,
.bridge-item,
.feature-card,
.memory-commands,
.cmd-item,
.secondary,
.phone-demo {
  transition: background 300ms ease, color 300ms ease, border-color 300ms ease;
}
