:root {
  color-scheme: dark;
  --color-bg: oklch(0.1 0.04 205);
  --color-ink: oklch(0.98 0.01 200);
  --color-muted: oklch(0.78 0.04 200);
  --color-coral: oklch(0.72 0.24 35);
  --color-coral-bright: oklch(0.8 0.26 38);
  --color-gold: oklch(0.86 0.18 85);
  --color-mint: oklch(0.82 0.14 175);
  --color-glass: oklch(0.14 0.04 205 / 0.42);
  --color-glass-edge: oklch(0.68 0.22 35 / 0.18);
  --color-error: oklch(0.7 0.2 25);
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --hero-title-size: clamp(1.75rem, 0.35rem + 5.5vw, 4.5rem);
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-gutter-start: max(1.25rem, env(safe-area-inset-left, 0rem));
  --space-gutter-end: max(1.25rem, env(safe-area-inset-right, 0rem));
  --radius-md: 0.85rem;
  --radius-lg: 1.25rem;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --copy-glow: 0 2px 28px oklch(0.05 0.04 205 / 0.92), 0 0 1px oklch(0 0 0 / 0.65);
  --text-pop: 0 1px 2px oklch(0 0 0 / 0.72), 0 0 48px oklch(0.08 0.06 205 / 0.95);
  --hero-text-legible: 0 1px 2px oklch(0 0 0 / 0.92), 0 2px 14px oklch(0.05 0.05 205 / 0.8);
  --copy-scrim: linear-gradient(
    135deg,
    oklch(0.07 0.05 205 / 0.48) 0%,
    oklch(0.08 0.04 205 / 0.32) 45%,
    oklch(0.08 0.04 205 / 0.1) 80%,
    transparent 100%
  );
  --hero-drift-duration: 26s;
  --hero-rise-duration: 880ms;
}

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

html,
body.no-scroll {
  margin: 0;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}

body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
}

.voice-low h1:not(.hero-stage__title),
.voice-low p,
.voice-low a,
.voice-low th,
.voice-low .loading,
.voice-low .pricing-error {
  text-transform: lowercase;
}

.voice-low code,
.voice-low .price {
  text-transform: none;
}

.voice-low .hero-stage__title {
  text-transform: uppercase;
}

a {
  color: var(--color-mint);
  text-decoration: none;
  transition: color 180ms var(--ease-out-expo);
}

a:hover {
  color: var(--color-coral-bright);
}

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

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100%;
  z-index: 100;
  background: var(--color-coral);
  color: oklch(0.14 0.04 35);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-weight: 700;
}

.skip-link:focus {
  top: var(--space-md);
}

.hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, clamp(15rem, 48vh, 22rem)) minmax(0, 1fr) auto;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

.hero-stage__art {
  position: relative;
  grid-row: 1;
  grid-column: 1;
  z-index: 0;
  min-height: 0;
  overflow: hidden;
  background: oklch(0.09 0.05 205);
}

.hero-stage__art picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-stage__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 18%;
  transform-origin: 42% 28%;
  animation: hero-art-drift var(--hero-drift-duration) var(--ease-out-expo) infinite alternate;
}

@keyframes hero-art-drift {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.04);
  }
}

@keyframes hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(0.65rem);
  }

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

@keyframes hero-row-in {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }

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

.hero-stage__kicker,
.hero-stage__title,
.hero-stage__tag {
  animation: hero-copy-in var(--hero-rise-duration) var(--ease-out-expo) both;
}

.hero-stage__kicker {
  animation-delay: 100ms;
}

.hero-stage__title {
  animation-delay: 200ms;
}

.hero-stage__tag {
  animation-delay: 300ms;
}

tbody tr.catalog-row {
  animation: hero-row-in 480ms var(--ease-out-expo) both;
  animation-delay: calc(560ms + var(--i, 0) * 42ms);
}

@media (prefers-reduced-motion: reduce) {
  .hero-stage__art img,
  .hero-stage__kicker,
  .hero-stage__title,
  .hero-stage__tag,
  .ledger-glass,
  tbody tr.catalog-row {
    animation: none;
  }
}

.hero-stage__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    oklch(0.09 0.04 205 / 0.12) 0%,
    transparent 28%,
    oklch(0.08 0.04 205 / 0.35) 62%,
    oklch(0.07 0.05 205 / 0.78) 100%
  );
  pointer-events: none;
}

.hero-stage__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(
      ellipse 120% 70% at 50% 100%,
      oklch(0.06 0.05 205 / 0.55) 0%,
      transparent 58%
    ),
    radial-gradient(
      ellipse 80% 50% at 18% 22%,
      transparent 30%,
      oklch(0.06 0.04 205 / 0.22) 100%
    );
  pointer-events: none;
}

