:root {
  --ink: #0b1f3a;
  --ink-soft: #33415c;
  --muted: #4f5e74;
  --line: #dfe6ef;
  --line-strong: #c6d1e0;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --bg-muted: #f8fafc;
  --accent: #0b6e6d;
  --accent-dark: #085453;
  --accent-soft: #e3f3f2;
  --accent-ring: rgba(11, 110, 109, 0.22);
  --gold: #c9a227;
  --live-bg: #e1f5e7;
  --live-ink: #145a28;
  --live-dot: #1a934a;
  --soon-bg: #edf1f6;
  --soon-ink: #475569;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(11, 31, 58, 0.05), 0 8px 24px rgba(11, 31, 58, 0.06);
  --shadow-hover: 0 4px 10px rgba(11, 31, 58, 0.07), 0 18px 42px rgba(11, 31, 58, 0.11);
}

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

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

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--ink);
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 16px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 2px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 19px;
  box-shadow: 0 2px 8px rgba(11, 31, 58, 0.16);
}

.brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.015em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--bg-alt);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 80px;
  background:
    radial-gradient(760px 420px at 88% -8%, rgba(11, 110, 109, 0.13), transparent 62%),
    radial-gradient(540px 320px at 4% 8%, rgba(11, 31, 58, 0.06), transparent 58%),
    radial-gradient(#d8e1ec 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
  background-size: auto, auto, 24px 24px, auto;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(11, 110, 109, 0.18);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.09;
  letter-spacing: -0.032em;
  font-weight: 800;
}

.serif-accent {
  font-family: "Source Serif 4", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  color: var(--accent-dark);
  letter-spacing: -0.02em;
}

.lede {
  max-width: 580px;
  margin: 0 0 32px;
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 13px 22px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 999px;
}

.btn-icon {
  flex-shrink: 0;
  transition: transform 0.16s ease;
}

.btn:hover .btn-icon {
  transform: translate(1px, -1px);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(11, 110, 109, 0.24);
}

.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 8px 22px rgba(8, 84, 83, 0.30);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: #ffffff;
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--bg-muted);
  transform: translateY(-1px);
}

.btn-small {
  padding: 10px 18px;
  min-height: 40px;
  font-size: 14px;
}

.btn-on-dark {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.btn-on-dark:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.btn-on-dark:focus-visible {
  outline-color: #ffffff;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.check-icon {
  color: var(--accent);
  flex-shrink: 0;
}

/* ---------- hero schematic card ---------- */
.diagram-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 16px;
  box-shadow: 0 10px 34px rgba(11, 31, 58, 0.08);
}

.diagram-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.diagram-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.diagram-pill {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
}

.diagram-svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 20px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.diagram-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-line {
  display: inline-block;
  width: 16px;
  height: 0;
}

.legend-eff { border-top: 2.5px solid var(--accent); }
.legend-fut { border-top: 2.5px dashed var(--gold); }
.legend-path { border-top: 2.5px solid var(--ink); }

/* ---------- sections ---------- */
.section {
  padding: 84px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  margin-bottom: 38px;
}

.section-kicker {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.section h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -0.025em;
  font-weight: 800;
  line-height: 1.2;
}

.section-sub {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  max-width: 600px;
}

.grid {
  display: grid;
  gap: 22px;
}

.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(11, 110, 109, 0.35);
}

.card-icon {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--accent-dark);
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(11, 110, 109, 0.16);
  margin-bottom: 18px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.62;
}

/* ---------- tools ---------- */
.tool-card {
  display: flex;
  flex-direction: column;
  position: relative;
}

.tool-live {
  border-color: rgba(11, 110, 109, 0.28);
  border-top: 3px solid var(--accent);
}

.tool-live:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.tool-soon {
  background: var(--bg-muted);
  border: 1.5px dashed var(--line-strong);
  box-shadow: none;
}

.tool-soon:hover {
  border-color: #9aa9be;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.tool-soon h3 {
  color: var(--ink-soft);
}

.tool-soon p {
  color: var(--muted);
}

.tool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.tool-head h3 {
  margin: 0;
}

.tool-card p {
  margin-bottom: 20px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tags span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 4px 11px;
  border-radius: 999px;
}

.tool-soon .tags span {
  color: var(--muted);
  background: #f1f5f9;
}

.tool-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tool-host,
.tool-status-note {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
}

.badge-live {
  background: var(--live-bg);
  color: var(--live-ink);
  border: 1px solid rgba(20, 90, 40, 0.16);
}

.badge-live .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live-dot);
  box-shadow: 0 0 0 3px rgba(26, 147, 74, 0.22);
  animation: livePulse 2.4s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(26, 147, 74, 0.20); }
  50% { box-shadow: 0 0 0 5px rgba(26, 147, 74, 0.08); }
}

.badge-soon {
  background: var(--soon-bg);
  color: var(--soon-ink);
  border: 1px solid var(--line);
}

.soon-icon {
  flex-shrink: 0;
}

.more-note {
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- contact / footer ---------- */
.contact {
  padding: 76px 0;
}

.contact-panel {
  max-width: 820px;
  margin: 0 auto;
  padding: 52px 40px;
  border-radius: 22px;
  text-align: center;
  color: #ffffff;
  background:
    radial-gradient(480px 260px at 88% 0%, rgba(20, 184, 166, 0.22), transparent 65%),
    radial-gradient(420px 220px at 10% 100%, rgba(201, 162, 39, 0.14), transparent 65%),
    var(--ink);
  box-shadow: 0 20px 48px rgba(11, 31, 58, 0.18);
}

.contact-kicker {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8be4dc;
}

.contact-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3.2vw, 34px);
  color: #ffffff;
}

.contact-panel p {
  max-width: 540px;
  margin: 0 auto 28px;
  color: #d7e2ee;
  font-size: 17px;
  line-height: 1.6;
}

.github-icon {
  flex-shrink: 0;
}

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
  background: #ffffff;
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero {
    padding: 68px 0 64px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-visual {
    max-width: 520px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .service-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0 20px;
    align-items: start;
  }

  .service-card .card-icon {
    margin-bottom: 0;
  }
}

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

  .section {
    padding: 60px 0;
  }

  .contact {
    padding: 56px 0;
  }

  .contact-panel {
    padding: 40px 26px;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 18px;
  }

  .nav-inner {
    height: 60px;
  }

  .brand-name {
    font-size: 15.5px;
  }

  .nav-links {
    gap: 2px;
  }

  .nav-links a {
    font-size: 14px;
    padding: 8px 10px;
  }

  .hero {
    padding: 48px 0 48px;
  }

  .lede {
    font-size: 16.5px;
  }

  .cta-row .btn {
    width: 100%;
  }

  .card {
    padding: 22px;
  }

  .service-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tool-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .tool-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-footer .btn {
    width: 100%;
  }

  .foot-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .btn-icon,
  .card,
  .nav-links a {
    transition: none;
  }

  .badge-live .dot {
    animation: none;
  }

  .btn:hover,
  .service-card:hover,
  .tool-live:hover {
    transform: none;
  }
}
