/* Messerschmidts marketing site - shared styles.
   System fonts only, no external resources. Light/dark via prefers-color-scheme.
   Prints are always light. */

:root {
  --bg: #ffffff;
  --bg-alt: #f3f6f9;
  --surface: #ffffff;
  --surface-2: #eef3f7;
  --border: #d5dee6;
  --text: #13202b;
  --muted: #4a5a69;
  --primary: #0a5c78;          /* links, primary buttons (white text 7.3:1) */
  --primary-strong: #074459;
  --on-primary: #ffffff;
  --accent: #f2b233;           /* safety amber, used with dark text */
  --on-accent: #1d1600;
  --eam: #0a5c78;
  --safety: #8a5a00;           /* amber-brown text on light (5.6:1) */
  --ok: #1d6b3a;
  --focus: #c2410c;
  --shadow: 0 1px 2px rgba(16, 32, 43, .06), 0 6px 20px rgba(16, 32, 43, .07);
  --radius: 14px;
  --max: 1180px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d141b;
    --bg-alt: #111b24;
    --surface: #15212c;
    --surface-2: #1b2a37;
    --border: #2b3c4b;
    --text: #e7eef5;
    --muted: #a8b6c4;
    --primary: #6cc7e6;
    --primary-strong: #9bdaf0;
    --on-primary: #05202b;
    --accent: #f2b233;
    --on-accent: #1d1600;
    --eam: #6cc7e6;
    --safety: #f5c35a;
    --ok: #6fd39a;
    --focus: #ffb27a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--primary); text-underline-offset: .18em; }
a:hover { color: var(--primary-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--primary); color: var(--on-primary); padding: .6em 1em; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .container { padding: 0 28px; } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-weight: 600; font-size: .7rem; color: var(--muted); letter-spacing: .02em; line-height: 1.1; }
.brand span { line-height: 1.1; }
.nav-toggle { margin-left: auto; display: none; align-items: center; gap: 6px; background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: .95rem; cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.site-nav a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .96rem; font-weight: 500; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--primary); font-weight: 700; }
.nav-actions { display: flex; gap: 8px; margin-left: 10px; align-items: center; }

@media (max-width: 1060px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 16px 18px; flex-direction: column; align-items: stretch; box-shadow: var(--shadow); }
  .js .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 12px 10px; }
  .nav-actions { margin: 10px 0 0; flex-direction: column; align-items: stretch; }
  .nav-actions .btn { width: 100%; }
  .header-inner { position: relative; flex-wrap: wrap; }
  html:not(.js) .site-nav { width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: .7em 1.15em; border-radius: 10px; border: 2px solid transparent; font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-strong); color: var(--on-primary); }
.btn-secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--surface-2); color: var(--primary-strong); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: #e2a11f; color: var(--on-accent); }
.btn-ghost { color: var(--text); background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: .5em .9em; font-size: .93rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
@media (min-width: 900px) { .section { padding: 88px 0; } }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--primary); margin-bottom: .6em; }
.eyebrow.safety { color: var(--safety); }
.lead { font-size: 1.15rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 64px; background:
  radial-gradient(900px 400px at 85% -10%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%),
  radial-gradient(700px 360px at -10% 110%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } .hero { padding: 84px 0 96px; } }
.hero .lead { max-width: 620px; }
.hero-note { margin-top: 18px; font-size: .92rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; }
.hero-note li::before { content: "\2713"; color: var(--ok); font-weight: 800; margin-right: 6px; }
.page-hero { padding: 52px 0 44px; border-bottom: 1px solid var(--border); background: radial-gradient(800px 300px at 90% 0%, color-mix(in srgb, var(--primary) 12%, transparent), transparent 70%); }
.page-hero.safety-hero { background: radial-gradient(800px 300px at 90% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%); }
.page-hero .lead { max-width: 720px; }

