:root {
  color-scheme: light;
  --bg: #f5f1e8;
  --bg-deep: #ece4d7;
  --surface: rgba(252, 250, 246, 0.88);
  --surface-strong: #fffdf9;
  --surface-tint: rgba(16, 86, 109, 0.06);
  --ink: #16212b;
  --ink-soft: rgba(22, 33, 43, 0.8);
  --muted: #5d6774;
  --line: rgba(22, 33, 43, 0.12);
  --line-strong: rgba(22, 33, 43, 0.18);
  --accent: #10566d;
  --accent-strong: #0b4255;
  --accent-soft: rgba(16, 86, 109, 0.1);
  --warm: #8a4d20;
  --warm-soft: rgba(138, 77, 32, 0.1);
  --command: #101721;
  --command-2: #182533;
  --command-line: rgba(255, 255, 255, 0.1);
  --command-ink: #f3f6fa;
  --success: #2d7d52;
  --shadow: 0 28px 80px rgba(18, 33, 43, 0.12);
  --shadow-soft: 0 16px 48px rgba(18, 33, 43, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --content-width: min(1180px, calc(100% - 40px));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, rgba(16, 86, 109, 0.14), transparent 30%),
    radial-gradient(circle at 100% 12%, rgba(138, 77, 32, 0.12), transparent 24%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 46%, var(--bg-deep) 100%);
  color: var(--ink);
  font-family: "SF Pro Text", Inter, "Segoe UI", system-ui, sans-serif;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-color: rgba(16, 86, 109, 0.3);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-strong);
}

a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(16, 86, 109, 0.35);
  outline-offset: 4px;
}

code,
pre {
  font-family: "SF Mono", "IBM Plex Mono", "Roboto Mono", Menlo, Consolas, monospace;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fefcf7;
  text-decoration: none;
  transition: top 180ms ease;
}

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

.site-shell {
  width: var(--content-width);
  margin: 0 auto;
  padding: 20px 0 88px;
}

.site-topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 18px;
  margin-bottom: 24px;
  padding: 12px 14px;
  border: 1px solid rgba(22, 33, 43, 0.08);
  border-radius: 999px;
  background: rgba(252, 250, 246, 0.78);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 12px 32px rgba(18, 33, 43, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(18, 33, 43, 0.16);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  font-family: "SF Pro Display", Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 1.04rem;
  letter-spacing: -0.02em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav,
.pill-row,
.badge-row,
.cta-row,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill,
.badge,
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-size: 0.92rem;
  text-decoration: none;
}

.pill--accent,
.button-primary {
  background: var(--accent);
  border-color: rgba(16, 86, 109, 0.2);
  color: #fefcf7;
}

.button-secondary {
  background: transparent;
  border: 1px solid rgba(16, 86, 109, 0.22);
  color: var(--accent-strong);
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.button-primary:hover,
.button-secondary:hover,
.pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(18, 33, 43, 0.08);
}

.poster,
.site-section,
.site-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(22, 33, 43, 0.08);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.poster {
  display: grid;
  grid-template-columns: 1.14fr 0.96fr;
  gap: 24px;
  min-height: 560px;
  padding: 30px;
}

.poster::before,
.site-section::before,
.site-panel::before {
  content: "";
  position: absolute;
  inset: auto -120px -140px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 86, 109, 0.1) 0%, rgba(16, 86, 109, 0) 68%);
  pointer-events: none;
}

.poster-copy,
.poster-visual {
  position: relative;
  z-index: 1;
}

.poster-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.poster-copy h1,
.site-panel h1 {
  margin: 18px 0 14px;
  max-width: 13ch;
  font-family: "SF Pro Display", Inter, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(2.9rem, 6vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.poster-copy p,
.section-copy,
.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 66ch;
}

.poster-note {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(16, 86, 109, 0.16);
  background: rgba(16, 86, 109, 0.06);
  color: var(--ink-soft);
}

.poster-note strong {
  color: var(--accent-strong);
}

.poster-visual {
  display: grid;
  gap: 16px;
  align-content: space-between;
}

.hero-shot,
.command-panel,
.ledger-panel,
.card,
.signal-card,
.rail-card,
.link-card,
.callout-card {
  border-radius: var(--radius-lg);
}

.hero-shot {
  overflow: hidden;
  border: 1px solid rgba(22, 33, 43, 0.1);
  background: linear-gradient(180deg, rgba(16, 86, 109, 0.07), rgba(255, 255, 255, 0.72));
  box-shadow: var(--shadow-soft);
}

.hero-shot img {
  width: 100%;
  height: auto;
}

.command-panel,
.ledger-panel {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, var(--command) 0%, var(--command-2) 100%);
  color: var(--command-ink);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 56px rgba(5, 12, 18, 0.24);
}

