/* Perseus storefront — light default with dark toggle; extends site.css tokens */

:root {
  /* Light theme (default) */
  --bg: #ffffff;
  --bg-alt: #f7f8fb;
  --panel: #ffffff;
  --line: #e6e8ef;
  --line-hover: #cfd3de;
  --text: #0e1321;
  --text-soft: #2a3144;
  --muted: #6b7385;
  --accent: #b08b2e;           /* slightly darker gold, legible on white */
  --accent-hover: #8d6e20;
  --accent-soft: rgba(176, 139, 46, 0.08);
  --blue: #2a5cc6;
  --blue-soft: rgba(42, 92, 198, 0.08);
  --success: #1c7a4a;
  --shadow: 0 4px 18px rgba(14, 19, 33, 0.06);
  --shadow-lg: 0 16px 48px rgba(14, 19, 33, 0.10);
  --radius: 14px;
  --radius-sm: 8px;
}

[data-theme="dark"] {
  --bg: #0a0f1a;
  --bg-alt: #0f1524;
  --panel: rgba(12, 18, 30, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --line-hover: rgba(255, 255, 255, 0.16);
  --text: #f0f2f5;
  --text-soft: #e0e3eb;
  --muted: #8a95a8;
  --accent: #c9a84c;
  --accent-hover: #d5b862;
  --accent-soft: rgba(201, 168, 76, 0.12);
  --blue: #5b8ad4;
  --blue-soft: rgba(91, 138, 212, 0.10);
  --success: #5ee09b;
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.40);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img, video { max-width: 100%; height: auto; display: block; }

body {
  color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mono, .badge, .section-label, .price-unit {
  font-family: "JetBrains Mono", "Consolas", monospace;
}

.page {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 20px 0 72px;
}

/* ── Top bar ────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 48px;
}

.brand {
  color: var(--text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand strong {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-sub {
  font-family: "JetBrains Mono", monospace;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.nav a, .nav button, .theme-toggle, .lang-link {
  color: var(--text-soft);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
  font-family: inherit;
}

.nav a:hover, .nav a.active, .lang-link:hover, .theme-toggle:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.nav a.active {
  color: var(--accent);
}

.theme-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border: 1px solid var(--line);
}

.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  color: var(--text);
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.92rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover { border-color: var(--line-hover); transform: translateY(-1px); }

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(176, 139, 46, 0.25);
}

.btn.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn.large { padding: 14px 28px; font-size: 1rem; }

.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 32px;
  margin-bottom: 48px;
  align-items: stretch;
}

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

.hero-copy .section-label {
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 14px 0 14px;
}

.hero-lead {
  font-size: 1.08rem;
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 56ch;
}

.hero-cta-row {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.trust-row {
  margin-top: 28px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.86rem;
}

.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row span::before { content: "•"; color: var(--accent); }

/* ── Product grid (index page) ──────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.product-card .section-label {
  color: var(--accent);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-card h2 {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.product-card p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.product-card .footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.product-card .price-mini {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.product-card .price-amount {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.product-card .price-unit {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Product detail page ────────────────────────────────── */
.product-detail {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 32px;
  margin-bottom: 48px;
}

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

.detail-body > * + * { margin-top: 36px; }

.section-title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

/* ── Feature list ──────────────────────────────────────── */
.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 24px;
}

.feature-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text);
  font-size: 0.93rem;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ── Pricing card ──────────────────────────────────────── */
.pricing-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 24px;
}

.billing-toggle {
  display: inline-flex;
  background: var(--bg-alt);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
}

.billing-toggle button {
  background: transparent;
  border: 0;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.billing-toggle button.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.billing-toggle button .save {
  color: var(--success);
  font-size: 0.7rem;
  margin-left: 4px;
}

.price-big {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.price-big .amount {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.price-big .unit {
  font-size: 0.95rem;
  color: var(--muted);
}

.price-sub {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.price-includes {
  list-style: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.price-includes li {
  padding: 3px 0;
  display: flex;
  gap: 8px;
}

.price-includes li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}

.note-box {
  background: var(--accent-soft);
  border: 1px solid rgba(176, 139, 46, 0.2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-size: 0.88rem;
  margin-top: 16px;
}

.note-box strong { color: var(--accent); }

/* ── Media slider (screenshots + video) ────────────────── */
.media-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
}

.media-track {
  display: flex;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  scroll-behavior: smooth;
  height: 100%;
  scrollbar-width: none;
}

.media-track::-webkit-scrollbar { display: none; }

.media-track > figure {
  flex: 0 0 100%;
  scroll-snap-align: start;
  margin: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  position: relative;
}

.media-track img, .media-track video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: linear-gradient(135deg, var(--bg-alt) 25%, transparent 25%, transparent 50%, var(--bg-alt) 50%, var(--bg-alt) 75%, transparent 75%, transparent) 0 0 / 20px 20px;
}

.media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #0e1321;
  border: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 300;
  transition: background 0.15s;
}

[data-theme="dark"] .media-nav {
  background: rgba(20, 25, 40, 0.9);
  color: var(--text);
}

.media-nav:hover { background: var(--accent); color: #fff; }
.media-nav.prev { left: 16px; }
.media-nav.next { right: 16px; }

.media-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.media-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 0;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}

[data-theme="dark"] .media-dots button {
  background: rgba(255, 255, 255, 0.3);
}

.media-dots button.active { background: var(--accent); }

.media-caption {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: "JetBrains Mono", monospace;
  pointer-events: none;
}

/* ── FAQ / small blocks ────────────────────────────────── */
.faq {
  display: grid;
  gap: 10px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  background: var(--panel);
}

.faq details[open] { border-color: var(--accent); }

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 300;
  transition: transform 0.2s;
}

.faq details[open] summary::after { transform: rotate(45deg); }

.faq p {
  color: var(--text-soft);
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ── Footer ───────────────────────────────────────────── */
.site-footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 16px;
}

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