/* ==========================================================================
   STJEPAN MIJAT ZANINOVIĆ — IHNEUMON
   LUXURY EDITORIAL BOOK EXPERIENCE
   - Magazine-grade typography (Bodoni Moda & Playfair Display)
   - Integrated Ihneumon infinity brand logo
   - Sea landscape front cover with gilded foil debossing
   - Authentic Black & White author photography
   - Fullscreen book proportions (no dividing center gutter)
   - Vertical edge page-turners ("Prethodna stranica" & "Sljedeća stranica")
   - Authentic woven bookmark ribbon cord ("MENI")
   - Realistic page turn curl dynamics and paper stack depth
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,500;0,6..96,600;0,6..96,700;0,6..96,800;0,6..96,900;1,6..96,400;1,6..96,600;1,6..96,700&family=Cinzel:wght@500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,600;1,700&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Desk & Ambient Lighting */
  --desk-bg: #0e0f13;
  --desk-gradient: radial-gradient(circle at 50% 30%, #161820 0%, #0a0b0e 70%, #040507 100%);

  /* Hardcover Leather & Foil */
  --cover-leather: #121820;
  --cover-leather-grad: linear-gradient(140deg, #18222e 0%, #0e151e 50%, #080c12 100%);
  --cover-border: #233142;
  --cover-gold: #d4af37;
  --cover-gold-light: #fae48c;
  --cover-gold-dark: #987820;
  --cover-gold-glow: rgba(212, 175, 55, 0.4);
  --cover-emboss-shadow: rgba(0, 0, 0, 0.85);

  /* Archival Museum Paper */
  --paper-bg: #fcf9f2;
  --paper-bg-warm: #f6f0e4;
  --paper-border: #e3dcce;
  --paper-line: #e8e2d4;
  --paper-shadow: rgba(26, 22, 16, 0.1);
  --page-stack-color: #ebe4d6;

  /* Editorial Ink */
  --ink-primary: #181715;
  --ink-secondary: #3b3832;
  --ink-muted: #69655d;
  --ink-faint: #9c978e;
  
  /* Brand Accent */
  --brand-crimson: #b8143a;
  --brand-crimson-dark: #7a0c25;
  --ribbon-cord: #b8143a;
  --ribbon-gold-trim: #d4af37;

  /* Luxury Magazine Typography */
  --font-editorial: 'Bodoni Moda', 'Playfair Display', Didot, Georgia, serif;
  --font-serif: 'Playfair Display', 'Bodoni Moda', serif;
  --font-cover: 'Cinzel', 'Bodoni Moda', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Book Geometry */
  --book-width: 96vw;
  --book-max-width: 1260px;
  --book-height: 90vh;
  --book-min-height: 720px;
  --edge-turner-width: 52px;

  /* Animations */
  --transition-page: 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-ui: 0.22s ease;
}

/* Dark Mode / Midnight Leather Edition */
[data-theme="dark"] {
  --desk-bg: #060709;
  --desk-gradient: radial-gradient(circle at 50% 30%, #101319 0%, #050608 70%, #010203 100%);

  --cover-leather: #0b0e14;
  --cover-leather-grad: linear-gradient(140deg, #121721 0%, #080b10 50%, #030406 100%);
  --cover-border: #1d2735;
  --cover-gold: #e2c05e;
  --cover-gold-light: #fae7a0;
  --cover-gold-dark: #ad8c2e;
  --cover-gold-glow: rgba(226, 192, 94, 0.38);

  --paper-bg: #151920;
  --paper-bg-warm: #11141a;
  --paper-border: #232b37;
  --paper-line: #1e2530;
  --paper-shadow: rgba(0, 0, 0, 0.55);
  --page-stack-color: #1a202a;

  --ink-primary: #ede8dc;
  --ink-secondary: #c9c3b4;
  --ink-muted: #8e887a;
  --ink-faint: #5b564c;
}

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

html, body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  background-color: var(--desk-bg);
  background-image: var(--desk-gradient);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Desk Controls (Sound & Theme Toggle) */
.desk-bar {
  position: fixed;
  top: 12px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  background: rgba(14, 17, 22, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 5px 12px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.desk-btn {
  background: transparent;
  border: none;
  color: #c9d1d9;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-ui);
  user-select: none;
}

.desk-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.desk-btn.active {
  color: var(--cover-gold-light);
  background: rgba(212, 175, 55, 0.2);
}

/* ==========================================================================
   THE BOOK STAGE & IMMERSIVE CASING
   ========================================================================== */
.desk-viewport {
  width: 100%;
  min-height: 100vh;
  padding: 18px 12px 28px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 2200px;
}

.book-stage {
  position: relative;
  width: var(--book-width);
  max-width: var(--book-max-width);
  min-height: var(--book-min-height);
  display: flex;
  justify-content: center;
  align-items: stretch;
  z-index: 10;
  margin: auto;
}

/* Hardcover Frame & Depth */
.book-casing {
  position: relative;
  width: 100%;
  min-height: var(--book-min-height);
  background: var(--paper-bg);
  border-radius: 8px;
  box-shadow: 
    0 35px 90px rgba(0, 0, 0, 0.8),
    0 12px 35px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(0, 0, 0, 0.18);
  display: flex;
  overflow: visible;
  transition: background-color var(--transition-ui);
}

/* Hardcover Leather Rim */
.book-casing::before {
  content: '';
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: -10px;
  right: -10px;
  background: var(--cover-border);
  background-image: var(--cover-leather-grad);
  border-radius: 12px;
  z-index: -2;
  box-shadow: 
    0 40px 100px rgba(0, 0, 0, 0.85),
    inset 0 1px 1px rgba(255, 255, 255, 0.18);
}

/* Layered Paper Stack Visual on Sides */
.page-stack-visual-left,
.page-stack-visual-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  pointer-events: none;
  z-index: 4;
  transition: all 0.35s ease;
}

.page-stack-visual-left {
  left: -12px;
  background: repeating-linear-gradient(
    to right,
    rgba(0, 0, 0, 0.28) 0px,
    var(--page-stack-color) 1px,
    var(--paper-border) 2px
  );
  border-radius: 4px 0 0 4px;
  box-shadow: inset 2px 0 4px rgba(0,0,0,0.35);
}

.page-stack-visual-right {
  right: -12px;
  background: repeating-linear-gradient(
    to left,
    rgba(0, 0, 0, 0.28) 0px,
    var(--page-stack-color) 1px,
    var(--paper-border) 2px
  );
  border-radius: 0 4px 4px 0;
  box-shadow: inset -2px 0 4px rgba(0,0,0,0.35);
}

/* When book is closed (Front Cover): Left edge is the book spine ("hrbat knjige") */
.book-casing.book-closed-front .page-stack-visual-left {
  left: -16px;
  width: 16px;
  background: 
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 68px,
      rgba(212, 175, 55, 0.45) 69px,
      rgba(250, 228, 140, 0.7) 70px,
      rgba(0, 0, 0, 0.85) 72px,
      transparent 74px
    ),
    linear-gradient(
      to right,
      #05080c 0%,
      #101720 18%,
      #1c293a 42%,
      #2a3b52 58%,
      #15202c 82%,
      #080c11 100%
    );
  border-radius: 10px 0 0 10px;
  border-right: 1px solid rgba(0, 0, 0, 0.75);
  border-left: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 
    inset 1px 0 2px rgba(255, 255, 255, 0.22),
    inset -2px 0 5px rgba(0, 0, 0, 0.85),
    -7px 0 18px rgba(0, 0, 0, 0.75);
  z-index: 5;
}

/* When book is closed at the back: Right edge is the book spine */
.book-casing.book-closed-back .page-stack-visual-right {
  right: -16px;
  width: 16px;
  background: 
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 68px,
      rgba(212, 175, 55, 0.45) 69px,
      rgba(250, 228, 140, 0.7) 70px,
      rgba(0, 0, 0, 0.85) 72px,
      transparent 74px
    ),
    linear-gradient(
      to left,
      #05080c 0%,
      #101720 18%,
      #1c293a 42%,
      #2a3b52 58%,
      #15202c 82%,
      #080c11 100%
    );
  border-radius: 0 10px 10px 0;
  border-left: 1px solid rgba(0, 0, 0, 0.75);
  border-right: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 
    inset -1px 0 2px rgba(255, 255, 255, 0.22),
    inset 2px 0 5px rgba(0, 0, 0, 0.85),
    7px 0 18px rgba(0, 0, 0, 0.75);
  z-index: 5;
}

/* ==========================================================================
   VERTICAL EDGE PAGE-TURNERS
   ========================================================================== */
.book-edge-turner {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--edge-turner-width);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: transparent;
  outline: none;
  user-select: none;
  transition: all var(--transition-ui);
}

.book-edge-turner.turner-left {
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.05) 0%, transparent 100%);
  border-right: none;
}

