:root {
  --paper: #F4F6FA;
  --paper-2: #E4E9F1;
  --ink: #0F2241;
  --muted: #4E5B70;
  --blue: #226BC2;
  --blue-deep: #17508F;
  --bubble: #DCEAFB;
  --marker: #F5D35B;
  --white: #FFFFFF;

  --font: "Bricolage Grotesque", system-ui, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--marker);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1, h2 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.04;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }

.sub {
  margin-top: 20px;
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  font-size: 1.02rem;
  text-decoration: none;
  border: 2px solid var(--blue);
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-light { background: var(--bubble); color: var(--blue-deep); border-color: var(--bubble); }
.btn-light:hover { background: var(--white); border-color: var(--white); }
.btn-small { min-height: 42px; padding: 0 20px; font-size: .95rem; }

/* Nav */
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--paper-2);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  margin-right: auto;
}
.brand img { height: 34px; width: auto; mix-blend-mode: multiply; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--muted);
}
.nav-links a:hover { color: var(--ink); }

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(64px, 9vw, 120px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 5.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.lede {
  margin-top: 28px;
  font-size: 1.22rem;
  color: var(--muted);
  max-width: 33em;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Phone / chat */
.phone {
  background: var(--paper-2);
  border: 10px solid var(--ink);
  border-radius: 40px;
  overflow: hidden;
  max-width: 400px;
  width: 100%;
  justify-self: end;
  box-shadow: 24px 24px 0 var(--blue);
}
.phone-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
  background: var(--ink);
  color: var(--white);
}
.phone-bar strong { display: block; font-weight: 600; line-height: 1.2; }
.phone-bar span { font-size: .82rem; color: #B9C9E2; }
.phone-bar img { background: var(--white); border-radius: 50%; padding: 6px; }

.chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 14px 22px;
  min-height: 420px;
}

.msg {
  position: relative;
  max-width: 86%;
  padding: 9px 12px 10px;
  border-radius: 14px;
  font-size: .96rem;
  line-height: 1.42;
  background: var(--white);
}
.msg.out { align-self: flex-end; background: var(--bubble); border-top-right-radius: 4px; }
.msg.in { align-self: flex-start; border-top-left-radius: 4px; }
.msg b { font-weight: 600; }

.who {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 2px;
}

.cite {
  display: block;
  margin-top: 8px;
  font-size: .8rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--marker) 55%, transparent);
  padding: 3px 8px;
  border-radius: 6px;
  width: fit-content;
}

.voice { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.play {
  width: 0; height: 0;
  border-left: 11px solid var(--blue);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
.wave {
  flex: 1;
  height: 22px;
  background: var(--blue);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 22' preserveAspectRatio='none'%3E%3Cpath d='M0 9h120v4H0z M6 5h3v12H6z M18 2h3v18h-3z M30 6h3v10h-3z M42 1h3v20h-3z M54 4h3v14h-3z M66 7h3v8h-3z M78 2h3v18h-3z M90 5h3v12h-3z M102 3h3v16h-3z M114 6h3v10h-3z' fill='black'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 22' preserveAspectRatio='none'%3E%3Cpath d='M0 9h120v4H0z M6 5h3v12H6z M18 2h3v18h-3z M30 6h3v10h-3z M42 1h3v20h-3z M54 4h3v14h-3z M66 7h3v8h-3z M78 2h3v18h-3z M90 5h3v12h-3z M102 3h3v16h-3z M114 6h3v10h-3z' fill='black'/%3E%3C/svg%3E");
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  opacity: .75;
}
.dur { font-size: .8rem; color: var(--muted); }

.typing {
  align-self: flex-start;
  display: none;
  gap: 4px;
  padding: 12px 14px;
  background: var(--white);
  border-radius: 14px;
  border-top-left-radius: 4px;
}
.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
  animation: blink 1s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Played once on load by script.js */
.chat.is-playing [data-step] { display: none; }
.chat.is-playing [data-step].shown { display: block; animation: pop .28s ease-out; }
.chat.is-playing .typing.on { display: flex; }
@keyframes pop {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* Problem */
.problem {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(72px, 10vw, 128px) 0;
}
.problem .sub { color: #A7B6CF; }
.problem-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}
.pains { display: grid; gap: 0; }
.pains li {
  padding: 28px 0;
  border-top: 1px solid #2A3D5E;
}
.pains li:last-child { border-bottom: 1px solid #2A3D5E; }
.pains h3 { color: var(--bubble); margin-bottom: 8px; }
.pains p { color: #CBD5E5; max-width: 32em; }

/* Solution */
.solution { padding: clamp(72px, 10vw, 128px) 0 clamp(40px, 6vw, 80px); }
.solution-head { max-width: 760px; margin-bottom: clamp(48px, 7vw, 88px); }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding: clamp(36px, 5vw, 56px) 0;
  border-top: 1px solid var(--paper-2);
}
.feature-copy h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 700; letter-spacing: -0.02em; }
.feature-copy p { margin-top: 14px; color: var(--muted); max-width: 30em; }

.snippet {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--paper-2);
  border-radius: 24px;
}
.snippet .msg { max-width: 82%; }

.receipt {
  display: grid;
  gap: 5px;
  width: 140px;
  padding: 12px;
  margin-bottom: 8px;
  background: var(--white);
  border-radius: 6px;
  transform: rotate(-3deg);
}
.receipt span { height: 4px; background: #C8D0DC; border-radius: 2px; }
.receipt span:nth-child(2) { width: 70%; }
.receipt span:nth-child(4) { width: 45%; background: var(--ink); }

.msg.locked {
  background: var(--white);
  box-shadow: inset 3px 0 0 var(--blue);
}

/* About */
.about { padding: clamp(56px, 8vw, 104px) 0; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
  padding-top: clamp(40px, 6vw, 72px);
  border-top: 2px solid var(--ink);
}
.about-grid p {
  font-size: clamp(1.15rem, 1.6vw, 1.32rem);
  line-height: 1.6;
  max-width: 36em;
}

/* Contact */
.contact {
  background: var(--blue);
  color: var(--white);
  padding: clamp(72px, 10vw, 128px) 0;
}
.contact-inner { max-width: 820px; }
.contact h2 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); font-weight: 800; }
.contact .email { margin: 20px 0 0; font-size: 1rem; }
.contact .email a { color: var(--white); font-weight: 600; user-select: all; }
.contact p { margin: 20px 0 36px; font-size: 1.22rem; color: #DCE8F8; max-width: 30em; }

/* Footer */
.footer { background: var(--ink); color: #B9C9E2; font-size: .92rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  padding-bottom: 24px;
}
.footer ul { display: flex; gap: 20px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--white); text-decoration: underline; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .problem-grid, .feature, .about-grid { grid-template-columns: minmax(0, 1fr); }
  .phone { justify-self: start; }
  .nav-links { display: none; }
}
@media (max-width: 480px) {
  .phone { box-shadow: 12px 12px 0 var(--blue); border-width: 8px; }
  .cta-row .btn { flex: 1 1 100%; }
  .snippet { padding: 16px; }
  .voice { min-width: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
