/* MedAlert website skin · built on tokens.css (design system pack)
   Same class vocabulary as the studio site (nav/wrap/eyebrow/doc/footer)
   plus ma-site marketing components. Light theme. */
body { margin: 0; background: var(--bg); color: var(--text); font-size: 17px; line-height: 1.6; font-weight: 500; }
* { box-sizing: border-box; }
img { display: block; max-width: 100%; }
a { color: var(--brand-700); }
a:hover { color: var(--brand-600); }
::selection { background: var(--brand-tint-2); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (min-width: 768px) { .wrap { padding-left: 48px; padding-right: 48px; } }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-700); margin: 0; }
.rule { border: 0; border-top: 1px solid var(--border); }

/* ---- nav ---- */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.nav-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 800; font-size: 19px; color: var(--text); letter-spacing: -0.02em; white-space: nowrap; }
.nav-logo img { width: 38px; height: 38px; border-radius: 11px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-link { font-size: 16px; font-weight: 700; text-decoration: none; color: var(--text-2); padding: 4px 0; transition: color 160ms ease; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--brand-700); }
.nav-cta { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: var(--r-btn); background: var(--brand-700); color: var(--brand-ink); font-weight: 800; font-size: 15.5px; text-decoration: none; box-shadow: var(--sh-1); transition: background 160ms ease, transform 120ms ease; white-space: nowrap; }
.nav-cta:hover { background: var(--brand-600); color: var(--brand-ink); }
.nav-burger { display: none; background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center; gap: 4px; flex-direction: column; }
.nav-burger span { display: block; width: 17px; height: 2px; border-radius: 2px; background: var(--text); transition: transform 200ms ease, opacity 200ms ease; }
@media (max-width: 920px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav.open .nav-links { display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 24px 16px; }
  .nav.open .nav-links li { width: 100%; }
  .nav.open .nav-link { display: block; padding: 15px 0; font-size: 17px; border-bottom: 1px solid var(--hairline); }
  .nav.open .nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav.open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.open .nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* ---- buttons / badges ---- */
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16.5px; color: var(--brand-700); text-decoration: none; border-bottom: 2px solid transparent; padding-bottom: 2px; transition: border-color 160ms ease; }
.btn-ghost:hover { border-bottom-color: var(--brand-700); }
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.store-badges a { display: block; border-radius: 10px; transition: transform 160ms ease, box-shadow 160ms ease; }
.store-badges a:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.store-badges img { height: 52px; width: auto; }

/* ---- hero ---- */
.ma-hero { padding: clamp(56px, 8vw, 110px) 0 clamp(48px, 6vw, 88px); }
.ma-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
@media (max-width: 920px) { .ma-hero-grid { grid-template-columns: 1fr; } }
.ma-hero h1 { font-size: clamp(42px, 5.6vw, 64px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.05; margin: 18px 0 20px; }
.ma-hero h1 .tint { color: var(--brand-700); }
.lead { font-size: clamp(18px, 1.6vw, 20px); font-weight: 500; line-height: 1.55; color: var(--text-2); max-width: 56ch; }
.hero-note { display: flex; gap: 10px 22px; flex-wrap: wrap; margin-top: 22px; font-size: 15px; font-weight: 600; color: var(--text-3); }
.hero-note span { display: inline-flex; align-items: center; gap: 7px; }
.hero-note svg { color: var(--brand-700); }

/* ---- phone placeholder (per web brief: no fake UI, striped block + mono label) ---- */
.phone-slot { display: flex; justify-content: center; }
.phone-ph { width: min(300px, 78vw); aspect-ratio: 9 / 19; border-radius: 24px; border: 1px solid var(--border); background: repeating-linear-gradient(-45deg, var(--surface-2) 0 14px, var(--surface-3) 14px 28px); box-shadow: var(--sh-2); display: grid; place-items: center; padding: 20px; }
.phone-ph span { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; color: var(--text-3); text-align: center; line-height: 1.6; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; }
/* real screenshot in the same slot: radius tracks the device frame baked into the image (12.5% of its width) */
.phone-shot { display: block; width: min(300px, 78vw); height: auto; border-radius: min(37.5px, 9.75vw); border: 1px solid var(--border); box-shadow: var(--sh-2); }

/* ---- sections ---- */
.sec { padding: clamp(64px, 9vw, 120px) 0; }
.sec-title { font-size: clamp(30px, 3.6vw, 40px); font-weight: 800; letter-spacing: -0.8px; line-height: 1.12; margin: 14px 0 14px; }
.sec-lead { font-size: 19px; color: var(--text-2); max-width: 62ch; }
.band { background: var(--surface-2); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }

/* ---- cards & tiles ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--sh-1); padding: clamp(24px, 3vw, 34px); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
@media (max-width: 920px) { .tiles { grid-template-columns: 1fr; } }
.tile-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-tint); color: var(--brand-700); display: grid; place-items: center; margin-bottom: 18px; }
.tile h3 { font-size: 24px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 10px; }
.tile p { font-size: 17px; color: var(--text-2); }
.tile .step-no { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: var(--text-3); text-transform: uppercase; display: block; margin-bottom: 12px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 36px; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; margin: 16px 0 0; padding: 0; }
.checklist li { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; font-size: 17px; color: var(--text-2); }
.checklist li svg { flex: none; margin-top: 3px; color: var(--taken-strong); }
.checklist li strong { color: var(--text); }
.pill-row { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }
.pill { border-radius: 999px; background: var(--brand-tint); color: var(--brand-700); font-size: 14px; font-weight: 700; padding: 7px 15px; }

/* ---- rule card (autonomy) ---- */
.rule-card { background: var(--surface); border: 1.5px solid var(--brand-tint-2); border-radius: var(--r-card); padding: clamp(24px, 3vw, 34px); }
.rule-card .rc-head { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 800; margin-bottom: 14px; }
.rule-card .rc-head svg { color: var(--brand-700); }
.rule-item { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--hairline); font-size: 17px; color: var(--text-2); }
.rule-item b { color: var(--text); font-weight: 700; }
.rule-item .no { flex: none; width: 30px; height: 30px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-700); font-weight: 800; font-size: 14px; display: grid; place-items: center; margin-top: 2px; }

