:root {
  --bg: #f3f7f6;
  --surface: #ffffff;
  --border: #e2eae8;
  --ink: #14232b;
  --muted: #5a6b73;          /* secondary #6f8189, darkened for 4.5:1 text contrast */
  --action: #12a58a;
  --action-strong: #0c7d68;  /* button fill: white text 5:1 */
  --amber: #f2a33a;
  --violet: #7c6cf0;
  --rose: #e5566d;
  --blue: #3b9be0;
  --ok-bg: #dff5ee;
  --ok-fg: #0d7d68;
  --soon-bg: #fff1d6;
  --soon-fg: #9a6200;
  --over-bg: #fde3e1;
  --over-fg: #b3261e;
  --radius: 18px;
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
p { margin: 0; }
h1, h2 {
  font-family: Gabarito, Figtree, system-ui, sans-serif;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(2.05rem, 1.45rem + 2.7vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.1rem); font-weight: 700; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: var(--gutter); z-index: 10; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* Header */
.top { max-width: 1120px; margin: 0 auto; padding: 14px var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: Gabarito, sans-serif; font-weight: 700; font-size: 1.05rem; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }

main { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
section { padding: 52px 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 22px; border-radius: 14px;
  font: 600 1rem/1 Figtree, system-ui, sans-serif;
  text-decoration: none; border: 0; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--action-strong); color: #fff; }
.btn-primary:hover { background: #0a6b59; }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--border); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); min-height: 44px; padding: 0 16px; }
a.btn:not([href]) { background: #dfe7e5; color: var(--muted); box-shadow: none; cursor: not-allowed; transform: none; }

/* Hero */
.hero { display: grid; gap: 24px; align-items: center; padding-top: 16px; }
.lead { margin-top: 16px; font-size: 1.1rem; color: var(--muted); max-width: 36ch; }
.cta-row { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1 / 1; margin: 0 auto; }
.art-static { width: 100%; height: 100%; }
.scene-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .8s ease; }
.has-3d .scene-canvas { opacity: 1; }
.has-3d .art-static { display: none; }

/* Story sections */
.story { display: grid; gap: 28px; align-items: center; border-top: 1px solid var(--border); }
.story-copy p { margin-top: 14px; color: var(--muted); max-width: 40ch; }

/* Dose card: a paper record with a Dei stamp and a notification sliding over it */
.dose-wrap { position: relative; padding-bottom: 56px; }
.dose-card {
  position: relative; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 20px 18px 24px;
  box-shadow: 0 22px 40px -30px rgba(20, 35, 43, .45);
}
.dose-card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 5px; border-radius: 0 4px 4px 0; background: var(--amber); }
.dose-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dose-name { font: 700 1.25rem/1.2 Gabarito, sans-serif; }
.dose-meta { color: var(--muted); font-size: .95rem; margin-top: 4px; }
.dose-btn {
  display: grid; place-items: center; min-width: 76px; min-height: 48px; padding: 0 16px;
  border-radius: 14px; background: var(--action-strong); color: #fff; font-weight: 700;
}
.stamp {
  display: inline-block; margin-top: 18px; padding: 6px 12px;
  border: 2px solid var(--action-strong); border-radius: 10px;
  color: var(--action-strong); background: var(--ok-bg);
  font: 700 .95rem Gabarito, sans-serif; transform: rotate(-3deg); transform-origin: left center;
}
.notif {
  position: absolute; right: 0; bottom: 0; width: min(300px, 88%);
  display: flex; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 18px 36px -18px rgba(20, 35, 43, .5);
}
.notif img { border-radius: 10px; flex: none; }
.notif-title { font-weight: 700; font-size: .92rem; }
.notif-body { color: var(--muted); font-size: .9rem; }

/* Vaccines */
.vac-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vac-row {
  display: flex; align-items: center; gap: 12px; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
}
.vac-name { font-weight: 600; flex: 1; }
.pet-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; }
.badge { padding: 5px 11px; border-radius: 999px; font-size: .85rem; font-weight: 600; white-space: nowrap; background: var(--ok-bg); color: var(--ok-fg); }
.badge.soon { background: var(--soon-bg); color: var(--soon-fg); }
.badge.over { background: var(--over-bg); color: var(--over-fg); }

/* Weight chart */
.chart { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.chart svg { width: 100%; height: auto; }
.chart .line { fill: none; stroke: var(--amber); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }

/* Vaccination card: the one dark block */
.vault { display: grid; gap: 28px; background: var(--ink); color: #eef5f3; border-radius: 26px; padding: 28px 20px; margin-top: 52px; }
.vault h2 { color: #fff; }
.vault-copy p { margin-top: 14px; color: #b9c9cf; max-width: 40ch; }
.vault-card { background: #fff; color: var(--ink); border-radius: 18px; padding: 18px; transform: rotate(-1.5deg); box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .6); }
.pet-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }
.pet-ring { width: 56px; height: 56px; border-radius: 50%; border: 4px solid var(--violet); display: grid; place-items: center; background: #efedfd; flex: none; }
.pet-name { font: 800 1.3rem/1.1 Gabarito, sans-serif; }
.pet-meta { color: var(--muted); font-size: .9rem; }
.card-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.card-line:last-child { border-bottom: 0; }

/* Features and privacy */
.features-sec { border-top: 1px solid var(--border); }
.features { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--border); }
.features li { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.features li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--action); margin-top: .55em; flex: none; }
.privacy { margin-top: 22px; color: var(--muted); max-width: 52ch; }
.final { border-top: 1px solid var(--border); padding-bottom: 36px; }
.final .cta-row { margin-top: 20px; }

/* Invite and invalid states */
.invite { display: flex; flex-direction: column; gap: 4px; padding: 0 0 40px; }
.invite-art { position: relative; width: 100%; height: 150px; margin: 0 auto; }
.invite-card { display: grid; gap: 0; }
.invite-card h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
.invite-card > .lead { margin-top: 12px; }
.code-label { margin-top: 18px; color: var(--muted); font-size: .95rem; }
.code-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.code {
  font: 800 clamp(2.1rem, 9vw, 3rem)/1 Gabarito, sans-serif;
  letter-spacing: .04em; font-variant-numeric: tabular-nums; white-space: nowrap; margin: 4px 0;
}
.status { min-height: 1.5em; margin-top: 4px; color: var(--action-strong); font-weight: 600; font-size: .95rem; }
.invite-actions { display: grid; gap: 10px; margin-top: 12px; }
.invite-actions .btn { width: 100%; }
.steps-title { margin-top: 28px; font-size: 1.3rem; }
.steps { margin: 12px 0 0; padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; color: var(--ink); }
.steps li::before {
  content: counter(s); width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; background: var(--ok-bg); color: var(--ok-fg);
  font: 800 1rem Gabarito, sans-serif;
}
.text-link { margin-top: 24px; color: var(--action-strong); font-weight: 600; }

.foot { max-width: 1120px; margin: 0 auto; padding: 8px var(--gutter) 32px; color: var(--muted); font-size: .88rem; }

/* Phone first; wider screens get two columns */
@media (min-width: 880px) {
  .top { padding-top: 22px; }
  .hero { grid-template-columns: 1.05fr .95fr; gap: 48px; min-height: calc(100vh - 110px); }
  .story { grid-template-columns: 1fr 1fr; gap: 72px; padding: 80px 0; }
  .story.flip .story-copy { order: 2; }
  .vault { grid-template-columns: 1fr 1fr; align-items: center; padding: 56px; gap: 64px; }
  .invite { flex-direction: row; align-items: center; gap: 56px; min-height: calc(100vh - 110px); padding-top: 24px; }
  .invite-art { flex: 1 1 0; height: 460px; max-width: 460px; }
  .invite-card { flex: 1 1 0; max-width: 480px; }
  .invite-actions { grid-template-columns: 1fr 1fr; }
  .invite-actions .btn { width: auto; }
}

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