.hero-stage__copy {
  position: relative;
  z-index: 2;
  grid-row: 1;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-self: stretch;
  min-width: 0;
  padding: var(--space-md) var(--space-gutter-end) var(--space-md) var(--space-gutter-start);
  font-family: var(--font-body);
}

.hero-stage__copy::before {
  content: "";
  position: absolute;
  top: 0;
  right: calc(-1 * var(--space-gutter-end));
  bottom: 0;
  left: calc(-1 * var(--space-gutter-start));
  z-index: -1;
  background: linear-gradient(
    180deg,
    transparent 0%,
    oklch(0.08 0.04 205 / 0.28) 38%,
    oklch(0.07 0.05 205 / 0.62) 100%
  );
  pointer-events: none;
}

.hero-stage__kicker {
  margin: 0 0 var(--space-sm);
  font-size: clamp(0.75rem, 2.8vw, 0.82rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: oklch(0.9 0.14 175);
}

.hero-stage__copy h1,
.hero-stage__title {
  margin: 0 0 var(--space-sm);
  font-size: var(--hero-title-size);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: oklch(0.99 0.01 200);
  max-width: 100%;
  text-wrap: balance;
}

.hero-stage__tag {
  margin: 0;
  font-size: clamp(0.68rem, 0.25rem + 1.85vw, 1.05rem);
  font-weight: 500;
  line-height: 1.35;
  color: oklch(0.96 0.02 200);
  max-width: none;
  white-space: nowrap;
}

.hero-stage__ledger {
  position: relative;
  z-index: 3;
  grid-row: 2;
  grid-column: 1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-gutter-end) 0 var(--space-gutter-start);
}

.ledger-glass {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: var(--radius-md);
  margin-bottom: 0.25rem;
  overflow: hidden;
  animation: hero-copy-in 720ms var(--ease-out-expo) 420ms both;
  background: linear-gradient(
    180deg,
    oklch(0.12 0.04 205 / 0) 0%,
    oklch(0.12 0.04 205 / 0.18) 22%,
    oklch(0.11 0.04 205 / 0.32) 100%
  );
  border: 1px solid oklch(0.68 0.22 35 / 0.1);
  border-top-color: oklch(0.68 0.22 35 / 0.04);
  border-bottom-color: oklch(0.68 0.22 35 / 0.07);
  backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: 0 -8px 40px oklch(0 0 0 / 0.1);
}

.ledger-glass::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1.25rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: linear-gradient(180deg, transparent, oklch(0.1 0.04 205 / 0.5));
  pointer-events: none;
}

.ledger-glass__head {
  flex: 0 0 auto;
  padding: var(--space-md) 0 0;
  border-bottom: 1px solid oklch(1 0 0 / 0.1);
}

.ledger-glass__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 var(--space-md);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ledger-glass__scroll:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: -2px;
}

.ledger-glass__scroll::-webkit-scrollbar {
  display: none;
}

.ledger-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.7rem;
}

.ledger-col-route {
  width: 36%;
}

.ledger-col-model {
  width: 40%;
}

.ledger-col-price {
  width: 24%;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}

thead {
  border-bottom: none;
}

th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: oklch(0.75 0.08 175);
}

.ledger-glass__head th {
  padding: 0 0.75rem 0.5rem;
}

.ledger-glass__scroll td {
  padding: 0.5rem 0.75rem;
}

td {
  border-bottom: 1px solid oklch(1 0 0 / 0.05);
  vertical-align: top;
}

td code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.35rem 0.5rem;
  word-break: break-word;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: oklch(0.68 0.22 35 / 0.07);
}

.price {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--color-gold);
  white-space: nowrap;
  text-shadow: 0 0 18px oklch(0.82 0.16 85 / 0.35);
}

.loading {
  color: var(--color-muted);
  font-style: italic;
  text-align: center;
  padding: var(--space-md) !important;
}

.pricing-error {
  color: var(--color-error);
  font-weight: 600;
  text-align: center;
  background: oklch(0.7 0.2 25 / 0.1);
}

.site-foot {
  position: relative;
  z-index: 4;
  grid-row: 3;
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm) var(--space-md);
  padding: 0.5rem var(--space-gutter-end) calc(0.5rem + env(safe-area-inset-bottom, 0rem))
    var(--space-gutter-start);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: oklch(0.62 0.04 200);
  background: linear-gradient(180deg, transparent, oklch(0.08 0.04 205 / 0.92));
}

.site-foot a {
  color: oklch(0.68 0.05 200);
}

.site-foot a:hover {
  color: var(--color-coral);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  background: oklch(0.1 0.04 205 / 0.65);
}