.book-edge-turner.turner-left:hover {
  background: linear-gradient(to right, rgba(212, 175, 55, 0.18) 0%, transparent 100%);
}

.turner-vertical-text-left {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-cover);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  transition: transform var(--transition-ui), color var(--transition-ui);
}

.book-edge-turner.turner-left:hover .turner-vertical-text-left {
  color: var(--cover-gold-dark);
  transform: rotate(180deg) translateY(4px);
}

.book-edge-turner.turner-right {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.05) 0%, transparent 100%);
  border-left: none;
}

.book-edge-turner.turner-right:hover {
  background: linear-gradient(to left, rgba(212, 175, 55, 0.18) 0%, transparent 100%);
}

.turner-vertical-text-right {
  writing-mode: vertical-rl;
  font-family: var(--font-cover);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  transition: transform var(--transition-ui), color var(--transition-ui);
}

.book-edge-turner.turner-right:hover .turner-vertical-text-right {
  color: var(--cover-gold-dark);
  transform: translateY(4px);
}

.book-edge-turner.turner-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ==========================================================================
   BOOKMARK RIBBON CORD ("MENI")
   ========================================================================== */
.bookmark-cord-wrap {
  position: absolute;
  top: -8px;
  right: 80px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  filter: drop-shadow(2px 8px 12px rgba(0, 0, 0, 0.42));
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bookmark-cord-wrap:hover {
  transform: translateY(6px);
}

.bookmark-cord-strip {
  width: 24px;
  height: 95px;
  background: linear-gradient(to right, #6b1022 0%, var(--ribbon-cord) 50%, #9e1f38 100%);
  box-shadow: 
    inset 1px 0 1px rgba(255, 255, 255, 0.35),
    inset -1px 0 2px rgba(0, 0, 0, 0.4),
    3px 6px 14px rgba(0, 0, 0, 0.28);
  position: relative;
  border-radius: 2px 2px 0 0;
}

.bookmark-cord-strip::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3px;
  right: 3px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 3px
  );
  pointer-events: none;
}

