/* Sympto Website — Design-Tokens gespiegelt aus design.md */

:root {
  --bg: #F5F3EE;
  --card: #FFFFFF;
  --primary: #FF5F46;
  --text-primary: #1A1A1A;
  --text-secondary: rgba(0, 0, 0, 0.45);
  --text-tertiary: rgba(0, 0, 0, 0.28);
  --border: rgba(0, 0, 0, 0.08);
  --radius-card: 16px;
  --radius-pill: 100px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- Header ---------- */

.site-header {
  padding: 34px 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

/* Holds the logo SVG; used by the legal pages' header. */
.brand-mark {
  width: 34px;
  height: 34px;
  display: block;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ---------- Hero (Startseite) ---------- */

.hero {
  padding: 46px 0 12px;
}

.hero h1 {
  font-size: clamp(32px, 7vw, 42px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.hero p {
  font-size: 19px;
  color: var(--text-secondary);
  margin: 0;
  max-width: 34em;
}

/* ---------- Karten ---------- */

.card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  margin: 14px 0;
}

.card h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 12px;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.feature-list li {
  display: flex;
  gap: 11px;
  align-items: baseline;
  color: var(--text-secondary);
}

.feature-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  transform: translateY(-2px);
}

.feature-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ---------- Sektionen Startseite ---------- */

.section {
  padding: 30px 0 4px;
}

.section-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin: 0 0 10px;
  padding-left: 2px;
}

.contact-line {
  margin: 0 0 6px;
  color: var(--text-secondary);
}

.contact-line strong {
  color: var(--text-primary);
  font-weight: 600;
}

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

a:hover {
  text-decoration: underline;
}

/* ---------- Rechtstexte ---------- */

.legal {
  padding: 32px 0 8px;
}

.legal h1 {
  font-size: clamp(28px, 6vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.legal .updated {
  color: var(--text-tertiary);
  font-size: 15px;
  margin: 0 0 30px;
}

.legal h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 36px 0 10px;
}

.legal h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 8px;
}

.legal p {
  margin: 0 0 14px;
  color: var(--text-secondary);
}

.legal li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.legal ul {
  padding-left: 22px;
  margin: 0 0 14px;
}

.legal strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal address {
  font-style: normal;
  color: var(--text-secondary);
  margin: 0 0 14px;
  line-height: 1.75;
}

/* Hinweis-Kasten (Disclaimer) */
.callout {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  margin: 18px 0;
}

.callout p {
  margin: 0;
  font-size: 15px;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 54px;
  padding: 24px 0 40px;
  border-top: 0.5px solid var(--border);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 14px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 15px;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-note {
  color: var(--text-tertiary);
  font-size: 14px;
  margin: 0;
}


/* ═══════════════════════════════════════════════════════════
   LANDING PAGE
   Tokens and components for index.html. The selectors above are
   shared with the legal pages and are deliberately left untouched.
   ═══════════════════════════════════════════════════════════ */

:root {
  --primary-dark: #EE4830;
  --hero-gradient: linear-gradient(160deg, #FF7A5C 0%, #FF5F46 52%, #EE4830 100%);
  --alert-red: #E9352B;
  --trend-positive: #34C759;
  --surface-ink: #1A1A1A;
  --chip-bg: #E9E7E2;

  /* Landing-only body colour. --text-secondary (0.45 alpha) is 3.30:1 on the
     warm background; this is 4.64:1. The legal pages keep --text-secondary. */
  --text-body: rgba(0, 0, 0, 0.55);

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);

  --tag-meal-bg: #FFF3E8;      --tag-meal-fg: #A06010;
  --tag-symptom-bg: #FFCCC4;   --tag-symptom-fg: #CC3A22;
  --tag-sleep-bg: rgba(221, 214, 255, 0.75); --tag-sleep-fg: #5B3FAA;
  --tag-med-bg: #C8DFFF;       --tag-med-fg: #2D5FAA;
  --tag-bowel-bg: #D4B896;     --tag-bowel-fg: #5C4526;
  --tag-skin-bg: #E8F5E9;      --tag-skin-fg: #2E7D32;
}


/* ---------- Layout shell ---------- */

.wrap-wide {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 22px;
}

.sec {
  padding: 92px 0;
  position: relative;
}

.sec--tight { padding: 64px 0; }

.sec-head {
  max-width: 660px;
  margin: 0 auto 52px;
  text-align: center;
}

.sec-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 14px;
}

.sec-head h2 {
  font-size: clamp(29px, 4.2vw, 44px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

.sec-head p {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-body);
  margin: 14px 0 0;
  text-wrap: pretty;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-out), background-color 0.18s,
    box-shadow 0.18s, border-color 0.18s;
}

.btn:hover { text-decoration: none; }

/* 19px semibold on #EE4830 = 3.75:1 — clears the large-text threshold. */
.btn-primary {
  background: var(--primary-dark);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  padding: 16px 30px;
  box-shadow: 0 6px 20px rgba(238, 72, 48, 0.28);
}

.btn-primary:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 95, 70, 0.38);
}

