/* iResuscitate — site stylesheet
   Colors sampled directly from the app's own Assets.xcassets colorsets
   and app icon, so the site matches the product exactly rather than
   inventing a new palette. */

:root {
  --accent: #0c7c8c;         /* AccentPrimary (light) */
  --accent-dark: #2dd4c6;    /* AccentPrimary (dark mode) */
  --epi-red: #e5484d;        /* EpinephrineRed */
  --rhythm-blue: #3b82f6;    /* RhythmBlue */
  --success-green: #22c55e;  /* SuccessGreen */
  --shock-amber: #e52121;    /* ShockAmber */
  --logo-blue: #4a90e2;      /* app icon outer ring */
  --logo-red: #d0021b;       /* app icon inner ring */

  --text-primary: #111418;
  --text-secondary: #5a6472;
  --bg: #f2f3f7;
  --card-bg: #ffffff;
  --hairline: #e2e5eb;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max-width: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #2dd4c6;
    --text-primary: #f2f3f7;
    --text-secondary: #9aa5b1;
    --bg: #0b0e14;
    --card-bg: #161b22;
    --hairline: #232a35;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-primary);
}

.brand img { width: 30px; height: 30px; border-radius: 8px; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 500;
}

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

.lang-switch {
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary) !important;
}

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

.hero {
  padding: 72px 24px 56px;
  text-align: center;
}

.hero img.icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.hero p.tagline {
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 32px;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg);
}
.btn-primary:hover { opacity: 0.85; text-decoration: none; }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--hairline);
}
.btn-secondary:hover { border-color: var(--text-secondary); text-decoration: none; }

/* ---------- Dual-ring hero graphic ---------- */

.ring-demo {
  margin: 48px auto 8px;
  width: 220px;
  height: 220px;
  position: relative;
}
.ring-demo svg { width: 100%; height: 100%; }

/* ---------- Sections ---------- */

section { padding: 64px 0; }
section.alt { background: var(--card-bg); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 12px; letter-spacing: -0.01em; }
.section-head p { color: var(--text-secondary); font-size: 16px; margin: 0; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ---------- Feature grid ---------- */

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

.card {
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.card .icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card .icon-badge svg { width: 22px; height: 22px; }

.card h3 { font-size: 17px; margin: 0 0 8px; }
.card p { font-size: 14.5px; color: var(--text-secondary); margin: 0; }

.card-video { padding: 0; overflow: hidden; line-height: 0; }
.card-video video { width: 100%; display: block; border-radius: inherit; background: var(--bg); }

/* Category chips (mirrors the app's own category grid) */

.chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
}
.chip .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ---------- Two-column feature rows ---------- */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0;
}
.feature-row:not(:last-child) { border-bottom: 1px solid var(--hairline); }
.feature-row.reverse .feature-visual { order: 2; }
.feature-row .feature-text h3 { font-size: 24px; margin: 0 0 14px; letter-spacing: -0.01em; }
.feature-row .feature-text p { color: var(--text-secondary); font-size: 15.5px; }
.feature-row .feature-text ul { color: var(--text-secondary); font-size: 15px; padding-left: 20px; margin: 14px 0 0; }
.feature-row .feature-text li { margin-bottom: 6px; }

.feature-visual {
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

@media (max-width: 760px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-visual { order: 0; }
}

/* ---------- Dashboard light mock ---------- */

.lights-mock {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.light-mock {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
}

/* ---------- Stats strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  text-align: center;
}
.stats .num { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.stats .label { font-size: 13.5px; color: var(--text-secondary); margin-top: 4px; }

/* ---------- Content pages (privacy / support) ---------- */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 90px;
}
.doc h1 { font-size: 32px; margin-bottom: 4px; }
.doc .updated { color: var(--text-secondary); font-size: 14px; margin-bottom: 40px; }
.doc h2 { font-size: 20px; margin: 40px 0 12px; }
.doc h3 { font-size: 16px; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--text-secondary); font-size: 15.5px; }
.doc ul { padding-left: 22px; }
.doc .callout {
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 14.5px;
  color: var(--text-secondary);
  margin: 20px 0;
}

.faq-item { border-bottom: 1px solid var(--hairline); padding: 22px 0; }
.faq-item h3 { margin: 0 0 8px; font-size: 16.5px; color: var(--text-primary); }
.faq-item p { margin: 0; }

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 24px 0 8px;
}
.contact-card h3 { margin-top: 0; }
.contact-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 15px; }

/* ---------- Coming soon ---------- */

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.badge-live .dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success-green);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.btn-instagram {
  background: linear-gradient(45deg,#f9ce34,#ee2a7b,#6228d7);
  color: #fff;
}
.btn-instagram:hover { opacity: 0.9; text-decoration: none; }

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

footer.site {
  border-top: 1px solid var(--hairline);
  padding: 40px 24px;
  margin-top: 40px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.footer-links { display: flex; gap: 22px; font-size: 14px; }
.footer-links a { color: var(--text-secondary); }
.footer-note { font-size: 13px; color: var(--text-secondary); }
