:root {
  --ink: #17211f;
  --muted: #5f6f6a;
  --paper: #f6f1e8;
  --mist: #e8f2ee;
  --line: rgba(23, 33, 31, 0.14);
  --teal: #0d7f7b;
  --cyan: #39c5d1;
  --coral: #d86f56;
  --gold: #d7ab43;
  --violet: #6c64c8;
  --white: rgba(255, 255, 255, 0.84);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

#flowCanvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100vw;
  height: 100vh;
  background: #f6f1e8;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(246, 241, 232, 0.82), rgba(246, 241, 232, 0.36) 48%, rgba(246, 241, 232, 0.9)),
    linear-gradient(180deg, rgba(246, 241, 232, 0.16), rgba(246, 241, 232, 0.94) 82%);
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid rgba(23, 33, 31, 0.1);
  background: rgba(246, 241, 232, 0.72);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  color: var(--muted);
  font-size: 14px;
}

nav a {
  white-space: nowrap;
}

nav a:hover {
  color: var(--ink);
}

.nav-action {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.86fr);
  align-items: center;
  gap: clamp(32px, 6vw, 90px);
  padding: 112px clamp(20px, 6vw, 92px) 54px;
}

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

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-family: "SF Mono", "DM Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(48px, 7.4vw, 108px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
}

.hero-lead,
.section-copy p,
.cta-section p {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(17px, 1.55vw, 22px);
  line-height: 1.75;
}

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

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

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

.button.primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 18px 42px rgba(23, 33, 31, 0.18);
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
}

.phone-demo {
  width: min(410px, 100%);
  justify-self: center;
  border: 1px solid rgba(23, 33, 31, 0.18);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 36px 100px rgba(23, 33, 31, 0.18);
  overflow: hidden;
  backdrop-filter: blur(14px);
}

.phone-bar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 11px;
}

.phone-screen {
  position: relative;
  height: 560px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 12%, rgba(57, 197, 209, 0.16), transparent 18%),
    radial-gradient(circle at 86% 78%, rgba(216, 111, 86, 0.16), transparent 18%),
    rgba(246, 241, 232, 0.66);
}

.axis {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--teal), transparent);
  box-shadow: 0 0 22px rgba(13, 127, 123, 0.32);
}

.stamp {
  position: absolute;
  left: 50%;
  width: 190px;
  padding: 12px 14px 12px 44px;
  border: 1px solid rgba(23, 33, 31, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 26px rgba(23, 33, 31, 0.12);
}

.stamp span {
  position: absolute;
  left: 12px;
  top: 14px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.stamp b {
  display: block;
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 12px;
}

.stamp small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.stamp-photo {
  top: 92px;
  transform: translateX(-106%);
}

.stamp-photo span {
  background: linear-gradient(135deg, var(--cyan), var(--teal));
}

.stamp-note {
  top: 252px;
  transform: translateX(10%);
}

.stamp-note span {
  background: linear-gradient(135deg, var(--gold), var(--coral));
}

.stamp-audio {
  top: 418px;
  transform: translateX(-106%);
}

.stamp-audio span {
  background: repeating-linear-gradient(90deg, var(--violet) 0 3px, rgba(108, 100, 200, 0.3) 3px 7px);
}

.section {
  min-height: 76vh;
  padding: clamp(78px, 12vw, 150px) clamp(20px, 6vw, 92px);
}

.story-section,
.flood-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: clamp(34px, 6vw, 82px);
  background: rgba(255, 255, 255, 0.38);
}

.quote-section {
  min-height: 58vh;
  padding: clamp(82px, 11vw, 132px) clamp(20px, 6vw, 92px);
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--ink);
  color: var(--paper);
}

.quote-mark {
  display: block;
  margin-bottom: 18px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: clamp(64px, 9vw, 120px);
  line-height: 0.55;
  opacity: 0.62;
}

.quote-section h2 {
  max-width: 800px;
  margin: 0 auto 22px;
  color: #f3dfb4;
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1.22;
}

.quote-section p {
  margin: 0;
  color: rgba(246, 241, 232, 0.72);
  font-size: clamp(17px, 2vw, 23px);
}

.memory-stack {
  display: grid;
  gap: 14px;
}

.memory-row {
  min-height: 86px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 16px 40px rgba(23, 33, 31, 0.08);
}

.memory-row span {
  color: var(--coral);
  font-family: "SF Mono", ui-monospace, monospace;
  font-weight: 700;
}

.memory-row strong {
  font-size: clamp(17px, 2vw, 24px);
}

.feature-section {
  background: rgba(232, 242, 238, 0.7);
}

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

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

.feature-card {
  min-height: 250px;
  padding: 24px;
  border: 1px solid rgba(23, 33, 31, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.feature-icon {
  display: inline-flex;
  margin-bottom: 32px;
  color: var(--teal);
  font-family: "SF Mono", ui-monospace, monospace;
  font-weight: 800;
}

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

.flood-visual {
  position: relative;
  min-height: 460px;
}

.stream {
  position: absolute;
  top: 8%;
  bottom: 6%;
  width: 3px;
  border-radius: 999px;
  animation: streamDrift 4s ease-in-out infinite;
}

.stream-a {
  left: 28%;
  background: var(--teal);
}

.stream-b {
  left: 50%;
  background: var(--coral);
  animation-delay: -1.2s;
}

.stream-c {
  left: 72%;
  background: var(--violet);
  animation-delay: -2.4s;
}

@keyframes streamDrift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(12px); }
}

.mini-photo {
  position: absolute;
  width: 62px;
  height: 62px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  box-shadow: 0 16px 30px rgba(23, 33, 31, 0.16);
}

.mini-photo.one {
  left: 19%;
  top: 21%;
  background: linear-gradient(135deg, var(--cyan), #f8d78c);
}

.mini-photo.two {
  left: 44%;
  top: 54%;
  background: linear-gradient(135deg, var(--coral), #f0b1d2);
}

.mini-photo.three {
  left: 66%;
  top: 35%;
  background: linear-gradient(135deg, var(--violet), var(--teal));
}

.cta-section {
  min-height: 64vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(92px, 12vw, 150px) 20px;
}

.cta-section p {
  margin-inline: auto;
}

.cta-section .button {
  margin-top: 18px;
}

footer {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(20px, 6vw, 92px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (max-width: 900px) {
  .site-header {
    position: sticky;
  }

  nav a:not(.nav-action) {
    display: none;
  }

  .hero,
  .story-section,
  .flood-section {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 72px;
  }

  .phone-demo {
    width: min(390px, 94vw);
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 64px;
    padding-inline: 14px;
  }

  .brand span:last-child {
    max-width: 138px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    min-height: auto;
    padding-inline: 16px;
  }

  h1 {
    font-size: 46px;
  }

  h2 {
    font-size: 34px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .phone-screen {
    height: 500px;
  }

  .stamp {
    width: 158px;
    padding-right: 10px;
  }

  .section {
    padding-inline: 16px;
  }

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

  .memory-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
