:root {
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --background: #08090c;
  --foreground: #f1ece4;
  --surface: #111318;
  --elevated: #171a21;
  --muted: #1a1d24;
  --muted-foreground: #8b8e88;
  --primary: #c8102e;
  --primary-foreground: #fff8f6;
  --border: rgb(241 236 228 / 0.1);
  --ring: #c8102e;
  --online: #7d9a7a;
  --shadow-border: 0 0 0 1px rgb(241 236 228 / 0.08);
  --shadow-border-hover: 0 0 0 1px rgb(241 236 228 / 0.16);
  --shadow-elevated: 0 0 0 1px rgb(241 236 228 / 0.08), 0 24px 48px -24px rgb(0 0 0 / 0.55);
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 1.75rem;
  --text-display: clamp(2.75rem, 1.2rem + 6.2vw, 5.35rem);
  --text-title: clamp(1.65rem, 1.15rem + 1.8vw, 2.35rem);
  color-scheme: dark;
}

html.light {
  --background: #f3efe8;
  --foreground: #17151c;
  --surface: #e8e2d8;
  --elevated: #fbf8f3;
  --muted: #ddd6cb;
  --muted-foreground: #5c5954;
  --border: rgb(23 21 28 / 0.12);
  --online: #3f6b42;
  --shadow-border: 0 0 0 1px rgb(23 21 28 / 0.08);
  --shadow-border-hover: 0 0 0 1px rgb(23 21 28 / 0.16);
  --shadow-elevated: 0 0 0 1px rgb(23 21 28 / 0.08), 0 20px 40px -24px rgb(23 21 28 / 0.22);
  color-scheme: light;
}

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

html {
  -webkit-font-smoothing: antialiased;
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
  text-wrap: pretty;
}

button,
[role="button"] {
  cursor: pointer;
  font-family: inherit;
}

button:disabled {
  cursor: not-allowed;
}

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

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

svg {
  display: block;
}

::selection {
  background: color-mix(in oklab, var(--primary) 75%, black);
  color: var(--primary-foreground);
}