.command-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(243, 246, 250, 0.84);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.command-panel h2,
.site-section h2 {
  margin: 12px 0 0;
  font-family: "SF Pro Display", Inter, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.command-copy {
  margin-top: 12px;
  color: rgba(243, 246, 250, 0.74);
  font-size: 0.98rem;
}

.command-list,
.route-list,
.proof-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.command-step,
.route-step,
.proof-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fefcf7;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.command-step strong,
.route-step strong,
.proof-step strong {
  display: block;
  margin-bottom: 4px;
}

.command-step p,
.route-step p,
.proof-step p {
  margin: 0;
  color: inherit;
  opacity: 0.78;
}

.command-panel code,
.ledger-panel code,
.command-step code {
  color: #f5f7fa;
}

.site-section {
  margin-top: 28px;
  padding: 32px;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 14px 24px;
  margin-bottom: 22px;
}

.section-header > div {
  display: grid;
  gap: 10px;
}

.section-kicker {
  color: var(--warm);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-copy {
  max-width: 68ch;
}

.card-grid,
.link-grid {
  display: grid;
  gap: 18px;
}

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

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

.card,
.signal-card,
.rail-card,
.link-card,
.callout-card {
  position: relative;
  padding: 22px;
  border: 1px solid rgba(22, 33, 43, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.46)),
    rgba(255, 255, 255, 0.46);
  box-shadow: 0 12px 28px rgba(18, 33, 43, 0.06);
}

.card::before,
.signal-card::before,
.rail-card::before,
.link-card::before,
.callout-card::before {
  content: "";
  display: block;
  width: 62px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(16, 86, 109, 0.16));
}

.card strong,
.signal-card strong,
.rail-card strong,
.link-card strong,
.callout-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.card p,
.signal-card p,
.rail-card p,
.link-card p,
.callout-card p {
  margin: 0;
  color: var(--muted);
}

.card--accent {
  background:
    linear-gradient(135deg, rgba(16, 86, 109, 0.14), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.72);
}

.card--warm {
  background:
    linear-gradient(135deg, rgba(138, 77, 32, 0.12), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.72);
}

.card--ink {
  background:
    linear-gradient(135deg, rgba(34, 47, 69, 0.12), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.72);
}

.rail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.meta-block,
.host-grid {
  display: grid;
  gap: 18px;
}

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

.callout-card ul,
.site-section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.callout-card li,
.site-section li {
  margin-bottom: 8px;
}

.accordion-group {
  display: grid;
  gap: 14px;
}

.accordion {
  border: 1px solid rgba(22, 33, 43, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 12px 28px rgba(18, 33, 43, 0.04);
  overflow: hidden;
}

.accordion summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  font-weight: 700;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--accent-strong);
}

.accordion[open] summary::after {
  content: "−";
}

.accordion-body {
  padding: 0 20px 20px;
  color: var(--muted);
}

.accordion-body > :first-child {
  margin-top: 0;
}

.accordion-body pre {
  margin: 14px 0 0;
}

pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 18px 20px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #101821 0%, #182433 100%);
  color: #f5f7fa;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 44px rgba(5, 12, 18, 0.18);
}

.inline-note {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(138, 77, 32, 0.18);
  background: var(--warm-soft);
  color: var(--ink-soft);
}

.footer-note {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(22, 33, 43, 0.08);
  color: var(--muted);
}

.footer-links {
  margin-top: 16px;
}

.center-panel {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.center-panel h1 {
  margin: 0;
}

.standalone {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 0;
}

.standalone .site-panel {
  width: min(760px, calc(100% - 32px));
  padding: 32px;
}

.fade-up {
  animation: fade-up 520ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.fade-up.delay-1 {
  animation-delay: 80ms;
}

.fade-up.delay-2 {
  animation-delay: 160ms;
}

.fade-up.delay-3 {
  animation-delay: 240ms;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .poster,
  .card-grid--3,
  .rail-grid,
  .host-grid {
    grid-template-columns: 1fr;
  }

  .card-grid--2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100% - 24px, 1180px);
    padding-bottom: 72px;
  }

  .site-topbar,
  .poster,
  .site-section,
  .site-panel {
    border-radius: 24px;
  }

  .poster,
  .site-section,
  .site-panel {
    padding: 22px;
  }

  .poster-copy h1,
  .site-panel h1 {
    font-size: clamp(2.4rem, 13vw, 3.8rem);
  }

  .command-panel h2,
  .site-section h2 {
    font-size: clamp(1.65rem, 9vw, 2.35rem);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
