:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: #151b37;
  --line: #2b3564;
  --text: #f7f9ff;
  --muted: #aeb8dc;
  --accent: #7c5cff;
  --accent-2: #f59e0b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(124, 92, 255, 0.18), transparent 36%), var(--bg);
}

.store-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px;
}

.store-card {
  width: min(860px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 34px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* The post-purchase screen carries a full license, download actions, and
   setup instructions. Give it the available desktop width while leaving the
   narrower checkout/account cards unchanged. */
.success-card {
  width: min(1180px, 100%);
}

.success-page .store-shell {
  align-items: start;
}

.success-page .success-card {
  margin-block: 34px;
}

.app-icon {
  width: 82px;
  height: 82px;
  border-radius: 18px;
  display: block;
  margin-bottom: 16px;
}

.eyebrow {
  color: #b9c8ff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  margin: 10px 0 14px;
}

p,
li {
  color: var(--muted);
  line-height: 1.6;
}

form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 700;
}

input {
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f1530;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

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

.license-key-panel {
  min-width: 0;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f1530;
}

.license-key-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.copy-license-button {
  min-height: 40px;
  padding: 8px 14px;
}

.license-key {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  user-select: all;
}

.license-help,
.download-help,
.copy-status {
  margin: 10px 0 0;
  font-size: 0.9rem;
}

.copy-status {
  min-height: 1.4em;
  color: #86efac;
}

.success-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.success-actions > * {
  flex: 1 1 220px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.download-instructions {
  margin: 22px 0;
  padding: 20px;
  border: 1px solid #6d78b8;
  border-radius: 10px;
  background: #111936;
  color: var(--text);
}

.download-instructions h3,
.download-instructions p,
.download-instructions li,
.download-instructions strong,
.download-instructions a {
  color: var(--text);
}

.download-instructions h3 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 800;
}

.download-instructions p {
  margin: 0 0 12px;
}

.download-instructions ol {
  margin: 0;
  padding-left: 24px;
}

.download-instructions a {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .store-shell {
    padding: 18px;
  }

  .store-card {
    padding: 22px;
  }

  .license-key-panel {
    padding: 14px;
  }

  .success-page .success-card {
    margin-block: 0;
  }
}

/* ---- Full landing page additions (reuses the tokens above, same visual language as store-card) ---- */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--panel);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  border: 1px solid var(--line);
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

header.rb-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 16, 32, 0.82);
  border-bottom: 1px solid var(--line);
}
.rb-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.rb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.rb-brand img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.rb-nav-links {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.rb-nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}
.rb-nav-links a:hover { color: var(--text); }

main section {
  padding: 60px 0;
  border-bottom: 1px solid rgba(43, 53, 100, 0.5);
}
main section:last-of-type { border-bottom: none; }

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 34px;
}
.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 8px 0 10px;
}

.badge-beta {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.42em;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(245, 158, 11, 0.18);
  color: var(--accent-2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 999px;
  padding: 4px 12px;
  margin-left: 8px;
}

.callout-warn {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  color: var(--text);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 10px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--panel); }
.btn-secondary.is-disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.download-card,
.template-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.download-card h3,
.template-panel h3 { margin: 8px 0 10px; }
.download-card ol { margin: 0 0 18px; padding-left: 20px; }
.download-card .btn-secondary { width: 100%; margin-top: 10px; }
.download-step { color: var(--accent-2); font-size: 1.4rem; font-weight: 800; }
.template-panel {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 24px;
  align-items: center;
}
.template-actions { display: grid; gap: 10px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}
.feature-tile strong { display: block; margin-bottom: 6px; color: var(--text); }
.feature-tile span { color: var(--muted); font-size: 0.92rem; }

.media-video-grid,
.media-gallery {
  display: grid;
  gap: 18px;
}
.media-video-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
}
.media-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.media-card {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}
.media-card video,
.media-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #e9eef6;
}
.media-card a {
  display: block;
}
.media-card figcaption {
  display: grid;
  gap: 5px;
  padding: 15px 17px 17px;
}
.media-card figcaption strong {
  color: var(--text);
}
.media-card figcaption span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.editions-grid, .pricing-grid, .requirements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.pricing-grid { grid-template-columns: repeat(4, 1fr); }
.edition-card, .price-card, .req-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}
.price-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.price-card .price { font-size: 1.6rem; font-weight: 800; color: var(--text); margin: 6px 0; }
.price-card .price small { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.price-card button {
  width: 100%;
  margin-top: 12px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.price-card button:hover { background: rgba(124, 92, 255, 0.15); border-color: var(--accent); }

.checkout-panel {
  max-width: 520px;
  margin: 28px auto 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
}

.faq-list { display: grid; gap: 10px; }
.faq-list details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}
.faq-list p { margin: 10px 0 0; }

footer.rb-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  text-align: center;
}
.rb-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 10px;
}
.rb-footer-links a { color: var(--muted); font-size: 0.9rem; text-decoration: underline; }
.rb-footer-links a:hover { color: var(--text); }

.rb-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
}

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

@media (max-width: 880px) {
  .feature-grid, .editions-grid, .pricing-grid, .requirements-grid, .media-gallery, .download-grid, .template-panel {
    grid-template-columns: 1fr;
  }
  .rb-nav-links { display: none; }
  .rb-menu-toggle { display: inline-block; }
  .rb-nav.open .rb-nav-links {
    display: flex;
    position: absolute;
    top: 64px;
    right: 4%;
    flex-direction: column;
    background: var(--panel);
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--line);
    z-index: 60;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