.bookmark-cord-tag {
  background: linear-gradient(135deg, #7c1328 0%, #9e1a38 100%);
  color: #fff9e6;
  border: 1px solid var(--ribbon-gold-trim);
  border-top: none;
  padding: 8px 14px;
  border-radius: 0 0 4px 4px;
  font-family: var(--font-cover);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.bookmark-cord-tag::after {
  content: '✦';
  font-size: 0.7rem;
  color: var(--cover-gold-light);
}

.bookmark-cord-tail {
  width: 0;
  height: 0;
  border-left: 19px solid transparent;
  border-right: 19px solid transparent;
  border-top: 11px solid #7c1328;
}

/* ==========================================================================
   BOOK PAGES & REALISTIC PAGE FLIP DYNAMICS
   ========================================================================== */
.book-pages-container {
  position: relative;
  width: 100%;
  min-height: var(--book-min-height);
  border-radius: 8px;
  background: var(--paper-bg);
  overflow: hidden;
}

.book-page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: var(--book-min-height);
  padding: 55px calc(var(--edge-turner-width) + 45px) 70px calc(var(--edge-turner-width) + 45px);
  background-color: var(--paper-bg);
  background-image: 
    radial-gradient(ellipse at 50% 25%, rgba(255, 255, 255, 0.5) 0%, transparent 75%),
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 0%, transparent 40px),
    linear-gradient(to left, rgba(0, 0, 0, 0.04) 0%, transparent 40px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(40px) scale(0.985);
  transition: opacity 0.45s ease, transform var(--transition-page), visibility 0.45s;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.book-page.active-page {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  z-index: 10;
  height: auto;
}

.book-page.page-flipped-prev {
  transform: translateX(-45px) scale(0.985);
  opacity: 0;
}

/* ==========================================================================
   BRAND LOGO STYLING
   ========================================================================== */
.brand-logo-cover {
  width: 160px;
  height: auto;
  margin: 0 auto 16px auto;
  display: block;
  filter: drop-shadow(0 3px 8px var(--cover-emboss-shadow));
}

.brand-logo-header {
  height: 20px;
  width: auto;
  opacity: 0.85;
  mix-blend-mode: multiply;
  transition: opacity var(--transition-ui);
}
[data-theme="dark"] .brand-logo-header {
  filter: invert(1) brightness(1.2);
  mix-blend-mode: screen;
}

.brand-logo-toc {
  width: 110px;
  height: auto;
  margin: 0 auto 14px auto;
  display: block;
  mix-blend-mode: multiply;
}
[data-theme="dark"] .brand-logo-toc {
  filter: invert(1) brightness(1.2);
  mix-blend-mode: screen;
}

.brand-logo-back {
  width: 150px;
  height: auto;
  margin: 0 auto 18px auto;
  display: block;
  filter: drop-shadow(0 3px 8px var(--cover-emboss-shadow));
}

/* ==========================================================================
   RUNNING HEADER & FOLIO
   ========================================================================== */
.running-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  padding-right: 95px;
  margin-bottom: 38px;
  border-bottom: 1px solid var(--paper-line);
  font-family: var(--font-cover);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.running-author {
  font-weight: 600;
  color: var(--ink-secondary);
}

.running-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.running-chapter {
  font-style: italic;
  font-family: var(--font-editorial);
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0.04em;
}

.running-footer {
  margin-top: auto;
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-editorial);
  font-size: 1.05rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--paper-line);
}

