:root {
  color-scheme: dark;
  --bg: #0b1018;
  --surface: #111923;
  --surface-strong: #151f2b;
  --surface-soft: #1a2633;
  --ink: #edf3fa;
  --muted: #9caabd;
  --line: #253342;
  --line-strong: #3d536b;
  --brand: #6ca7df;
  --brand-dark: #477faf;
  --accent: #a9cce8;
  --soft: #17212c;
  --warning: #2b2610;
  --success: #102d26;
  --danger: #321925;
  --danger-ink: #ffb7c8;
  --shadow: rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #111925 0%, var(--bg) 44%, #070a10 100%);
  color: var(--ink);
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(108, 167, 223, 0.16);
  background: rgba(11, 16, 24, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 2;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #0e151e;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(169, 204, 232, 0.12);
}

.brand small,
.fine-print,
.muted,
footer {
  color: var(--muted);
}

.brand span:last-child {
  display: grid;
  line-height: 1.1;
}

nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

nav a,
.back-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

nav a:hover,
.back-link:hover {
  color: var(--accent);
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: min(590px, calc(100vh - 112px));
  margin: -34px calc(50% - 50vw) 0;
  padding: clamp(96px, 13vw, 156px) max(18px, calc((100vw - 1120px) / 2)) clamp(78px, 9vw, 124px);
  background-image:
    linear-gradient(90deg, rgba(5, 9, 15, 0.96) 0%, rgba(8, 14, 23, 0.9) 34%, rgba(8, 14, 23, 0.64) 62%, rgba(8, 14, 23, 0.78) 100%),
    linear-gradient(180deg, rgba(5, 9, 15, 0.24) 0%, rgba(5, 9, 15, 0.86) 100%),
    url("/images/vaulttrader-hero-desktop.webp");
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid rgba(108, 167, 223, 0.16);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 55%, rgba(108, 167, 223, 0.16), rgba(5, 9, 15, 0) 28%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-copy h1,
.narrow h1,
.admin h1 {
  max-width: 760px;
  margin: 8px 0 16px;
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-title {
  max-width: 980px;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
  text-shadow:
    0 0 22px rgba(108, 167, 223, 0.44),
    0 4px 18px rgba(0, 0, 0, 0.72);
}

.hero-copy {
  max-width: 820px;
  margin-left: clamp(28px, 8vw, 220px);
}

.hero-copy p {
  max-width: 640px;
  font-size: 18px;
  color: var(--muted);
}

.hero-link {
  margin-top: 6px;
  color: var(--ink);
}

.hero-panel,
.panel,
.product-card,
.payment-card,
.table-panel,
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px var(--shadow);
}

.hero-panel {
  background: rgba(17, 25, 35, 0.82);
  backdrop-filter: blur(12px);
  padding: 24px;
}

.hero-panel ol {
  padding-left: 20px;
  color: var(--muted);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 18px 0 14px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: 26px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.product-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(250px, 0.85fr) minmax(0, 1.3fr) minmax(0, 1.3fr);
  gap: 14px;
  align-items: start;
}

.description-hero {
  max-width: 920px;
  padding: clamp(28px, 6vw, 64px) 0 24px;
}

.description-hero h1 {
  margin: 8px 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: 0;
}

.description-hero p:last-child {
  max-width: 760px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.description-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.description-card,
.description-section {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(108, 167, 223, 0.045), rgba(17, 25, 35, 0) 34%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px var(--shadow);
}

.description-card.lead-card {
  grid-column: 1 / -1;
}

.description-card h2,
.description-section h2 {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 24px;
}

.description-card p,
.description-section p,
.not-list {
  color: var(--muted);
  line-height: 1.68;
}

.description-card p:last-child,
.description-section p:last-child {
  margin-bottom: 0;
}

.not-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 14px 0 20px;
  padding-left: 20px;
}

.product-card {
  min-height: 285px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(108, 167, 223, 0.055), rgba(17, 25, 35, 0) 42%),
    var(--surface);
}

.purchase-card {
  height: 352px;
  display: grid;
  grid-template-rows: minmax(204px, auto) auto auto;
  align-content: start;
}

.product-card h2 {
  margin: 0 0 10px;
  font-size: 21px;
}

.product-card p {
  color: var(--muted);
  line-height: 1.5;
}

.screenshot-card {
  grid-column: span 2;
  gap: 14px;
}

.screenshot-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.screenshot-card-head h2 {
  margin: 0;
}

.screenshot-count {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #0d151f;
  font-size: 12px;
  font-weight: 800;
}

.screenshot-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  display: block;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #080d14;
  cursor: zoom-in;
}

