/*
Theme Name: MnemoBooks
Theme URI: https://mnemobooks.com
Author: Dmitri Saren
Author URI: https://mnemobooks.com
Description: Custom theme for MnemoBooks — Learn Languages Through Stories. 1111 Russian Words in 85 Short Stories.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: mnemobooks
*/

:root {
  --navy: #1E2D50;
  --navy-light: #2B3A67;
  --red: #C23B22;
  --red-hover: #A83020;
  --cream: #F5F0DC;
  --cream-dark: #E8E0C8;
  --white: #FEFCF5;
  --text-dark: #1A1A2E;
  --text-muted: #5A5A6E;
  --gold: #C9A84C;
}

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

body {
  font-family: 'Source Sans 3', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  overflow-x: hidden;
}

/* ========== NAVIGATION ========== */
/* WordPress admin bar offset */
body.admin-bar .site-nav { top: 32px; }
body.admin-bar .hero,
body.admin-bar .book-hero,
body.admin-bar .audio-page-hero,
body.admin-bar .about-hero { padding-top: 102px; }

@media screen and (max-width: 782px) {
  body.admin-bar .site-nav { top: 46px; }
  body.admin-bar .hero,
  body.admin-bar .book-hero,
  body.admin-bar .audio-page-hero,
  body.admin-bar .about-hero { padding-top: 116px; }
}

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(30, 45, 80, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s ease;
}

.site-nav.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--cream);
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--red);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 18px;
  color: white;
  transform: rotate(-3deg);
}

.nav-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
  gap: 0.3rem;
  list-style: none;
  align-items: center;
}

.nav-menu a {
  color: rgba(245, 240, 220, 0.75);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a,
.nav-menu .current_page_item a {
  color: var(--cream);
  background: rgba(255,255,255,0.1);
}

.nav-cta {
  background: var(--red) !important;
  color: white !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--red-hover) !important;
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: 0.3s;
  display: block;
}

/* ========== BUTTONS ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--red);
  color: white;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 15px rgba(194, 59, 34, 0.3);
}

.btn-primary:hover {
  background: var(--red-hover);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(194, 59, 34, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--cream);
  padding: 0.9rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: var(--cream);
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-light) 55%, #3A4F7A 100%);
  position: relative;
  overflow: hidden;
  padding-top: 70px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(194, 59, 34, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-deco {
  position: absolute;
  font-family: 'Playfair Display', serif;
  color: rgba(255,255,255,0.03);
  font-size: 20vw;
  font-weight: 900;
  pointer-events: none;
  user-select: none;
}
.hero-deco-1 { top: 5%; left: -5%; transform: rotate(-12deg); }
.hero-deco-2 { bottom: -10%; right: -5%; transform: rotate(8deg); font-size: 25vw; }

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content { animation: fadeSlideUp 0.8s ease-out; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(194, 59, 34, 0.15);
  border: 1px solid rgba(194, 59, 34, 0.3);
  color: #F0A090;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 900;
  color: var(--cream);
  line-height: 1.1;
  margin-bottom: 1.2rem;
  letter-spacing: -1px;
}

.hero h1 em {
  font-style: italic;
  color: var(--red);
}

.hero-text {
  color: rgba(245, 240, 220, 0.7);
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-book {
  display: flex;
  justify-content: center;
  animation: fadeSlideUp 0.8s ease-out 0.2s both;
}

.book-3d {
  position: relative;
  perspective: 1200px;
}

.book-3d img {
  width: 320px;
  max-width: 90%;
  border-radius: 8px;
  box-shadow: 20px 20px 60px rgba(0,0,0,0.4), -5px -5px 20px rgba(255,255,255,0.05);
  transform: rotateY(-8deg) rotateX(2deg);
  transition: transform 0.5s ease;
}

.book-3d:hover img {
  transform: rotateY(-2deg) rotateX(0deg);
}

/* ========== FEATURES STRIP ========== */
.features-strip {
  background: var(--cream);
  padding: 4rem 2rem;
}

.features-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.04);
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1.2rem;
  transform: rotate(-3deg);
}

.feature-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: var(--navy);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ========== METHOD SECTION ========== */
.method-section {
  padding: 6rem 2rem;
  background: var(--white);
}

.method-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--red);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 650px;
  margin: 0 auto 3rem;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: left;
}

.method-step {
  padding: 2rem;
  background: var(--cream);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.method-step::before {
  content: attr(data-step);
  position: absolute;
  top: -10px;
  right: -5px;
  font-family: 'Playfair Display', serif;
  font-size: 6rem;
  font-weight: 900;
  color: rgba(30, 45, 80, 0.05);
  line-height: 1;
}

.method-step h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 0.6rem;
}