/* Product mock (illustrative only) */
.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; font-size: .86rem; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 2px 4px 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); display: inline-block; }
.mock-bar b { margin-left: 8px; font-weight: 700; font-size: .85rem; }
.mock-bar .pill { margin-left: auto; }
.mock-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 480px) { .mock-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--surface-2); border-radius: 10px; padding: 10px; }
.kpi strong { display: block; font-size: 1.35rem; line-height: 1.1; }
.kpi span { color: var(--muted); font-size: .78rem; }
.mock-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.mock-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.mock-list li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-caption { margin: 10px 4px 0; font-size: .78rem; color: var(--muted); }
.pill { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text); white-space: nowrap; border: 1px solid var(--border); }
.pill.ok { color: var(--ok); }
.pill.warn { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.pill.info { color: var(--primary); }

/* ---------- Chips / strip ---------- */
.strip { padding: 22px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.strip-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; justify-content: center; }
.strip p { margin: 0; font-weight: 700; color: var(--muted); font-size: .92rem; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: .93rem; color: var(--text); text-decoration: none; }
.chip svg { width: 18px; height: 18px; color: var(--primary); }
a.chip:hover { border-color: var(--primary); color: var(--text); }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 13%, transparent); color: var(--primary); margin-bottom: 14px; }
.card .icon svg { width: 24px; height: 24px; }
.card.safety .icon, .icon.safety { background: color-mix(in srgb, var(--accent) 26%, transparent); color: var(--safety); }
.feature-card p { color: var(--muted); font-size: .98rem; }
.link-arrow { font-weight: 700; text-decoration: none; }
.link-arrow::after { content: " \2192"; }

.product-card { display: flex; flex-direction: column; padding: 28px; border-top: 5px solid var(--eam); }
.product-card.safety { border-top-color: var(--accent); }
.product-card ul { margin: 0 0 22px; padding: 0; list-style: none; display: grid; gap: 8px; }
.product-card li { display: flex; gap: 10px; }
.product-card li::before { content: "\2713"; font-weight: 800; color: var(--ok); }
.product-card .btn-row { margin-top: auto; }
.product-tag { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--eam); }
.product-card.safety .product-tag { color: var(--safety); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 800; margin-bottom: 12px; }
.steps h3 { font-size: 1.08rem; }
.steps p { color: var(--muted); margin: 0; font-size: .98rem; }

/* Split rows */
.split { display: grid; gap: 32px; align-items: center; }
.split > *, .grid > *, .hero-grid > * { min-width: 0; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } .split.reverse > :first-child { order: 2; } }
.check-list { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; }
.check-list li::before { content: "\2713"; color: var(--ok); font-weight: 800; flex: none; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }

/* Example scenario */
.scenario { border-left: 5px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; padding: 24px 26px; box-shadow: var(--shadow); }
.scenario .label { display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--accent); color: var(--on-accent); padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
.scenario blockquote { margin: 0 0 .6em; font-size: 1.12rem; }

/* Ticker demo */
.ticker { overflow: hidden; border-radius: 10px; background: #1d1600; color: #ffe2a3; font-weight: 600; font-size: .92rem; white-space: nowrap; border: 2px solid var(--accent); }
.ticker-track { display: inline-block; padding: 9px 0; padding-left: 100%; animation: ticker 28s linear infinite; }
.ticker-track span { margin-right: 48px; }
@keyframes ticker { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; padding-left: 12px; white-space: normal; } }

