/* ==========================================================================
   MUSU K. POWELL — STARDUST MIST PARALLAX FUSION (EDITION 15)
   Design System & Modern CSS
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Typography Tokens */
  --font-display: 'Cinzel Decorative', serif;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Color Palette (11 Stardust Mesh Colors + 12 Mist Accents) */
  --bg-main: #FAF7F2;
  --bg-card: rgba(255, 255, 255, 0.76);
  --bg-card-hover: rgba(255, 255, 255, 0.90);
  
  --text-dark: #1F2937;
  --text-muted: #4B5563;
  --text-soft: #6B7280;

  --color-teal: #0F8B8D;
  --color-teal-glow: rgba(15, 139, 141, 0.25);
  --color-plum: #8C3A80;
  --color-plum-glow: rgba(140, 58, 128, 0.20);
  --color-gold: #E8A238;
  --color-gold-bright: #F59E0B;
  --color-gold-metallic: #D4AF37;
  
  --mesh-peach: rgba(255, 218, 193, 0.65);
  --mesh-blue: rgba(181, 226, 250, 0.55);
  --mesh-lavender: rgba(226, 212, 240, 0.60);
  --mesh-apricot: rgba(255, 183, 178, 0.50);

  --border-light: rgba(15, 139, 141, 0.15);
  --border-gold: rgba(212, 175, 55, 0.40);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(15, 139, 141, 0.06);
  --shadow-md: 0 12px 32px rgba(140, 58, 128, 0.08);
  --shadow-glow: 0 0 25px rgba(232, 162, 56, 0.25);
  --shadow-frame: 0 16px 40px rgba(15, 139, 141, 0.12), 0 0 0 1px rgba(212, 175, 55, 0.3);

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"],
body[data-theme="dark"],
[data-theme="dark"],
.dark-theme {
  color-scheme: dark;
  --bg-main: #0D1420;
  --bg-card: rgba(20, 30, 44, 0.84);
  --bg-card-hover: rgba(28, 40, 57, 0.94);

  --text-dark: #F7F3ED;
  --text-muted: #CBD5E1;
  --text-soft: #9EABB9;

  --color-teal: #52CED0;
  --color-teal-glow: rgba(82, 206, 208, 0.24);
  --color-plum: #D78BCB;
  --color-plum-glow: rgba(215, 139, 203, 0.2);
  --color-gold: #F2B858;
  --color-gold-bright: #F6C86F;
  --color-gold-metallic: #E6BE50;

  --mesh-peach: rgba(155, 70, 83, 0.24);
  --mesh-blue: rgba(25, 121, 149, 0.28);
  --mesh-lavender: rgba(115, 73, 160, 0.3);
  --mesh-apricot: rgba(179, 95, 64, 0.22);

  --border-light: rgba(82, 206, 208, 0.2);
  --border-gold: rgba(230, 190, 80, 0.5);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 14px 38px rgba(0, 0, 0, 0.28);
  --shadow-frame: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(230, 190, 80, 0.36);
}

/* --- Base Reset & Page Layout --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-main);
  color: var(--text-dark);
  font-family: var(--font-body);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  position: relative;
  /* Keep pastel layers above the body fill, as on Find the Mark. */
  isolation: isolate;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg-main);
  color: var(--text-dark);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- SVG Noise Grain Overlay --- */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

/* --- Pastel Mesh Background Orbs --- */
.pastel-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.85;
  will-change: transform;
  transition: transform 0.1s linear;
}

.orb-peach {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -50px;
  background: var(--mesh-peach);
  animation: floatOrbA 18s ease-in-out infinite alternate;
}

.orb-blue {
  width: 600px;
  height: 600px;
  bottom: -150px;
  left: -100px;
  background: var(--mesh-blue);
  animation: floatOrbB 22s ease-in-out infinite alternate;
}

.orb-lavender {
  width: 450px;
  height: 450px;
  top: 35%;
  left: 25%;
  background: var(--mesh-lavender);
  animation: floatOrbC 20s ease-in-out infinite alternate;
}

.orb-apricot {
  width: 400px;
  height: 400px;
  top: 60%;
  right: 15%;
  background: var(--mesh-apricot);
  animation: floatOrbA 24s ease-in-out infinite alternate;
}

@keyframes floatOrbA {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 60px) scale(1.1); }
}

@keyframes floatOrbB {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, -40px) scale(1.08); }
}

@keyframes floatOrbC {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, -50px) scale(0.95); }
}

/* --- Interactive Stardust Canvas (Background ambient magic) --- */
.dust-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* Ensure all page content, typography, cards & images render above background canvas */
main,
.footer {
  position: relative;
  z-index: 1;
}

/* --- Wrapper Utility --- */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Typography Helpers --- */
h1, h2, h3, h4 {
  color: var(--text-dark);
}

em, i {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: var(--color-plum);
}

.eyebrow, .section-tag {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-teal);
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0.75rem;
}

/* --- Header Navigation --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 3rem;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 139, 141, 0.1);
  transition: var(--transition-normal);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.mobile-nav {
  display: none;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-teal);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.05em;
}

.brand .spark {
  color: var(--color-gold);
  animation: pulseSpark 2s ease-in-out infinite;
}

@keyframes pulseSpark {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}

.nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-dark);
  text-decoration: none;
  position: relative;
  padding: 0.25rem 0;
  transition: var(--transition-fast);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-teal), var(--color-gold));
  transition: width 0.3s ease;
}

.nav a:hover {
  color: var(--color-teal);
}

.nav a:hover::after {
  width: 100%;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 82px;
  padding: 0.48rem 0.78rem;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  color: var(--text-dark);
  background: var(--bg-card);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--color-plum);
  border-color: var(--color-gold);
  transform: translateY(-2px);
}

.theme-toggle:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
}

.theme-toggle-icon {
  color: var(--color-gold);
  font-size: 1rem;
  line-height: 1;
}

.nav-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-plum);
  text-decoration: none;
  padding: 0.55rem 1.25rem;
  border: 1.5px solid var(--color-plum);
  border-radius: var(--radius-full);
  transition: var(--transition-bounce);
}

.nav-btn:hover {
  background: var(--color-plum);
  color: #FFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* --- Hero Section --- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 4rem;
  padding-top: 5rem;
  padding-bottom: 6rem;
  min-height: 82vh;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 4.2rem;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-intro {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.btn-primary {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFF;
  background: linear-gradient(135deg, var(--color-teal) 0%, #0c7375 100%);
  border: none;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(15, 139, 141, 0.25);
  transition: var(--transition-bounce);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(15, 139, 141, 0.35);
  background: linear-gradient(135deg, #129d9f 0%, var(--color-teal) 100%);
}

.btn-secondary {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition-normal);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: #FFF;
  border-color: var(--color-gold);
  color: var(--color-plum);
  transform: translateY(-2px);
}

/* --- Hero Parallax Book Portal --- */
.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.moon-ring {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 1.5px stroke var(--border-gold);
  background: radial-gradient(circle, rgba(232, 162, 56, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  box-shadow: 0 0 60px rgba(232, 162, 56, 0.2);
  animation: rotateRing 40s linear infinite;
}

@keyframes rotateRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.little-star {
  position: absolute;
  color: var(--color-gold-metallic);
  font-size: 1.2rem;
  pointer-events: none;
  animation: floatStar 3s ease-in-out infinite alternate;
}

.star-a { top: -10px; right: 40px; animation-delay: 0.2s; }
.star-b { bottom: 20px; left: 30px; animation-delay: 1.1s; }

@keyframes floatStar {
  0% { transform: translateY(0) scale(0.9); opacity: 0.7; }
  100% { transform: translateY(-10px) scale(1.2); opacity: 1; }
}

/* ==========================================================================
   3D HARDCOVER NOVEL STYLING & INTERACTIVE HOVER ANIMATION (OPTION 1)
   ========================================================================== */

.hero-art {
  perspective: 1400px;
  position: relative;
}

.book-3d-novel {
  position: relative;
  width: 295px;
  height: 405px;
  border-radius: 4px 18px 18px 4px;
  background: #1E0427; /* Rear hardcover base */
  box-shadow: 
    -6px 14px 36px rgba(42, 8, 53, 0.42),
    14px 28px 56px rgba(0, 0, 0, 0.35),
    0 0 0 1.5px rgba(212, 175, 55, 0.45);
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateY(-8deg) rotateX(3deg);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  outline: none;
}

/* Silk Ribbon Bookmark hanging from binding with W Monogram */
.book-ribbon {
  position: absolute;
  top: -10px;
  right: 38px;
  width: 20px;
  height: 52px;
  background: linear-gradient(180deg, #6B1F7E 0%, #3F0E4E 100%);
  border-radius: 2px 2px 0 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  z-index: 15;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%);
  transform-origin: top center;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.35s;
}

.ribbon-letter {
  font-family: var(--font-heading), 'Great Vibes', 'Cinzel Decorative', cursive, serif;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 700;
  color: #F8EDD3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  line-height: 1;
  user-select: none;
}

/* Stacked Deckle-Edge Pages Interior */
.book-pages-stack {
  position: absolute;
  top: 6px;
  left: 12px;
  right: 6px;
  bottom: 6px;
  border-radius: 2px 14px 14px 2px;
  background: #FAF6ED;
  overflow: hidden;
  box-shadow: 
    inset -3px 0 8px rgba(0, 0, 0, 0.08),
    inset 0 -2px 5px rgba(0, 0, 0, 0.04),
    inset 0 2px 5px rgba(0, 0, 0, 0.04);
  transform-style: preserve-3d;
  pointer-events: none;
}

/* Deckle Edge Texture Lines on Right Margin */
.book-pages-stack::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    #F4EEDF,
    #F4EEDF 1px,
    #E7DFC9 1px,
    #E7DFC9 2px
  );
  box-shadow: inset 1px 0 3px rgba(0, 0, 0, 0.12);
}

.page-layer {
  position: absolute;
  inset: 0;
  border-radius: 2px 14px 14px 2px;
  background: #FAF6ED;
  transform-origin: left center;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-layer-3 {
  transform: rotateY(-3deg);
  background: #F3ECE0;
}

.page-layer-2 {
  transform: rotateY(-6deg);
  background: #F7F1E4;
}

.page-layer-1 {
  background: #FCF8F0;
  display: flex;
  flex-direction: column;
  padding: 2.1rem 1.65rem;
  z-index: 4;
}

.page-inner-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0.96;
}

/* --- Manuscript Unwritten Story Lines (Replacing Real Text) --- */
.manuscript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(140, 58, 128, 0.18);
  padding-bottom: 0.5rem;
  margin-bottom: 1.15rem;
}

.manuscript-chapter-tag {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--color-plum);
  font-weight: 700;
}

.manuscript-sparkle {
  color: var(--color-gold);
  font-size: 0.75rem;
}

.manuscript-lines-block {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.manuscript-dropcap-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 2px;
}

.manuscript-dropcap-box {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.65);
  background: linear-gradient(135deg, rgba(140, 58, 128, 0.14) 0%, rgba(212, 175, 55, 0.18) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 6px rgba(140, 58, 128, 0.12);
}

.dropcap-glyph {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-plum);
  line-height: 1;
}

.manuscript-lead-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 3px;
}

.manuscript-rule {
  height: 4.5px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(75, 45, 82, 0.32) 0%, rgba(140, 58, 128, 0.22) 50%, rgba(75, 45, 82, 0.28) 100%);
  position: relative;
  overflow: hidden;
}

.manuscript-rule::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(232, 162, 56, 0.45), transparent);
  transform: translateX(-100%);
  transition: transform 0.85s ease;
}

.book-3d-novel:hover .manuscript-rule::after,
.book-3d-novel:focus-visible .manuscript-rule::after,
.book-3d-novel.is-open .manuscript-rule::after {
  transform: translateX(100%);
}

.rule-lead-1 { width: 100%; }
.rule-lead-2 { width: 92%; }
.rule-w95 { width: 95%; }
.rule-w92 { width: 92%; }
.rule-w90 { width: 90%; }
.rule-w85 { width: 85%; }
.rule-w82 { width: 82%; }
.rule-w60 { width: 60%; }
.rule-w50 { width: 50%; }

.rule-indent {
  margin-left: 20px;
  width: calc(88% - 20px);
}

.rule-end {
  margin-bottom: 0.35rem;
}

.manuscript-flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0.35rem 0 0.5rem;
}

.flourish-line {
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(140, 58, 128, 0.3), transparent);
}

.flourish-star {
  color: var(--color-gold);
  font-size: 0.65rem;
}

.manuscript-footer {
  margin-top: auto;
  text-align: center;
  border-top: 1px solid rgba(140, 58, 128, 0.12);
  padding-top: 0.5rem;
}

.manuscript-page-no {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-plum);
  opacity: 0.75;
}

/* Inner Magical Golden Stardust Aura */
.book-magic-glow {
  position: absolute;
  top: -30px;
  left: 10px;
  width: 300px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 184, 88, 0.75) 0%, rgba(212, 175, 55, 0.35) 42%, transparent 75%);
  filter: blur(22px);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  transition: opacity 0.65s ease, transform 0.65s ease;
  transform: scale(0.65);
}

/* Front Hardcover: Royal Purple Velvet with Gold Beveled Framing */
.book-front-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 4px 18px 18px 4px;
  background: 
    radial-gradient(ellipse at 50% 36%, #4B125C 0%, #2E0739 55%, #180322 100%);
  border: 2px solid rgba(212, 175, 55, 0.85);
  padding: 2.2rem 1.7rem;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.65s ease;
  z-index: 10;
  box-shadow: 
    inset 5px 0 12px rgba(0, 0, 0, 0.45),
    inset 0 0 45px rgba(0, 0, 0, 0.55),
    6px 0 16px rgba(0, 0, 0, 0.25);
}

/* Spine Hinge Indentation on Left Margin */
.cover-spine-edge {
  position: absolute;
  top: 0;
  left: 11px;
  width: 3px;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.5), transparent);
  pointer-events: none;
}

/* Stardust Sparkle Sprinkle Overlay */
.cover-stardust {
  position: absolute;
  inset: 0;
  border-radius: 4px 18px 18px 4px;
  background-image: 
    radial-gradient(1.5px 1.5px at 18% 22%, rgba(245, 222, 160, 0.75) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 82% 20%, rgba(245, 222, 160, 0.75) 50%, transparent 100%),
    radial-gradient(2px 2px at 16% 45%, rgba(255, 235, 185, 0.65) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 84% 62%, rgba(245, 222, 160, 0.7) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 25% 82%, rgba(245, 222, 160, 0.6) 50%, transparent 100%),
    radial-gradient(2px 2px at 75% 85%, rgba(255, 235, 185, 0.7) 50%, transparent 100%),
    radial-gradient(1px 1px at 48% 12%, rgba(245, 222, 160, 0.5) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 32% 64%, rgba(245, 222, 160, 0.55) 50%, transparent 100%),
    radial-gradient(1px 1px at 68% 40%, rgba(245, 222, 160, 0.5) 50%, transparent 100%);
  pointer-events: none;
  opacity: 0.85;
}

/* Inset Gold Frame Line */
.cover-gold-frame {
  position: absolute;
  top: 14px;
  left: 18px;
  right: 14px;
  bottom: 14px;
  border: 1px solid rgba(212, 175, 55, 0.65);
  border-radius: 2px 10px 10px 2px;
  pointer-events: none;
  box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.12);
}

/* 4 Beveled Gold Corner Brackets */
.cover-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
  z-index: 5;
}

.cover-corner.corner-tl {
  top: 11px;
  left: 15px;
  border-top: 3.5px solid #E5C378;
  border-left: 3.5px solid #D4AF37;
  box-shadow: -1px -1px 3px rgba(0, 0, 0, 0.6), inset 1px 1px 2px rgba(255, 245, 215, 0.8);
}

.cover-corner.corner-tr {
  top: 11px;
  right: 11px;
  border-top: 3.5px solid #E5C378;
  border-right: 3.5px solid #B8860B;
  box-shadow: 1px -1px 3px rgba(0, 0, 0, 0.6), inset -1px 1px 2px rgba(255, 245, 215, 0.8);
}

.cover-corner.corner-bl {
  bottom: 11px;
  left: 15px;
  border-bottom: 3.5px solid #AA8222;
  border-left: 3.5px solid #D4AF37;
  box-shadow: -1px 1px 3px rgba(0, 0, 0, 0.6), inset 1px -1px 2px rgba(255, 245, 215, 0.8);
}

.cover-corner.corner-br {
  bottom: 11px;
  right: 11px;
  border-bottom: 3.5px solid #8C6512;
  border-right: 3.5px solid #B8860B;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6), inset -1px -1px 2px rgba(255, 245, 215, 0.8);
}

/* Subtle Gold Foil Light Sweep on Hover */
.cover-shimmer {
  position: absolute;
  inset: 0;
  border-radius: 4px 18px 18px 4px;
  background: linear-gradient(115deg, transparent 20%, rgba(245, 205, 105, 0.25) 50%, transparent 80%);
  opacity: 0;
  transform: translateX(-100%);
  transition: opacity 0.5s ease, transform 0.75s ease;
  pointer-events: none;
}

/* ==========================================================================
   HOVER & FOCUS ANIMATION REVELATION (35° Ajar + Stack Fan + Golden Magic)
   ========================================================================== */

.book-3d-novel:hover,
.book-3d-novel:focus-visible,
.book-3d-novel.is-open {
  transform: perspective(1300px) rotateY(-22deg) rotateX(5deg) translateY(-12px);
  box-shadow: 
    -10px 18px 42px rgba(42, 8, 53, 0.55),
    24px 36px 72px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(232, 162, 56, 0.4);
}

.book-3d-novel:hover .book-front-cover,
.book-3d-novel:focus-visible .book-front-cover,
.book-3d-novel.is-open .book-front-cover {
  transform: rotateY(-36deg);
  box-shadow: 
    -16px 16px 36px rgba(0, 0, 0, 0.45),
    inset 6px 0 14px rgba(0, 0, 0, 0.4);
}

.book-3d-novel:hover .page-layer-1,
.book-3d-novel:focus-visible .page-layer-1,
.book-3d-novel.is-open .page-layer-1 {
  transform: rotateY(-12deg);
}

.book-3d-novel:hover .page-layer-2,
.book-3d-novel:focus-visible .page-layer-2,
.book-3d-novel.is-open .page-layer-2 {
  transform: rotateY(-8deg);
}

.book-3d-novel:hover .book-magic-glow,
.book-3d-novel:focus-visible .book-magic-glow,
.book-3d-novel.is-open .book-magic-glow {
  opacity: 0.95;
  transform: scale(1.15);
}

.book-3d-novel:hover .cover-shimmer,
.book-3d-novel:focus-visible .cover-shimmer,
.book-3d-novel.is-open .cover-shimmer {
  opacity: 1;
  transform: translateX(100%);
}

.book-3d-novel:hover .book-ribbon,
.book-3d-novel:focus-visible .book-ribbon,
.book-3d-novel.is-open .book-ribbon {
  opacity: 1;
  visibility: visible;
  transform: rotate(8deg) translateY(4px) scale(1);
}

.portal-cover {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  position: relative;
}

.portal-label {
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: #E8C982;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8), 0 0 12px rgba(212, 175, 55, 0.4);
  margin-top: 0.2rem;
}

.portal-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  margin: 1.15rem 0 0.85rem;
}

.title-row {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #FFF6DD 0%, #F2D288 30%, #D4AF37 68%, #A87E1B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
  line-height: 1.1;
}

.title-row-1 { font-size: 1.45rem; }
.title-row-2 { font-size: 1.95rem; letter-spacing: 0.11em; }
.title-row-3 { font-size: 1.25rem; }
.title-row-4 { font-size: 1.45rem; }

.portal-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100px;
  margin: 0.35rem auto 1rem;
}

.ornament-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.85), transparent);
}

.ornament-gem {
  color: #F2D288;
  font-size: 0.75rem;
  line-height: 1;
  filter: drop-shadow(0 0 5px rgba(232, 162, 56, 0.7));
}

.portal-badge {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #F8E7BE;
  background: rgba(212, 175, 55, 0.08);
  border: 1.5px solid #D4AF37;
  border-radius: var(--radius-full);
  padding: 0.55rem 1.45rem;
  display: inline-block;
  margin: 0 auto;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.22), inset 0 0 10px rgba(212, 175, 55, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  transition: var(--transition-normal);
}

.portal-badge:hover {
  background: rgba(212, 175, 55, 0.16);
  box-shadow: 0 0 22px rgba(212, 175, 55, 0.35), inset 0 0 12px rgba(212, 175, 55, 0.18);
}

.portal-click {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: #E8C982;
  letter-spacing: 0.18em;
  margin-top: 0.85rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 0 12px rgba(212, 175, 55, 0.35);
}

/* --- Bio Section (Side-by-Side Text & Framed Picture) --- */
.about {
  padding: 6rem 0;
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3.5rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3.25rem 3rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.about-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-teal), var(--color-gold));
}

.bio-copy {
  display: flex;
  flex-direction: column;
}

.bio-heading {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.bio-lead {
  font-size: 1.25rem;
  color: var(--text-dark);
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.bio-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.bio-name-note {
  margin-top: 1.4rem;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.7;
  font-style: italic;
}

.bio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.bio-pill {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-teal);
  background: rgba(15, 139, 141, 0.08);
  border: 1px solid rgba(15, 139, 141, 0.2);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
}

/* --- Framed Bio Portrait --- */
.bio-frame-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bio-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(246, 241, 233, 0.9));
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 16px 36px rgba(140, 58, 128, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: var(--transition-bounce);
}

.bio-frame:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px rgba(15, 139, 141, 0.15), var(--shadow-glow);
  border-color: var(--color-gold-bright);
}

.frame-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 472 / 766;
  border-radius: 14px;
  overflow: hidden;
  border: none;
}

.bio-img {
  width: 100%;
  /* Hide the dark export edge in the portrait's final pixel row. */
  height: calc(100% + 2px);
  display: block;
  object-fit: cover;
  object-position: center 20%;
  transition: var(--transition-normal);
}

.bio-frame:hover .bio-img {
  transform: scale(1.04);
}

.frame-glow-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(232, 162, 56, 0.15), transparent 70%);
  pointer-events: none;
}

.frame-star {
  position: absolute;
  color: var(--color-gold-metallic);
  font-size: 1.1rem;
  pointer-events: none;
}

.star-tl { top: -14px; left: -10px; }
.star-br { bottom: 32px; right: -12px; }

.bio-caption {
  margin-top: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.caption-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  color: var(--text-dark);
}

.caption-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-teal);
}

/* --- Stories Shelf Section --- */
.stories {
  padding: 6rem 0;
}

.section-heading {
  margin-bottom: 3.5rem;
}

.section-heading h2 {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.stories-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-bounce);
  backdrop-filter: blur(12px);
  position: relative;
}

.story-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
  border-color: var(--color-teal);
}

.card-tag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.card-num {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-teal);
  letter-spacing: 0.1em;
}

.card-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-plum);
  background: rgba(140, 58, 128, 0.08);
  padding: 0.28rem 0.72rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.pill-star-purple {
  color: var(--color-plum);
  font-size: 0.8rem;
  line-height: 1;
  display: inline-block;
}

.story-card h3 {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.story-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.card-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-teal);
  background: transparent;
  border: 1.5px solid var(--color-teal);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
  width: 100%;
  text-align: center;
}

.card-btn:hover {
  background: var(--color-teal);
  color: #FFF;
  box-shadow: var(--shadow-sm);
}

.card-btn-outline {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  display: block;
  text-align: center;
  transition: var(--transition-fast);
}

.card-btn-outline:hover {
  border-color: var(--color-gold);
  color: var(--color-plum);
}

/* --- Journal Section --- */
#journal[hidden] { display: none; }

.journal {
  padding: 4rem 0 6rem;
}

.journal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  backdrop-filter: blur(16px);
}

.journal-card h2 {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.journal-card p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.journal-preview {
  background: rgba(250, 247, 242, 0.6);
  border-left: 4px solid var(--color-gold);
  padding: 1.75rem 2rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  cursor: pointer;
  transition: var(--transition-normal);
}

.journal-preview:hover {
  background: rgba(255, 255, 255, 0.82);
  border-left-color: var(--color-plum);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.journal-preview:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 4px;
}

.journal-preview .journal-entry p {
  margin-bottom: 0;
}

.journal-preview-link {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--color-teal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.journal-modal-card {
  max-width: 700px;
}

.journal-modal-body {
  min-height: 220px;
}

.journal-modal-body p {
  margin-top: 1rem;
}

.journal-modal-body .journal-modal-note {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-soft);
  font-size: 0.9rem;
  font-style: italic;
}

.entry-date {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--color-teal);
  letter-spacing: 0.1em;
  font-weight: 700;
}

.journal-entry h4 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin: 0.4rem 0 0.6rem;
}

/* --- Newsletter / Reader Circle Section --- */
.newsletter {
  padding: 3rem 0 5rem;
}

.newsletter-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(254, 250, 243, 0.95));
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 3.5rem 3rem;
  box-shadow: 0 16px 40px rgba(15, 139, 141, 0.08), 0 0 24px rgba(212, 175, 55, 0.12);
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);
}

html[data-theme="dark"] .newsletter-card {
  background: linear-gradient(135deg, rgba(26, 38, 57, 0.92), rgba(20, 30, 46, 0.96));
}

.newsletter-content {
  max-width: 620px;
  margin: 0 auto;
}

.newsletter-content h2 {
  font-family: var(--font-heading);
  font-size: 3.1rem;
  margin-top: 0.6rem;
  margin-bottom: 0.9rem;
  line-height: 1.15;
}

.newsletter-content p {
  font-size: 1.08rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  max-width: 520px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-light);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-dark);
  outline: none;
  transition: var(--transition-fast);
}

html[data-theme="dark"] .newsletter-form input[type="email"] {
  background: rgba(13, 20, 32, 0.85);
  border-color: rgba(255, 255, 255, 0.15);
  color: #F8FAFC;
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.2);
}

.newsletter-form .btn-primary {
  white-space: nowrap;
  flex-shrink: 0;
}

.subscribe-status {
  margin-top: 1.25rem;
  font-size: 0.92rem;
  font-weight: 600;
  min-height: 1.4rem;
  transition: opacity 0.3s ease;
}

.subscribe-status.success {
  color: var(--color-teal);
}

.subscribe-status.error {
  color: #DC2626;
}

/* --- Contact Section --- */
.contact {
  padding: 4rem 0 8rem;
}

.contact-box {
  text-align: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.85), rgba(250, 247, 242, 0.95));
  border: 2px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 4.5rem 3rem;
  box-shadow: var(--shadow-md);
}

.contact-box h2 {
  font-family: var(--font-heading);
  font-size: 3.4rem;
  margin-bottom: 2rem;
}

.contact-box p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 2.5rem;
}

.contact-email-btn {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  color: #FFF;
  background: linear-gradient(135deg, var(--color-plum) 0%, #68265e 100%);
  text-decoration: none;
  padding: 1.1rem 2.5rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 28px rgba(140, 58, 128, 0.25);
  transition: var(--transition-bounce);
}

.contact-email-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 36px rgba(140, 58, 128, 0.35);
  background: linear-gradient(135deg, #a04494 0%, var(--color-plum) 100%);
}

.btn-arrow {
  font-size: 1.3rem;
}

/* --- Interactive Story Reader Modal --- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #FAF7F2;
  width: 100%;
  max-width: 820px;
  max-height: 88vh;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-gold);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25), var(--shadow-glow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(30px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2.25rem;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border-light);
}

.modal-eyebrow {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--color-teal);
  font-weight: 700;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  line-height: 1.2;
}

.modal-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-icon-btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  background: #FFF;
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-icon-btn:hover {
  border-color: var(--color-teal);
  color: var(--color-teal);
}

.modal-close-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFF;
  background: var(--color-plum);
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close-btn:hover {
  background: #68265e;
}

.modal-body {
  padding: 3rem 3.5rem;
  overflow-y: auto;
  line-height: 1.85;
  font-size: 1.12rem;
  color: #2D3748;
}

.modal-body.large-font {
  font-size: 1.3rem;
  line-height: 1.95;
}

.modal-body p {
  margin-bottom: 1.6rem;
}

.modal-body .story-dropcap::first-letter {
  font-family: var(--font-heading);
  font-size: 3.8rem;
  float: left;
  line-height: 0.8;
  margin-right: 0.6rem;
  color: var(--color-teal);
  font-weight: 600;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.25rem;
  background: rgba(255, 255, 255, 0.85);
  border-top: 1px solid var(--border-light);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-soft);
  font-family: var(--font-display);
}

.btn-secondary-sm {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dark);
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
}

/* --- Fullscreen Artwork Lightbox (Zero Scroll, Fit Screen, Deep Zoom) --- */
.modal-backdrop.modal-mode-fullscreen-art {
  padding: 0 !important;
  background: #FFFFFF !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: hidden !important;
}

.modal-backdrop.modal-mode-fullscreen-art .modal-card {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: #FFFFFF !important;
  overflow: hidden !important;
  transform: none !important;
}

.modal-backdrop.modal-mode-fullscreen-art .modal-header,
.modal-backdrop.modal-mode-fullscreen-art .modal-footer {
  display: none !important;
}

.modal-backdrop.modal-mode-fullscreen-art .modal-body {
  padding: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #FFFFFF !important;
}

.art-fullscreen-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  background: #FFFFFF;
}

.art-fullscreen-image {
  max-width: 95vw;
  max-height: 94vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: auto;
  display: block;
  filter: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  will-change: transform;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}

.art-fullscreen-close-btn {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1050;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.07);
  color: #1E293B;
  border: 1px solid rgba(15, 23, 42, 0.14);
  font-size: 1.25rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.art-fullscreen-close-btn:hover {
  background: rgba(15, 23, 42, 0.16);
  color: #0F172A;
  transform: scale(1.08);
  border-color: rgba(15, 23, 42, 0.28);
}

.art-fullscreen-close-btn:active {
  transform: scale(0.95);
}

/* --- Polished 2-Tier Footer --- */
.footer {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.footer-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-teal);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-logo:hover {
  color: var(--color-plum);
}

.footer-tagline {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-soft);
  max-width: 440px;
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-policy-group {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.84rem;
}