html.light ::selection {
  background: color-mix(in oklab, var(--primary) 65%, white);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only:focus {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 50;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  white-space: normal;
  border-radius: var(--radius-md);
  background: var(--foreground);
  color: var(--background);
  padding: 0.5rem 0.75rem;
}

.wrap {
  width: min(72rem, calc(100% - 2rem));
  margin-inline: auto;
}

@media (min-width: 640px) {
  .wrap {
    width: min(72rem, calc(100% - 3rem));
  }
}

.kicker {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
}

.title {
  font-size: var(--text-title);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.display {
  font-size: var(--text-title);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.94;
}

@media (min-width: 640px) {
  .display {
    font-size: var(--text-display);
  }
}

.muted {
  color: var(--muted-foreground);
}

.font-display {
  font-family: var(--font-display);
}

.bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    linear-gradient(to right, color-mix(in oklab, var(--foreground) 4.5%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklab, var(--foreground) 4.5%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
}

.site {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--background);
}

header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

.header-inner {
  display: flex;
  height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.wordmark svg {
  height: 2.25rem;
  width: auto;
  color: var(--primary);
  flex-shrink: 0;
}

.wordmark-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.wordmark-name .it {
  color: var(--primary);
}

.wordmark-domain {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-desktop a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 150ms;
}

.nav-desktop a:hover {
  color: var(--foreground);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.icon-btn {
  display: flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--foreground);
  transition: background-color 150ms;
}

.icon-btn:hover {
  background: var(--muted);
}

.icon-btn svg {
  width: 1rem;
  height: 1rem;
}

.menu-toggle {
  display: flex;
}

.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1rem;
}

.nav-mobile.open {
  display: block;
}

.nav-mobile nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-mobile a {
  display: flex;
  height: 2.75rem;
  align-items: center;
  font-size: 0.875rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: var(--radius-md);
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
  transition: background-color 150ms, color 150ms, box-shadow 150ms, transform 150ms;
}

.btn:active:not(:disabled) {
  transform: scale(0.96);
}

.btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: var(--shadow-border);
}

.btn-primary:hover {
  background: color-mix(in oklab, var(--primary) 90%, black);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  box-shadow: var(--shadow-border);
}

.btn-outline:hover {
  background: var(--elevated);
  box-shadow: var(--shadow-border-hover);
}

.btn-snow {
  background: var(--foreground);
  color: var(--background);
}

.btn-sm {
  height: 2.5rem;
  padding: 0 0.875rem;
  font-size: 0.875rem;
}

.btn-md {
  height: 2.75rem;
  padding: 0 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  height: 3rem;
  padding: 0 1.25rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

.btn-desktop {
  display: none;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--online);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
}

.hero-map,
.hero-copy {
  grid-column: 1;
  grid-row: 1;
}

.hero-map {
  pointer-events: none;
  z-index: 0;
  display: flex;
  justify-content: center;
  padding: 1rem 1rem 0;
}

.hero-map-inner {
  width: 100%;
  max-width: 48rem;
}

.hero-copy {
  position: relative;
  z-index: 10;
  padding: 4rem 0 2rem;
}

.hero-copy-inner {
  margin-left: 1rem;
  max-width: 36rem;
}

.hero h1 {
  margin-top: 0.75rem;
}

.hero .lede {
  margin-top: 1rem;
  max-width: 28rem;
  color: var(--muted-foreground);
}

.hero-actions,
.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section {
  padding: 5rem 0;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-copy {
  max-width: 36rem;
}

.section-copy .title {
  margin-top: 0.75rem;
}

.section-copy p {
  margin-top: 0.75rem;
  color: var(--muted-foreground);
}

.cycle {
  display: flex;
  border-radius: var(--radius-md);
  background: var(--muted);
  padding: 0.25rem;
  box-shadow: var(--shadow-border);
}

.cycle button {
  height: 2.75rem;
  padding: 0 1rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
}

.cycle button.is-on {
  background: var(--elevated);
  color: var(--foreground);
}

.plans-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.plan {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-2xl);
  background: var(--surface);
  padding: 1.5rem;
  box-shadow: var(--shadow-border);
}

.plan.featured {
  background: var(--elevated);
  box-shadow: var(--shadow-elevated);
}

.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.badge {
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.plan-tagline {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-top: 1.5rem;
}

.plan-price strong {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.plan-price span,
.plan-note {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.plan ul {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.plan li {
  display: flex;
  gap: 0.5rem;
}

.plan li svg {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  color: var(--primary);
  flex-shrink: 0;
}

.plan .btn {
  margin-top: auto;
  padding-top: 0;
  margin-top: 2rem;
}

.band {
  border-block: 1px solid var(--border);
  background: var(--surface);
}

.panel-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.panel-layout {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

.panel-mock {
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: var(--elevated);
  box-shadow: var(--shadow-elevated);
}

.mock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
}

.mock-online {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--online);
  font-family: var(--font-sans);
  font-weight: 400;
}

.mock-body {
  display: grid;
}

.mock-nav {
  display: none;
  border-right: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 60%, transparent);
  padding: 0.75rem;
}

.mock-nav div {
  display: flex;
  height: 2.75rem;
  align-items: center;
  border-radius: var(--radius-md);
  padding: 0 0.75rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.mock-nav div.is-on {
  background: var(--elevated);
  color: var(--foreground);
  font-weight: 500;
  box-shadow: var(--shadow-border);
}

.mock-main {
  padding: 1rem;
}

.mock-stats,
.mock-chips {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.mock-stats {
  grid-template-columns: repeat(3, 1fr);
}

.mock-stat,
.mock-chip,
.mock-deploy {
  border-radius: var(--radius-lg);
  background: var(--muted);
  padding: 0.75rem;
}

.bar {
  margin-top: 0.5rem;
  height: 0.25rem;
  border-radius: 999px;
  background: var(--background);
}

.bar > span {
  display: block;
  height: 0.25rem;
  border-radius: 999px;
  background: var(--primary);
}

.feature-list,
.feature-grid,
.stack-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.feature-card,
.stack-card {
  border-radius: var(--radius-xl);
  background: var(--elevated);
  padding: 1rem;
  box-shadow: var(--shadow-border);
}

.feature-row {
  display: flex;
  gap: 0.75rem;
}

.icon-box {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--muted);
  color: var(--primary);
}

.icon-box svg,
.icon-box-sm svg {
  width: 1rem;
  height: 1rem;
}

.icon-box-sm {
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--muted);
  color: var(--primary);
}

.stack-grid {
  margin-top: 2.5rem;
}

.stack-card {
  background: var(--surface);
  padding: 1.25rem;
}

.stack-card h3 {
  margin-top: 1rem;
  font-size: 1.125rem;
}

.stack-card p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.faq-grid {
  display: grid;
  gap: 2.5rem;
}

.faq-list {
  border-radius: var(--radius-2xl);
  background: var(--elevated);
  padding: 0 1.25rem;
  box-shadow: var(--shadow-border);
}

.faq-list details {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.faq-list details:last-child {
  border-bottom: 0;
}

.faq-list summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

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

.faq-list summary span {
  color: var(--muted-foreground);
  transition: transform 150ms;
}

.faq-list details[open] summary span {
  transform: rotate(45deg);
}

.faq-list details p {
  margin-top: 0.5rem;
  max-width: 65ch;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.closing {
  position: relative;
  overflow: hidden;
}

.closing-leaf {
  position: absolute;
  left: -2.5rem;
  bottom: 0;
  width: 16rem;
  height: 16rem;
  color: var(--primary);
  opacity: 0.2;
  pointer-events: none;
}

.closing-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

footer {
  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  font-size: 0.875rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  color: var(--muted-foreground);
}

.footer-col a:hover {
  color: var(--foreground);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklab, var(--background) 80%, transparent);
  padding: 1rem;
}

.dialog-backdrop.open {
  display: flex;
}

.dialog {
  position: relative;
  width: min(32rem, 100%);
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  background: var(--background);
  box-shadow: var(--shadow-elevated);
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
}

.dialog-body {
  overflow-y: auto;
  padding: 1.5rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dialog-foot {
  border-top: 1px solid var(--border);
  background: var(--elevated);
  padding: 1rem 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field label,
legend {
  font-size: 0.875rem;
  font-weight: 500;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

input[type="text"],
input[type="email"],
input:not([type]),
select {
  height: 2.75rem;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--muted);
  color: var(--foreground);
  padding: 0 0.75rem;
  font: inherit;
  box-shadow: var(--shadow-border);
}

input:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--ring) 70%, transparent);
}

.domain-row {
  display: flex;
  gap: 0.5rem;
}

.domain-row input {
  flex: 1;
}

.plan-option,
.node-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: inherit;
  padding: 0.625rem 0.75rem;
  text-align: left;
  box-shadow: var(--shadow-border);
}

.plan-option.is-on,
.node-option.is-on {
  background: var(--muted);
  box-shadow: var(--shadow-border-hover);
}

.node-grid {
  display: grid;
  gap: 0.5rem;
}

.form-grid {
  display: grid;
  gap: 0.75rem;
}

.alert {
  color: var(--primary);
  font-size: 0.875rem;
}

.receipt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
}

.receipt-icon {
  display: flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: var(--primary-foreground);
}

.receipt dl {
  width: 100%;
  margin: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 0 1rem;
  box-shadow: var(--shadow-border);
}

.receipt .row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.receipt .row:last-child {
  border-bottom: 0;
}

@keyframes pulse-dot {
  0%,
  100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes network-flow {
  to { stroke-dashoffset: -36; }
}

@keyframes map-ring {
  0% { opacity: 0.5; transform: scale(0.35); }
  100% { opacity: 0; transform: scale(1.65); }
}

.motion-network {
  animation: network-flow 2s linear infinite;
}

.motion-map-ring {
  transform-box: fill-box;
  transform-origin: center;
  stroke: var(--primary);
  stroke-width: 1.4;
  animation: map-ring 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot,
  .motion-network,
  .motion-map-ring {
    animation: none !important;
  }
}

@media (min-width: 640px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
  .btn-desktop { display: inline-flex; }
  .hero-copy { padding-top: 5rem; }
  .hero-copy-inner { margin-left: 2rem; }
  .section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .mock-nav { display: block; }
  .mock-body { grid-template-columns: 4fr 8fr; }
  .mock-chips { grid-template-columns: repeat(3, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .node-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { flex-direction: row; justify-content: space-between; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 1024px) {
  .hero-copy { padding-top: 6rem; }
  .hero-copy-inner { margin-left: 4rem; }
  .plans-grid { grid-template-columns: repeat(3, 1fr); }
  .plan.featured { transform: translateY(-0.5rem); }
  .panel-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .panel-layout { grid-template-columns: 7fr 5fr; }
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
  .stack-grid { grid-template-columns: repeat(3, 1fr); }
  .faq-grid { grid-template-columns: 4fr 8fr; }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .feature-list,
  .feature-grid,
  .stack-grid {
    grid-template-columns: 1fr 1fr;
  }
}
