:root {
  --bg: #050505;
  --panel: #121114;
  --panel-2: #19181d;
  --ink: #f8f5ee;
  --muted: #b9b0a1;
  --line: #403b35;
  --gold: #fad085;
  --green: #72f2a7;
  --blue: #7cc7ff;
  --red: #e85b65;
  --shadow: rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: rgba(5, 5, 5, 0.78);
  border-bottom: 1px solid rgba(250, 208, 133, 0.2);
  backdrop-filter: blur(16px);
}

.brand {
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.4rem);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-header nav a {
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--gold);
}

.hero {
  position: relative;
  min-height: min(82vh, 820px);
  display: grid;
  align-items: end;
  padding: clamp(6rem, 12vh, 8rem) clamp(1rem, 5vw, 5rem) clamp(3rem, 8vh, 5rem);
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-image {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.98) 0%, rgba(5, 5, 5, 0.7) 38%, rgba(5, 5, 5, 0.12) 78%),
    linear-gradient(0deg, rgba(5, 5, 5, 0.85) 0%, rgba(5, 5, 5, 0.06) 34%),
    url("/resonate/assets/ResonatePanel.png") center right / min(980px, 88vw) auto no-repeat;
  transform: scale(1.02);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--green), transparent);
  opacity: 0.72;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.7rem;
  font-size: clamp(4.4rem, 15vw, 13rem);
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 1.5rem;
  color: var(--ink);
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
}

.hero-actions,
.dialog-actions,
.invoice-actions,
.address-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.button,
.icon-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.72rem 1rem;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--gold);
  color: #130d04;
}

.button.secondary,
.icon-button {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.product-strip {
  padding: clamp(1rem, 4vw, 3rem) clamp(1rem, 5vw, 5rem);
  background: #0d0c0f;
}

.product-strip img {
  display: block;
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(250, 208, 133, 0.26);
  box-shadow: 0 28px 80px var(--shadow);
}

.media-band,
.buy-band {
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 5vw, 5rem);
}

.section-copy {
  width: min(920px, 100%);
  margin-bottom: 1.5rem;
}

.section-copy h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.video-frame {
  width: min(1120px, 100%);
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(124, 199, 255, 0.35);
  background: #000;
  box-shadow: 0 30px 90px var(--shadow);
}

.video-frame iframe,
.itch-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
}

.buy-band {
  background: #0b0a0d;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.purchase-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

.purchase-grid.fiat-only {
  max-width: 720px;
  grid-template-columns: minmax(0, 1fr);
}

.purchase-panel {
  padding: clamp(1rem, 3vw, 1.4rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 60px var(--shadow);
}

.panel-heading,
.invoice-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.panel-heading h3,
.downloads h4 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.panel-heading span {
  color: var(--green);
  font-weight: 900;
}

.purchase-panel p {
  color: var(--muted);
}

.install-note {
  width: min(1120px, 100%);
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  color: var(--muted);
  background: rgba(250, 208, 133, 0.07);
  border: 1px solid rgba(250, 208, 133, 0.22);
  border-radius: 8px;
}

.install-note strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--gold);
}

.install-note p {
  margin-bottom: 0;
}

.itch-frame-wrap {
  width: 100%;
  height: 167px;
  overflow: hidden;
  background: #0f0000;
  border: 1px solid rgba(250, 208, 133, 0.18);
  border-radius: 8px;
}

.checkout-form {
  margin-top: 1.1rem;
}

.checkout-form label,
.label {
  display: block;
  margin-bottom: 0.34rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.email-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
}

.email-row input {
  min-width: 0;
  min-height: 44px;
  padding: 0.72rem 0.85rem;
  color: var(--ink);
  background: #050505;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.email-row input:focus {
  outline: 2px solid rgba(114, 242, 167, 0.35);
  outline-offset: 2px;
}

.field-note {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.checkout-error {
  margin-top: 1rem;
  padding: 0.75rem;
  color: #fff1f2;
  background: rgba(232, 91, 101, 0.14);
  border: 1px solid rgba(232, 91, 101, 0.42);
  border-radius: 8px;
}

.invoice,
.downloads {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.invoice-topline strong {
  display: block;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-variant-numeric: tabular-nums;
}

progress {
  width: 100%;
  height: 0.7rem;
  appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: #050505;
}

progress::-webkit-progress-bar {
  background: #050505;
}

progress::-webkit-progress-value {
  background: var(--green);
}

progress::-moz-progress-bar {
  background: var(--green);
}

.qr-address-grid {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
}

.qr {
  width: 164px;
  height: 164px;
  padding: 0.5rem;
  background: #fff;
  border-radius: 8px;
}

.address-block code {
  display: block;
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.72rem;
  overflow-wrap: anywhere;
  color: var(--ink);
  background: #050505;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
}

.payment-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  color: var(--muted);
}

.status-dot {
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(250, 208, 133, 0.12);
}

.status-dot.paid {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(114, 242, 167, 0.12);
}

.status-dot.expired {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(232, 91, 101, 0.12);
}

.invoice-actions {
  margin-top: 1rem;
}

.download-list {
  display: grid;
  gap: 0.6rem;
}

.download-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.download-link:hover {
  border-color: var(--green);
}

.download-link span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

.email-dialog {
  width: min(460px, calc(100vw - 2rem));
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62);
}

.email-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.email-dialog h2 {
  margin-bottom: 0.55rem;
}

.email-dialog p {
  color: var(--muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 1.2rem clamp(1rem, 5vw, 5rem);
  color: var(--muted);
  background: #050505;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold);
}

.legal-page {
  min-height: 100vh;
  background: #0b0a0d;
}

.legal-content {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5rem) clamp(1rem, 5vw, 3rem);
}

.legal-content h1 {
  margin-bottom: 0.6rem;
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 0.95;
}

.legal-updated {
  margin-bottom: 2rem;
  color: var(--muted);
}

.legal-content section {
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
}

.legal-content h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.legal-content p,
.legal-content li {
  color: var(--muted);
}

.legal-content a {
  color: var(--gold);
}

@media (max-width: 900px) {
  .purchase-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-image {
    background:
      linear-gradient(0deg, rgba(5, 5, 5, 0.96) 0%, rgba(5, 5, 5, 0.38) 70%),
      url("/resonate/assets/ResonatePanel.png") center top 5rem / 104vw auto no-repeat;
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .email-row,
  .qr-address-grid {
    grid-template-columns: 1fr;
  }

  .email-row .button {
    width: 100%;
  }

  .qr {
    width: min(100%, 260px);
    height: auto;
    aspect-ratio: 1;
  }

  .panel-heading,
  .invoice-topline {
    flex-direction: column;
  }
}
