:root {
  /* Brand colors from the logo: red #EE1100, blue #0073CF, gold #FFCC33.
     Text and button shades are darkened slightly for readable contrast. */
  --bg: #fbfaf8;
  --bg-alt: #f3f1ed;
  --surface: #ffffff;
  --text: #1b1d21;
  --muted: #555960;
  --border: #e2dfda;
  --accent: #cc1100;
  --accent-hover: #a50e00;
  --accent-text: #ffffff;
  --blue: #0068bd;
  --gold: #ffcc33;
  --radius: 10px;
  --max: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131518;
    --bg-alt: #1a1d21;
    --surface: #21252a;
    --text: #eef0f2;
    --muted: #a9aeb5;
    --border: #33383f;
    --accent: #ff5a45;
    --accent-hover: #ff7a68;
    --accent-text: #1a0400;
    --blue: #5aa9f0;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); max-width: 18ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h2::after { content: ""; display: block; width: 48px; height: 4px; margin-top: 12px; background: var(--gold); border-radius: 2px; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--surface); padding: 8px 12px; border-radius: 6px; z-index: 100;
}
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.muted { color: var(--muted); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand-mark { width: 76px; height: 40px; flex: none; }
.nav { display: flex; align-items: center; gap: 24px; flex: none; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav a:not(.btn):hover { color: var(--text); }

@media (max-width: 640px) {
  .nav a:not(.btn) { display: none; }
  /* Let the company name wrap so the Contact button stays on screen. */
  .header-inner { gap: 12px; }
  .brand { min-width: 0; gap: 8px; font-size: 0.95rem; line-height: 1.2; white-space: normal; }
  .brand-mark { width: 61px; height: 32px; }
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
.btn-small { padding: 7px 14px; font-size: 0.9rem; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-alt); border-color: var(--muted); color: var(--text); }

/* Hero */
.hero { padding: clamp(56px, 10vw, 112px) 0 clamp(48px, 8vw, 88px); }
.eyebrow { color: var(--blue); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.hero-logo { order: 2; width: 100%; height: auto; }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-logo { order: 0; max-width: 300px; }
}

/* Facts strip */
.facts { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts-grid > div { padding: 24px 16px; display: flex; flex-direction: column; gap: 2px; }
.facts-grid > div + div { border-left: 1px solid var(--border); }
.fact-num { font-size: 1.75rem; font-weight: 700; color: var(--blue); }
.fact-label { color: var(--muted); font-size: 0.95rem; }

@media (max-width: 720px) {
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .facts-grid > div:nth-child(3) { border-left: 0; }
  .facts-grid > div:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* Sections */
.section { padding: clamp(56px, 9vw, 96px) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-lede { color: var(--muted); font-size: 1.1rem; margin-bottom: 32px; }

.two-col { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.prose p { max-width: 65ch; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; gap: 8px; } }

/* Capability cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
}
.card p { color: var(--muted); margin: 0; }

/* Tools & technologies */
.tools { margin-top: 48px; }
.tool-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px 32px; margin: 16px 0 20px; }
.tool-groups dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.tool-groups dd { margin: 0; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.92rem;
  font-weight: 500;
}

/* Process steps */
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-weight: 700;
  color: var(--blue);
  font-size: 0.9rem;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--border);
}
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Contact */
.section-contact { background: var(--bg-alt); border-top: 1px solid var(--border); }
.contact-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.contact-inner > div > p { color: var(--muted); font-size: 1.1rem; max-width: 45ch; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.contact-card dl { margin: 0 0 24px; }
.contact-card dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.contact-card dd { margin: 2px 0 16px; font-size: 1.05rem; overflow-wrap: anywhere; }
@media (max-width: 760px) { .contact-inner { grid-template-columns: 1fr; gap: 16px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer-inner p { margin: 0; }

/* 404 */
.not-found { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }

/* Text-alert opt-in and legal pages */
.optin { max-width: 680px; }
.optin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px;
  margin: 32px 0 48px;
}
.field-label { display: block; font-weight: 600; margin-bottom: 6px; }
.field {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.field:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field-hint { color: var(--muted); font-size: 0.9rem; margin: 6px 0 20px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.95rem; margin-bottom: 24px; }
.consent input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--accent); }
.form-error {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button.btn { font: inherit; font-weight: 600; cursor: pointer; }
.optin-details dl { margin: 0 0 24px; }
.optin-details dt { font-weight: 600; margin-top: 16px; }
.optin-details dd { margin: 2px 0 0; color: var(--muted); }
.legal { max-width: 720px; }
.legal h2 { font-size: 1.25rem; margin-top: 1.75em; }
.legal h2::after { display: none; }