.btn-primary .btn-sub {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  font-size: 17px;
  padding: 15px 24px;
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-on-dark {
  background: #fff;
  color: var(--primary-dark);
  font-size: 19px;
  font-weight: 700;
  padding: 16px 32px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

.btn-on-dark:hover {
  transform: translateY(-2px);
  color: var(--primary-dark);
}

.btn-sm {
  font-size: 15px;
  padding: 10px 20px;
  box-shadow: none;
}

/* ---------- Sticky header ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 18px 0;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 0.5px solid transparent;
  transition: padding 0.25s var(--ease-out), border-color 0.25s, box-shadow 0.25s;
}

.nav--scrolled {
  padding: 11px 0;
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}

.nav-brand:hover { text-decoration: none; }

.nav-brand img.mark { width: 30px; height: 30px; display: block; }
.nav-brand .wordmark { height: 19px; width: auto; display: block; }

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--text-body);
  font-size: 16px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* ---------- Hero ---------- */

.hero-land {
  position: relative;
  overflow: hidden;
  padding: 44px 0 64px;
}

.hero-land::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(255, 95, 70, 0.14), transparent 62%),
    radial-gradient(1100px 640px at 96% 108%, rgba(255, 95, 70, 0.10), transparent 62%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 40px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}

.hero-copy h1 .hl { color: var(--primary); }

.hero-sub {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.5;
  color: var(--text-body);
  margin: 20px 0 0;
  max-width: 30em;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.trust-row li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-body);
}

.trust-row svg { flex: 0 0 auto; color: var(--primary); }

/* Hero visual */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Large, centered, near-invisible mark behind the hero phone. */
.hero-logo-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500px;
  max-width: none;
  transform: translate(-50%, -50%);
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

:root[data-theme="dark"] .hero-logo-mark { opacity: 0.09; }

.hero-visual .phone-slot { z-index: 1; }

/* ---------- Phone frame (from docs/reference/ios-frame.jsx) ---------- */

.phone-slot {
  position: relative;
  flex: 0 0 auto;
  width: calc(428px * var(--ps, 1));
  height: calc(900px * var(--ps, 1));
}

.phone {
  position: absolute;
  top: 0;
  left: 50%;
  width: 428px;
  background: #141414;
  border-radius: 61px;
  padding: 13px;
  box-shadow: 0 50px 100px rgba(0, 0, 0, 0.35), 0 12px 30px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%) scale(var(--ps, 1)) rotate(var(--prot, 0deg));
  transform-origin: top center;
}

.phone-screen {
  position: relative;
  width: 402px;
  height: 874px;
  border-radius: 48px;
  overflow: hidden;
  background: #F5F3EE;
  /* The mockups depict the app's light appearance and stay light in dark mode. */
  color: #1A1A1A;
  font-size: 17px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

.phone-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 37px;
  border-radius: 24px;
  background: #000;
  z-index: 50;
}

.phone-status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 154px;
  padding: 21px 24px 19px;
  box-sizing: border-box;
}

.phone-status .t,
.phone-status .i {
  flex: 1;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-status .t {
  font-size: 17px;
  font-weight: 590;
  line-height: 22px;
  padding-top: 1.5px;
}

.phone-status .i { gap: 7px; padding-top: 1px; padding-right: 1px; }

.phone-status--dark { color: #fff; }

.phone-home {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 139px;
  height: 5px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.25);
  z-index: 60;
  pointer-events: none;
}

.phone-home--light { background: rgba(255, 255, 255, 0.7); }

.phone-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* Repeating pieces inside the mockups */

.pcard {
  background: #fff;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pcard-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ptag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.ptime {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
  margin-left: auto;
}

.ptitle { font-size: 17px; font-weight: 600; color: #1A1A1A; }
.psub { font-size: 15px; font-weight: 500; color: rgba(0, 0, 0, 0.45); }

.pfig-caption {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
}

/* ---------- Pain cards ---------- */

.pains-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pain {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pain-quote {
  font-size: 19px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: pretty;
}

.pain-note {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-body);
  margin: 0;
}

.pain-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 95, 70, 0.12);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 700;
  flex: 0 0 auto;
}

