/* SafePlate — editorial site
   Design direction: Economist-meets-medical-device.
   Type-led, dense, confident, restrained. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,300..900,30..100,0..1&family=Geist:wght@400;500;600;700&display=swap');

:root {
  --purple-deep: #3D1163;
  --purple-brand: #6819A6;
  --purple-soft: #EDE4F4;
  --red: #E72614;
  --red-dark: #B71C0F;
  --bg: #F7F4EE;             /* warm off-white — newsprint */
  --bg-card: #FFFFFF;
  --ink: #1A1320;            /* near-black with a purple cast */
  --ink-soft: #4A3F55;
  --rule: #1A132022;          /* hairline rule, ink with low alpha */
  --rule-strong: #1A132066;

  --serif: 'Fraunces', 'Cambria', Georgia, serif;
  --sans: 'Geist', system-ui, -apple-system, sans-serif;

  --max: 1280px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "ss01", "kern";
}

/* ---------- TYPE ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--purple-deep);
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
}
h1, .display-xl {
  font-size: clamp(3rem, 7vw, 6.25rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.95;
}
h2, .display-l {
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  letter-spacing: -0.02em;
}
h3, .display-m { font-size: clamp(1.5rem, 2.5vw, 2.25rem); }
h4 { font-size: 1.15rem; line-height: 1.3; }

p { max-width: 62ch; }
p + p { margin-top: 1em; }

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

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  line-height: 1.35;
  letter-spacing: -0.005em;
  font-weight: 400;
  color: var(--ink);
  font-variation-settings: "opsz" 100;
  max-width: 38ch;
}

/* Pull-quote */
.pull {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--purple-deep);
  border-left: 4px solid var(--red);
  padding-left: clamp(1.25rem, 2.5vw, 2rem);
  max-width: 32ch;
}

/* ---------- LAYOUT ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
section { padding: clamp(4rem, 9vw, 8rem) 0; }
.rule-top { border-top: 1px solid var(--rule); }

/* Twelve-column grid for asymmetric composition */
.grid12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn .arrow { display: inline-block; transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 238, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-header__logo img {
  height: 28px;
  width: auto;
  display: block;
}
.site-nav { display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); align-items: center; }
.site-nav a {
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--red); }
.site-nav a.cta {
  border: 1px solid var(--ink);
  padding: 0.55rem 1.05rem;
  font-weight: 500;
}
.site-nav a.cta:hover {
  background: var(--ink);
  color: var(--bg);
}
.site-nav__login {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-nav__login:hover { color: var(--red); }

@media (max-width: 760px) {
  .site-nav .hide-mobile { display: none; }
}

/* ---------- HERO STAT TICKER ---------- */
.ticker {
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
  position: relative;
}
.ticker__inner {
  display: flex;
  align-items: center;
  height: 38px;
  gap: 2.5rem;
  white-space: nowrap;
  width: max-content;
  animation: ticker-scroll 80s linear infinite;
}
.ticker__item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-shrink: 0;
  padding-left: 1.5rem;
}
.ticker__item:first-child { padding-left: 1.5rem; }
.ticker__item strong {
  color: var(--red);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ticker__sep {
  color: var(--ink-soft);
  flex-shrink: 0;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- HERO ---------- */
.hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem);
  border-bottom: 1px solid var(--rule);
}
.hero__head h1 {
  max-width: 16ch;
}
.hero__head h1 em {
  font-style: italic;
  color: var(--red);
  font-variation-settings: "opsz" 144, "WONK" 1;
}
.hero__sub {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 44ch;
  margin-top: 1.75rem;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.25rem;
  flex-wrap: wrap;
}
.hero__meta {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}
.hero__meta-item small {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.hero__meta-item strong {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--purple-deep);
}

