/* Public front door. Same dark palette as the app shell, no sidebar. */

:root {
  --home-bg: #0e1117;
  --home-card: #1a1f2a;
  --home-card-2: #141922;
  --home-border: rgba(255, 255, 255, 0.08);
  --home-text: #c5cdd9;
  --home-muted: #8b96a8;
  --home-dim: #6b7280;
  --home-heading: #f3f5f9;
  --home-accent: #6eb5ff;
  --home-accent-bg: rgba(110, 181, 255, 0.14);
  --home-accent-border: rgba(110, 181, 255, 0.35);
  --home-max: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.home-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(110, 181, 255, 0.08), transparent 60%),
    var(--home-bg);
  color: var(--home-text);
  font: 16px/1.55 Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

a {
  color: var(--home-accent);
}

.home-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 14px 28px;
  background: rgba(14, 17, 23, 0.92);
  border-bottom: 1px solid var(--home-border);
  backdrop-filter: blur(10px);
}

.home-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 4px;
  flex: 1 1 280px;
}

.home-nav a {
  color: var(--home-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
}

.home-nav a:hover,
.home-nav a[aria-current="page"] {
  color: var(--home-heading);
  background: var(--home-accent-bg);
}

.home-mark {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--home-muted);
  text-decoration: none;
}

a.home-mark:hover {
  color: var(--home-heading);
}

.home-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-main {
  width: min(var(--home-max), calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 40px;
}

.home-hero {
  max-width: 760px;
  margin-bottom: 48px;
}

/* Connection cycle — elliptical coverflow (front low/bright, back high/dark) */

.home-cycle {
  margin: 0 0 80px;
}

.home-cycle-intro {
  max-width: 720px;
  margin-bottom: 22px;
}

.home-cycle-intro h2 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--home-heading);
}

.home-cycle-intro p:last-child {
  margin: 0;
  max-width: 62ch;
  color: var(--home-text);
}

.home-cycle-shell {
  display: grid;
  gap: 14px;
  padding: 18px 18px 22px;
  background: #05070c;
  border: 1px solid rgba(110, 181, 255, 0.22);
  border-radius: 18px;
  overflow: hidden;
}

.home-cycle-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  position: relative;
  z-index: 20;
}

.home-cycle-controls {
  display: flex;
  gap: 8px;
}

.home-cycle-nav {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #141a24;
  color: var(--home-heading);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.home-cycle-nav:hover {
  border-color: var(--home-accent-border);
  background: var(--home-accent-bg);
}

.home-cycle-nav:focus-visible,
.home-cycle-page:focus-visible {
  outline: 2px solid var(--home-accent);
  outline-offset: 3px;
}

.home-cycle-sample {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--home-dim);
}

.home-cycle-progress {
  margin: 0 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--home-muted);
  font-variant-numeric: tabular-nums;
}

.home-cycle-scene {
  --page-w: min(340px, 78vw);
  --page-h: 250px;
  position: relative;
  height: min(520px, 78vw);
  min-height: 420px;
  margin: 4px 0 8px;
  perspective: 1600px;
  perspective-origin: 50% 42%;
}

.home-cycle-carousel {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.home-cycle-page {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--page-w);
  height: var(--page-h);
  margin: 0;
  padding: 16px 18px 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, #3a5f8c 0%, #1e3a5f 48%, #152a45 100%);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.55);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transform-style: preserve-3d;
  transform-origin: center center;
  transition:
    transform 0.75s cubic-bezier(0.22, 0.7, 0.25, 1),
    filter 0.75s ease,
    opacity 0.75s ease,
    box-shadow 0.75s ease,
    border-color 0.35s ease;
  overflow: hidden;
  will-change: transform, filter, opacity;
}

.home-cycle-page.is-active {
  border-color: rgba(140, 196, 255, 0.55);
  background: linear-gradient(165deg, #5b8fd4 0%, #2f5f9a 45%, #1e4470 100%);
  box-shadow:
    0 22px 40px rgba(0, 0, 0, 0.65),
    0 0 40px rgba(90, 150, 220, 0.2);
}

.home-cycle-page-chrome {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.home-cycle-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(190, 220, 255, 0.9);
}

.home-cycle-page-id {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: rgba(180, 200, 230, 0.55);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.home-cycle-page h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #f3f7ff;
}

.home-cycle-page-body {
  max-height: calc(var(--page-h) - 88px);
  overflow: auto;
}

.home-cycle-page-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: rgba(200, 215, 235, 0.75);
}

.home-cycle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  margin: 0;
}

