/* CarbLuma website: shared styles. No external fonts, no inline styles (CSP: style-src 'self'). */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f2f4f3;
  --border: #e3e5e8;
  --text: #1d1d1f;
  --text-2: #4b4b50;
  --text-3: #6b6b70;
  --accent: #047857;
  --accent-strong: #065f46;
  --accent-soft: #e7f5ef;
  --accent-contrast: #ffffff;
  --teal: #0f766e;
  --ring-track: #d9ece4;
  --warn-bg: #fff8eb;
  --warn-border: #f2c879;
  --warn-text: #5c3b00;
  --focus: #0a66c2;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.08);

  --radius: 20px;
  --radius-sm: 12px;
  --max: 1080px;
  --gutter: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #0d0d0f;
    --surface: #161618;
    --surface-2: #1f1f22;
    --border: #2c2c30;
    --text: #f5f5f7;
    --text-2: #c7c7cc;
    --text-3: #a1a1a6;
    --accent: #34d399;
    --accent-strong: #6ee7b7;
    --accent-soft: #0f2a21;
    --accent-contrast: #032018;
    --teal: #2dd4bf;
    --ring-track: #1d3a30;
    --warn-bg: #2a2010;
    --warn-border: #6b4f1d;
    --warn-text: #f8deb0;
    --focus: #7cc4ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-strong); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.3rem, 7vw, 4rem); font-weight: 750; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Skip link */
.skip {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 8px; color: var(--accent-contrast); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand img { width: 28px; height: 28px; }
.brand small { color: var(--text-3); font-weight: 500; font-size: 0.8rem; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 6px 10px;
  border-radius: 999px;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
@media (max-width: 480px) {
  .brand small { display: none; }
  .nav a { padding: 6px 7px; font-size: 0.88rem; }
}

/* Hero */
.hero { padding: 56px 0 40px; overflow: hidden; }
.hero .wrap {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero { padding: 88px 0 64px; }
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
}
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 650;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}
.hero h1 .accent { color: var(--accent); }
.lead { font-size: 1.2rem; color: var(--text-2); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 600;
}
.badge-soon .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

.hero-art { display: flex; flex-direction: column; align-items: center; }
.hero-art svg { width: 300px; max-width: 78vw; }
.art-caption { color: var(--text-3); font-size: 0.82rem; margin-top: 12px; text-align: center; }

/* Phone illustration fills (inline SVG, styled here) */
.ph-frame { fill: #1d1d1f; }
.ph-screen { fill: var(--bg-alt); }
.ph-card { fill: var(--surface); }
.ph-island { fill: #1d1d1f; }
.ph-text { fill: var(--text); font-family: var(--font-display); }
.ph-muted { fill: var(--text-3); font-family: var(--font); }
.ph-accent-text { fill: var(--accent); font-family: var(--font); }
.ph-track { fill: none; stroke: var(--ring-track); }
.ph-ring { fill: none; stroke: var(--accent); stroke-linecap: round; }
.ph-btn { fill: var(--accent); }
.ph-btn-text { fill: var(--accent-contrast); font-family: var(--font); }
.ph-bar { fill: var(--accent); }
.ph-bar-soft { fill: var(--ring-track); }
@media (prefers-color-scheme: dark) {
  .ph-frame { fill: #3a3a3e; }
  .ph-island { fill: #000; }
}

/* Sections */
section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 40em; margin-bottom: 36px; }
.section-head p { color: var(--text-2); font-size: 1.1rem; }

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.section-alt .card { border-color: transparent; box-shadow: var(--shadow); }
.card p { color: var(--text-2); margin: 0; }
.card h3 { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 8px;
}

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  margin-bottom: 14px;
}
.steps p { color: var(--text-2); margin: 0; }

/* Check list */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .checks { grid-template-columns: repeat(2, 1fr); column-gap: 32px; } }
.checks li { position: relative; padding-left: 32px; color: var(--text-2); }
.checks li strong { color: var(--text); }
.checks li::before {
  content: "";
  position: absolute; left: 0; top: 0.2em;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
}
.checks li::after {
  content: "";
  position: absolute; left: 7px; top: calc(0.2em + 5px);
  width: 6px; height: 9px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Free vs Pro table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
thead th { font-size: 0.85rem; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
tbody th { font-weight: 500; }
td.pro { color: var(--accent); font-weight: 600; }
.fine { color: var(--text-3); font-size: 0.9rem; margin-top: 16px; }

/* Disclaimer callout */
.callout {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  border-radius: var(--radius);
  padding: 24px;
}
.callout h2, .callout h3 { color: var(--warn-text); }
.callout h2 { font-size: 1.4rem; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout ul { padding-left: 1.2em; margin: 0 0 1em; }
.callout li { margin-bottom: 6px; }

/* Long-form documents (privacy, terms, support) */
.doc { padding: 48px 0 72px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 6vw, 3rem); }
.doc h2 { font-size: 1.45rem; margin-top: 2.2em; }
.doc h3 { margin-top: 1.6em; }
.doc p, .doc li { color: var(--text-2); }
.doc strong { color: var(--text); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: 0.5em; }
.meta { color: var(--text-3); font-size: 0.95rem; margin-bottom: 2em; }
.summary {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 2em;
}
.summary h2 { margin-top: 0; font-size: 1.15rem; color: var(--text); }
.summary ul { margin: 0; }
.toc { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 2em; }
.toc h2 { font-size: 1rem; margin: 0 0 8px; }
.toc ol { margin: 0; columns: 2 220px; column-gap: 24px; }
.toc li { margin-bottom: 4px; break-inside: avoid; }

.data-table td, .data-table th { font-size: 0.93rem; }

details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 10px;
}
summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border: solid var(--text-3);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -4px;
  transition: transform 0.2s ease;
}
details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
details > div { padding: 0 20px 16px; }
details > div p:last-child { margin-bottom: 0; }

.contact-card {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 2em;
}
.contact-card p { margin: 0; }
.contact-card a.email { font-size: 1.15rem; font-weight: 650; }

/* 404 */
.notfound { padding: 96px 0; text-align: center; }
.notfound .wrap { max-width: 560px; }
.notfound .cta-row { justify-content: center; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 32px 0 40px;
  font-size: 0.92rem;
  color: var(--text-3);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: flex-start; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer p { margin: 0 0 6px; }
.site-footer .footnote { flex-basis: 100%; font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .skip { display: none; }
  body { background: #fff; color: #000; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.doc .callout { margin: 2em 0; }
.doc .callout h2 { margin-top: 0; }
.doc .callout p, .doc .callout li { color: var(--warn-text); }
.doc .callout strong { color: var(--warn-text); }

/* Keep the footer at the bottom on short pages (404, support). */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
