:root {
  color-scheme: dark;
  --midnight: #071426;
  --ink: #0e2138;
  --panel: rgba(16, 40, 66, 0.88);
  --panel-raised: rgba(23, 53, 82, 0.94);
  --blue: #4c91ff;
  --red: #ff5c5c;
  --gold: #ffd166;
  --gold-deep: #d4a017;
  --bone: #eef4ff;
  --muted: #9fb2c8;
  --border: #527398;
  --shadow: rgba(2, 8, 16, 0.55);
  --radius: 18px;
  --header-h: 4.5rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-x: max(1.25rem, env(safe-area-inset-left, 0px));
  --safe-r: max(1.25rem, env(safe-area-inset-right, 0px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Outfit", "Segoe UI", sans-serif;
  background: var(--midnight);
  color: var(--bone);
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--bone);
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 50% 78%, rgba(255, 209, 102, 0.18), transparent 58%),
    linear-gradient(180deg, #050b14 0%, #0a1c33 42%, #16324f 72%, #1b3a4a 100%);
}

.sky::before,
.sky::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 58vw;
  max-width: 720px;
  height: min(42vh, 420px);
  pointer-events: none;
}

.sky::before {
  left: -8%;
  background: linear-gradient(180deg, #4c91ff 0%, #2a5a9e 58%, #163056 100%);
  clip-path: polygon(8% 22%, 22% 8%, 36% 22%, 48% 100%, 0 86%);
  opacity: 0.55;
}

.sky::after {
  right: -8%;
  background: linear-gradient(180deg, #ff5c5c 0%, #b33a3a 58%, #5a2228 100%);
  clip-path: polygon(52% 22%, 66% 8%, 80% 22%, 100% 86%, 42% 100%);
  opacity: 0.55;
}

.horizon {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 28%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.7;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-header,
.site-footer,
.wrap {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-left: var(--safe-x);
  padding-right: var(--safe-r);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding-top: calc(0.75rem + var(--safe-top));
  padding-bottom: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--bone);
  text-decoration: none;
  min-width: 0;
}

.brand img {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-name {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.site-nav {
  display: flex;
  gap: 0.4rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--bone);
  border-color: var(--border);
  background: rgba(16, 40, 66, 0.7);
}

main {
  padding: 0.5rem 0 3.5rem;
}

.hero {
  padding: 1.25rem 0 2rem;
  max-width: 38rem;
}

.kicker {
  margin: 0 0 0.65rem;
  color: var(--gold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
}

h1 {
  margin: 0 0 0.75rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 36rem;
}

.layout {
  display: grid;
  gap: 1.25rem;
}

.layout > * {
  min-width: 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem 1.5rem;
  box-shadow: 0 18px 40px var(--shadow);
  backdrop-filter: blur(10px);
}

.offer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.price {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}

.price-note {
  color: var(--muted);
  font-size: 0.95rem;
}

h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
}

.benefits {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.benefits li {
  display: grid;
  grid-template-columns: 1.15rem 1fr;
  gap: 0.7rem;
  color: var(--bone);
}

.benefits li::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.15);
}

.faction-bar {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  margin-top: auto;
}

.faction-bar span:first-child {
  flex: 1;
  background: var(--blue);
}

.faction-bar span:last-child {
  flex: 1;
  background: var(--red);
}

form {
  display: grid;
  gap: 0.35rem;
}

label {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

input {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--midnight);
  color: var(--bone);
  font: inherit;
  font-size: 1rem;
}

input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-color: var(--gold);
}

.actions {
  margin-top: 1rem;
}

button,
.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 0;
  border-radius: 12px;
  background: var(--gold);
  color: var(--midnight);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

button:hover,
.button:hover {
  background: #ffe08a;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.status {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
}

.status.notice {
  color: #9be7b8;
  background: rgba(40, 110, 72, 0.28);
  border-color: #3f8a5e;
}

.status.error {
  color: #ffb4aa;
  background: rgba(120, 40, 40, 0.28);
  border-color: #a85a52;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.stat {
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.stat strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.8rem;
  color: var(--gold);
}

.stat span {
  color: var(--muted);
  font-size: 0.88rem;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 36rem;
}

th,
td {
  text-align: left;
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid rgba(82, 115, 152, 0.45);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

td {
  font-size: 0.95rem;
}

.receipt {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0 0.6rem;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.16);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
}

.cards {
  display: none;
  gap: 0.85rem;
}

.payer-card {
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  display: grid;
  gap: 0.35rem;
}

.payer-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.empty {
  color: var(--muted);
  margin: 0;
}

.site-footer {
  padding: 1.25rem var(--safe-x) calc(1.5rem + var(--safe-bottom));
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(82, 115, 152, 0.35);
}

@media (min-width: 960px) {
  .layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: stretch;
  }

  .hero {
    padding-top: 2.2rem;
    padding-bottom: 2.4rem;
  }
}

@media (max-width: 720px) {
  table,
  .table-wrap {
    display: none;
  }

  .cards {
    display: grid;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .brand-copy {
    display: none;
  }

  .site-nav a {
    padding-inline: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