.screenshot-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screenshot-expand-label {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(169, 204, 232, 0.42);
  border-radius: 999px;
  background: rgba(8, 13, 20, 0.84);
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.screenshot-frame:hover .screenshot-expand-label,
.screenshot-frame:focus-visible .screenshot-expand-label {
  opacity: 1;
  transform: translateY(0);
}

.screenshot-selector {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.screenshot-selector button {
  min-height: 36px;
  padding: 8px;
  background: var(--soft);
  color: var(--muted);
  border-color: var(--line);
}

.screenshot-selector button:hover,
.screenshot-selector button.active {
  color: var(--ink);
  background: rgba(108, 167, 223, 0.18);
  border-color: var(--brand);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: hidden;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(2, 5, 10, 0.86);
  backdrop-filter: blur(10px);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: calc(100vw - 20px);
  height: calc(100vh - 20px);
}

.lightbox-frame {
  position: relative;
  width: 100%;
  height: 100%;
}

.lightbox-panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #080d14;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.58);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  min-height: 36px;
  padding: 8px 12px;
  background: rgba(23, 33, 44, 0.88);
  color: var(--accent);
  border-color: var(--line-strong);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  min-width: 64px;
  min-height: 42px;
  background: rgba(23, 33, 44, 0.9);
  color: var(--accent);
  border-color: var(--line-strong);
  transform: translateY(-50%);
}

.lightbox-nav[data-lightbox-step="-1"] {
  left: 12px;
}

.lightbox-nav[data-lightbox-step="1"] {
  right: 12px;
}

.lightbox-nav:hover,
.lightbox-close:hover {
  background: var(--surface-soft);
  border-color: var(--brand);
}

.lightbox-open {
  overflow: hidden;
}

.price,
.checkout-total {
  font-size: 31px;
  font-weight: 850;
  color: var(--accent);
}

.product-card .price,
.product-card .button.primary,
.product-card .button.ghost {
  color: var(--ink);
}

.product-card .price {
  margin-top: 0;
}

.asset-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.asset-row .button {
  white-space: nowrap;
}

.button,
button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 13px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--brand);
  color: #07111a;
  border-color: #92bde3;
  box-shadow: 0 10px 22px rgba(108, 167, 223, 0.14);
}

.button.primary:hover {
  background: var(--accent);
}

.button.ghost,
.copy-row button,
.inline-form button {
  background: var(--soft);
  color: var(--accent);
  border-color: var(--line-strong);
}

.button.ghost:hover,
.copy-row button:hover,
.inline-form button:hover {
  background: var(--surface-soft);
  border-color: var(--brand);
}

.wide {
  width: 100%;
}

.narrow {
  max-width: 920px;
  margin: 0 auto;
}

.checkout-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 26px;
  align-items: start;
  margin-top: 22px;
}

.panel,
.form-panel,
.table-panel {
  padding: 24px;
}

.form-panel {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  font: inherit;
  background: #0d141d;
}

input:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(108, 167, 223, 0.14);
  outline: none;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

legend {
  color: var(--muted);
  font-weight: 800;
}

.radio-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  margin: 8px 0;
  color: var(--ink);
}

.radio-row input {
  width: auto;
}

.error {
  padding: 12px;
  border-radius: 8px;
  background: var(--danger);
  color: var(--danger-ink);
  font-weight: 750;
}

.invoice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0;
}

.invoice-header h1 {
  font-size: clamp(32px, 5vw, 54px);
}

.status {
  display: inline-flex;
  min-width: 92px;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--warning);
  color: #ffe39a;
  border: 1px solid rgba(255, 227, 154, 0.18);
  text-transform: capitalize;
  font-weight: 850;
}

.status.paid {
  background: var(--success);
  color: #9ff0d8;
}

.status.cancelled {
  background: var(--danger);
  color: var(--danger-ink);
}

.payment-card {
  padding: clamp(20px, 4vw, 34px);
}

.payment-amount {
  display: grid;
  gap: 4px;
  margin-bottom: 22px;
}

.payment-amount span,
.payment-amount small {
  color: var(--muted);
  font-weight: 750;
}

.payment-amount strong {
  font-size: clamp(34px, 7vw, 62px);
  line-height: 1;
}

.copy-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.copy-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #0d151f;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.copy-row span {
  color: var(--muted);
  font-weight: 800;
}

code {
  overflow-wrap: anywhere;
  color: var(--accent);
}

.split-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
}

.paid-card {
  border-color: #2e8a77;
}

.admin {
  display: grid;
  gap: 18px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  display: grid;
  gap: 4px;
  padding: 18px;
}

.metric span {
  color: var(--muted);
  font-weight: 800;
}

.metric strong {
  font-size: 32px;
}

.table-panel {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
}

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

.inline-form {
  display: inline;
}

footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 20px 0 38px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 980px) {
  .hero,
  .checkout-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 104px;
    background-image:
      linear-gradient(180deg, rgba(5, 9, 15, 0.95) 0%, rgba(8, 14, 23, 0.82) 44%, rgba(8, 14, 23, 0.9) 100%),
      url("/images/vaulttrader-hero-mobile.webp");
    background-position: center top;
  }

  .product-grid,
  .metric-grid,
  .description-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar,
  .invoice-header,
  .split-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-grid,
  .metric-grid,
  .description-layout,
  .not-list {
    grid-template-columns: 1fr;
  }

  .copy-row {
    grid-template-columns: 1fr;
  }

  .asset-row {
    grid-template-columns: 1fr;
  }

  .purchase-card {
    height: auto;
  }

  .screenshot-card {
    grid-column: span 1;
  }

  .lightbox-frame {
    display: block;
  }

  .lightbox-nav {
    top: auto;
    bottom: 12px;
    transform: none;
  }

  .hero-copy {
    margin-left: 0;
  }

  .hero-title {
    white-space: normal;
  }
}

@media (min-width: 1800px) {
  .hero {
    background-image:
      linear-gradient(90deg, rgba(5, 9, 15, 0.96) 0%, rgba(8, 14, 23, 0.9) 34%, rgba(8, 14, 23, 0.58) 62%, rgba(8, 14, 23, 0.76) 100%),
      linear-gradient(180deg, rgba(5, 9, 15, 0.22) 0%, rgba(5, 9, 15, 0.86) 100%),
      url("/images/vaulttrader-hero-wide.webp");
  }
}
