:root {
  color-scheme: light dark;
  --bg: #f3f3f0;
  --bg-soft: #e9e9e4;
  --surface: #ffffff;
  --surface-muted: #f7f7f4;
  --text: #111111;
  --muted: #666662;
  --soft: #8a8a84;
  --line: #deded7;
  --line-strong: #c8c8bf;
  --button-bg: #111111;
  --button-text: #ffffff;
  --focus: #707070;
  --shadow: 0 22px 60px rgba(17, 17, 17, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #050505;
    --bg-soft: #0b0b0b;
    --surface: #101010;
    --surface-muted: #171717;
    --text: #f5f5f2;
    --muted: #aaa9a2;
    --soft: #7c7c76;
    --line: #292929;
    --line-strong: #424242;
    --button-bg: #f5f5f2;
    --button-text: #050505;
    --focus: #d0d0c8;
    --shadow: none;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f3f0;
  --bg-soft: #e9e9e4;
  --surface: #ffffff;
  --surface-muted: #f7f7f4;
  --text: #111111;
  --muted: #666662;
  --soft: #8a8a84;
  --line: #deded7;
  --line-strong: #c8c8bf;
  --button-bg: #111111;
  --button-text: #ffffff;
  --focus: #707070;
  --shadow: 0 22px 60px rgba(17, 17, 17, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050505;
  --bg-soft: #0b0b0b;
  --surface: #101010;
  --surface-muted: #171717;
  --text: #f5f5f2;
  --muted: #aaa9a2;
  --soft: #7c7c76;
  --line: #292929;
  --line-strong: #424242;
  --button-bg: #f5f5f2;
  --button-text: #050505;
  --focus: #d0d0c8;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, var(--bg-soft), var(--bg) 260px),
    var(--bg);
  color: var(--text);
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-shell {
  width: min(calc(100% - 36px), var(--max-width));
  margin: 0 auto;
  padding: 8px 0 30px;
}

.top-nav,
.footer-band,
.nav-links,
.hero-status {
  display: flex;
  align-items: center;
}

.top-nav {
  position: sticky;
  top: 12px;
  z-index: 5;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface), transparent 8%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  font-weight: 850;
  letter-spacing: 0;
}

.nav-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.nav-links a,
.theme-toggle,
.back-link {
  min-height: 38px;
  border-radius: var(--radius-sm);
  padding: 9px 11px;
}

.nav-links a:hover,
.theme-toggle:hover,
.back-link:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.theme-toggle {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(16px, 4vw, 44px);
  align-items: start;
  min-height: 0;
  padding: clamp(14px, 2.6vw, 28px) clamp(18px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface), var(--bg) 8%), var(--surface-muted));
  box-shadow: var(--shadow);
}

.hero-copy h1,
.legal-hero h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(2.15rem, 6.4vw, 5rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.hero-text {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.6vw, 1.12rem);
  line-height: 1.5;
}

.hero-status {
  gap: 9px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--soft);
}

.hero-status.is-ready .status-dot {
  background: var(--text);
}

.hero-services {
  margin-top: 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.12;
}

.section-head p,
.service-description,
.service-domain,
.footer-band,
.legal-copy p {
  color: var(--muted);
  line-height: 1.55;
}

.section-head > p {
  max-width: 360px;
  margin: 0;
  text-align: right;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.service-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.service-card:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  transform: translateY(-2px);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 1.35rem;
}

.service-copy {
  min-width: 0;
}

.service-name {
  margin: 1px 0 0;
  font-size: 1.12rem;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.service-description,
.service-domain {
  margin: 7px 0 0;
  font-size: 0.96rem;
}

.service-domain {
  display: inline-flex;
  max-width: 100%;
  margin-top: 12px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--soft);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.service-link {
  grid-column: 1 / -1;
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--button-bg);
  border-radius: var(--radius-sm);
  background: var(--button-bg);
  color: var(--button-text);
  font-size: 0.92rem;
  font-weight: 800;
}

.service-link:hover {
  opacity: 0.88;
}

.error-card {
  grid-template-columns: 1fr;
  min-height: 120px;
  color: var(--muted);
}

.error-card h3,
.error-card p {
  margin: 0;
}

.footer-band {
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.footer-band p {
  margin: 0;
}

.legal-page .site-shell {
  max-width: 880px;
  padding-bottom: 52px;
}

.legal-hero {
  margin-top: 28px;
  margin-bottom: 34px;
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
}

.eyebrow {
  display: none;
}

.legal-copy {
  padding: 0 clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.legal-block {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.legal-block:last-child {
  border-bottom: 0;
}

.legal-block h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.legal-copy a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-copy code {
  color: var(--text);
}

@media (max-width: 820px) {
  .site-shell {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .top-nav {
    position: static;
  }

  .hero-grid,
  .section-head {
    grid-template-columns: 1fr;
    display: grid;
    align-items: start;
  }

  .hero-grid {
    min-height: 0;
  }

  .hero-status {
    justify-self: start;
  }

  .section-head > p {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(calc(100% - 18px), var(--max-width));
    padding-top: 10px;
  }

  .top-nav,
  .footer-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero-grid,
  .hero-services {
    padding: 15px;
  }

  .hero-copy h1 {
    font-size: clamp(2.25rem, 12vw, 3.3rem);
  }

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

  .service-card {
    min-height: 0;
  }
}