.folio-number {
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   FRONT COVER (With Sea Landscape & Gilded Foil)
   "ovu s moren za naslovnicu"
   ========================================================================== */
.book-page.page-cover {
  background-color: #0b1118;
  background-image: 
    linear-gradient(180deg, rgba(12, 17, 24, 0.42) 0%, rgba(7, 10, 16, 0.72) 100%),
    url('../images/cover-sea.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 45px 35px;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.85);
  border-radius: 8px;
}

.cover-outer-frame {
  position: relative;
  width: 100%;
  max-width: 680px;
  min-height: 640px;
  padding: 50px 36px;
  border: 2px solid var(--cover-gold);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 14, 20, 0.46);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  box-shadow: 
    0 0 0 6px rgba(0, 0, 0, 0.5),
    0 0 0 8px var(--cover-gold-dark),
    inset 0 0 0 4px rgba(0, 0, 0, 0.5),
    inset 0 0 32px rgba(212, 175, 55, 0.22);
}

.cover-corner {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 2px solid var(--cover-gold-light);
  pointer-events: none;
}
.corner-tl { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.corner-tr { top: 12px; right: 12px; border-left: none; border-bottom: none; }
.corner-bl { bottom: 12px; left: 12px; border-right: none; border-top: none; }
.corner-br { bottom: 12px; right: 12px; border-left: none; border-top: none; }

.cover-author {
  font-family: var(--font-cover);
  font-size: 1.55rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cover-gold);
  background: linear-gradient(135deg, #f7e28b 0%, #d4af37 50%, #aa8021 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px var(--cover-emboss-shadow));
  margin-bottom: 8px;
  font-weight: 700;
}

.cover-divider-flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--cover-gold-dark);
  font-size: 0.95rem;
  margin: 10px auto;
  width: 180px;
}
.cover-divider-flourish::before,
.cover-divider-flourish::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--cover-gold), transparent);
}

.cover-main-title {
  font-family: var(--font-editorial);
  font-size: clamp(3.4rem, 7.5vw, 5.2rem);
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cover-gold-light);
  background: linear-gradient(180deg, #fff8dc 0%, #f3d476 35%, #d4af37 70%, #977017 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.85));
  margin: 16px 0 10px 0;
  line-height: 1.05;
  padding-left: 0.24em;
}

.cover-subtitle {
  font-family: var(--font-cover);
  font-size: clamp(0.95rem, 2.3vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #e5edf5;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  margin-top: 10px;
}

.btn-open-book {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 38px;
  background: linear-gradient(135deg, rgba(43, 57, 71, 0.9) 0%, rgba(26, 37, 48, 0.9) 100%);
  color: #fff9e6;
  border: 1px solid var(--cover-gold);
  border-radius: 40px;
  font-family: var(--font-cover);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 22px var(--cover-gold-glow);
  transition: all var(--transition-ui);
}

.btn-open-book:hover {
  background: linear-gradient(135deg, #374758 0%, #202d3b 100%);
  border-color: var(--cover-gold-light);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.65), 0 0 30px rgba(212, 175, 55, 0.45);
}

/* ==========================================================================
   BACK COVER (Zadnje Korice)
   ========================================================================== */
.book-page.page-back-cover {
  background: var(--cover-leather);
  background-image: 
    var(--cover-leather-grad),
    radial-gradient(circle at 50% 40%, rgba(212, 175, 55, 0.1) 0%, transparent 65%);
  padding: 45px 35px;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.75);
}

.back-cover-frame {
  position: relative;
  width: 100%;
  max-width: 680px;
  min-height: 640px;
  padding: 45px 36px;
  border: 2px solid var(--cover-gold);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  box-shadow: 
    0 0 0 6px rgba(0, 0, 0, 0.45),
    0 0 0 8px var(--cover-gold-dark),
    inset 0 0 0 4px rgba(0, 0, 0, 0.5),
    inset 0 0 28px rgba(212, 175, 55, 0.16);
}

.back-cover-emblem {
  font-family: var(--font-editorial);
  font-size: 1.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cover-gold);
  margin-bottom: 6px;
  font-weight: 700;
}

.back-cover-blurb {
  max-width: 520px;
  font-family: var(--font-editorial);
  font-size: 1.15rem;
  line-height: 1.75;
  color: #e5edf5;
  text-align: justify;
  text-align-last: center;
  margin: 14px 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.back-cover-colophon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9cb1c9;
  margin: 10px 0;
}

.back-cover-barcode-box {
  background: #ffffff;
  color: #111111;
  padding: 10px 20px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.barcode-lines {
  width: 175px;
  height: 40px;
  background: repeating-linear-gradient(
    to right,
    #111 0px,
    #111 2px,
    #fff 2px,
    #fff 4px,
    #111 4px,
    #111 7px,
    #fff 7px,
    #fff 9px,
    #111 9px,
    #111 11px,
    #fff 11px,
    #fff 14px,
    #111 14px,
    #111 15px,
    #fff 15px,
    #fff 18px,
    #111 18px,
    #111 21px
  );
}

.barcode-isbn {
  font-family: monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #222;
}

.back-cover-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-back-action {
  padding: 9px 18px;
  border-radius: 20px;
  font-family: var(--font-cover);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-ui);
}

.btn-back-action.primary {
  background: var(--cover-gold);
  color: #111;
  border: 1px solid var(--cover-gold-dark);
}
.btn-back-action.primary:hover {
  background: var(--cover-gold-light);
  transform: translateY(-2px);
}

.btn-back-action.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-back-action.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ==========================================================================
   PAGE 1: TABLE OF CONTENTS (Sadržaj / Meni)
   ========================================================================== */
.toc-wrapper {
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}

.toc-header-block {
  text-align: center;
  margin-bottom: 30px;
}

.toc-title {
  font-family: var(--font-editorial);
  font-size: clamp(2.4rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-primary);
  margin-bottom: 4px;
}

.toc-subtitle {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-muted);
}

.toc-flourish {
  width: 120px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--cover-gold-dark), transparent);
  margin: 14px auto 0;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.toc-item {
  transition: transform var(--transition-ui);
}
.toc-item:hover {
  transform: translateX(4px);
}

.toc-link {
  display: flex;
  align-items: baseline;
  text-decoration: none;
  color: var(--ink-primary);
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color var(--transition-ui);
}
.toc-link:hover {
  background-color: rgba(212, 175, 55, 0.08);
}

.toc-chapter-num {
  font-family: var(--font-cover);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand-crimson);
  min-width: 115px;
  text-transform: uppercase;
}

.toc-chapter-title {
  font-family: var(--font-editorial);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--ink-primary);
  line-height: 1.25;
}

.toc-link:hover .toc-chapter-title {
  color: var(--brand-crimson);
}

.toc-chapter-desc {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.toc-leader {
  flex-grow: 1;
  border-bottom: 1px dotted var(--ink-faint);
  margin: 0 16px;
  position: relative;
  top: -4px;
  opacity: 0.55;
}

.toc-page-num {
  font-family: var(--font-editorial);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink-secondary);
  font-style: italic;
  min-width: 48px;
  text-align: right;
}

/* ==========================================================================
   EDITORIAL CHAPTER STYLING
   ========================================================================== */
.chapter-content {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}

.chapter-badge-line {
  display: inline-block;
  font-family: var(--font-cover);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-crimson);
  margin-bottom: 8px;
}

.chapter-title {
  font-family: var(--font-editorial);
  font-size: clamp(2.5rem, 4.8vw, 3.4rem);
  font-weight: 700;
  line-height: 1.14;
  color: var(--ink-primary);
  margin-bottom: 14px;
}

.chapter-lead {
  font-family: var(--font-editorial);
  font-size: 1.36rem;
  font-style: italic;
  color: var(--ink-secondary);
  line-height: 1.55;
  margin-bottom: 28px;
}

/* Luxury Magazine Drop Cap */
.prose-text p.drop-cap::first-letter {
  float: left;
  font-family: var(--font-editorial);
  font-size: 4.6rem;
  line-height: 0.82;
  padding-top: 4px;
  padding-right: 14px;
  padding-bottom: 2px;
  color: var(--brand-crimson);
  font-weight: 700;
}

.prose-text p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  color: var(--ink-secondary);
  line-height: 1.82;
}

.prose-text h3 {
  font-family: var(--font-editorial);
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin: 34px 0 14px 0;
}

.prose-text blockquote {
  position: relative;
  margin: 30px 0;
  padding: 24px 34px 24px 44px;
  background: rgba(212, 175, 55, 0.07);
  border-left: 3px solid var(--cover-gold);
  border-radius: 0 8px 8px 0;
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--ink-primary);
  line-height: 1.55;
}

.prose-text blockquote::before {
  content: '“';
  position: absolute;
  top: 4px;
  left: 14px;
  font-size: 3.2rem;
  color: var(--cover-gold);
  line-height: 1;
  font-family: var(--font-editorial);
}

/* Author Profile Layout with High-Contrast B&W Treatment */
.profile-showcase-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 36px;
  margin-bottom: 32px;
  align-items: start;
}

.profile-photo-frame {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  border: 1px solid var(--paper-border);
  background: #000;
}

.profile-photo-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: contrast(1.12) brightness(1.02);
  transition: transform 0.4s ease, filter 0.4s ease;
}

.profile-photo-frame:hover .profile-photo-img {
  transform: scale(1.02);
  filter: contrast(1.18) brightness(1.04);
}

.profile-photo-caption {
  padding: 10px 12px;
  background: var(--paper-bg-warm);
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink-muted);
  text-align: center;
  border-top: 1px solid var(--paper-border);
}

/* Secondary Editorial Visual Card (Karate discipline) */
.editorial-duo-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 30px;
  margin: 32px 0;
  align-items: center;
}

.editorial-mini-frame {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--paper-border);
  background: #000;
}

.editorial-mini-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: contrast(1.1);
}

/* ==========================================================================
   CHAPTER II: THE BOOK (YAWN TOWN)
   ========================================================================== */
.book-spotlight-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  background: var(--paper-bg-warm);
  border: 1px solid var(--paper-border);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  margin-bottom: 28px;
  align-items: center;
}

.book-3d-wrap {
  perspective: 1000px;
  display: flex;
  justify-content: center;
}

.book-3d-cover {
  width: 210px;
  height: auto;
  border-radius: 6px;
  box-shadow: -10px 15px 30px rgba(0, 0, 0, 0.35);
  transform: rotateY(-8deg) rotateX(2deg);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.book-3d-wrap:hover .book-3d-cover {
  transform: rotateY(0deg) translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.38);
}

.book-details {
  display: flex;
  flex-direction: column;
}

.book-publisher-tag {
  font-family: var(--font-cover);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-crimson);
  font-weight: 700;
  margin-bottom: 6px;
}

.book-title-yawn {
  font-family: var(--font-editorial);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 4px;
}

.book-author-line {
  font-family: var(--font-cover);
  font-size: 0.92rem;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.book-synopsis {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--ink-secondary);
  margin-bottom: 18px;
}

.book-specs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 22px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  border-left: 3px solid var(--cover-gold);
}

.book-spec-item {
  font-size: 0.86rem;
  color: var(--ink-muted);
}
.book-spec-item strong {
  color: var(--ink-primary);
}

.btn-buy-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 30px;
  background: linear-gradient(135deg, var(--brand-crimson) 0%, #d41b44 100%);
  color: #ffffff;
  border: none;
  border-radius: 30px;
  font-family: var(--font-cover);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(184, 20, 58, 0.38);
  transition: all var(--transition-ui);
  width: fit-content;
}

.btn-buy-book:hover {
  background: linear-gradient(135deg, #d41b44 0%, #e62852 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(184, 20, 58, 0.5);
  color: #ffffff;
}

/* ==========================================================================
   SERVICES & JOURNALISM
   ========================================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin: 28px 0;
}

.service-card {
  background: var(--paper-bg-warm);
  border: 1px solid var(--paper-border);
  border-radius: 10px;
  padding: 26px 22px;
  transition: all var(--transition-ui);
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  border-color: var(--cover-gold);
}

.service-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.service-title {
  font-family: var(--font-editorial);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 10px;
}

.service-desc {
  font-size: 0.95rem;
  color: var(--ink-secondary);
  line-height: 1.65;
}

.articles-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px 0;
}

.filter-pill {
  background: transparent;
  border: 1px solid var(--paper-border);
  color: var(--ink-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-ui);
}
.filter-pill:hover,
.filter-pill.active {
  background: var(--ink-primary);
  color: var(--paper-bg);
  border-color: var(--ink-primary);
}

.articles-editorial-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.article-entry {
  background: var(--paper-bg-warm);
  border-left: 3px solid var(--cover-gold);
  border-radius: 0 8px 8px 0;
  padding: 22px 26px;
  border-top: 1px solid var(--paper-border);
  border-right: 1px solid var(--paper-border);
  border-bottom: 1px solid var(--paper-border);
  transition: all var(--transition-ui);
}
.article-entry:hover {
  transform: translateX(3px);
  background: var(--paper-bg);
}

.article-tag {
  font-family: var(--font-cover);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #183b56;
  font-weight: 600;
  margin-bottom: 4px;
}

.article-headline {
  font-family: var(--font-editorial);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.35;
  margin-bottom: 6px;
}

.article-summary {
  font-size: 0.94rem;
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.article-source-meta {
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-style: italic;
  font-family: var(--font-editorial);
}

/* ==========================================================================
   STORYBUILDING & CONTACT
   ========================================================================== */
.storybuilding-widget {
  background: var(--paper-bg-warm);
  border: 1px solid var(--cover-gold);
  border-radius: 12px;
  padding: 26px;
  margin: 26px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.sb-widget-title {
  font-family: var(--font-editorial);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 6px;
  text-align: center;
}

.sb-widget-subtitle {
  font-size: 0.92rem;
  color: var(--ink-muted);
  text-align: center;
  max-width: 580px;
  margin: 0 auto 20px auto;
}

.sb-cards-triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.sb-card-slot {
  background: var(--paper-bg);
  border: 1px solid var(--paper-border);
  border-radius: 8px;
  padding: 14px;
}

.sb-slot-header {
  font-family: var(--font-cover);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-crimson);
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sb-item-pill {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--paper-line);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}

.sb-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-sb {
  padding: 9px 20px;
  border-radius: 20px;
  font-family: var(--font-cover);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-ui);
}