/* ---------- BIG NUMBER SECTION ---------- */
.kpi-block {
  background: var(--purple-deep);
  color: var(--bg);
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.kpi-block h2 { color: var(--bg); }
.kpi-block .eyebrow { color: #E0B6F2; }
.kpi-block p { color: #DDD0E5; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  margin-top: 3rem;
  border-top: 1px solid #ffffff22;
}
.kpi {
  padding: 2rem 1.25rem;
  border-right: 1px solid #ffffff22;
  border-bottom: 1px solid #ffffff22;
}
.kpi:last-child { border-right: none; }
.kpi__num {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 400;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.kpi__num em {
  color: var(--red);
  font-style: normal;
}
.kpi__label {
  margin-top: 0.85rem;
  font-size: 0.86rem;
  color: #DDD0E5;
  line-height: 1.45;
}

/* ---------- THREE-MODE BLOCK ---------- */
.modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 3rem;
  border: 1px solid var(--rule-strong);
  background: var(--bg-card);
}
.mode { padding: 2.25rem 1.75rem; border-right: 1px solid var(--rule); }
.mode:last-child { border-right: none; }
.mode__tag {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-block;
  padding: 0.3rem 0.6rem;
  margin-bottom: 1.5rem;
  background: var(--purple-soft);
  color: var(--purple-deep);
}
.mode--strict .mode__tag { background: var(--purple-deep); color: #fff; }
.mode--moderate .mode__tag { background: var(--purple-brand); color: #fff; }
.mode--advisory .mode__tag { background: var(--purple-soft); color: var(--purple-deep); }
.mode h3 { font-size: 1.6rem; margin-bottom: 0.85rem; }
.mode p { font-size: 0.95rem; color: var(--ink-soft); }
.mode__rule {
  margin: 1.5rem 0 1rem;
  border-top: 1px solid var(--rule);
}
.mode__fit small {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.mode__fit p { margin-top: 0.4rem; font-style: italic; }

@media (max-width: 760px) {
  .modes { grid-template-columns: 1fr; }
  .mode { border-right: none; border-bottom: 1px solid var(--rule); }
  .mode:last-child { border-bottom: none; }
}

/* ---------- PRESS / LOGOS / EVIDENCE STRIP ---------- */
.evidence {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 2rem 0;
  background: var(--purple-soft);
}
.evidence__inner {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.evidence strong { color: var(--purple-deep); font-weight: 600; }

/* ---------- SCREENSHOT FRAME ---------- */
.shot {
  background: var(--bg-card);
  border: 1px solid var(--rule-strong);
  box-shadow: 0 30px 60px -20px rgba(61, 17, 99, 0.18);
  position: relative;
  overflow: hidden;
}
.shot__chrome {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 0.85rem;
  background: var(--purple-soft);
  border-bottom: 1px solid var(--rule);
  gap: 6px;
}
.shot__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink-soft);
  opacity: 0.4;
}
.shot__chrome span {
  margin-left: auto;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.shot__placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    -45deg,
    var(--bg-card), var(--bg-card) 12px,
    var(--purple-soft) 12px, var(--purple-soft) 24px
  );
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- ARGUMENT ROW (a paired text + visual) ---------- */
.argument {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.argument--reverse > div:first-child { order: 2; }
.argument h2 { margin-bottom: 1.25rem; }
.argument p + p { margin-top: 1em; }
@media (max-width: 860px) {
  .argument { grid-template-columns: 1fr; }
  .argument--reverse > div:first-child { order: 0; }
}

/* ---------- FEATURE LIST (annotated) ---------- */
.feature-list {
  list-style: none;
  margin-top: 2rem;
  border-top: 1px solid var(--rule);
}
.feature-list li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.5rem;
  align-items: start;
}
.feature-list li > .num {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.feature-list li > div h4 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.feature-list li > div p {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ---------- PRICING ---------- */
.tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--rule-strong);
  background: var(--bg-card);
  margin-top: 3rem;
}
.tier {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}
.tier:last-child { border-right: none; }
.tier__name {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}
.tier__price {
  font-family: var(--serif);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.tier__price .amount {
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--purple-deep);
  font-variant-numeric: tabular-nums;
}
.tier__price .unit {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.tier__sub {
  font-size: 0.86rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  min-height: 2.6em;
}
.tier__features {
  list-style: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  flex: 1;
}
.tier__features li {
  font-size: 0.88rem;
  padding: 0.5rem 0;
  color: var(--ink);
  display: flex;
  gap: 0.6rem;
}
.tier__features li::before {
  content: "—";
  color: var(--red);
  flex-shrink: 0;
}
@media (max-width: 860px) {
  .tiers { grid-template-columns: 1fr 1fr; }
  .tier { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .tier:nth-child(2n) { border-right: none; }
  .tier:nth-last-child(-n+2) { border-bottom: none; }
}
@media (max-width: 540px) {
  .tiers { grid-template-columns: 1fr; }
  .tier { border-right: none; }
}

/* ---------- FAQ ---------- */
details.faq {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0;
}
details.faq:last-of-type { border-bottom: 1px solid var(--rule); }
details.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary h4 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--purple-deep);
}
details.faq summary::after {
  content: "+";
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--red);
  transition: transform 0.2s ease;
}
details.faq[open] summary::after { content: "−"; }
details.faq p {
  margin-top: 1rem;
  color: var(--ink-soft);
  max-width: 70ch;
}

/* ---------- FORM ---------- */
.form {
  display: grid;
  gap: 1.25rem;
  max-width: 540px;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input,
.field textarea,
.field select {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--purple-brand);
  box-shadow: 0 0 0 3px var(--purple-soft);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }
.form .btn { justify-self: start; margin-top: 0.5rem; }
.form-success {
  background: var(--purple-soft);
  padding: 2rem;
  border-left: 4px solid var(--red);
  display: none;
}
.form-success h4 {
  font-family: var(--serif);
  color: var(--purple-deep);
  margin-bottom: 0.6rem;
  font-size: 1.4rem;
  font-weight: 500;
}

/* ---------- CTA BAND ---------- */
.cta-band {
  background: var(--ink);
  color: var(--bg);
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.cta-band h2 { color: var(--bg); max-width: 18ch; }
.cta-band .lede { color: #DDD0E5; }
.cta-band .btn {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--bg);
}
.cta-band .btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.cta-band__row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--purple-deep);
  color: #DDD0E5;
  padding: clamp(3rem, 6vw, 5rem) 0 2rem;
  font-size: 0.9rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #ffffff22;
}
.site-footer h5 {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 0.55rem; }
.site-footer ul a:hover { color: #fff; }
.site-footer__brand p { max-width: 36ch; line-height: 1.6; }
.site-footer__bottom {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #B89FCC;
  flex-wrap: wrap;
  gap: 1rem;
}
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* ---------- LEGAL PAGES ---------- */
.legal-page {
  padding: clamp(3rem, 6vw, 5rem) 0;
  max-width: 720px;
  margin: 0 auto;
}
.legal-page h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.legal-page h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--purple-deep);
}
.legal-page h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
}
.legal-page p, .legal-page li {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 1em;
  max-width: none;
}
.legal-page ul, .legal-page ol { padding-left: 1.5rem; }
.legal-page li { margin-bottom: 0.5em; }

/* ---------- UTILS ---------- */
.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-12 { grid-column: span 12; }
@media (max-width: 760px) {
  [class*="col-"] { grid-column: span 12; }
}

.ink { color: var(--ink); }
.red { color: var(--red); }
.purple { color: var(--purple-deep); }
.muted { color: var(--ink-soft); }
.serif { font-family: var(--serif); }
.center { text-align: center; }
.mt-s { margin-top: 1rem; }
.mt-m { margin-top: 2rem; }
.mt-l { margin-top: 3rem; }
.mt-xl { margin-top: 5rem; }

/* Content is always visible. Reveal class is no-op for now;
   reserved if we want fade-ins later without breaking SSR/screenshots. */
.reveal { opacity: 1; transform: none; }
