:root {
  --bg: #070d1a;
  --surface: rgba(12, 20, 37, 0.7);
  --surface-strong: rgba(11, 16, 30, 0.9);
  --text: #e7eef9;
  --muted: #9eb0ce;
  --accent: #37d0b2;
  --accent-dark: #1aa389;
  --secondary: #ffcf7e;
  --border: rgba(170, 207, 255, 0.22);
  --shadow: 0 22px 52px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Sora", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 10%, rgba(55, 208, 178, 0.22), transparent 42%),
    radial-gradient(circle at 85% 14%, rgba(255, 207, 126, 0.16), transparent 38%),
    radial-gradient(circle at 50% 90%, rgba(39, 62, 105, 0.3), transparent 45%),
    var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

.starfield {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background-image: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.8) 1px, transparent 1.4px),
    radial-gradient(circle at 70% 40%, rgba(190, 220, 255, 0.8) 1px, transparent 1.4px),
    radial-gradient(circle at 35% 75%, rgba(255, 226, 167, 0.9) 1.2px, transparent 1.6px),
    radial-gradient(circle at 90% 85%, rgba(170, 210, 255, 0.8) 0.8px, transparent 1.2px);
  background-size: 340px 340px, 420px 420px, 500px 500px, 600px 600px;
  animation: twinkle 9s linear infinite;
  opacity: 0.7;
}

.nebula-layer {
  position: fixed;
  inset: -12% -10%;
  pointer-events: none;
  filter: blur(44px);
  z-index: -3;
}

.nebula-a {
  background: radial-gradient(circle at 20% 30%, rgba(56, 184, 214, 0.18), transparent 44%),
    radial-gradient(circle at 70% 60%, rgba(80, 228, 185, 0.2), transparent 40%);
  animation: nebulaDriftA 20s ease-in-out infinite alternate;
}

.nebula-b {
  background: radial-gradient(circle at 80% 20%, rgba(255, 197, 123, 0.12), transparent 40%),
    radial-gradient(circle at 30% 70%, rgba(99, 132, 245, 0.2), transparent 46%);
  animation: nebulaDriftB 24s ease-in-out infinite alternate;
}

.background-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
      110deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(154, 202, 255, 0.26) 46%,
      rgba(255, 255, 255, 0) 76%
    ),
    linear-gradient(rgba(160, 193, 248, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 193, 248, 0.04) 1px, transparent 1px);
  background-size: 180% 180%, 32px 32px, 32px 32px;
  animation: drift 14s linear infinite;
  z-index: -2;
}

.site-header {
  width: min(1100px, 92vw);
  margin: 1rem auto;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(5, 10, 22, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0.75rem;
  z-index: 10;
}

.brand {
  font-family: "Cormorant Garamond", serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

.nav-links a:hover {
  color: #d9f5ff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.admin-link {
  text-decoration: none;
  color: #d6e6ff;
  font-size: 0.85rem;
  border: 1px solid rgba(148, 205, 255, 0.35);
  border-radius: 999px;
  padding: 0.48rem 0.85rem;
  background: rgba(10, 17, 33, 0.7);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.admin-link:hover {
  color: #ffffff;
  border-color: rgba(148, 205, 255, 0.75);
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, #21bda2, #2ec3e6);
  box-shadow: 0 10px 25px rgba(46, 195, 230, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(46, 195, 230, 0.45);
}

.button-small {
  font-size: 0.85rem;
  padding: 0.65rem 1rem;
}

.button-ghost {
  background: rgba(255, 208, 136, 0.08);
  border: 1.5px solid rgba(255, 207, 126, 0.62);
  color: #ffe4ad;
  box-shadow: none;
}

.button-wide {
  width: 100%;
  margin-top: 1rem;
}

main {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

section {
  padding: 4.5rem 0;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.8rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 2rem;
  min-height: 70vh;
}

.hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 5.8vw, 4.2rem);
  line-height: 1.05;
  margin: 0;
}

.hero h1 span {
  display: block;
  color: #d9f7fb;
}

#book-subtitle {
  color: #ffdca1;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  font-style: italic;
}

.hero-text {
  max-width: 58ch;
  color: var(--muted);
  margin: 1.1rem 0 1.3rem;
}

.cta-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-points {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-points li {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(144, 196, 255, 0.28);
  background: rgba(20, 37, 67, 0.7);
  font-size: 0.85rem;
}

.hero-cover {
  position: relative;
  justify-self: center;
  animation: levitate 6s ease-in-out infinite;
}

.hero-cover img {
  width: min(340px, 86vw);
  border-radius: 20px;
  border: 1px solid rgba(176, 211, 255, 0.45);
  filter: drop-shadow(0 22px 35px rgba(0, 0, 0, 0.55));
}

.hero-cover::before {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 24px;
  border: 1px solid rgba(135, 197, 247, 0.3);
  animation: orbitRing 12s linear infinite;
}

.hero-cover::after {
  content: "";
  position: absolute;
  top: -10px;
  right: 25px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ffd38a;
  box-shadow: 0 0 24px rgba(255, 211, 138, 0.75);
  animation: orbitStar 6s ease-in-out infinite;
}

h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.7rem, 4.2vw, 2.5rem);
  margin: 0 0 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(117, 217, 234, 0.55);
}

.card h3 {
  margin-top: 0;
  font-family: "Cormorant Garamond", serif;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
}

.inside {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  align-items: start;
}

.chapters {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.chapters li {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-strong);
  padding: 0.85rem 1rem;
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.chapters span {
  color: var(--secondary);
  font-weight: 700;
}

.quote {
  border: 1px dashed rgba(255, 207, 126, 0.65);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  background: rgba(16, 33, 60, 0.62);
}

.quote blockquote {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  font-family: "Cormorant Garamond", serif;
}

.testimonial strong {
  display: block;
  margin-top: 0.8rem;
}

.pricing {
  display: flex;
  justify-content: center;
}

.price-box {
  width: min(560px, 100%);
  padding: 2rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(140deg, rgba(12, 20, 37, 0.96), rgba(9, 35, 47, 0.94));
  box-shadow: var(--shadow);
  text-align: center;
}

.price {
  margin: 1rem 0 0;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  align-items: baseline;
}

.old-price {
  text-decoration: line-through;
  color: #8f9fbf;
}

.price strong {
  font-size: 3rem;
  font-family: "Cormorant Garamond", serif;
  color: #8bf8d6;
}

.countdown {
  margin: 0.6rem 0;
  color: var(--muted);
  font-weight: 600;
}

.fine-print {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.payment-modal.is-open {
  display: block;
}

.payment-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 18, 0.72);
  backdrop-filter: blur(4px);
}

.payment-modal-panel {
  position: relative;
  width: min(640px, 92vw);
  margin: 4vh auto;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid rgba(148, 205, 255, 0.35);
  background: linear-gradient(155deg, rgba(10, 18, 36, 0.97), rgba(8, 28, 43, 0.96));
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.6);
  padding: 1.3rem;
  animation: modalRise 0.28s ease;
}