/* Domains */
.domain { border-top: 4px solid var(--border); }
.domain.health { border-top-color: #c0392b; }
.domain.safety-d { border-top-color: var(--accent); }
.domain.env { border-top-color: #2e8b57; }
.domain.sec { border-top-color: #4b6cb7; }

/* ---------- Pricing ---------- */
.plans { display: grid; gap: 20px; }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .plans.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); position: relative; min-width: 0; }
.plan.featured { border: 2px solid var(--primary); }
.plan .badge { position: absolute; top: -13px; left: 22px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.plan h3 { font-size: 1.3rem; margin-bottom: .2em; }
.plan .app-name { font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 8px 0 6px; }
.price .amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.price .per { color: var(--muted); font-size: .95rem; }
.price .soon { font-size: 1.6rem; font-weight: 800; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 14px 0 22px; display: grid; gap: 8px; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: "\2713"; color: var(--ok); font-weight: 800; flex: none; }
.plan .btn { margin-top: auto; }
.plan .sub { font-size: .92rem; color: var(--muted); }
.plan-extra { margin: 0 0 16px; padding: 12px 14px; background: var(--surface-2); border-radius: 10px; font-size: .93rem; }
.plans-status { font-size: .85rem; color: var(--muted); margin-top: 12px; min-height: 1.2em; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .96rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--surface-2); font-size: .85rem; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }

.calc { display: grid; gap: 16px; }
@media (min-width: 760px) { .calc { grid-template-columns: 1fr 1fr; align-items: start; } }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid #7d8b98; border-radius: 10px; padding: .6em .75em; width: 100%; }
textarea { min-height: 140px; resize: vertical; }
.calc-total { font-size: 2rem; font-weight: 800; }
.calc-lines { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; font-size: .95rem; }
.calc-lines li { display: flex; justify-content: space-between; gap: 12px; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--primary); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 16px; color: var(--muted); }
.faq-group { margin-bottom: 40px; }

/* CTA band */
.cta-band { background: var(--primary); color: var(--on-primary); border-radius: 22px; padding: 40px 28px; display: grid; gap: 20px; align-items: center; }
@media (min-width: 860px) { .cta-band { grid-template-columns: 1.4fr 1fr; padding: 52px; } .cta-band .btn-row { justify-content: flex-end; } }
.cta-band h2 { color: inherit; margin-bottom: .3em; }
.cta-band p { margin: 0; opacity: .95; }
.cta-band .btn-light { background: var(--on-primary); color: var(--primary); }
.cta-band .btn-light:hover { background: var(--bg-alt); color: var(--primary-strong); }
.cta-band .btn-outline-light { border-color: var(--on-primary); color: var(--on-primary); background: transparent; }
.cta-band .btn-outline-light:hover { background: color-mix(in srgb, var(--on-primary) 14%, transparent); color: var(--on-primary); }

/* Notices */
.draft-banner { background: var(--accent); color: var(--on-accent); border-radius: 12px; padding: 14px 18px; font-weight: 600; margin-bottom: 28px; }
.prose { max-width: 780px; }
.prose h2 { font-size: 1.4rem; margin-top: 1.8em; }
.prose li { margin-bottom: .4em; }
.notice { padding: 14px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 0; border-top: 1px solid var(--border); background: var(--bg-alt); padding: 52px 0 28px; font-size: .95rem; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-brand { grid-column: auto; } }
.site-footer h2 { font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); font-size: .88rem; }
.email { overflow-wrap: anywhere; }

/* 404 */
.notfound { text-align: center; padding: 96px 0; }
.notfound .code { font-size: clamp(4rem, 18vw, 8rem); font-weight: 900; color: var(--primary); line-height: 1; margin-bottom: 10px; }

/* ---------- Print: always light, no chrome ---------- */
@media print {
  :root {
    --bg: #fff; --bg-alt: #fff; --surface: #fff; --surface-2: #f1f1f1; --border: #bbb;
    --text: #000; --muted: #333; --primary: #000; --primary-strong: #000; --on-primary: #fff;
    --eam: #000; --safety: #000; --ok: #000; --shadow: none;
    color-scheme: light;
  }
  html, body { background: #fff !important; color: #000 !important; }
  .site-header, .nav-toggle, .skip-link, .cta-band .btn-row, .ticker, .hero-visual, .calc, .contact-form { display: none !important; }
  .section, .hero, .page-hero { padding: 18px 0 !important; background: none !important; }
  .section-alt { background: none !important; }
  .card, .plan, .steps li, .panel, .scenario, .faq details { box-shadow: none !important; break-inside: avoid; }
  .cta-band { background: #fff !important; color: #000 !important; border: 1px solid #000; }
  .faq details > div { display: block !important; }
  a { color: #000; }
  main a[href^="http"]::after, main a[href^="mailto:"]::after { content: " (" attr(href) ")"; font-size: .85em; }
  .site-footer { background: #fff !important; }
}
