:root {
  --bg: #02060f;
  --bg-2: #07122a;
  --card: #0a1a3a;
  --line: #17306a;
  --blue: #1e6bff;
  --cyan: #4cc3ff;
  --steel: #c9d3e3;
  --text: #eaf1ff;
  --muted: #8fa3c8;
  --ok: #2fd08a;
  --warn: #ffb02e;
  --danger: #ff5d6c;
  --radius: 14px;
  --glow: 0 0 0 1px rgba(76, 195, 255, 0.35), 0 8px 40px rgba(30, 107, 255, 0.35);
}

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

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #0b2766 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Rajdhani', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(12px);
  background: rgba(2, 6, 15, 0.78);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.35rem; letter-spacing: 0.04em; }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.spacer { flex: 1; }
.nav a { color: var(--steel); margin-inline: 10px; font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 10px 18px; border-radius: 10px; font: 600 0.95rem 'Inter', sans-serif; cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.btn:hover { border-color: var(--cyan); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, #2f86ff, #1456e6); border-color: #5cb0ff; box-shadow: var(--glow); }
.btn-primary:hover { box-shadow: 0 0 0 1px var(--cyan), 0 10px 44px rgba(30, 107, 255, 0.55); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }

.cart-btn .count {
  background: var(--cyan); color: #02122e; border-radius: 99px; min-width: 20px; height: 20px;
  display: inline-grid; place-items: center; font-size: .75rem; font-weight: 800; padding: 0 6px;
}

/* ---------- hero ---------- */
.hero { padding: 48px 0 24px; text-align: center; }
.hero img.logo { width: min(420px, 80%); height: auto; margin: 0 auto 8px; filter: drop-shadow(0 0 40px rgba(30, 107, 255, 0.6)); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.hero p { color: var(--muted); max-width: 640px; margin: 12px auto 24px; font-size: 1.1rem; }

.section { padding: 40px 0; }
.section > .wrap > h2, .section > h2 { font-size: 2rem; margin-bottom: 24px; }
.section h2 span { color: var(--cyan); }

/* ---------- catalog ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  background: linear-gradient(180deg, var(--card), #06122b);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); border-color: var(--cyan); box-shadow: var(--glow); }
.card .cover { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; }
.card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 1.5rem; }
.card p { color: var(--muted); margin: 0; flex: 1; }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.card.soon { border-style: dashed; align-items: center; justify-content: center; text-align: center; padding: 32px; color: var(--muted); min-height: 280px; }
.card.soon:hover { transform: none; box-shadow: none; border-color: var(--line); }
.card.soon .big { font-size: 2.4rem; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700; background: rgba(76, 195, 255, .14); color: var(--cyan); border: 1px solid rgba(76, 195, 255, .35); }
.badge.hot { background: rgba(255, 176, 46, .14); color: var(--warn); border-color: rgba(255, 176, 46, .4); }
.price { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.5rem; }
.price small { color: var(--muted); font-weight: 500; font-size: .8rem; font-family: 'Inter', sans-serif; margin-left: 4px; }

/* ---------- steps ---------- */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(180deg, #2f86ff, #1456e6); margin-bottom: 10px; font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; }
.step p { color: var(--muted); margin: 4px 0 0; }

/* ---------- product page ---------- */
.product-top { display: grid; gap: 28px; grid-template-columns: 1.1fr 1fr; padding: 32px 0; align-items: start; }
.product-top .cover { width: 100%; max-width: 520px; aspect-ratio: 1 / 1; object-fit: contain; filter: drop-shadow(0 0 36px rgba(30, 107, 255, 0.45)); }
.product-top h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 10px 0; }
.product-top p.lead { color: var(--muted); font-size: 1.1rem; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.crumbs { color: var(--muted); padding-top: 20px; font-size: .9rem; }

.editions { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.edition { position: relative; background: linear-gradient(180deg, var(--card), #06122b); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.edition.featured { border-color: var(--cyan); box-shadow: var(--glow); }
.edition .tag { position: absolute; top: -12px; right: 16px; }
.edition h3 { font-size: 1.8rem; }
.edition .pitch { color: var(--muted); margin: 0; }
.edition ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; flex: 1; }
.edition li { padding-left: 26px; position: relative; font-size: .95rem; }
.edition li::before { content: '✔'; position: absolute; left: 0; color: var(--ok); font-weight: 800; }
.edition .includes { color: var(--cyan); font-weight: 700; font-size: .95rem; }
.edition .actions { display: grid; gap: 8px; }

.prose h1 { font-size: 2.4rem; margin-bottom: 16px; }
.prose li { margin-bottom: 10px; max-width: 760px; }
.note { color: var(--muted); font-size: .9rem; margin: 16px 0 0; }
.note a { color: var(--muted); text-decoration: underline; }
.prose p { color: var(--steel); max-width: 760px; }
.prose ul { color: var(--steel); padding-left: 20px; }
.install { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--steel); }
.install code { background: #02060f; border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; color: var(--cyan); word-break: break-all; }

/* ---------- cart drawer / modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); background: var(--bg-2); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .25s; z-index: 50; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer header h3 { font-size: 1.5rem; }
.drawer .items { flex: 1; overflow: auto; padding: 12px 16px; display: grid; gap: 12px; align-content: start; }
.drawer footer { padding: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.line img { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; }
.line small { color: var(--muted); display: block; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.2rem; padding: 4px 8px; }
.icon-btn:hover { color: var(--danger); }
.total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.97); width: min(460px, calc(100% - 32px)); background: var(--bg-2); border: 1px solid var(--cyan); box-shadow: var(--glow); border-radius: var(--radius); padding: 22px; z-index: 60; opacity: 0; pointer-events: none; transition: .18s; }
.modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.modal h3 { font-size: 1.7rem; margin-bottom: 12px; }
.modal label { display: block; font-weight: 600; margin: 12px 0 6px; }
.modal input[type=email] { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: #02060f; color: var(--text); font: inherit; }
.modal input[type=email]:focus { outline: 2px solid var(--cyan); border-color: transparent; }
.modal .check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; color: var(--muted); font-size: .88rem; }
.modal .check input { margin-top: 4px; }
.modal .actions { display: grid; gap: 8px; margin-top: 16px; }
.error { color: var(--danger); min-height: 1.2em; margin: 8px 0 0; font-size: .9rem; }

/* ---------- thanks page ---------- */
.status-box { max-width: 640px; margin: 48px auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center; }
.status-box h1 { font-size: 2.2rem; margin-bottom: 8px; }
.status-box p { color: var(--muted); }
.status-box .downloads { display: grid; gap: 10px; margin: 20px 0 4px; text-align: left; }
.spinner { width: 36px; height: 36px; border: 4px solid var(--line); border-top-color: var(--cyan); border-radius: 50%; margin: 12px auto; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.site-footer .links a { margin-right: 16px; }

@media (max-width: 800px) {
  .product-top { grid-template-columns: minmax(0, 1fr); }
  .editions { grid-template-columns: minmax(0, 1fr); }
  .nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 0s !important; }
}