/* ---- pricing ---- */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 36px; align-items: start; }
@media (max-width: 920px) { .price-grid { grid-template-columns: 1fr; } }
.price-card h3 { font-size: 24px; font-weight: 800; }
.price-card .who { font-size: 15px; font-weight: 600; color: var(--text-3); margin: 6px 0 4px; }
.price-card.premium { border: 1.5px solid var(--brand-500); }
.price-tag { display: inline-block; border-radius: 999px; background: var(--brand-tint); color: var(--brand-700); font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 13px; margin-bottom: 14px; }
.price-note { font-size: 15px; color: var(--text-3); margin-top: 16px; }

/* ---- FAQ ---- */
.faq { margin-top: 30px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--sh-1); padding: 6px 26px; }
.faq details { border-top: 1px solid var(--hairline); }
.faq details:first-child { border-top: 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 19px 0; font-size: 17px; font-weight: 700; color: var(--text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform 200ms ease; margin-right: 4px; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { color: var(--text-2); padding: 0 0 20px; max-width: 68ch; font-size: 17px; }

/* ---- final CTA ---- */
.cta-final { text-align: center; padding: clamp(64px, 9vw, 120px) 0; }
.cta-final h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; letter-spacing: -1px; margin-bottom: 14px; }
.cta-final .lead { margin: 0 auto 30px; }

/* ---- footer ---- */
.footer { background: var(--surface-2); border-top: 1px solid var(--border); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: clamp(44px, 6vw, 72px) 0 28px; }
@media (max-width: 920px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr; } }
.footer h4 { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 10px; }
.footer a { color: var(--text-2); text-decoration: none; font-size: 16px; }
.footer a:hover { color: var(--brand-700); text-decoration: underline; }
.footer-brand p { color: var(--text-2); font-size: 16px; max-width: 36ch; margin-top: 12px; }
.footer-base { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--hairline); padding: 18px 0 26px; font-size: 14.5px; font-weight: 600; color: var(--text-3); }
.footer-langs { font-size: 14.5px; font-weight: 600; color: var(--text-3); padding-bottom: 20px; }

/* ---- legal / doc pages ---- */
.page-head { padding: clamp(48px, 7vw, 90px) 0 clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--border); }
.page-head .display { font-size: clamp(34px, 4.6vw, 56px); font-weight: 800; letter-spacing: -1px; margin: 14px 0 0; }
.page-head .mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--text-3); }
.doc { max-width: 760px; padding: clamp(36px, 5vw, 60px) 0; counter-reset: docsec; }
.doc section { margin-bottom: 42px; }
.doc h2 { font-size: 21px; font-weight: 800; margin: 0 0 12px; counter-increment: docsec; display: flex; align-items: baseline; gap: 14px; }
.doc h2::before { content: counter(docsec, decimal-leading-zero); font-family: ui-monospace, Menlo, monospace; font-size: 13px; font-weight: 500; color: var(--brand-700); }
.doc p { color: var(--text-2); margin: 0 0 12px; font-size: 16.5px; }
.doc ul { margin: 12px 0; padding: 0 0 0 4px; list-style: none; }
.doc li { color: var(--text-2); padding: 6px 0 6px 26px; position: relative; font-size: 16.5px; }
.doc li::before { content: "·"; position: absolute; left: 8px; color: var(--brand-700); font-weight: 800; }
.doc a { color: var(--brand-700); }
.doc strong { color: var(--text); }
.doc .highlight-box, .doc .contact-box, .doc .warning-box { border: 1px solid var(--border); border-radius: var(--r-card); padding: 22px 26px; margin: 22px 0; background: var(--surface); box-shadow: var(--sh-1); }
.doc .warning-box { border-color: var(--missed); }
.doc .contact-box h3, .doc .highlight-box h3 { font-size: 18px; font-weight: 800; margin: 0 0 8px; }

/* ---- reveal (same contract as js/site.js) ---- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms ease, transform 600ms ease; }
  .reveal.in { opacity: 1; transform: none; }
}
:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }
