/* ==========================================================================
   MOMORI LANDING PAGE - STYLESHEET
   Design Theme: Warm, Organic, Cozy Storybook with Clean Modern Layout
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Color Palette */
  --bg-main: #fcfaf6;
  --bg-card: #f8f4ee;
  --bg-header-footer: #d7e0e8;
  --bg-header-footer-hover: #c9d5e0;
  
  --color-primary: #452b1a;       /* Deep bark brown */
  --color-secondary: #744b2c;     /* Warm amber brown */
  --color-accent: #d87b38;        /* Autumn orange */
  --color-text: #2e221b;          /* Dark espresso text */
  --color-text-muted: #6e5e54;    /* Muted text */
  --color-border: #e2d8cd;        /* Soft border */
  --color-border-dark: #b8a898;
  
  /* Fonts */
  --font-base: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Comfortaa', 'Montserrat', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-handwritten: 'Caveat', cursive;

  /* Spacing */
  --container-max: 1140px;
  --section-padding: 80px 0;
  --section-padding-mobile: 48px 0;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-subtle: 0 4px 20px rgba(70, 45, 25, 0.06);
  --shadow-hover: 0 10px 30px rgba(70, 45, 25, 0.12);
}

/* --- Reset & Base Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-main);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.text-center {
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section {
  padding: var(--section-padding);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-header-footer);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  transition: background-color var(--transition-smooth);
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header Left: Instagram + Languages */
.header-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Instagram Link */
.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.instagram-link:hover {
  color: var(--color-accent);
  background-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.icon-instagram {
  display: block;
  fill: currentColor;
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.6);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  color: var(--color-text);
  background-color: rgba(255, 255, 255, 0.9);
}

.lang-btn.active {
  color: var(--color-primary);
  background-color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.flag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.flag-icon svg {
  display: block;
}

.lang-divider {
  color: rgba(0, 0, 0, 0.2);
  font-size: 0.75rem;
}

/* Header Right: Navigation Links */
.header-nav .nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-text);
  position: relative;
  padding: 6px 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-smooth);
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.btn-nav-buy {
  background-color: var(--color-primary);
  color: #ffffff !important;
  padding: 8px 22px !important;
  border-radius: 50px !important;
  transition: all var(--transition-fast) !important;
}

.btn-nav-buy::after {
  display: none !important;
}

.btn-nav-buy:hover {
  background-color: #f2af29 !important;
  color: #2e1d10 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(242, 175, 41, 0.4) !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  z-index: 110;
}

.mobile-menu-toggle .bar {
  display: block;
  height: 2.5px;
  width: 100%;
  background-color: var(--color-text);
  border-radius: 3px;
  transition: all var(--transition-fast);
}

.mobile-menu-toggle.active .bar:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}
.mobile-menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* ==========================================================================
   IMAGE PLACEHOLDERS SYSTEM
   ========================================================================== */
.image-box {
  position: relative;
  width: 100%;
  background-color: #f1ede5;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.image-box img.responsive-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-box img.responsive-img:not([src]),
.image-box img.responsive-img[src=""] {
  display: none;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  min-height: inherit;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  background: linear-gradient(135deg, #f5f0e8 0%, #ece5d8 100%);
  border: 2px dashed #d5cabd;
  border-radius: inherit;
  color: var(--color-text-muted);
}

/* Hide placeholder if image has src or has-image class */
.image-box:has(img[src]:not([src=""])) .image-placeholder,
.image-box.has-image .image-placeholder {
  display: none !important;
}

.placeholder-icon {
  color: #a49484;
  display: flex;
  align-items: center;
  justify-content: center;
}

.placeholder-text {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #7b6d61;
}

/* ==========================================================================
   1. HERO SECTION (Full-width, flush with header)
   ========================================================================== */
.hero-section {
  padding: 0;
  margin: 0;
  width: 100%;
  background: #ffffff;
  overflow: hidden;
}

.hero-container {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-image-box {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 2 / 1;
  min-height: unset;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background-color: #ffffff;
}

.hero-image-box img.responsive-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   2. CHARACTERS SECTION (ПРО MOMORI І ЇХ СВІТ)
   ========================================================================== */
.section-characters {
  background-color: var(--bg-main);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-family: var(--font-base);
  font-size: clamp(1.25rem, 2.8vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text);
  text-transform: uppercase;
}

.section-description {
  max-width: 740px;
  margin: 16px auto 0;
  font-size: clamp(0.92rem, 1.15vw, 1.02rem);
  line-height: 1.65;
  color: var(--color-text-muted);
}

.section-tagline {
  margin-top: 10px;
  font-weight: 600;
  color: var(--color-primary);
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.character-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 16px;
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-smooth);
}

.character-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-border-dark);
}

