/* KegMetrics static site.
   Palette from the official KM2 logos (/workspace/kegmetrics-brand): black #000000, white #ffffff,
   cyan bars #08c4fd (light logo) / #00b0f0 (dark logo + app icon). #04627f is the bar-edge tone
   from the icon SVG. Tints are derived from #08c4fd. */
:root {
  --accent: #08c4fd;      /* icon bar fill: shapes only (2.0:1 on white, never small text) */
  --accent-deep: #04627f; /* icon bar edge: links, labels, step numbers (6.9:1 on white) */
  --ink: #000000;         /* icon outline: headings, dark band */
  --body: #333333;        /* body text (neutral) */
  --muted: #555555;       /* secondary text */
  --line: #d3eef7;        /* derived tint of accent: borders */
  --tint: #f0fbff;        /* derived tint of accent: alternate sections */
  --paper: #ffffff;       /* icon face */
  --confirm-bg: #fff3a3;
  --radius: 12px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::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; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--body); background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-deep); text-underline-offset: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 7vw, 3.75rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); font-weight: 750; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 10; }
.skip-link:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.eyebrow { font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: .75em; }

/* Header: icon + text wordmark */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 44px; height: 44px; }
.brand-name { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.015em; }
.site-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-nav a { color: var(--body); text-decoration: none; font-weight: 600; font-size: .9375rem; }
.site-nav a:hover { color: var(--accent-deep); }
.site-nav .nav-cta { color: var(--paper); background: var(--ink); padding: 8px 14px; border-radius: 8px; }
.site-nav .nav-cta:hover { color: var(--paper); background: var(--accent-deep); }
.nav-optional { display: none; }
@media (min-width: 820px) { .nav-optional { display: inline; } }

/* Hero */
.hero { background: var(--tint); border-bottom: 1px solid var(--line); padding: 48px 0 56px; }
.hero-inner { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero { padding: 88px 0; } .hero-inner { grid-template-columns: 1.4fr 1fr; gap: 64px; } }
.lede { font-size: clamp(1.125rem, 2.4vw, 1.3rem); max-width: 36em; }
.hero-icon { margin: 0; justify-self: center; width: min(60vw, 320px); }
.hero-icon img { width: 100%; height: auto; border-radius: 22.5%; box-shadow: 0 12px 32px rgba(0,0,0,.18); }
@media (max-width: 899px) { .hero-icon { width: 112px; order: -1; justify-self: start; } }

/* CTA: App Store badge. Apple: >= 40px tall onscreen, clear space >= 1/4 badge height
   (12px at 48px), unmodified artwork, subordinate to the headline. */
.cta-block { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 28px 0 12px; }
.cta-center { justify-content: center; flex-direction: column; }
.app-badge { display: inline-block; padding: 12px; margin: -12px; line-height: 0; border-radius: 10px; }
.app-badge img { height: 48px; width: auto; }
.cta-note { margin: 0; font-weight: 700; color: var(--ink); }
.cta-sub { font-size: .9375rem; color: var(--muted); margin: 0; max-width: 34em; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .section { padding: 96px 0; } }
.hero + .section { border-top: 0; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }

.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 20px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--paper); }
.step-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-deep); color: #fff; font-weight: 800; margin-bottom: 14px; }

.grid { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 22px; }
.card p { margin: 0; }

/* Free vs Pro */
.pro-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.pro-head img { width: 120px; height: 120px; border-radius: 16px; flex: none; }
.pro-head > div { flex: 1 1 300px; }
.table-wrap { overflow-x: auto; margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.compare { width: 100%; border-collapse: collapse; table-layout: fixed; }
.compare col.c-feature { width: auto; }
.compare thead th:nth-child(2), .compare thead th:nth-child(3) { width: 28%; }
@media (min-width: 760px) { .compare thead th:nth-child(2), .compare thead th:nth-child(3) { width: 24%; } }
.compare th, .compare td { padding: 12px 10px; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th { color: var(--ink); font-size: .9375rem; }
.compare thead th span { font-weight: 500; color: var(--muted); font-size: .8125rem; }
.compare tbody th { font-weight: 600; color: var(--ink); }
.compare td, .compare thead th:not(:first-child) { text-align: center; }
@media (max-width: 600px) { .compare { font-size: .9rem; } }
@media (min-width: 760px) { .compare th, .compare td { padding: 14px 16px; } }
.yes { color: var(--accent-deep); font-weight: 800; font-size: 1.1rem; }
.no { color: var(--muted); }
.small { display: block; font-size: .8125rem; color: var(--muted); }

.proof { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .proof { grid-template-columns: 1fr 2fr; gap: 56px; } }
.stat { border-left: 6px solid var(--accent); padding-left: 20px; }
.stat-num { font-size: clamp(2.75rem, 8vw, 4rem); font-weight: 800; color: var(--ink); line-height: 1; margin: 0 0 8px; }
.stat-label { margin: 0; color: var(--muted); }

details { border-bottom: 1px solid var(--line); padding: 4px 0; }
details:first-of-type { border-top: 1px solid var(--line); margin-top: 24px; }
summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 14px 32px 14px 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 1.5rem; color: var(--accent-deep); }
details[open] summary::after { content: "\2212"; }
details p, details ul { margin: 0 0 16px; }

.final-cta { background: var(--ink); color: #e9f8fd; padding: 72px 0; border-top: 6px solid #00b0f0; }
.final-cta h2, .final-cta .cta-note { color: #fff; }
.final-logo { width: 64px; height: 64px; margin: 0 auto 20px; }

/* Legal / support pages */
.doc { padding: 48px 0 72px; }
.doc h1 { font-size: clamp(2rem, 6vw, 3rem); }
.doc h2 { font-size: clamp(1.35rem, 3.5vw, 1.75rem); margin-top: 2em; scroll-margin-top: 84px; }
.doc h3 { margin-top: 1.4em; }
.doc ul { padding-left: 1.25em; margin: 0 0 1em; }
.doc li { margin-bottom: .4em; }
.doc-meta { color: var(--muted); font-size: .9375rem; }
.toc { background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; }
.toc ol { margin: 0; padding-left: 1.25em; columns: 2 220px; }
.contact-box { background: var(--tint); border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: var(--radius); padding: 20px 24px; margin: 24px 0 8px; }
.contact-box h2 { margin-top: 0; }
.contact-box p:last-child { margin-bottom: 0; }
.doc-links { margin-top: 32px; }
mark.confirm { background: var(--confirm-bg); color: #000; font-weight: 700; padding: 1px 6px; border-radius: 4px; border: 1px dashed #8a6d00; }

.site-footer { padding: 32px 0 40px; font-size: .875rem; color: var(--muted); border-top: 1px solid var(--line); }
.final-cta + .site-footer { border-top: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.footer-nav a { font-weight: 600; }
.footer-inner p { margin: 0 0 6px; }
.legal { font-size: .75rem; }
