:root {
  color-scheme: light dark;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-dark: #1e40af;
  --accent: #14b8a6;
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
}

/* Dark palette. Applied two ways: automatically via the media query (unless the
   visitor chose light), or explicitly via data-theme="dark" from the toggle.
   Keep both blocks identical. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b1120;
    --panel: #111a2e;
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --line: #1e293b;
    --brand: #3b82f6;
    --brand-dark: #1d4ed8;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1120;
  --panel: #111a2e;
  --ink: #e2e8f0;
  --muted: #94a3b8;
  --line: #1e293b;
  --brand: #3b82f6;
  --brand-dark: #1d4ed8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 32rem),
    linear-gradient(180deg, #eef6ff 0%, var(--bg) 34rem);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body {
    background:
      radial-gradient(circle at top left, rgba(20, 184, 166, 0.1), transparent 32rem),
      linear-gradient(180deg, #101c33 0%, var(--bg) 34rem);
  }
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.1), transparent 32rem),
    linear-gradient(180deg, #101c33 0%, var(--bg) 34rem);
}

a {
  color: inherit;
}

.site-header,
.site-footer,
.section {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
}

.brand,
.site-nav,
.hero-actions,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  font-weight: 900;
}

.site-nav {
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.section {
  padding: 86px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 56px;
  align-items: center;
  min-height: 72vh;
  padding-top: 42px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1,
h2 {
  line-height: 1.04;
  letter-spacing: -0.055em;
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 8vw, 6.8rem);
}

h2 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 5vw, 4rem);
}

h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}

.hero-text,
.section-heading p + h2,
.card p,
.approach-list p,
.contact p {
  color: var(--muted);
}

.hero-text {
  max-width: 650px;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-weight: 750;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  background: var(--brand-dark);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.25);
  transform: translateY(-2px);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  border-color: var(--line);
}

.button-secondary:hover {
  background: white;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

.hero-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.code-window {
  display: flex;
  gap: 8px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.code-window span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fb7185;
}

.code-window span:nth-child(2) {
  background: #fbbf24;
}

.code-window span:nth-child(3) {
  background: var(--accent);
}

pre {
  margin: 0;
  padding: 34px;
  overflow-x: auto;
  color: #dbeafe;
  background: #0f172a;
  font: 700 clamp(1rem, 2vw, 1.45rem) / 1.7 "SFMono-Regular", Consolas, monospace;
}

.section-heading {
  margin-bottom: 34px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card,
.contact,
.split {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.card {
  padding: 28px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 46px;
  padding: 44px;
}

.approach-list {
  display: grid;
  gap: 22px;
}

.approach-list div {
  padding-left: 18px;
  border-left: 3px solid var(--accent);
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 44px;
}

.contact p {
  max-width: 620px;
  margin-bottom: 0;
}

.site-footer {
  justify-content: space-between;
  gap: 16px;
  padding: 34px 0 46px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 700;
  text-decoration: none;
}

.coming-soon {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.coming-soon-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.wordmark {
  margin: 0 0 10px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.coming-soon .site-footer {
  justify-content: center;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

.theme-toggle svg {
  display: block;
}

/* Show the moon when the page is light (click for dark), the sun when dark.
   Mirrors the palette logic above — keep in sync. */
.theme-toggle .icon-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

@media (max-width: 820px) {
  .site-header,
  .site-footer,
  .contact {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .cards,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 28px;
  }

  .section {
    padding: 58px 0;
  }

  .split,
  .contact {
    padding: 28px;
  }
}

@media (max-width: 560px) {
  .site-header,
  .site-footer,
  .section {
    width: min(100% - 28px, 1120px);
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  h1 {
    font-size: 3rem;
  }

  pre {
    padding: 24px;
  }
}