.legal-page__inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) 4rem;
}

.legal-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
}

.legal-page p {
  color: var(--color-muted);
  max-width: 65ch;
}

.back-link {
  display: inline-block;
  margin-top: var(--space-xl);
  font-weight: 700;
}

@media (max-width: 40rem) {
  :root {
    --space-gutter-start: max(1.5rem, env(safe-area-inset-left, 0rem));
    --space-gutter-end: max(1.375rem, env(safe-area-inset-right, 0rem));
  }

  .ledger-glass__head th,
  .ledger-glass__scroll td {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .ledger-glass__head th:first-child,
  .ledger-glass__scroll td:first-child {
    padding-left: 0;
  }

  .ledger-glass__head th:last-child,
  .ledger-glass__scroll td:last-child {
    padding-right: 0;
  }
}

@media (min-width: 40.01rem) {
  .hero-stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr auto auto;
  }

  .hero-stage__art {
    position: absolute;
    inset: 0;
    grid-row: auto;
    grid-column: auto;
    border-radius: 0;
    background: transparent;
  }

  .hero-stage__art img {
    object-fit: cover;
    object-position: 40% 34%;
  }

  .hero-stage__veil {
    background: linear-gradient(
      115deg,
      oklch(0.07 0.05 205 / 0.55) 0%,
      oklch(0.08 0.04 205 / 0.32) 30%,
      oklch(0.09 0.04 205 / 0.06) 48%,
      oklch(0.09 0.04 205 / 0.22) 78%,
      oklch(0.09 0.04 205 / 0.5) 100%
    );
  }

  .hero-stage__vignette {
    background:
      radial-gradient(
        ellipse 70% 80% at 24% 38%,
        oklch(0.06 0.05 205 / 0.28) 0%,
        transparent 58%
      ),
      radial-gradient(
        ellipse 120% 90% at 50% 45%,
        transparent 35%,
        oklch(0.06 0.04 205 / 0.32) 100%
      );
  }

  .hero-stage__art img {
    transform-origin: 40% 34%;
  }

  .hero-stage__copy {
    grid-row: auto;
    grid-column: auto;
    align-self: end;
    justify-self: start;
    justify-content: flex-start;
    width: min(36rem, 52vw);
    max-width: min(36rem, 52vw);
    margin: 0 clamp(1rem, 4vw, 2.5rem) clamp(0.5rem, 1.75vh, 1rem)
      clamp(0.75rem, 3.5vw, 2rem);
    padding: var(--space-lg);
  }

  .hero-stage__copy::before {
    inset: -0.65rem -0.85rem;
    border-radius: var(--radius-lg);
    background: var(--copy-scrim);
  }

  .hero-stage__copy h1,
  .hero-stage__title {
    width: fit-content;
    max-width: 100%;
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-wrap: nowrap;
    overflow: visible;
    padding: 0.12em 0.08em 0.2em 0.12em;
  }

  .hero-stage__tag {
    max-width: none;
    font-size: clamp(0.78rem, 0.35rem + 1.2vw, 1.05rem);
  }

  .hero-stage__ledger {
    grid-row: auto;
    grid-column: auto;
    align-self: end;
    padding: 0 clamp(0.75rem, 3vw, 2rem) clamp(0.35rem, 1.5vh, 0.75rem);
  }

  .ledger-glass {
    flex: initial;
    border-radius: var(--radius-lg) var(--radius-lg) 0.35rem 0.35rem;
    margin-bottom: 0;
    max-height: min(42vh, 22rem);
  }

  .ledger-table {
    table-layout: fixed;
    width: 100%;
  }

  .ledger-col-route {
    width: 40%;
  }

  .ledger-col-model {
    width: 12%;
  }

  .ledger-col-price {
    width: 48%;
  }

  .ledger-glass__head th:nth-child(2),
  .ledger-glass__scroll td:nth-child(2) {
    white-space: nowrap;
    padding-right: 0.35rem;
  }

  .ledger-glass__head th:nth-child(3),
  .ledger-glass__scroll td:nth-child(3) {
    text-align: right;
    padding-left: 0;
  }

  table {
    font-size: clamp(0.72rem, 1.5vw, 0.84rem);
  }

  .ledger-glass__head th,
  .ledger-glass__scroll td {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .ledger-glass__head th {
    padding-bottom: 0.45rem;
  }

  .ledger-glass__scroll td {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  td code {
    font-size: 0.76rem;
    padding: 0.3rem 0.45rem;
  }

  .site-foot {
    grid-row: auto;
    grid-column: auto;
    padding: 0.45rem var(--space-md) 0.55rem;
    font-size: 0.68rem;
  }
}