.character-image-box {
  aspect-ratio: 3 / 4;
  min-height: 260px;
  background-color: #faf4eb;
  border-radius: var(--radius-sm);
}

.character-image-box img.responsive-img {
  object-fit: contain;
  background-color: #faf4eb;
}

.character-info {
  padding-top: 14px;
  padding-bottom: 2px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.character-name {
  font-family: var(--font-base);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
}

.character-tree {
  font-family: var(--font-base);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: lowercase;
  margin: 0;
  line-height: 1.2;
}

/* ==========================================================================
   3. BOOK OVERVIEW SECTION («MOMORI ТА ОСІНЬ»)
   ========================================================================== */
.section-book {
  background: linear-gradient(180deg, var(--bg-main) 0%, #f7f1e7 100%);
}

.book-header {
  margin-bottom: 40px;
}

.book-main-title {
  font-family: var(--font-base);
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-text);
  margin-bottom: 8px;
}

.book-subtitle {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.book-panoramic-wrapper {
  max-width: var(--container-max);
  margin: 0 auto;
}

.book-panoramic-box {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  min-height: 320px;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--color-border);
  background-color: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.book-panoramic-box img.responsive-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.book-panoramic-content {
  position: absolute;
  left: calc(17% - 40px);
  top: 8%;
  width: 35%;
  max-width: 400px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;
}

.book-text-inner {
  width: 100%;
}

.book-content-heading {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: 12px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.book-paragraph {
  font-size: clamp(0.86rem, 1.15vw, 0.98rem);
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 12px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   4. BOOK SPREADS / INTERACTIVE 3D FLIPBOOK
   ========================================================================== */
.section-gallery {
  background-color: var(--bg-main);
  padding: var(--section-padding);
}

.gallery-wrapper {
  max-width: var(--container-max);
  margin: 0 auto;
}

.flipbook-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.flipbook-stage {
  position: relative;
  width: 100%;
  max-width: var(--container-max);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3D Book Chassis */
.flipbook-book {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  perspective: 2600px;
  border-radius: 10px;
  background-color: #b39b82;
  box-shadow: 
    0 20px 45px -10px rgba(60, 40, 25, 0.18),
    0 6px 18px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: grab;
}

.flipbook-book:active {
  cursor: grabbing;
}

/* Outer hardcover edge border styling (Soft warm lighter tone) */
.flipbook-book::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 12px;
  background: linear-gradient(135deg, #d8c6b2, #b89f86);
  z-index: 0;
  box-shadow: 0 10px 28px rgba(60, 40, 25, 0.14);
}

/* Static Left Page */
.flipbook-page-left {
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px 0 0 8px;
  background-color: #f7f3ec;
  z-index: 1;
}

.flipbook-page-left img {
  position: absolute;
  left: 0;
  top: 0;
  width: 200%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
}

/* Static Right Page */
.flipbook-page-right {
  position: absolute;
  right: 0;
  top: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  border-radius: 0 8px 8px 0;
  background-color: #f7f3ec;
  z-index: 1;
}

.flipbook-page-right img {
  position: absolute;
  right: 0;
  top: 0;
  width: 200%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
}

/* Hyper-Realistic Book Spine / Gutter Crease */
.flipbook-spine {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 72px;
  transform: translateX(-50%);
  z-index: 15;
  pointer-events: none;
  mix-blend-mode: multiply;
  background: linear-gradient(to right,
    rgba(0, 0, 0, 0) 0%,
    rgba(40, 25, 15, 0.03) 20%,
    rgba(40, 25, 15, 0.08) 38%,
    rgba(30, 18, 10, 0.22) 46%,
    rgba(20, 10, 5, 0.45) 50%,
    rgba(30, 18, 10, 0.22) 54%,
    rgba(40, 25, 15, 0.08) 62%,
    rgba(40, 25, 15, 0.03) 80%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* Crisp central binding seam (physical book fold incision) */
.flipbook-spine::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom,
    rgba(25, 12, 5, 0.5) 0%,
    rgba(30, 15, 8, 0.65) 10%,
    rgba(30, 15, 8, 0.65) 90%,
    rgba(25, 12, 5, 0.5) 100%
  );
  box-shadow: 
    0 0 2px rgba(10, 5, 0, 0.5),
    1px 0 2px rgba(255, 255, 255, 0.25);
  mix-blend-mode: multiply;
}

/* Subtle 3D paper curvature highlight next to the gutter */
.flipbook-spine::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 100%;
  transform: translateX(-50%);
  background: linear-gradient(to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 18%,
    rgba(255, 255, 255, 0) 36%,
    rgba(0, 0, 0, 0) 64%,
    rgba(255, 255, 255, 0.08) 82%,
    rgba(255, 255, 255, 0) 100%
  );
  mix-blend-mode: screen;
}

/* 3D Animated Turning Leaf */
.flipbook-leaf {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  transform-style: preserve-3d;
  z-index: 10;
  pointer-events: none;
  will-change: transform;
  display: none;
}

.flipbook-leaf.turning-next {
  left: 50%;
  transform-origin: left center;
}

.flipbook-leaf.turning-prev {
  left: 0;
  transform-origin: right center;
}

.flipbook-leaf-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background-color: #f7f3ec;
}

.flipbook-leaf-front {
  z-index: 2;
}

.flipbook-leaf-back {
  transform: rotateY(180deg);
  z-index: 1;
}

.flipbook-leaf-face img {
  position: absolute;
  top: 0;
  width: 200%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
}

/* Right half image positioning for leaf front */
.flipbook-leaf.turning-next .flipbook-leaf-front img {
  right: 0;
}
/* Left half image positioning for leaf back */
.flipbook-leaf.turning-next .flipbook-leaf-back img {
  left: 0;
}
/* Left half image positioning for leaf front (prev flip) */
.flipbook-leaf.turning-prev .flipbook-leaf-front img {
  left: 0;
}
/* Right half image positioning for leaf back (prev flip) */
.flipbook-leaf.turning-prev .flipbook-leaf-back img {
  right: 0;
}

/* Dynamic Page Lighting / Shadow Overlay */
.flipbook-leaf-shadow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.1s linear;
  opacity: 0;
}

.flipbook-leaf-front .flipbook-leaf-shadow {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 100%);
}

.flipbook-leaf-back .flipbook-leaf-shadow {
  background: linear-gradient(to left, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Interactive Click / Hover Zones on Left and Right */
.flipbook-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 18;
  cursor: pointer;
}

.flipbook-zone-left {
  left: 0;
  cursor: pointer;
}

.flipbook-zone-right {
  right: 0;
  cursor: pointer;
}

/* Subtle corner curl hint on hover */
.flipbook-corner-hint {
  position: absolute;
  bottom: 12px;
  width: 38px;
  height: 38px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  z-index: 16;
}

.flipbook-corner-hint-left {
  left: 12px;
  background: radial-gradient(circle at bottom left, rgba(0, 0, 0, 0.18), transparent 70%);
  border-bottom-left-radius: 6px;
}

.flipbook-corner-hint-right {
  right: 12px;
  background: radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.18), transparent 70%);
  border-bottom-right-radius: 6px;
}