.payment-help {
  margin-top: 0;
  color: var(--muted);
}

.payment-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 205, 255, 0.35);
  background: rgba(12, 20, 37, 0.7);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0.7rem 0 1.1rem;
}

.qr-card {
  margin: 0;
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 205, 255, 0.28);
  background: rgba(11, 20, 39, 0.65);
}

.qr-card.is-selected {
  border-color: rgba(55, 208, 178, 0.75);
  box-shadow: 0 0 0 2px rgba(55, 208, 178, 0.2) inset;
}

.qr-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(148, 205, 255, 0.28);
  background: rgba(4, 9, 18, 0.95);
}

.qr-card figcaption {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.qr-card-select {
  margin-top: 0.55rem;
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(148, 205, 255, 0.45);
  background: rgba(9, 16, 32, 0.85);
  color: #d7e8ff;
  font-family: inherit;
  font-weight: 700;
  padding: 0.48rem 0.8rem;
  cursor: pointer;
}

.qr-selection-actions {
  display: none;
  gap: 0.6rem;
  margin-top: -0.3rem;
  margin-bottom: 0.9rem;
}

.qr-selection-actions.is-visible {
  display: flex;
  flex-wrap: wrap;
}

.payment-form {
  display: grid;
  gap: 0.55rem;
}

.payment-form label {
  color: #d8ebff;
  font-weight: 600;
}

.payment-form input {
  border-radius: 10px;
  border: 1px solid rgba(148, 205, 255, 0.35);
  background: rgba(9, 16, 32, 0.8);
  color: var(--text);
  padding: 0.7rem 0.8rem;
  font-family: inherit;
  font-size: 0.96rem;
}

.payment-form input:focus {
  outline: 2px solid rgba(55, 208, 178, 0.6);
  border-color: rgba(55, 208, 178, 0.7);
}

.reference-error {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: #ff9e9e;
}

.site-footer {
  width: min(1100px, 92vw);
  margin: 2rem auto 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(139, 171, 218, 0.35);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a {
  color: inherit;
}

.reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.98);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes drift {
  0% {
    background-position: 0% 50%, 0 0, 0 0;
  }
  100% {
    background-position: 100% 50%, 0 0, 0 0;
  }
}

@keyframes twinkle {
  0% {
    opacity: 0.45;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.03);
  }
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
}

@keyframes nebulaDriftA {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  100% {
    transform: translate3d(3%, 2%, 0) scale(1.08);
  }
}

@keyframes nebulaDriftB {
  0% {
    transform: translate3d(2%, 1%, 0) scale(1.02);
  }
  100% {
    transform: translate3d(-2%, -3%, 0) scale(1.1);
  }
}

@keyframes levitate {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes orbitRing {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes orbitStar {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.75;
  }
  50% {
    transform: translateY(6px) scale(1.25);
    opacity: 1;
  }
}

@keyframes modalRise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 960px) {
  .site-header {
    border-radius: 18px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero,
  .inside {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero-cover {
    order: -1;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
  }

  .qr-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
  }

  .site-header {
    padding: 0.75rem;
    position: static;
  }

  .button {
    width: 100%;
  }

  .button-small {
    width: auto;
  }

  .cta-row {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .price-box {
    padding: 1.3rem;
  }
}
