:root {
  color-scheme: light;
  --primary: #111;
  --accent: #f2b705;
  --ink: #151515;
  --muted: #5a6472;
  --paper: #fbfbf8;
  --panel: #ffffff;
  --line: #d9ded8;
  --ok: #166534;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

body.dark {
  color: #f8fafc;
  background: #111;
  --ink: #f8fafc;
  --muted: #c8d0d8;
  --paper: #111;
  --panel: #1b1b1b;
  --line: #343434;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--primary);
  border: 2px solid var(--accent);
  font-weight: 900;
  letter-spacing: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid var(--primary);
}

.button.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.hero {
  display: grid;
  min-height: 670px;
  align-items: end;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--paper) 96%, transparent) 0%, color-mix(in srgb, var(--paper) 80%, transparent) 45%, transparent 78%),
    linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--paper) 85%, transparent) 100%),
    url("../assets/mobile-carb-testing-hero.png") center right / cover no-repeat;
}

.hero-inner {
  position: relative;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 4px;
  border-radius: 99px;
  background: var(--accent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lede {
  max-width: 690px;
  font-size: 1.18rem;
  color: var(--muted);
}

.hero-panel {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 30px 0;
}

.metric {
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}

.metric strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1.1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.93rem;
}

main section {
  padding: 70px 0;
}

.section-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 30px;
}

.section-heading h2 {
  font-size: clamp(1.75rem, 3vw, 3rem);
  line-height: 1.08;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card,
.faq-item,
.form-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.card {
  padding: 22px;
}

.card h3 {
  margin-bottom: 8px;
}

.list {
  padding-left: 20px;
  margin: 0;
}

.list li + li {
  margin-top: 8px;
}

.steps {
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 58px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 22px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #101010;
  font-weight: 900;
}

.split {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.service-areas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--panel);
  font-weight: 700;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  padding: 20px;
}

.faq-item h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.form-wrap {
  padding: 22px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.muted {
  color: var(--muted);
}

.tool {
  display: grid;
  gap: 14px;
}

.tool-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tool-result {
  min-height: 116px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px;
  background: color-mix(in srgb, var(--panel) 88%, var(--accent) 12%);
}

.source-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.source-list a {
  display: inline-flex;
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  background: var(--panel);
}

.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 820px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .nav-actions {
    width: 100%;
  }

  .nav-actions .button {
    flex: 1;
  }

  .hero {
    min-height: auto;
  }

  .hero::before {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--paper) 90%, transparent) 0%, color-mix(in srgb, var(--paper) 92%, transparent) 70%),
      url("../assets/mobile-carb-testing-hero.png") center top / cover no-repeat;
  }

  .hero-inner {
    padding-top: 270px;
  }

  .hero-panel,
  .grid,
  .split,
  .tool-row {
    grid-template-columns: 1fr;
  }
}