.home-cycle-grid dt {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(180, 205, 235, 0.55);
}

.home-cycle-grid dd {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #eef4ff;
}

.home-cycle-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-cycle-chips-stack {
  flex-direction: column;
}

.home-cycle-chips li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 16, 28, 0.35);
  color: #eef4ff;
  font-size: 13px;
  font-weight: 600;
}

.home-cycle-chips li span {
  color: rgba(180, 205, 235, 0.55);
  font-size: 11px;
  font-weight: 600;
}

.home-cycle-chips li.is-focus {
  border-color: rgba(140, 196, 255, 0.45);
  background: rgba(90, 150, 220, 0.22);
}

.home-cycle-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-cycle-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 16, 28, 0.35);
}

.home-cycle-list li.is-focus {
  border-color: rgba(140, 196, 255, 0.45);
  background: rgba(90, 150, 220, 0.22);
}

.home-cycle-list strong {
  color: #eef4ff;
  font-weight: 600;
}

.home-cycle-list span {
  color: rgba(200, 215, 235, 0.7);
  font-size: 13px;
}

.home-cycle-caption {
  margin: 4px 0 0;
  max-width: 68ch;
  font-size: 15px;
  color: rgba(210, 220, 235, 0.88);
}

.home-cycle-linkto {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #8ec5ff;
}

.home-cycle-shell.is-paused .home-cycle-progress::after {
  content: " · paused";
  color: var(--home-dim);
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .home-cycle-page {
    transition: none;
  }

  .home-cycle-scene {
    perspective: none;
    height: auto;
    min-height: 0;
  }

  .home-cycle-carousel {
    position: relative;
    inset: auto;
  }

  .home-cycle-page {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 420px;
    height: auto;
    min-height: 240px;
    margin: 0 auto;
    transform: none !important;
    display: none;
    opacity: 1 !important;
    filter: none !important;
  }

  .home-cycle-page.is-active {
    display: block;
  }
}

.home-services-lead {
  margin: 0 0 18px;
  max-width: 62ch;
  color: var(--home-muted);
}

.home-services .home-cards {
  opacity: 0.92;
}

.home-eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--home-accent);
}

.home-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4.4vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--home-heading);
  font-weight: 600;
}

.home-lead {
  margin: 0 0 28px;
  font-size: 1.125rem;
  color: var(--home-text);
  max-width: 62ch;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
}

.home-hint {
  margin: 0;
  font-size: 14px;
  color: var(--home-muted);
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  color: #0e1117;
  background: var(--home-accent);
}

.home-btn:hover {
  filter: brightness(1.06);
}

.home-btn:focus-visible,
.home-btn-quiet:focus-visible {
  outline: 2px solid var(--home-accent);
  outline-offset: 3px;
}

.home-btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--home-heading);
  background: transparent;
  border: 1px solid var(--home-border);
}

.home-btn-quiet:hover {
  border-color: var(--home-accent-border);
  background: var(--home-accent-bg);
}

.home-error {
  margin: 0 0 22px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.12);
  color: #fecaca;
  font-size: 14px;
}

.home-section {
  margin: 0 0 72px;
}

.home-section h2 {
  margin: 0 0 12px;
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--home-heading);
}

.home-section > p {
  margin: 0 0 22px;
  max-width: 68ch;
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.home-card {
  margin: 0;
  padding: 20px 18px 22px;
  background: var(--home-card);
  border: 1px solid var(--home-border);
  border-radius: 14px;
}

.home-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--home-heading);
}

a.home-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

a.home-card:hover {
  border-color: var(--home-accent-border);
}

.home-card p {
  margin: 0;
  color: var(--home-text);
  font-size: 15px;
}

.home-map {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 8px 0 0;
  padding: 22px 18px;
  background: var(--home-card-2);
  border: 1px solid var(--home-border);
  border-radius: 16px;
}

.home-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 140px;
}

.home-node {
  display: block;
  text-align: center;
  padding: 12px 10px;
  border-radius: 12px;
  background: var(--home-card);
  border: 1px solid var(--home-border);
  color: var(--home-heading);
  font-size: 14px;
  font-weight: 600;
}

.home-node-core {
  flex: 1.15 1 150px;
  background: var(--home-accent-bg);
  border-color: var(--home-accent-border);
  font-size: 16px;
}

.home-arrow {
  flex: 0 0 auto;
  color: var(--home-dim);
  text-align: center;
  font-size: 18px;
  line-height: 1;
}

.home-map figcaption {
  flex: 1 0 100%;
  margin: 6px 0 0;
  color: var(--home-muted);
  font-size: 14px;
}

