: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);
}

* {
  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.34);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.72);
  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, 1fr);
  align-items: end;
  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.82), rgba(17, 25, 30, 0.5) 38%, rgba(17, 25, 30, 0.1) 68%),
    linear-gradient(180deg, rgba(17, 25, 30, 0.2), rgba(17, 25, 30, 0.26)),
    url("./rain-letter-bg.png") 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: 680px;
  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: 20px;
  font-size: clamp(52px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-lead {
  margin-bottom: 16px;
  font-size: clamp(25px, 3.2vw, 43px);
  font-weight: 700;
  line-height: 1.18;
}

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

.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: rgba(255, 255, 255, 0.56);
}

.phone-demo {
  display: none;
}

.phone-top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 14px;
  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: 10px;
  min-height: 430px;
  padding: 20px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(252, 248, 239, 0.9), rgba(236, 246, 243, 0.9)),
    #f6efe4;
}

.bubble {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.65;
  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: 14px 8px 4px;
  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,
.deploy-card,
.deploy-notes,
.final-cta {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
  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,
.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: #f9fff9;
  background: #152329;
  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;
  }

  .rain-scene {
    inset: 1% 0 auto auto;
    width: 290px;
    height: 390px;
    max-width: 76vw;
  }

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

  .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: 60px;
  }

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

  .chat-stream {
    min-height: 360px;
    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;
  }
}
