:root {
  --bg: #090912;
  --panel: rgba(13, 15, 28, 0.72);
  --panel-strong: rgba(18, 20, 36, 0.92);
  --text: #f5f7ff;
  --muted: rgba(245, 247, 255, 0.72);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #8c7bff;
  --accent-2: #3cf2c4;
  --accent-3: #ff7ad9;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, sans-serif;
  background:
    radial-gradient(circle at 20% 20%, rgba(140, 123, 255, 0.18), transparent 30%),
    radial-gradient(circle at 80% 15%, rgba(60, 242, 196, 0.16), transparent 25%),
    radial-gradient(circle at 50% 85%, rgba(255, 122, 217, 0.16), transparent 32%),
    linear-gradient(135deg, #07070f, #0c1020 40%, #130c1d 100%);
  color: var(--text);
  overflow-x: hidden;
}

#bg-canvas,
.noise {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
}

.noise {
  z-index: -1;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 60px 60px;
  mix-blend-mode: soft-light;
}

.topbar,
.hero,
.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 10, 18, 0.55);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand p,
.brand small,
nav a,
.section-heading p,
.eyebrow,
.stats span,
.hero-card p,
.page-card-top span,
.fine-print,
.cart-summary span,
.summary-line span {
  color: var(--muted);
}

.brand p,
.brand small,
nav a,
button,
input,
label,
li,
p,
h1,
h2,
h3,
strong,
span {
  margin: 0;
}

.brand p {
  font-weight: 700;
  color: var(--text);
}

.brand small {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #090912;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 12px 26px rgba(60, 242, 196, 0.25);
}

nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

nav a {
  text-decoration: none;
  font-weight: 600;
}

nav a:hover,
.hero-actions .secondary-button:hover,
.ghost-button:hover {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  padding: 52px 0 32px;
  align-items: center;
}

.hero-copy h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.95;
  max-width: 10ch;
  margin: 14px 0 18px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 700;
}

.lede {
  max-width: 60ch;
  font-size: 1.06rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.primary-button,
.secondary-button,
.ghost-button {
  font: inherit;
  font-weight: 700;
  border-radius: 999px;
  padding: 14px 18px;
}

.primary-button {
  color: #090912;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 18px 40px rgba(255, 122, 217, 0.25);
}

.secondary-button,
.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

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

.stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.stats div {
  min-width: 120px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  backdrop-filter: blur(14px);
}

.stats strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.hero-panel {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.panel-glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: conic-gradient(from 180deg, rgba(60, 242, 196, 0.28), rgba(140, 123, 255, 0.18), rgba(255, 122, 217, 0.24), rgba(60, 242, 196, 0.28));
  filter: blur(30px);
  animation: pulse 12s ease-in-out infinite;
}

.hero-card,
.catalog-card,
.process-grid article,
.page-card,
.drawer-header,
.cart-summary,
.order-summary,
.checkout-form,
.modal-shell {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.hero-card h2,
.section-heading h2,
.drawer-header h2,
.modal-header h2 {
  font-family: "Playfair Display", serif;
  line-height: 1.02;
}

.hero-card h2 {
  font-size: 2rem;
  margin: 8px 0 16px;
}

.hero-card ul {
  padding-left: 18px;
  line-height: 1.9;
  margin: 0 0 20px;
}

.section {
  padding: 34px 0 24px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 3.1rem);
  margin-top: 8px;
  max-width: 14ch;
}

.section-heading > p {
  max-width: 54ch;
  line-height: 1.7;
}

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

.catalog-card {
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.cover {
  padding: 18px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  isolation: isolate;
}

.cover::before,
.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

.cover::before {
  background: var(--cover-gradient, linear-gradient(135deg, #8c7bff, #3cf2c4));
}

.cover::after {
  background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.28), transparent 30%),
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.2), transparent 28%),
    radial-gradient(circle at 50% 90%, rgba(0, 0, 0, 0.24), transparent 40%);
  mix-blend-mode: soft-light;
}

.badge-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(9, 9, 18, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.cover h3 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  max-width: 9ch;
}

.card-body {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.94rem;
  color: var(--muted);
}

.preview-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-links button {
  flex: 1;
}

.card-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-price strong {
  font-size: 1.2rem;
}

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

.process-grid article,
.page-card,
.order-summary,
.checkout-form {
  border-radius: 24px;
  padding: 22px;
}

.process-grid h3,
.order-summary h3 {
  margin-bottom: 10px;
}

.process-grid p,
.order-summary p,
.process-grid li,
.page-card p,
.checkout-form label,
.checkout-form span {
  line-height: 1.7;
  color: var(--muted);
}

.cart-drawer,
.preview-modal,
.checkout-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center end;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 40;
}

.preview-modal,
.checkout-modal {
  place-items: center;
}

.cart-drawer.open,
.preview-modal.open,
.checkout-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-shell {
  width: min(980px, 100%);
  border-radius: 28px;
  padding: 22px;
  max-height: min(90vh, 920px);
  overflow: auto;
}

.cart-drawer .modal-shell,
.cart-drawer {
  justify-items: end;
}

.cart-drawer .modal-shell {
  width: min(420px, 100%);
}

.drawer-header,
.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
}

.cart-items,
#checkout-items {
  display: grid;
  gap: 12px;
}

.cart-item,
.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.cart-item button {
  align-self: center;
}

.cart-summary,
.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cart-summary {
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: 20px;
}

.wide {
  width: 100%;
}

.preview-meta,
.page-tabs,
.checkout-grid {
  display: grid;
  gap: 16px;
}

.preview-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.preview-meta > div,
.page-tabs button,
.checkout-form label,
.checkout-form input {
  border-radius: 16px;
}

.preview-meta > div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
}

.page-tabs {
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  margin-bottom: 16px;
}

.page-tabs button {
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 700;
}

.page-tabs button.active {
  color: #090912;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
}

.page-viewer {
  display: grid;
}

.page-card {
  min-height: 380px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
}

.page-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 0.88rem;
}

.page-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  margin-bottom: 14px;
}

.page-card p {
  font-size: 1.02rem;
}

.checkout-grid {
  grid-template-columns: 1fr 0.8fr;
}

.checkout-form {
  display: grid;
  gap: 14px;
  align-content: start;
}

.checkout-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.checkout-form input {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
}

.checkbox-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.fine-print {
  font-size: 0.88rem;
  line-height: 1.6;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(10, 12, 22, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 60;
}

@keyframes pulse {
  0%,
  100% { transform: scale(1) rotate(0deg); opacity: 0.6; }
  50% { transform: scale(1.08) rotate(20deg); opacity: 0.9; }
}

@media (max-width: 1080px) {
  .hero,
  .section-heading,
  .checkout-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

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

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

  .preview-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    border-radius: 24px;
    flex-direction: column;
    align-items: stretch;
  }

  nav {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-copy h1 {
    font-size: clamp(2.5rem, 14vw, 4.2rem);
  }

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

  .modal-shell {
    padding: 16px;
    border-radius: 22px;
  }

  .cart-drawer {
    place-items: end stretch;
  }

  .cart-drawer .modal-shell {
    width: 100%;
    max-height: 86vh;
  }
}
