/* ───────────────────────────────────────────────────────────────────────────
   Sal — warm, calm & editorial. The website wears the app's exact skin:
   Fredoka display over Plus Jakarta Sans, cream paper, sage & coral accents,
   soft warm shadows, and one gentle signature motion per view.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --cream: #fbf6ee;
  --card: #ffffff;
  --line: #efe7db;
  --ink: #2c2722;
  --ink-soft: #978d82;
  --sage: #5ba888;
  --sage-deep: #3f8e70;
  --sage-mint: #8fd3b4;
  --sage-soft: #e2f0e9;
  --coral: #ff7a59;
  --coral-deep: #f2603c;
  --coral-soft: #ffe6dd;
  --honey: #f2b85a;
  --blue: #7fb1c9;
  --radius: 24px;
  --radius-lg: 28px;
  --shadow: 0 8px 24px -12px rgba(63, 50, 35, 0.25);
  --shadow-hero: 0 18px 40px -18px rgba(63, 50, 35, 0.35);
  --coral-lift: 0 10px 26px -10px rgba(255, 122, 89, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Warm paper atmosphere: two soft glows + a whisper of grain. */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(560px 420px at 12% -4%, rgba(143, 211, 180, 0.22), transparent 66%),
    radial-gradient(640px 460px at 96% 12%, rgba(255, 122, 89, 0.13), transparent 62%),
    var(--cream);
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.24 0 0 0 0 0.19 0 0 0 0 0.13 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, .display {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

a { color: var(--sage-deep); text-decoration: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 28px; }

/* ── Header ─────────────────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(251, 246, 238, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
}
.brand img { width: 38px; height: 38px; object-fit: contain; }
.nav .links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav .links a { color: var(--ink-soft); transition: color 0.15s; }
.nav .links a:hover { color: var(--sage-deep); }
/* The coral CTA keeps its white label — the link tint above must not win. */
.nav .links a.btn-coral,
.nav .links a.btn-coral:hover { color: #fff; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-coral {
  background: var(--coral);
  color: #fff;
  box-shadow: var(--coral-lift);
}
.btn-coral:hover { background: var(--coral-deep); transform: translateY(-1px); }
.btn-ghost {
  background: var(--sage-soft);
  color: var(--sage-deep);
}
.btn-ghost:hover { background: #d5e9df; }
.btn-small { padding: 10px 20px; font-size: 0.9rem; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding-block: 80px 88px;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.1rem);
  color: var(--ink);
}
.hero h1 .sage { color: var(--sage-deep); }
.hero p.lede {
  margin-top: 20px;
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 34rem;
}
.hero .cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero .fine { margin-top: 14px; font-size: 0.85rem; color: var(--ink-soft); }

/* Staggered hero entrance — animated only when scripts run (html.js), so
   animation-less renderers still show a complete hero. */
.js .rise {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.3, 1.06) forwards;
}
.js .rise.d1 { animation-delay: 0.08s; }
.js .rise.d2 { animation-delay: 0.18s; }
.js .rise.d3 { animation-delay: 0.3s; }
.js .rise.d4 { animation-delay: 0.44s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── The CSS phone (a living render of Home) ────────────────────────────── */
.phone-stage { position: relative; display: flex; justify-content: center; }
.phone {
  width: 320px;
  background: var(--cream);
  border: 10px solid var(--ink);
  border-radius: 44px;
  padding: 26px 18px 22px;
  box-shadow: var(--shadow-hero);
  transform: rotate(2.5deg);
}
.phone .greeting { font-size: 0.7rem; letter-spacing: 0.12em; font-weight: 700; color: var(--ink-soft); }
.phone .date { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.35rem; }

.ring-box { display: flex; justify-content: center; margin: 18px 0 6px; }
.ring { position: relative; width: 190px; height: 190px; }
.ring svg { transform: rotate(-90deg); }
.ring .track { stroke: #eee5d8; }
.ring .arc {
  stroke: url(#ringGrad);
  stroke-linecap: round;
  stroke-dasharray: 534;
  stroke-dashoffset: 534;
  animation: ringfill 1.6s cubic-bezier(0.34, 1.2, 0.4, 1) 0.7s forwards;
}
@keyframes ringfill { to { stroke-dashoffset: 240; } }
.ring .center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring .num { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 2.3rem; }
.ring .sub { font-size: 0.85rem; color: var(--ink-soft); }

.sal-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sage-soft);
  border-radius: 20px;
  padding: 8px 12px;
  margin: 14px 0;
}
.sal-row img { width: 40px; height: 40px; object-fit: contain; }
.sal-row span { font-size: 0.86rem; color: var(--sage-deep); font-weight: 600; }

.macro { margin-top: 10px; }
.macro .label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
}
.macro .label em { font-style: normal; color: var(--ink-soft); font-weight: 600; }
.macro .bar {
  height: 8px;
  border-radius: 99px;
  background: #eee5d8;
  overflow: hidden;
  margin-top: 4px;
}
.macro .bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  width: 0;
  animation: grow 1.1s cubic-bezier(0.22, 1, 0.3, 1) 1s forwards;
}
.macro.p i { background: var(--coral); --w: 52%; }
.macro.c i { background: var(--honey); --w: 44%; }
.macro.f i { background: var(--blue); --w: 38%; }
@keyframes grow { to { width: var(--w); } }

