/* Accent values are pinned by contrast, not by taste. In light mode:
     --accent        #0a8150 on white  = 4.92:1  (AA for normal text)
     --accent-strong #076b42 on tint   = 5.84:1  (small text on --accent-soft,
                                                  where plain --accent is 4.37:1)
   The old #0d8f5b was 4.12:1 and failed AA on the primary button.
   Recompute both if the palette moves. */
:root {
  --bg: #ffffff;
  --bg-alt: #f2f9f5;
  --fg: #0c1711;
  --fg-muted: #4d6157;
  --border: #dcebe3;
  --accent: #0a8150;
  --accent-strong: #076b42;
  --accent-soft: #e6f5ed;
  --accent-fg: #ffffff;
  --gear-1: #0a8150;
  --gear-2: #7cc9a3;
  --radius: 10px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1310;
    --bg-alt: #0f1c17;
    --fg: #e6f2ec;
    --fg-muted: #93aca1;
    --border: #1d3129;
    --accent: #34d67f;
    --accent-strong: #34d67f;
    --accent-soft: #12281e;
    --accent-fg: #04120b;
    --gear-1: #34d67f;
    --gear-2: #1d7a51;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

/* ---------- keyboard access ---------- */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible { outline-offset: 4px; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--bg);
  color: var(--fg);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-weight: 600;
  text-decoration: none;
  transition: top .12s ease;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */
header.site {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}
.brand span { color: var(--accent); }
.brand svg { width: 22px; height: 22px; }
nav.site a {
  color: var(--fg-muted);
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.94rem;
}
nav.site a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  padding: 80px 0 72px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 380px at 82% 18%, var(--accent-soft), transparent 70%);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
/* On narrow screens the copy leads and the art follows. The art used to be
   order: -1, which pushed the value proposition and both CTAs below a large
   decorative graphic on phones. */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 48px 0 56px; }
  .gearstack { max-width: 280px; }
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  max-width: 18ch;
}

/* rotating "updating text" line */
.rotator {
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  min-height: 1.6em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 2px;
}
.rotator .caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  background: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero p.lead {
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  color: var(--fg-muted);
  max-width: 60ch;
  margin: 0 0 32px;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--accent);
  margin-right: 10px;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}

/* ---------- gear animation + logo hubs ---------- */
.hero-art { display: flex; justify-content: center; }

.gearstack {
  position: relative;
  width: 100%;
  max-width: 360px;
  border-radius: 14px;
  overflow: hidden;
}
.gearstack img { display: block; width: 100%; height: auto; }

/* Hubs sit over the hollow gear centres. Percentages are emitted by
   tools/make_gears.py -- rerun it after changing the gear geometry.
   No .hub elements are in index.html right now: empty hubs read as an
   unfinished graphic. Add the divs back only when a hub holds a real,
   licence-checked integration logo. See README. */
.hub {
  position: absolute;
  transform: translate(-50%, -50%);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hub img, .hub svg {
  width: 62%;
  height: 62%;
  object-fit: contain;
}
.hub-a { left: 29.17%; top: 32.94%; width: 27.73%; }
.hub-b { left: 72.50%; top: 32.94%; width: 24.27%; }
.hub-c { left: 72.50%; top: 72.71%; width: 20.80%; }

@media (prefers-reduced-motion: reduce) {
  .rotator .caret { animation: none; }
}

/* ---------- sections ---------- */
section { padding: 64px 0; border-bottom: 1px solid var(--border); }
section.alt { background: var(--bg-alt); }
section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
section > .wrap > p.sub {
  color: var(--fg-muted);
  max-width: 62ch;
  margin: 0 0 36px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg);
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .ico {
  width: 34px; height: 34px;
  color: var(--accent);
  margin-bottom: 12px;
}
.card { display: flex; flex-direction: column; }
.card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--fg-muted); font-size: 0.95rem; }
.card p.for {
  margin: 10px 0 0;
  font-size: 0.86rem;
  color: var(--fg-muted);
  opacity: .85;
  flex: 1;
}
.card-cta {
  display: inline-block;
  margin-top: 16px;
  align-self: flex-start;
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}
.card-cta::after { content: " →"; }
.card-cta:hover { text-decoration: underline; }

