/* Self-hosted font (SIL OFL, see assets/fonts/OFL.txt). No third-party requests. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F6F9F7;
  --surface: #FFFFFF;
  --ink: #132E27;
  --ink-strong: #0A1612;
  --muted: #4B5F59;
  --line: #DDE6E2;
  --brand: #3D7362;
  --brand-deep: #2B5A4C;
  --brand-soft: #E4F1EB;
  --mint: #CFEDE2;
  --sand: #FBF4E6;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(10, 22, 18, .04), 0 12px 32px -12px rgba(10, 22, 18, .18);
  --shadow-lg: 0 30px 60px -24px rgba(10, 22, 18, .35);
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;

  /* Severity colours. Red is for emergency messaging only. */
  --red: #B42318;
  --red-ink: #8F1C13;
  --red-soft: #FDECEA;
  --amber-ink: #7A4300;
  --amber-soft: #FFF3DC;
  --amber-line: #E3B04F;
  --green-ink: #17663A;
  --green-soft: #E7F4EC;
  --green-line: #8CC7A1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3 { color: var(--ink-strong); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 800; text-wrap: balance; }
h3 { font-size: 1.12rem; font-weight: 700; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.sprite { position: absolute; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 780px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 56px; z-index: 30; background: var(--surface); padding: 12px 16px; border-radius: 10px; }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

/* Emergency strip: always visible */
.alert {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 16px;
  background: var(--red); color: #fff;
  font-size: 1rem; text-decoration: none;
}
.alert .icon { width: 18px; height: 18px; }
.alert strong { text-decoration: underline; text-underline-offset: 3px; }
.alert:hover { background: var(--red-ink); }
.alert:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }

/* Nav */
.nav { display: flex; align-items: center; gap: 24px; padding: 14px 0; position: relative; z-index: 2; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--ink-strong); }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; font-weight: 800; font-size: 1.2rem; }
.brand-text b { color: var(--brand); font-weight: 800; }
.brand-text small { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.nav nav {
  display: flex; gap: 2px; margin-left: auto; padding: 4px;
  background: rgba(255, 255, 255, .7); border: 1px solid var(--line); border-radius: 999px;
}
.nav nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.93rem;
}
.nav nav a:hover { color: var(--ink-strong); background: var(--brand-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 24px;
  background: var(--ink-strong); color: #fff;
  border: 2px solid var(--ink-strong); border-radius: 999px;
  text-decoration: none; font-weight: 700;
  transition: background .15s ease, border-color .15s ease;
}
.btn .icon { width: 20px; height: 20px; }
.btn:hover { background: var(--brand); border-color: var(--brand); }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: 0.9rem; }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn-ghost { background: #fff; color: var(--ink-strong); border-color: var(--line); }
.btn-ghost:hover { background: #fff; color: var(--ink-strong); border-color: var(--ink-strong); }
.btn-light { background: #fff; color: var(--ink-strong); border-color: #fff; }
.btn-light:hover { background: var(--brand-soft); border-color: var(--brand-soft); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn-outline-light:hover { background: #fff; color: var(--ink-strong); border-color: #fff; }
.closing a:focus-visible, .story a:focus-visible { outline-color: #fff; }

/* Hero */
.hero { position: relative; padding: 40px 0 88px; background: linear-gradient(180deg, var(--brand-soft) 0%, var(--bg) 100%); }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.eyebrow { margin: 0 0 18px; color: var(--brand); font-weight: 700; font-size: 0.9rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.3rem); font-weight: 800; letter-spacing: -0.035em; text-wrap: balance; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 560px; margin: 22px 0 30px; }
.lead strong { display: block; font-size: 1.3rem; line-height: 1.4; color: var(--ink-strong); margin-bottom: 8px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust .icon { width: 20px; height: 20px; color: var(--brand); }

/* Hero phone with a real app screen */
.hero-visual { position: relative; margin: 0; display: grid; justify-items: center; }
.phone { width: 290px; padding: 10px; background: #0E1B17; border-radius: 44px; box-shadow: var(--shadow), inset 0 0 0 2px #26352F; }
.phone-shot { display: block; width: 100%; height: auto; border-radius: 34px; }
.hero-visual figcaption { margin-top: 18px; font-size: 0.8rem; color: var(--muted); }

/* Placeholders: clearly marked, to be replaced with real images */
.ph {
  display: grid; place-items: center; padding: 16px; height: 100%;
  background: repeating-linear-gradient(45deg, #F1F4F2, #F1F4F2 12px, #E9EEEC 12px, #E9EEEC 24px);
  border: 2px dashed #9AAAA6; border-radius: var(--radius);
  color: var(--muted); font: 600 .82rem/1.4 ui-monospace, Menlo, Consolas, monospace; text-align: center;
}

/* Sections */
.section { padding: 88px 0; }
.section h2, .sub { text-align: center; }
.sub { color: var(--muted); margin: 10px auto 0; max-width: 620px; font-size: 1.05rem; }
.section-tint { background: var(--surface); border-block: 1px solid var(--line); }

/* How it works: 2 AM example */
.story { background: var(--ink-strong); color: #fff; padding: 88px 0; }
.story-intro { position: relative; max-width: 700px; margin: 0 auto; text-align: center; }
.story-tag { margin: 0 0 12px; color: #8FD6BE; font-weight: 700; font-size: 0.9rem; }
.story h2 { color: #fff; }
.story-intro p { color: #B9CCC5; font-size: 1.1rem; margin: 14px 0 0; }
.story-steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 44px 0 0; }
.story-steps li {
  counter-increment: step;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius); padding: 24px;
}
.story-steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 34px; height: 34px; margin-bottom: 14px; border-radius: 50%;
  background: var(--mint); color: var(--ink-strong); font-weight: 800;
}
.story-steps h3 { color: #fff; font-size: 1.05rem; }
.story-steps p { color: #C9D8D3; margin: 6px 0 0; }
.story-note { max-width: 680px; margin: 32px auto 0; text-align: center; font-size: 0.9rem; color: #B9CCC5; }

/* Result levels: colour always paired with words */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.level { position: relative; border-radius: var(--radius); border: 2px solid; padding: 28px 24px 24px; }
.level p { margin: 8px 0 0; }
.level-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 14px;
  background: #fff;
}
.level-icon .icon { width: 26px; height: 26px; }
.level .level-tag { display: inline-block; margin: 0 0 8px; font-size: 0.75rem; font-weight: 700; color: #fff; padding: 4px 12px; border-radius: 999px; }
.level-red { background: var(--red-soft); border-color: var(--red); }
.level-red h3, .level-red .level-icon { color: var(--red-ink); }
.level-red .level-tag { background: var(--red); }
.level-amber { background: var(--amber-soft); border-color: var(--amber-line); }
.level-amber h3, .level-amber .level-icon { color: var(--amber-ink); }
.level-amber .level-tag { background: var(--amber-ink); }
.level-green { background: var(--green-soft); border-color: var(--green-line); }
.level-green h3, .level-green .level-icon { color: var(--green-ink); }
.level-green .level-tag { background: var(--green-ink); }

/* Features: a simple list */
.feature-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; margin-top: 40px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; padding: 22px 0; border-top: 1px solid var(--line); }
.feature-list .icon { flex: none; width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.feature-list h3 { font-size: 1.05rem; }
.feature-list p { margin: 6px 0 0; color: var(--muted); }

/* Screenshots in phone frames */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 56px; }
.shots figure { margin: 0; }
.shot-frame { padding: 7px; background: #0E1B17; border-radius: 30px; }
.shot-frame img { display: block; width: 100%; height: auto; border-radius: 23px; }
.shots-note { margin: 18px 0 0; text-align: center; font-size: 0.85rem; color: var(--muted); }
.shots figcaption { margin-top: 14px; font-size: 0.9rem; font-weight: 600; color: var(--muted); text-align: center; }

/* Safety */
.safety { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.safety-head { position: sticky; top: 80px; }
.safety-head h2, .safety-head .sub { text-align: left; margin-left: 0; }
.ph-family { margin-top: 28px; aspect-ratio: 4 / 3; height: auto; }
.family-photo { display: block; width: 100%; height: auto; margin-top: 28px; border-radius: var(--radius); object-fit: cover; }
.safety-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.safety-grid li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.safety-grid .icon { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.safety-grid h3 { font-size: 1.02rem; }
.safety-grid p { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }

/* Pricing */
.pricing-card { text-align: center; padding: 40px 28px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid var(--line); }
.pricing-card .cta { justify-content: center; margin-top: 26px; }
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 28px; text-align: left; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.plan .price { font-size: 2rem; font-weight: 800; color: var(--ink-strong); margin: 6px 0 0; line-height: 1.1; }
.plan .note { color: var(--muted); font-size: 0.875rem; margin: 4px 0 0; }
.coming-soon { text-align: center; font-size: 1.3rem; font-weight: 700; color: var(--ink-strong); margin: 24px 0 0; }

/* Launch + waitlist */
.launch-note { margin: 14px 0 0; color: var(--muted); font-size: 0.92rem; font-weight: 600; }
.waitlist-card { padding: 48px 32px; border-radius: 28px; border: 1px solid var(--line); background: #fff; }
.waitlist-card h2 { text-align: center; }
.waitlist-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 600px; margin: 28px auto 0; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 0.92rem; color: var(--ink-strong); }
.field input {
  min-height: 52px; padding: 12px 16px; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid #B9C7C2; border-radius: 14px;
}
.field input:focus { outline: 3px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.consent { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; font-size: 0.92rem; color: var(--muted); cursor: pointer; }
.consent input { width: 24px; height: 24px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.consent a { color: var(--brand); font-weight: 700; }
.waitlist-form .btn { grid-column: 1 / -1; justify-self: center; min-width: 240px; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.form-note { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 0.85rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error {
  display: none; max-width: 600px; margin: 24px auto 0; padding: 14px 16px; border-radius: 14px;
  background: var(--amber-soft); border: 1.5px solid var(--amber-line); color: var(--amber-ink); font-weight: 600; text-align: center;
}
.form-error:target { display: block; }
.try-now { margin: 24px 0 0; text-align: center; font-weight: 600; color: var(--muted); }
.try-now a { color: var(--brand); font-weight: 800; }

/* FAQ */
#faq h2 { margin-bottom: 32px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; }
details[open] { border-color: var(--brand); }
summary {
  cursor: pointer; list-style: none;
  min-height: 60px; padding: 16px 22px; font-weight: 700; color: var(--ink-strong);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-soft); font-size: 1.2rem; line-height: 1; color: var(--brand);
}
details[open] summary::after { content: "–"; background: var(--brand); color: #fff; }
details p { margin: 0; padding: 0 22px 16px; color: var(--muted); }

/* Closing */
.closing { padding: 0 0 72px; }
.closing-inner { text-align: center; color: #fff; padding: 64px 24px; border-radius: 28px; background: var(--brand-deep); }
.closing h2 { color: #fff; }
.closing p { color: #D5E6E3; margin: 10px 0 28px; font-size: 1.1rem; }
.closing .cta { justify-content: center; }

/* Footer */
.foot { background: var(--ink-strong); color: #B9CCC5; padding: 40px 0 32px; font-size: 0.92rem; }
.disclaimer {
  display: flex; align-items: center; gap: 12px; margin: 0 0 32px;
  color: #fff; font-weight: 600; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px; padding: 16px 18px;
}
.disclaimer .icon { color: #FCA5A5; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot .brand { color: #fff; }
.foot .brand-text b { color: #8FD6BE; }
.foot .brand-text small { color: #B9CCC5; }
.foot-brand p { margin: 12px 0 0; max-width: 280px; }
.foot-col h3 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }
.foot-col a { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: #D5E6E3; }
.foot-col a:hover { color: #fff; text-decoration: underline; }
.foot-col p { margin: 10px 0 0; }
.foot a:focus-visible { outline-color: #fff; }
.copy { margin: 32px 0 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 0.85rem; }

/* Simple centred page (404) */
.page-simple { text-align: center; padding: 72px 0; max-width: 680px; }
.page-simple h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; }
.page-simple .lead { margin-inline: auto; }
.page-simple .cta { justify-content: center; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { text-align: center; }
  .lead, .eyebrow { margin-inline: auto; }
  .cta, .trust { justify-content: center; }
  .levels, .story-steps, .feature-list { grid-template-columns: 1fr 1fr; }
  .shots { grid-template-columns: repeat(4, 62%); overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 20px; }
  .shots li { scroll-snap-align: start; }
  .safety { grid-template-columns: 1fr; }
  .safety-head { position: static; }
  .safety-head h2, .safety-head .sub { text-align: center; margin-inline: auto; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav { flex-wrap: wrap; gap: 4px 12px; padding-bottom: 6px; }
  .nav .btn-sm { margin-left: auto; }
  .nav nav {
    order: 3; flex: 1 0 100%; margin: 0; padding: 2px; gap: 0;
    justify-content: space-between; overflow-x: auto; scrollbar-width: none;
  }
  .nav nav::-webkit-scrollbar { display: none; }
  .nav nav a { flex: none; padding: 0 9px; min-height: 44px; font-size: 0.85rem; }
  .hero { padding: 24px 0 64px; }
  .cta .btn { width: 100%; }
  .phone { width: 260px; }
  .section, .story { padding: 64px 0; }
  .levels, .story-steps, .feature-list, .safety-grid, .plans { grid-template-columns: 1fr; }
  .waitlist-card { padding: 36px 18px; border-radius: 22px; }
  .waitlist-form { grid-template-columns: 1fr; }
  .waitlist-form .btn { width: 100%; min-width: 0; }
  .closing-inner { padding: 56px 20px; border-radius: 24px; }
  .foot-grid { grid-template-columns: 1fr; gap: 8px; }
  .disclaimer { align-items: flex-start; }
}
@media (max-width: 380px) {
  .nav nav a { padding: 0 5px; font-size: 0.8rem; }
}
/* Calm moving border, on the three result levels only: on hover, tap or focus, a soft line of
   light travels slowly around the border. Levels have tabindex="-1" so a tap focuses them on
   every phone browser, without adding them to the Tab order. */
@property --ring-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes ring-spin { to { --ring-angle: 360deg; } }
.level::after {
  content: ""; position: absolute; inset: -2px; z-index: 1; pointer-events: none;
  border-radius: inherit; padding: 2px;
  background: conic-gradient(from var(--ring-angle), transparent 0 70%, rgba(143, 214, 190, .8) 79%, var(--brand) 85%, rgba(143, 214, 190, .8) 91%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .5s ease;
}
.level:focus::after { opacity: 1; animation: ring-spin 4s linear infinite; }
.level:focus { outline: none; }
@media (hover: hover) {
  .level:hover::after { opacity: 1; animation: ring-spin 4s linear infinite; }
}
@media (hover: none) {
  .level { cursor: pointer; -webkit-tap-highlight-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .level::after { animation: none !important; }
}

/* Site version label, so the team can tell which version they are looking at */
.site-version { white-space: nowrap; }

/* Cookie banner, added by assets/analytics.js only when analytics is configured */
.consent-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40;
  max-width: 640px; margin: 0 auto; padding: 16px 18px;
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg); font-size: 0.92rem;
}
.consent-banner p { margin: 0; flex: 1 1 260px; }
.consent-actions { display: flex; gap: 10px; }

/* Privacy Policy and other long legal pages */
.legal { text-align: left; max-width: 760px; }
.legal h2 { font-size: 1.35rem; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--ink); }
.legal ol, .legal ul { padding-left: 1.3em; }
.legal ol { list-style: decimal; }
.legal ul { list-style: disc; }
.legal li { margin: 6px 0; }
.legal .lead { margin-inline: 0; }
.table-scroll { overflow-x: auto; margin: 16px 0; }
.legal table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.92rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { color: var(--ink-strong); background: var(--brand-soft); }