/* The real cat, gently bobbing beside the phone. */
.hero-cat {
  position: absolute;
  width: 168px;
  right: -30px;
  bottom: -26px;
  filter: drop-shadow(0 14px 22px rgba(63, 50, 35, 0.28));
  animation: bob 3.4s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-9px) rotate(1.5deg); }
}

/* ── Chat marquee ───────────────────────────────────────────────────────── */
.marquee {
  border-block: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee .track {
  display: inline-block;
  animation: slide 36s linear infinite;
}
.marquee span {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 9px 20px;
  margin-right: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.marquee span b { color: var(--sage-deep); font-weight: 700; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ── Sections ───────────────────────────────────────────────────────────── */
section { padding-block: 84px; }
.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: var(--sage-deep);
  text-transform: uppercase;
}
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-top: 10px; }
.section-sub { color: var(--ink-soft); font-size: 1.08rem; max-width: 38rem; margin-top: 12px; }
.center { text-align: center; }
.center .section-sub { margin-inline: auto; }

/* Scroll reveal — progressive: content is visible by default and only
   hidden-for-entrance when JS is actually running (html.js). No-JS
   environments (previews, crawlers, reader modes) see the full page. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.3, 1.06);
}
.js .reveal.in { opacity: 1; transform: none; }

/* Chat demo */
.chat-demo {
  max-width: 560px;
  margin: 44px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bubble {
  max-width: 78%;
  padding: 14px 18px;
  font-size: 1rem;
  box-shadow: var(--shadow);
}
.bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--sage), var(--sage-mint));
  color: #fff;
  font-weight: 600;
  border-radius: 18px 18px 6px 18px;
}
.bubble.sal {
  align-self: flex-start;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  background: transparent;
  box-shadow: none;
  padding: 0;
  max-width: 88%;
}
.bubble.sal img { width: 34px; height: 34px; flex-shrink: 0; object-fit: contain; }
.bubble.sal .txt {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 4px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
}
.logcard {
  margin-left: 46px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  max-width: 78%;
}
.logcard .item {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 6px 0;
}
.logcard .item em { font-style: normal; color: var(--ink-soft); font-weight: 600; }
.logcard .add {
  margin-top: 10px;
  background: var(--coral);
  color: #fff;
  text-align: center;
  font-weight: 700;
  border-radius: 14px;
  padding: 11px;
  box-shadow: var(--coral-lift);
}