/* ---------- pricing ---------- */
.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  align-items: stretch;
}
.tier {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.tier.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tier h3 { margin: 0 0 4px; font-size: 1.05rem; }
.tier .who { margin: 0 0 16px; color: var(--fg-muted); font-size: 0.88rem; }
.tier .amount {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--fg);
}
.tier .amount .per { font-size: 0.9rem; font-weight: 500; color: var(--fg-muted); letter-spacing: 0; }
.tier .amount.quote { font-size: 1.3rem; }
.tier ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 22px;
  color: var(--fg-muted);
  font-size: 0.92rem;
  flex: 1;
}
.tier li { padding-left: 22px; position: relative; margin-bottom: 7px; }
.tier li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.tier .btn { margin-right: 0; text-align: center; }
.tier .btn.secondary { border-color: var(--accent); color: var(--accent-strong); }

.fairuse {
  margin: 32px 0 0;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg);
  padding: 22px 26px;
}
.fairuse h3 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
}
.fairuse p {
  margin: 0 0 10px;
  color: var(--fg-muted);
  font-size: 0.93rem;
  max-width: 74ch;
}
.fairuse p:last-child { margin-bottom: 0; }
.fairuse strong { color: var(--fg); }

.price-foot {
  margin: 28px 0 0;
  color: var(--fg-muted);
  font-size: 0.9rem;
  max-width: 72ch;
}
.price-foot strong { color: var(--fg); }
.price-foot a, .fairuse a { color: var(--accent-strong); }

/* ---------- contact form ---------- */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 640px;
}
.form .full { grid-column: 1 / -1; }
.form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.form .req { color: var(--accent-strong); }
.form input,
.form select,
.form textarea {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.form textarea { min-height: 130px; resize: vertical; }
.form input:hover,
.form select:hover,
.form textarea:hover { border-color: var(--accent); }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form button {
  font: inherit;
  cursor: pointer;
  justify-self: start;
}
.form button[disabled] { opacity: .6; cursor: progress; }

.form-msg {
  grid-column: 1 / -1;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.94rem;
  margin: 0;
}
.form-msg[hidden] { display: none; }
.form-msg.ok { background: var(--accent-soft); border-left: 3px solid var(--accent); color: var(--fg); }
.form-msg.err { background: var(--accent-soft); border-left: 3px solid #b3261e; color: var(--fg); }

@media (max-width: 560px) {
  .form { grid-template-columns: 1fr; }
}

/* ---------- who we are ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px;
}
.about-grid h3 { margin: 0 0 6px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-strong); }
.about-grid p { margin: 0; color: var(--fg-muted); font-size: 0.95rem; }
.about-grid a { color: var(--accent-strong); }

/* ---------- legal pages ---------- */
.legal { padding: 56px 0 80px; }
.legal h1 { font-size: 2rem; letter-spacing: -0.02em; margin: 0 0 6px; }
.legal .updated { color: var(--fg-muted); font-size: 0.9rem; margin: 0 0 36px; }
.legal h2 { font-size: 1.18rem; margin: 36px 0 10px; color: var(--fg); }
.legal p, .legal li { color: var(--fg-muted); max-width: 72ch; }
.legal a { color: var(--accent); }

.notice {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 0 0 32px;
}
.notice p { margin: 0; color: var(--fg); font-size: 0.94rem; }

/* ---------- footer ---------- */
footer.site {
  padding: 40px 0 56px;
  color: var(--fg-muted);
  font-size: 0.9rem;
}
footer.site .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
footer.site a { color: var(--fg-muted); text-decoration: none; margin-right: 18px; }
footer.site a:hover { color: var(--accent); text-decoration: underline; }

.contact-line { font-size: 1.05rem; }
.contact-line a { color: var(--accent); }