/* ---------- Pattern animation ---------- */

.pattern-frame {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding: 34px 26px 26px;
  border: 1.5px dashed var(--border);
  border-radius: 26px;
  background: color-mix(in srgb, var(--card) 45%, transparent);
}

.pattern-caption {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.pattern-card {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pattern-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

.pattern-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.pattern-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.pattern-day {
  width: 22px;
  flex: 0 0 auto;
  font-weight: 600;
  color: var(--text-body);
}

.pattern-chip {
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  color: var(--text-primary);
  white-space: nowrap;
}

.pattern-symptom {
  margin-left: auto;
  color: var(--text-body);
  white-space: nowrap;
}

.pattern-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--alert-red);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 14px;
  transform-origin: center;
}

.pattern-note {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-body);
  text-align: center;
  margin: 0;
}

.pattern-disclaimer {
  max-width: 600px;
  margin: 18px auto 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-body);
  text-align: center;
}

/* Animation states — JS adds .is-on. Defaults are the final state so the
   page is correct with JS off and under reduced motion. */
html:not(.no-js) .pattern-row {
  opacity: 0;
  transform: translateY(8px);
}

html:not(.no-js) .pattern-row.is-on {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease-in-out, transform 0.55s ease-in-out;
}

html:not(.no-js) .pattern-badge {
  opacity: 0;
  transform: scale(0.6);
}

html:not(.no-js) .pattern-badge.is-on {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.6s var(--ease-spring), transform 0.6s var(--ease-spring);
}

html:not(.no-js) .pattern-badge.is-pulse {
  transform: scale(1.04);
  transition: transform 0.18s ease-in-out;
}

/* ---------- Steps ---------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 30px 26px;
}

.step-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
}

.step h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

.step p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-body);
  margin: 0;
}

/* ---------- Feature rows ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding: 60px 0;
}

.feature--flip .feature-copy { order: 2; }

.feature-copy h3 {
  font-size: clamp(27px, 3.4vw, 38px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

.feature-copy > p {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-body);
  margin: 16px 0 0;
  text-wrap: pretty;
}

.feature-visual {
  display: flex;
  justify-content: center;
}

/* ---------- Categories ---------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.cat {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Label sits in --text-primary on --card; the category colour is carried by
   the pill only, so the tile never relies on tag-on-tag contrast. */
.cat-pill {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.cat-name {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
}

.cat-desc {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-body);
  margin: 0;
}

/* ---------- Privacy ---------- */

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.privacy-item {
  background: var(--card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px 22px;
}

.privacy-item h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 14px 0 6px;
}

.privacy-item p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-body);
  margin: 0;
}

.privacy-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 95, 70, 0.12);
  color: var(--primary);
  display: grid;
  place-items: center;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 0.5px solid var(--border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "";
  margin-left: auto;
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-right: 2.2px solid var(--text-tertiary);
  border-bottom: 2.2px solid var(--text-tertiary);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.22s var(--ease-out);
}

.faq-item[open] summary::after {
  transform: rotate(225deg) translate(-3px, -3px);
}

.faq-item summary:hover { color: var(--primary); }

.faq-a {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  margin: 0;
  padding: 0 40px 24px 0;
}

/* ---------- Final CTA ---------- */

.cta-final {
  background: var(--surface-ink);
  border: 0.5px solid var(--border);
  border-radius: 28px;
  padding: 76px 32px;
  text-align: center;
  color: #fff;
}

.cta-final h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
  color: #fff;
  text-wrap: balance;
}

.cta-final p {
  font-size: 19px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  margin: 16px auto 0;
  max-width: 34em;
}

.cta-final .btn { margin-top: 32px; }

.cta-fine {
  font-size: 14px !important;
  color: rgba(255, 255, 255, 0.6) !important;
  margin-top: 18px !important;
}

/* ---------- Reveal on scroll ---------- */

html:not(.no-js) .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: var(--d, 0s);
}

html:not(.no-js) .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Idle float on the hero phone */
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero-visual .phone-slot {
  animation: float-y 7s ease-in-out infinite;
}