.footer-dot {
  color: var(--border-gold);
  user-select: none;
  font-weight: 700;
  opacity: 0.7;
}

.footer-policy-btn {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: var(--transition-fast);
}

.footer-policy-btn:hover {
  color: var(--color-teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-back-to-top {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-teal);
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  background: rgba(15, 139, 141, 0.08);
  border: 1px solid rgba(15, 139, 141, 0.2);
  transition: var(--transition-fast);
}

.footer-back-to-top:hover {
  background: var(--color-teal);
  color: #FFF;
  border-color: var(--color-teal);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 139, 141, 0.2);
}

.footer-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(15, 139, 141, 0.1);
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-teal);
  text-decoration: none;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(15, 139, 141, 0.25);
  background: rgba(15, 139, 141, 0.05);
  transition: var(--transition-fast);
}

.footer-social-btn:hover {
  background: var(--color-teal);
  color: #FFF;
  border-color: var(--color-teal);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 139, 141, 0.2);
}

.footer-credit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  color: var(--text-soft);
  border: 1px solid rgba(15, 139, 141, 0.2);
  background: rgba(15, 139, 141, 0.04);
  transition: var(--transition-fast);
  opacity: 0.8;
}

html[data-theme="dark"] .footer-credit-btn {
  background: rgba(20, 30, 46, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
}

.footer-credit-btn:hover {
  opacity: 1;
  color: var(--color-teal);
  border-color: var(--color-teal);
  background: rgba(15, 139, 141, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 139, 141, 0.2);
}

.policy-modal-card {
  max-width: 680px;
}

.policy-modal-body h4 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--color-teal);
  margin-top: 1.8rem;
  margin-bottom: 0.5rem;
}

.policy-modal-body ul {
  padding-left: 1.4rem;
  margin-bottom: 1.4rem;
  color: #4A5568;
}

html[data-theme="dark"] .policy-modal-body ul {
  color: var(--text-soft);
}



