/* ECG Lab — marketing site
   Design system: Outfit, #F5F4F1 background, #3D8A5A accent, white cards */

:root {
  --bg: #F5F4F1;
  --card: #FFFFFF;
  --ink: #1B1F1D;
  --ink-2: #4A514D;
  --ink-3: #7A817C;
  --line: #E6E4DF;
  --green: #3D8A5A;
  --green-dark: #2F6E47;
  --green-soft: #E4F0E8;
  --amber-soft: #FBF1DC;
  --amber: #A3651A;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(27,31,29,.04), 0 8px 24px rgba(27,31,29,.06);
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { color: var(--ink-2); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-3); }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--green); margin-bottom: 12px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px;
  border-radius: 999px; font-weight: 600; font-size: 1rem; border: 1px solid transparent;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 6px 18px rgba(27,31,29,.18); }
.btn-primary:hover { background: #000; }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(61,138,90,.3); }
.btn-green:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(245,244,241,.85); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid transparent; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav .btn { padding: 10px 18px; font-size: .92rem; }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { margin: 0 0 20px; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero .lead { font-size: 1.2rem; max-width: 34em; margin-bottom: 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.hero-note { font-size: .9rem; color: var(--ink-3); }
.hero-visual { position: relative; }
.hero-visual img { border-radius: 28px; box-shadow: 0 30px 60px rgba(27,31,29,.18); }
@media (max-width: 860px) {
  .hero { padding-top: 40px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { max-width: 380px; margin: 0 auto; }
}

/* Trust strip */
.trust { padding: 24px 0 8px; }
.trust ul { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: center; }
.trust li { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: .95rem; font-weight: 500; }
.trust svg { width: 18px; height: 18px; color: var(--green); flex: none; }

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 40em; margin-bottom: 40px; }
.section-head p { font-size: 1.1rem; margin-top: 12px; }

/* Feature rows */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 40px 0; }
.feature:nth-child(even) .feature-visual { order: -1; }
.feature h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 14px; }
.feature p { font-size: 1.05rem; }
.feature ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.feature li { display: flex; gap: 10px; color: var(--ink-2); }
.feature li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 9px; flex: none; }
.feature-visual img { border-radius: 24px; box-shadow: var(--shadow); max-width: 380px; margin: 0 auto; }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature:nth-child(even) .feature-visual { order: 0; }
  .feature-visual img { max-width: 320px; }
}

/* Cards / grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 8px; }
.card .step { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-weight: 700; margin-bottom: 16px; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--green-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--green-dark); }
.card .icon svg { width: 24px; height: 24px; }

/* Pricing */
.pricing { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--bg); position: relative; }
.plan.featured { background: var(--ink); color: #fff; border-color: var(--ink); }
.plan.featured p, .plan.featured li { color: rgba(255,255,255,.8); }
.plan .badge { position: absolute; top: -12px; left: 24px; background: var(--green); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .08em; padding: 5px 10px; border-radius: 999px; }
.plan h3 { font-size: 1.3rem; }
.plan .tag { font-size: .95rem; margin: 4px 0 18px; }
.plan ul { list-style: none; display: grid; gap: 10px; margin-top: 18px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: .98rem; }
.plan li svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--green); }
.plan.featured li svg { color: #8ED3A6; }
.pricing-note { text-align: center; margin-top: 24px; font-size: .9rem; color: var(--ink-3); }

/* FAQ */
details { background: var(--card); border-radius: var(--radius-sm); padding: 4px 22px; box-shadow: var(--shadow); }
details + details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; color: var(--ink-3); transition: transform .15s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 0 18px; }

/* Callout */
.callout { border-left: 4px solid var(--amber); background: var(--amber-soft); padding: 16px 20px; border-radius: 8px; color: #5A3B0C; font-size: .95rem; }
.callout strong { color: #3E2A08; }

/* CTA band */
.cta-band { background: var(--green); color: #fff; text-align: center; padding: 80px 0; }
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,.85); font-size: 1.15rem; margin-bottom: 28px; }
.cta-band .btn-primary { background: #fff; color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.cta-band .btn-primary:hover { background: #fff; }

/* Footer */
footer { padding: 48px 0 40px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--ink-3); }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
footer h4 { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px; }
footer ul { list-style: none; display: grid; gap: 8px; }
footer a { color: var(--ink-2); }
footer .legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); font-size: .85rem; line-height: 1.6; }
@media (max-width: 760px) { footer .wrap { grid-template-columns: 1fr 1fr; } footer .wrap > div:first-child { grid-column: 1 / -1; } }

/* Long-form legal / support pages */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 8px; }
.doc .updated { color: var(--ink-3); margin-bottom: 36px; }
.doc h2 { font-size: 1.5rem; margin: 44px 0 14px; }
.doc h3 { font-size: 1.15rem; margin: 26px 0 8px; }
.doc p, .doc li { margin-bottom: 12px; color: var(--ink-2); }
.doc ul, .doc ol { padding-left: 24px; margin-bottom: 12px; }
.doc li { margin-bottom: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: .95rem; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--ink); font-weight: 600; background: #fff; }
.doc .callout { margin: 20px 0; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: #fff; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); }
.doc .toc { background: #fff; border-radius: var(--radius-sm); padding: 20px 24px; box-shadow: var(--shadow); margin-bottom: 32px; }
.doc .toc ol { margin: 0; columns: 2; column-gap: 24px; }
@media (max-width: 600px) { .doc .toc ol { columns: 1; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Device frame (iPhone-style) around raw app screenshots */
.device {
  --w: 300px;
  width: var(--w); margin: 0 auto; position: relative;
  background: #171B19; border-radius: calc(var(--w) * .16); padding: calc(var(--w) * .035);
  box-shadow: 0 30px 60px rgba(27,31,29,.22), inset 0 0 0 2px #2C312E;
}
.device::before { /* Dynamic Island */
  content: ""; position: absolute; z-index: 2; left: 50%; transform: translateX(-50%);
  top: calc(var(--w) * .06); width: calc(var(--w) * .30); height: calc(var(--w) * .085);
  background: #000; border-radius: 999px;
}
.device::after { /* status-bar time */
  content: "9:41"; position: absolute; z-index: 2; top: calc(var(--w) * .062); left: calc(var(--w) * .11);
  font-weight: 600; font-size: calc(var(--w) * .048); color: var(--ink); letter-spacing: -.01em;
}
.device-screen {
  border-radius: calc(var(--w) * .125); overflow: hidden; background: var(--bg);
  aspect-ratio: 9 / 19.3; padding-top: calc(var(--w) * .105);
}
.device-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.device-lg { --w: 340px; }
.hero-visual { position: relative; padding: 24px 0; }
.hero-visual::before {
  content: ""; position: absolute; inset: 10% 5%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(61,138,90,.22), rgba(61,138,90,0));
}
.hero-visual img { border-radius: 0; box-shadow: none; }
.feature-visual img { border-radius: 0; box-shadow: none; max-width: none; }
@media (max-width: 860px) { .device { --w: 260px; } .device-lg { --w: 300px; } }