/* ---------- Responsive ---------- */

.hero-visual { --ps: 0.58; }
.feature-visual { --ps: 0.70; }

@media (max-width: 1040px) {
  .hero-visual { --ps: 0.54; }
  .feature-visual { --ps: 0.62; }
  .feature { gap: 36px; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    text-align: center;
  }

  .hero-copy h1, .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions, .trust-row { justify-content: center; }
  .hero-land { padding-bottom: 56px; }
  .hero-visual { --ps: 0.66; margin-top: 24px; }
  .hero-logo-mark { width: 440px; }

  .feature,
  .feature--flip {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 44px 0;
  }

  .feature--flip .feature-copy { order: 0; }
  .feature-visual { --ps: 0.70; }

  .pains-grid,
  .steps-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sec { padding: 68px 0; }
  .cta-final { padding: 56px 24px; }
}

@media (max-width: 560px) {
  .hero-visual { --ps: 0.68; }
  .feature-visual { --ps: 0.68; }
  .pattern-frame { padding: 30px 16px 20px; }
  .pattern-symptom { font-size: 12px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .cta-final .btn-on-dark { width: 100%; }
}

@media (max-width: 380px) {
  .hero-visual, .feature-visual { --ps: 0.60; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  html:not(.no-js) .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  html:not(.no-js) .pattern-row {
    opacity: 1 !important;
    transform: none !important;
  }

  html:not(.no-js) .pattern-badge {
    opacity: 1 !important;
    transform: scale(1) !important;
  }

  .hero-visual .phone-slot { animation: none !important; }
}

/* ---------- Growing bars (stats mockup) ----------
   The real value stays as an inline width/height so the no-JS and
   reduced-motion paths render it directly; the animation is a transform. */

html:not(.no-js) .grow-x { transform: scaleX(0); transform-origin: left center; }

html:not(.no-js) .grow-x.is-visible {
  transform: scaleX(1);
  transition: transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}

html:not(.no-js) .grow-y { transform: scaleY(0); transform-origin: bottom center; }

html:not(.no-js) .grow-y.is-visible {
  transform: scaleY(1);
  transition: transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}

@media (prefers-reduced-motion: reduce) {
  html:not(.no-js) .grow-x,
  html:not(.no-js) .grow-y {
    transform: none !important;
  }
}


/* ═══════════════════════════════════════════════════════════
   APPEARANCE — system by default, overridable by the switch
   No data-theme attribute  → follow the operating system.
   data-theme="dark|light"  → the visitor picked it; that wins.
   The phone mockups keep their hardcoded light-mode colours in
   both themes: they depict the app's light appearance.
   ═══════════════════════════════════════════════════════════ */

/* Applied when the visitor forced dark ... */
:root[data-theme="dark"] {
  --bg: #1C1C1E;
  --card: #2C2C2E;
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-tertiary: rgba(255, 255, 255, 0.3);
  --border: rgba(255, 255, 255, 0.1);

  --trend-positive: #30D158;
  --surface-ink: #2A2A2C;
  --text-body: rgba(255, 255, 255, 0.62);
  --chip-bg: rgba(255, 255, 255, 0.10);

  --tag-meal-bg: rgba(231, 179, 116, 0.18);    --tag-meal-fg: #E7B374;
  --tag-symptom-bg: rgba(236, 138, 121, 0.18); --tag-symptom-fg: #EC8A79;
  --tag-sleep-bg: rgba(159, 136, 221, 0.18);   --tag-sleep-fg: #9F88DD;
  --tag-med-bg: rgba(134, 170, 223, 0.18);     --tag-med-fg: #86AADF;
  --tag-bowel-bg: rgba(214, 177, 133, 0.18);   --tag-bowel-fg: #D6B185;
  --tag-skin-bg: rgba(133, 214, 137, 0.18);    --tag-skin-fg: #85D689;
}

:root[data-theme="dark"] .wordmark--light { display: none; }
:root[data-theme="dark"] .wordmark--dark { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ---------- Appearance switch ---------- */

.theme-toggle {
  flex: 0 0 auto;
  /* 44px keeps it a valid touch target on phones. */
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-body);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background-color 0.18s;
}

.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.theme-toggle svg { display: block; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

.nav-brand .wordmark--dark { display: none; }

/* The switch needs JavaScript; without it the system preference still
   applies, so hide the control rather than offer a dead button. */
.no-js .theme-toggle { display: none; }