.home-entities .home-node {
  flex: 1 1 120px;
}

.home-walk {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.home-walk li {
  counter-increment: step;
  padding: 16px 18px 16px 58px;
  background: var(--home-card);
  border: 1px solid var(--home-border);
  border-radius: 14px;
  position: relative;
}

.home-walk li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--home-heading);
  background: var(--home-accent-bg);
  border: 1px solid var(--home-accent-border);
}

.home-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.home-toc a {
  display: inline-block;
  text-decoration: none;
  color: var(--home-heading);
  border: 1px solid var(--home-border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
}

.home-toc a:hover {
  border-color: var(--home-accent-border);
  background: var(--home-accent-bg);
}

.home-back {
  margin: 0 0 18px;
  font-size: 14px;
}

.home-back a {
  color: var(--home-muted);
  text-decoration: none;
  font-weight: 600;
}

.home-back a:hover {
  color: var(--home-accent);
}

.home-hero.home-prose {
  margin-bottom: 12px;
}

.home-prose p {
  margin: 0 0 16px;
  max-width: 68ch;
}

.home-prose p:last-child {
  margin-bottom: 0;
}

.home-more {
  margin-top: 28px;
}

.home-points {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-points li {
  padding: 16px 18px;
  background: var(--home-card);
  border: 1px solid var(--home-border);
  border-radius: 14px;
}

.home-points strong {
  color: var(--home-heading);
  font-weight: 600;
}

.home-local {
  padding: 28px 26px;
  background: var(--home-card);
  border: 1px solid var(--home-accent-border);
  border-radius: 16px;
}

.home-local h2 {
  margin-top: 0;
}

.home-local p:last-child {
  margin-bottom: 0;
}

.home-footer {
  width: min(var(--home-max), calc(100% - 40px));
  margin: 0 auto;
  padding: 8px 0 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--home-border);
  padding-top: 28px;
}

.home-footer p {
  margin: 0;
  color: var(--home-muted);
  font-size: 14px;
  max-width: 52ch;
}

.home-doc-link {
  color: var(--home-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
}

.home-doc-link:hover,
.home-doc-link[aria-current="page"] {
  color: var(--home-heading);
  background: var(--home-accent-bg);
}

.home-doc h3 {
  margin: 26px 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--home-muted);
}

.home-doc .doc-table td:first-child {
  white-space: normal;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 500;
}

.home-doc .doc-table td code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--home-heading);
}

.doc-read {
  margin-top: 18px;
  padding: 14px 16px 6px;
  background: var(--home-card-2);
  border: 1px solid var(--home-border);
  border-radius: 12px;
}

.doc-read p {
  margin: 0 0 8px;
  max-width: none;
}

.doc-read-label,
.doc-account-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--home-accent);
}

.doc-read code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--home-heading);
}

.doc-read-desc {
  color: var(--home-muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.doc-account {
  margin-top: 16px;
  padding: 14px 16px 4px;
  background: var(--home-accent-bg);
  border: 1px solid var(--home-accent-border);
  border-radius: 12px;
}

.doc-account p {
  margin: 0 0 12px;
  max-width: 68ch;
}

.doc-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
  border: 1px solid var(--home-border);
  border-radius: 12px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.doc-table th,
.doc-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--home-border);
}

.doc-table th {
  color: var(--home-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--home-card-2);
}

.doc-table td:first-child {
  color: var(--home-heading);
  font-weight: 600;
  white-space: nowrap;
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 860px) {
  .home-cards {
    grid-template-columns: 1fr;
  }

  .home-map:not(.home-entities) {
    flex-direction: column;
    align-items: stretch;
  }

  .home-arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 640px) {
  .home-main,
  .home-footer {
    width: min(var(--home-max), calc(100% - 28px));
  }

  .home-header {
    padding: 14px 16px;
  }

  .home-main {
    padding-top: 40px;
  }

  .home-hero {
    margin-bottom: 52px;
  }

  .home-section {
    margin-bottom: 52px;
  }

  .home-cycle {
    margin-bottom: 56px;
  }

  .home-cycle-shell {
    padding: 14px;
  }

  .home-cycle-scene {
    --page-h: 230px;
    height: 400px;
    min-height: 360px;
  }

  .home-cycle-page {
    padding: 14px 14px 12px;
    border-radius: 18px;
  }

  .home-cycle-page h3 {
    font-size: 1.1rem;
  }

  .home-cycle-grid {
    grid-template-columns: 1fr;
  }

  .home-cycle-progress {
    margin-left: 0;
  }
}