.btn-sb-primary {
  background: var(--cover-gold);
  color: #1a1708;
  border: 1px solid var(--cover-gold-dark);
}
.btn-sb-primary:hover {
  background: var(--cover-gold-light);
  transform: translateY(-2px);
}

.btn-sb-secondary {
  background: transparent;
  color: var(--ink-secondary);
  border: 1px solid var(--paper-border);
}

.contact-container {
  max-width: 620px;
  margin: 0 auto;
}

.contact-form-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
}

.form-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-family: var(--font-cover);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  font-weight: 600;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 12px 14px;
  background: var(--paper-bg-warm);
  border: 1px solid var(--paper-border);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  color: var(--ink-primary);
  transition: border-color var(--transition-ui), box-shadow var(--transition-ui);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--cover-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
  background: var(--paper-bg);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.92rem;
  display: none;
  margin-bottom: 14px;
}
.form-alert.success {
  background: rgba(45, 106, 79, 0.12);
  border: 1px solid #2d6a4f;
  color: #2d6a4f;
}
.form-alert.error {
  background: rgba(184, 20, 58, 0.12);
  border: 1px solid var(--brand-crimson);
  color: var(--brand-crimson);
}

.book-chapter-tracker {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px 14px;
  border-radius: 20px;
  font-family: var(--font-editorial);
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-muted);
  pointer-events: none;
  z-index: 30;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Mobile)
   ========================================================================== */
@media screen and (max-width: 900px) {
  :root {
    --book-width: 98vw;
    --edge-turner-width: 38px;
  }

  .desk-viewport {
    padding: 8px 4px 16px 4px;
  }

  .book-page {
    padding: 40px calc(var(--edge-turner-width) + 18px) 50px calc(var(--edge-turner-width) + 18px);
  }

  .profile-showcase-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .profile-photo-frame {
    max-width: 240px;
    margin: 0 auto;
  }

  .editorial-duo-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .editorial-mini-frame {
    max-width: 200px;
    margin: 0 auto;
  }

  .book-spotlight-card {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 20px;
  }
  .btn-buy-book {
    margin: 0 auto;
  }

  .sb-cards-triptych {
    grid-template-columns: 1fr;
  }

  .bookmark-cord-wrap {
    right: 48px;
  }
}

@media screen and (max-width: 600px) {
  :root {
    --edge-turner-width: 28px;
  }

  .book-page {
    padding: 30px calc(var(--edge-turner-width) + 12px) 45px calc(var(--edge-turner-width) + 12px);
  }

  .cover-outer-frame,
  .back-cover-frame {
    padding: 30px 14px;
    min-height: 520px;
  }

  .cover-author {
    font-size: 1.15rem;
  }

  .cover-main-title {
    font-size: 2.3rem;
  }

  .cover-subtitle {
    font-size: 0.84rem;
  }

  .turner-vertical-text-left,
  .turner-vertical-text-right {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
  }

  .bookmark-cord-wrap {
    right: 32px;
  }
  .bookmark-cord-strip {
    height: 65px;
    width: 18px;
  }
  .bookmark-cord-tag {
    font-size: 0.68rem;
    padding: 5px 8px;
  }
}