/* Disabled Coming Soon state styles */
.btn-disabled {
  opacity: 0.85;
  cursor: default !important;
  pointer-events: none;
  background: linear-gradient(135deg, #718096, #4a5568) !important;
  box-shadow: none !important;
}

.card-btn-disabled {
  opacity: 0.75;
  cursor: default !important;
  pointer-events: none;
  border-color: rgba(0, 0, 0, 0.18) !important;
  color: var(--text-soft) !important;
  background: rgba(0, 0, 0, 0.03) !important;
}

.book-portal-disabled {
  cursor: default !important;
}

.book-portal-disabled .portal-click {
  color: var(--text-soft) !important;
  font-weight: 600;
}


/* --- Dark Theme Surface Overrides --- */
html[data-theme="dark"] .header {
  background: rgba(13, 20, 32, 0.88);
  border-bottom-color: rgba(82, 206, 208, 0.14);
}

html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .theme-toggle {
  background: rgba(24, 35, 51, 0.9);
}

html[data-theme="dark"] .btn-secondary:hover {
  background: rgba(32, 45, 63, 0.98);
}

html[data-theme="dark"] .book-portal,
html[data-theme="dark"] .book-front-cover {
  background: radial-gradient(ellipse at 50% 36%, #451054 0%, #25062F 55%, #13021B 100%);
  border-color: rgba(230, 190, 80, 0.75);
}

html[data-theme="dark"] .book-3d-novel {
  background: #14021C;
  box-shadow: 
    -6px 10px 32px rgba(0, 0, 0, 0.7),
    16px 24px 50px rgba(0, 0, 0, 0.7),
    0 0 25px rgba(140, 58, 128, 0.35),
    0 0 0 1.5px rgba(230, 190, 80, 0.5);
}

html[data-theme="dark"] .book-pages-stack {
  background: #EFE7D8;
}

html[data-theme="dark"] .page-layer {
  background: #E9DFCD;
}

html[data-theme="dark"] .page-layer-1 {
  background: #F4EEDF;
}

html[data-theme="dark"] .page-excerpt {
  color: #1F2937;
}

html[data-theme="dark"] .portal-badge,
html[data-theme="dark"] .card-status-pill {
  background: rgba(215, 139, 203, 0.12);
}

html[data-theme="dark"] .bio-frame {
  background: linear-gradient(135deg, #253044, #121B2A);
}

html[data-theme="dark"] .frame-inner {
  border: none;
}

html[data-theme="dark"] .journal-preview {
  background: rgba(11, 18, 29, 0.58);
}

html[data-theme="dark"] .journal-preview:hover {
  background: rgba(30, 42, 59, 0.9);
}

html[data-theme="dark"] .contact-box {
  background: linear-gradient(145deg, rgba(26, 37, 53, 0.94), rgba(13, 20, 32, 0.98));
}

html[data-theme="dark"] .modal-card {
  background: #111B2A;
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
  background: rgba(20, 30, 44, 0.96);
}

html[data-theme="dark"] .modal-body {
  color: var(--text-muted);
}

html[data-theme="dark"] .modal-icon-btn {
  color: var(--text-dark);
  background: rgba(29, 42, 60, 0.96);
  border-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .btn-secondary-sm {
  color: var(--text-dark);
  border-color: rgba(255, 255, 255, 0.18);
}

html[data-theme="dark"] .mobile-nav {
  background: rgba(13, 20, 32, 0.92);
  border-color: rgba(82, 206, 208, 0.24);
}

/* --- Responsive Layout --- */
@media (max-width: 992px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    padding-top: 3rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3rem 2rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .header {
    padding: 1rem 1.25rem;
  }

  .header-actions {
    margin-left: auto;
  }

  .nav {
    display: none;
  }

  body {
    padding-bottom: 0;
  }

  .mobile-nav {
    position: sticky;
    top: 4.05rem;
    z-index: 90;
    display: flex;
    width: 100%;
    max-width: none;
    padding: 0.35rem 0.6rem;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    background: rgba(250, 247, 242, 0.92);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .mobile-nav a {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.25rem;
    color: var(--text-dark);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: center;
    text-decoration: none;
  }

  .mobile-nav a:active,
  .mobile-nav a:focus-visible {
    color: var(--color-teal);
  }

  section[id] {
    scroll-margin-top: 7.5rem;
  }

  .parallax-layer {
    transform: none !important;
  }

  .theme-toggle {
    min-width: 74px;
    padding: 0.44rem 0.68rem;
  }

  .hero-title {
    font-size: clamp(2.25rem, 11vw, 2.8rem);
  }

  .hero {
    min-height: auto;
    gap: 2.75rem;
    padding-top: 3rem;
    padding-bottom: 4.5rem;
  }

  .hero-copy,
  .hero-art,
  .bio-copy,
  .story-card,
  .journal-card,
  .contact-box {
    min-width: 0;
  }

  .hero-intro {
    font-size: 1rem;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .hero-actions > * {
    justify-content: center;
    text-align: center;
  }

  .hero-art {
    width: 100%;
  }

  .moon-ring {
    width: 250px;
    height: 250px;
  }

  .book-portal,
  .book-3d-novel {
    width: min(100%, 275px);
    height: 380px;
  }

  .book-front-cover {
    padding: 1.75rem 1.25rem;
  }

  .title-row-1 { font-size: 1.25rem; }
  .title-row-2 { font-size: 1.65rem; }
  .title-row-3 { font-size: 1.05rem; }
  .title-row-4 { font-size: 1.25rem; }

  .about,
  .stories {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .about-grid {
    gap: 2.5rem;
    padding: 2.5rem 1.5rem;
  }

  .bio-lead {
    font-size: 1.1rem;
  }

  .bio-text {
    font-size: 1rem;
  }

  .bio-frame {
    max-width: 280px;
  }

  .bio-heading, .section-heading h2, .contact-box h2 {
    font-size: 2.3rem;
  }

  .section-heading {
    margin-bottom: 2.5rem;
  }

  .stories-intro {
    font-size: 1rem;
  }

  .cards-grid {
    gap: 1.25rem;
  }

  .story-card {
    padding: 1.75rem 1.4rem;
  }

  .story-card h3 {
    font-size: 1.75rem;
  }

  .card-tag-row {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .journal {
    padding-top: 2rem;
    padding-bottom: 4rem;
  }

  .journal-card {
    padding: 2.25rem 1.25rem;
  }

  .journal-card h2 {
    font-size: 2.3rem;
  }

  .journal-card p {
    font-size: 1rem;
  }

  .journal-preview {
    padding: 1.25rem 1rem;
  }

  .journal-entry h4 {
    font-size: 1.45rem;
  }

  .newsletter {
    padding-top: 2rem;
    padding-bottom: 3.5rem;
  }

  .newsletter-card {
    padding: 2.5rem 1.4rem;
  }

  .newsletter-content h2 {
    font-size: 2.3rem;
  }

  .newsletter-form {
    flex-direction: column;
    width: 100%;
  }

  .newsletter-form input[type="email"],
  .newsletter-form .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .contact {
    padding-top: 2rem;
    padding-bottom: 5rem;
  }

  .contact-box {
    padding: 3rem 1.25rem;
  }

  .contact-box p {
    font-size: 1rem;
  }

  .contact-email-btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    padding: 1rem 1.1rem;
    font-size: 0.9rem;
    gap: 0.5rem;
  }

  .contact-email-btn span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .modal-body {
    padding: 2rem 1.25rem;
    font-size: 1rem;
  }

  .modal-backdrop {
    padding: 0.75rem;
  }

  .modal-card {
    max-height: calc(100vh - 1.5rem);
  }

  .modal-header {
    flex-wrap: wrap;
    gap: 0.85rem;
    padding: 1.25rem 1rem;
  }

  .modal-title-wrap {
    min-width: 0;
    flex: 1 1 100%;
  }

  .modal-header h3 {
    font-size: 1.5rem;
  }

  .modal-controls {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
  }

  .modal-footer {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    padding: 1rem;
    text-align: center;
  }

  .footer {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    gap: 1.75rem;
  }

  .footer-primary {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
  }

  .footer-brand {
    align-items: center;
  }

  .footer-tagline {
    text-align: center;
  }

  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
  }

  .footer-policy-group {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .footer-secondary {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding-top: 1.25rem;
  }

  .footer-actions {
    justify-content: center;
  }
}
