:root, .theme-amber {
  --bg: #07090d;
  --bg-elev: #0e1520;
  --text: #e8eef5;
  --muted: #9aa8b8;
  --accent: #e8a838;
  --accent-dim: rgba(232, 168, 56, 0.15);
  --line: rgba(232, 238, 245, 0.12);
  --danger: #e85a5a;
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --radius: 2px;
  --max: 1100px;
}

.theme-cyan {
  --accent: #3db8c5;
  --accent-dim: rgba(61, 184, 197, 0.15);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--accent-dim), transparent 55%),
    linear-gradient(180deg, var(--bg-elev), var(--bg) 40%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 1.05rem;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.site-header {
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 9, 13, 0.85);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.9rem 0;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  text-decoration: none;
  font-size: 1.15rem;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 0.85rem 1.1rem; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav a:hover, .nav a.active { color: var(--text); }
.lang-switch { display: flex; gap: 0.4rem; margin-left: 0.5rem; }
.lang-switch a {
  border: 1px solid var(--line);
  padding: 0.15rem 0.45rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
}
.lang-switch a.on { border-color: var(--accent); color: var(--accent); }

.hero {
  padding: 4.5rem 0 3rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: end;
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  font-weight: 550;
}
.hero p.lead { color: var(--muted); font-size: 1.15rem; max-width: 36ch; margin: 0 0 1.75rem; }
.hero-photo {
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: #000;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05); }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #111;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.95rem;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

section.block { padding: 3rem 0; border-top: 1px solid var(--line); }
section.block h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  margin: 0 0 1.25rem;
  font-weight: 550;
}

.book-feature {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 700px) { .book-feature { grid-template-columns: 1fr; } }
.cover {
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.cover img { width: 100%; }
.muted { color: var(--muted); }
.tagline { color: var(--accent); font-size: 0.95rem; margin: 0.25rem 0 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.chip {
  border: 1px solid var(--line);
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.chip.on { border-color: var(--accent); color: var(--accent); }

.offer-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.offer-table th, .offer-table td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.offer-table th { color: var(--muted); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; }

.grid-books {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
}
.book-card a { color: inherit; text-decoration: none; }
.book-card a:hover .title { color: var(--accent); }
.book-card .title { font-family: var(--font-display); margin-top: 0.75rem; font-size: 1.05rem; }

.author-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
}
@media (max-width: 700px) { .author-grid { grid-template-columns: 1fr; } }
.author-grid .photo { border: 1px solid var(--line); background: #000; }
.author-grid .photo img { width: 100%; }

.project-list { list-style: none; padding: 0; margin: 0; }
.project-list li {
  border: 1px solid var(--line);
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
}
.project-list .status { color: var(--accent); font-size: 0.85rem; margin-bottom: 0.35rem; }

.form { display: grid; gap: 0.85rem; max-width: 520px; }
.form label { display: grid; gap: 0.35rem; font-size: 0.9rem; color: var(--muted); }
.form input, .form textarea, .form select {
  background: #0a0e14;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.65rem 0.75rem;
  font: inherit;
  border-radius: var(--radius);
}
.form textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.flash { padding: 0.75rem 1rem; border: 1px solid var(--accent); background: var(--accent-dim); margin-bottom: 1rem; max-width: 520px; }
.flash.err { border-color: var(--danger); }

.socials { display: flex; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; align-items: center; }
.socials > span:first-child { color: var(--muted); margin-right: 0.25rem; }
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0.35rem 0.7rem;
  transition: border-color .15s, color .15s;
}
.social-link:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.icon-social, .icon-store {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.icon-social svg, .icon-store svg { width: 100%; height: 100%; display: block; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}
.offer-table .btn-buy {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

.audio-banner {
  border: 1px dashed var(--accent);
  background: var(--accent-dim);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
}

.jg-modal {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  padding: 0;
  max-width: min(92vw, 440px);
  width: 100%;
}
.jg-modal::backdrop { background: rgba(0,0,0,0.65); }
.jg-modal-card { margin: 0; padding: 1.25rem 1.35rem 1.5rem; }
.jg-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.jg-modal-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.35rem; font-weight: 550; }
.jg-modal-x {
  background: transparent; border: 0; color: var(--muted); font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.jg-modal-x:hover { color: var(--accent); }
.jg-sample-formats { border: 1px solid var(--line); padding: 0.75rem 1rem; margin: 0; }
.jg-sample-formats legend { padding: 0 0.35rem; color: var(--muted); font-size: 0.85rem; }
.form label.jg-radio,
.jg-radio {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  margin: 0.45rem 0;
  color: var(--text);
  font-size: 0.95rem;
}
.jg-radio input[type="radio"] {
  accent-color: var(--accent);
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  margin: 0;
}
.jg-audio-modal { max-width: min(92vw, 360px); }
.jg-audio-card { padding: 1.1rem 1.15rem 1.25rem; }
.jg-audio-body { display: grid; gap: 1rem; }
.jg-audio-cover {
  width: min(100%, 240px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  margin-inline: auto;
  display: block;
}
.jg-audio-book { font-family: var(--font-display); font-size: 1.05rem; }
.jg-audio-track { color: var(--accent); margin: 0.25rem 0 0.85rem; font-size: 0.95rem; }
.jg-audio-progress input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}
.jg-audio-times {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}
.jg-audio-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
}
.jg-audio-btn { min-width: 2.75rem; padding: 0.55rem 0.75rem; font-size: 1rem; }
.jg-audio-play { min-width: 3.4rem; }