.method-step p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ========== CTA SECTION ========== */
.cta-section {
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(194,59,34,0.06), transparent 70%);
}

.cta-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: var(--cream);
  margin-bottom: 1rem;
  position: relative;
}

.cta-section p {
  color: rgba(245, 240, 220, 0.65);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  position: relative;
}

.cta-section .btn-primary { position: relative; }

/* ========== BOOK PAGE ========== */
.book-hero {
  padding: 8rem 2rem 4rem;
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-light) 55%, #3A4F7A 100%);
}

.book-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 4rem;
  align-items: center;
}

.book-cover-display img {
  width: 300px;
  border-radius: 8px;
  box-shadow: 20px 20px 60px rgba(0,0,0,0.4);
}

.book-info h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
  line-height: 1.15;
}

.book-info .author {
  color: rgba(245,240,220,0.6);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.book-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.book-meta-tag {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  color: var(--cream);
  font-size: 0.85rem;
  font-weight: 500;
}

.book-description {
  color: rgba(245,240,220,0.7);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 550px;
}

.book-features-section {
  padding: 5rem 2rem;
  background: var(--white);
}

.book-features-inner {
  max-width: 900px;
  margin: 0 auto;
}

.book-feature-list {
  list-style: none;
  display: grid;
  gap: 1.5rem;
}

.book-feature-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--cream);
  border-radius: 12px;
}

.book-feature-item .icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--navy);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.book-feature-item h4 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  margin-bottom: 0.3rem;
}

.book-feature-item p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ========== AUDIO PAGE ========== */
.audio-page-hero {
  padding: 8rem 2rem 3rem;
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-light) 100%);
  text-align: center;
}

.audio-page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--cream);
  margin-bottom: 0.8rem;
}

.audio-page-hero p {
  color: rgba(245,240,220,0.65);
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto;
}

.audio-section {
  padding: 3rem 2rem 5rem;
  background: var(--white);
}

.audio-inner {
  max-width: 800px;
  margin: 0 auto;
}

.audio-chapter-group { margin-bottom: 2.5rem; }

.audio-chapter-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--cream);
}

.audio-track {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  margin-bottom: 0.3rem;
  transition: all 0.2s;
  cursor: pointer;
}

.audio-track:hover { background: var(--cream); }
.audio-track.playing { background: var(--cream); }

.audio-track-num {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.audio-track-info { flex: 1; }

.audio-track-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.audio-track-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.audio-track-duration {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.audio-play-btn {
  width: 36px;
  height: 36px;
  background: var(--red);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 0.8rem;
}

.audio-play-btn:hover {
  background: var(--red-hover);
  transform: scale(1.1);
}

/* ========== ABOUT PAGE ========== */
.about-hero {
  padding: 8rem 2rem 4rem;
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-light) 100%);
  text-align: center;
}

.about-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--cream);
  margin-bottom: 0.8rem;
}

.about-hero > p {
  color: rgba(245,240,220,0.65);
  font-size: 1.1rem;
}

.about-content {
  padding: 4rem 2rem;
  background: var(--white);
}

.about-inner {
  max-width: 750px;
  margin: 0 auto;
}

.about-inner h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 1rem;
  margin-top: 2.5rem;
}

.about-inner h2:first-child { margin-top: 0; }

.about-inner p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.contact-card {
  background: var(--cream);
  border-radius: 16px;
  padding: 2.5rem;
  margin-top: 3rem;
  text-align: center;
}

.contact-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.contact-card a {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.contact-card a:hover { text-decoration: underline; }

/* ========== LEGAL FOOTER ========== */
.site-footer {
  background: var(--navy);
  padding: 3rem 2rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand span {
  font-family: 'Playfair Display', serif;
  color: var(--cream);
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-copy {
  color: rgba(245,240,220,0.4);
  font-size: 0.85rem;
}

.footer-legal {
  width: 100%;
  text-align: center;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: rgba(245,240,220,0.3);
  font-size: 0.78rem;
  line-height: 1.6;
}

.footer-menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-menu a {
  color: rgba(245,240,220,0.5);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-menu a:hover { color: var(--cream); }

/* ========== ANIMATIONS ========== */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .hero-text { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .method-steps { grid-template-columns: 1fr; }
  .book-hero-inner { grid-template-columns: 1fr; text-align: center; }
  .book-description { margin-left: auto; margin-right: auto; }
  .book-meta { justify-content: center; }
}

@media (max-width: 600px) {
  .nav-menu { display: none; }
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .hamburger { display: flex; }
  .features-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .book-3d img { width: 220px; }
}