.flipbook-book:hover .flipbook-corner-hint {
  opacity: 0.6;
}

/* Navigation Arrow Buttons on the Sides */
.flipbook-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  transition: all var(--transition-fast);
  backdrop-filter: blur(4px);
}

.flipbook-prev-btn {
  left: -20px;
}

.flipbook-next-btn {
  right: -20px;
}

.flipbook-nav-btn:hover:not(:disabled) {
  background-color: #f2af29;
  color: #2e1d10;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 18px rgba(242, 175, 41, 0.45);
}

.flipbook-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* Controls Bar: Counter & Interactive Dots */
.flipbook-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  padding: 8px 12px;
}

.flipbook-counter {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

.flipbook-instruction {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.flipbook-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flipbook-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(58, 32, 16, 0.2);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.flipbook-dot.active {
  background-color: var(--color-accent);
  width: 28px;
  border-radius: 12px;
}

.flipbook-dot:hover:not(.active) {
  background-color: rgba(58, 32, 16, 0.5);
}

/* Responsive Styles for Flipbook */
@media (max-width: 992px) {
  .flipbook-prev-btn {
    left: -10px;
  }
  .flipbook-next-btn {
    right: -10px;
  }
}

@media (max-width: 768px) {
  .flipbook-nav-btn {
    width: 38px;
    height: 38px;
  }
  .flipbook-controls {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
}

/* ==========================================================================
   5. BUY OPTIONS SECTION (PDF & AMAZON)
   ========================================================================== */
.section-buy {
  background: linear-gradient(180deg, var(--bg-main) 0%, #f4eee3 100%);
}

.buy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(70px, 14vw, 164px);
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
}

.buy-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.buy-image-box {
  width: 100%;
  aspect-ratio: 742 / 1024;
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--color-border);
  background-color: #fff;
}

.buy-action {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Buy Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 34px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 50px;
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-buy {
  width: 100%;
  max-width: 290px;
  background-color: #ffffff;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-buy:hover {
  background-color: #f2af29;
  color: #2e1d10;
  border-color: #f2af29;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(242, 175, 41, 0.4);
}

/* ==========================================================================
   6. ABOUT THE AUTHOR SECTION
   ========================================================================== */
.section-author {
  background-color: var(--bg-main);
  border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.author-panoramic-wrapper {
  max-width: var(--container-max);
  margin: 0 auto;
}

.author-panoramic-box {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  min-height: 320px;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--color-border);
  background-color: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.author-panoramic-box img.responsive-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.author-panoramic-content {
  position: relative;
  z-index: 2;
  width: 42%;
  max-width: 430px;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 36px 20px 36px clamp(36px, 5.5vw, 58px);
}

.author-text-inner {
  max-width: 420px;
}

.author-title {
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: 14px;
}

.author-bio p {
  font-size: clamp(0.82rem, 1.05vw, 0.92rem);
  color: var(--color-text);
  line-height: 1.58;
  margin-bottom: 10px;
}

/* ==========================================================================
   LEGAL MODALS STYLES
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(26, 17, 10, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-smooth), visibility var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background-color: #ffffff;
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform var(--transition-smooth);
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-primary);
  background-color: rgba(0, 0, 0, 0.05);
}

.modal-body {
  padding: 28px;
  overflow-y: auto;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--color-text);
}

.modal-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 18px 0 8px 0;
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-body p {
  margin-bottom: 14px;
  color: var(--color-text-muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--bg-header-footer);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 36px 0;
  margin-top: 40px;
}

.footer-container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-col {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-link {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-secondary);
  text-decoration: underline;
}

.footer-copyright {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (TABLET & MOBILE)
   ========================================================================== */

/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
  :root {
    --section-padding: 60px 0;
  }

  .characters-grid {
    gap: 20px;
  }

  .book-overview-grid,
  .author-grid {
    gap: 36px;
  }

  .buy-grid {
    gap: 32px;
  }
}

/* Mobile & Small Tablet (max-width: 768px) */
@media (max-width: 768px) {
  :root {
    --section-padding: var(--section-padding-mobile);
  }

  .header-container,
  .container,
  .footer-container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .header-container {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .header-left {
    gap: 16px;
  }

  .instagram-label {
    display: none; /* Icon only on small screens */
  }

  /* Hamburger Menu */
  .mobile-menu-toggle {
    display: flex;
  }

  .header-nav {
    position: fixed;
    top: 57px;
    left: 0;
    width: 100%;
    background-color: var(--bg-header-footer);
    padding: 24px 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-smooth);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .header-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .header-nav .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .nav-link {
    font-size: 1rem;
  }

  /* 1-column characters on mobile */
  .characters-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin: 0 auto;
    gap: 28px;
  }

  /* Panoramic Sections Mobile Adaptations */
  .book-panoramic-box,
  .author-panoramic-box {
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
  }

  .book-panoramic-box img.responsive-img,
  .author-panoramic-box img.responsive-img {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: cover;
  }

  .book-panoramic-content,
  .author-panoramic-content {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    padding: 24px 20px;
    background-color: var(--bg-card);
  }

  .book-text-inner,
  .author-text-inner {
    max-width: 100%;
  }

  /* 1-column buy section on mobile */
  .buy-grid {
    grid-template-columns: 1fr;
    max-width: 395px;
    gap: 36px;
  }

  /* Footer wrap on mobile */
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .footer-col {
    flex-direction: column;
    gap: 12px;
  }
}

/* Extra Small (max-width: 420px) */
@media (max-width: 420px) {
  .hero-title {
    font-size: 2.6rem;
  }

  .lang-btn {
    padding: 3px 6px;
    font-size: 0.72rem;
  }
}