/* Feature grid */
.grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.3, 1.06), box-shadow 0.25s;
}
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow-hero); }
.feature .ico {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.ico.sage { background: var(--sage-soft); }
.ico.coral { background: var(--coral-soft); }
.ico.honey { background: #fdf0d7; }
.feature h3 { font-size: 1.25rem; margin-bottom: 8px; }
.feature p { color: var(--ink-soft); font-size: 0.98rem; }

/* Accuracy band */
.band {
  background: linear-gradient(135deg, var(--sage), var(--sage-mint));
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 52px 48px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  align-items: center;
  box-shadow: var(--shadow-hero);
}
.band h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.band p { margin-top: 12px; opacity: 0.94; }
.band .stat {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 22px;
  text-align: center;
}
.band .stat + .stat { margin-top: 14px; }
.band .stat b { font-family: "Fredoka", sans-serif; font-size: 1.9rem; display: block; }
.band .stat span { font-size: 0.9rem; opacity: 0.92; }

/* Pricing */
.plans {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.plan.featured {
  background: var(--sage-soft);
  border: 2px solid var(--sage);
  position: relative;
}
.plan .tag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--honey);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: 99px;
}
.plan h3 { font-size: 1.2rem; }
.plan .price { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 2.4rem; margin: 12px 0 2px; }
.plan .per { color: var(--ink-soft); font-size: 0.9rem; }
.plan ul { list-style: none; margin: 20px 0 26px; flex: 1; }
.plan li { padding: 7px 0 7px 28px; position: relative; font-size: 0.97rem; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--sage-deep); font-weight: 800; }
.plan .btn { justify-content: center; }

/* Final CTA + footer */
.final {
  text-align: center;
  padding-block: 96px 110px;
}
.final img { width: 150px; animation: bob 3.4s ease-in-out infinite; }
.final h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin-top: 18px; }
.final p { color: var(--ink-soft); font-size: 1.1rem; margin-top: 12px; }
.final .cta-row { justify-content: center; display: flex; gap: 16px; margin-top: 30px; flex-wrap: wrap; }

footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 46px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
footer .row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
footer .row .spacer { flex: 1; }
footer a { color: var(--ink-soft); font-weight: 600; }
footer a:hover { color: var(--sage-deep); }

/* ── Legal pages ────────────────────────────────────────────────────────── */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 28px 96px;
}
.legal h1 { font-size: clamp(2.1rem, 4vw, 2.9rem); }
.legal .updated { color: var(--ink-soft); margin-top: 10px; font-size: 0.95rem; }
.legal h2 { font-size: 1.35rem; margin: 40px 0 12px; }
.legal p, .legal li { color: #55493d; font-size: 1.02rem; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal li { margin: 6px 0; }
.legal .card-note {
  background: var(--sage-soft);
  border-radius: 18px;
  padding: 18px 22px;
  margin-top: 26px;
  color: var(--sage-deep);
  font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; text-align: center; }
  .hero p.lede { margin-inline: auto; }
  .hero .cta-row { justify-content: center; }
  .phone-stage { margin-top: 26px; }
  .hero-cat { right: 4px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .band { grid-template-columns: 1fr; padding: 40px 30px; }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .nav .links a:not(.btn) { display: none; }
  .wrap { padding-inline: 22px; }
  section { padding-block: 56px; }
  .hero { padding-block: 56px 64px; gap: 36px; }
  .hero p.lede { font-size: 1.08rem; }
  .cta-row .btn { width: 100%; justify-content: center; }
  .phone { width: min(320px, 88vw); padding: 20px 14px 18px; }
  .hero-cat { width: 118px; right: 0; bottom: -18px; }
  .band { padding: 32px 22px; }
  .band h2 { font-size: 1.5rem; }
  .plan { padding: 26px 22px; }
  .final { padding-block: 64px 80px; }
  .chat-demo { margin-top: 32px; }
  .bubble { max-width: 88%; }
  .logcard { margin-left: 30px; max-width: 88%; }
  footer .row { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .rise, .reveal { opacity: 1; transform: none; }
  .ring .arc { stroke-dashoffset: 240; }
  .macro .bar i { width: var(--w); }
}
