@font-face {
  font-family: "CC Mild Mannered";
  src: url("../fonts/cc-mild-mannered-regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "CC Mild Mannered";
  src: url("../fonts/cc-mild-mannered-bold-italic.otf") format("opentype");
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #f2f1f6;
  --muted: #c6c3d0;
  --deep: #08080d;
  --glass: rgba(8, 8, 14, .72);
  --glass-soft: rgba(16, 16, 26, .62);
  --line: rgba(189, 164, 255, .38);
  --violet: #9870ff;
  --blue: #5fc7ff;
  --warm: #efad72;
  --header-h: 76px;
  --content: 1180px;
  --reading: 780px;
  --scroll-y: 0px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 22px); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--deep);
  color: var(--ink);
  font-family: "CC Mild Mannered", Arial, sans-serif;
  font-size: clamp(1.05rem, 1.1vw, 1.2rem);
  line-height: 1.56;
  letter-spacing: .018em;
}
body.menu-open { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: #d8ccff; text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: #fff; }
p { margin: 0 0 1.1em; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.02; font-weight: 400; letter-spacing: .035em; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 8vw, 6.8rem); }
h2 { font-size: clamp(2.2rem, 5vw, 4.7rem); }
h3 { font-size: clamp(1.65rem, 3vw, 2.75rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
  margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important; border: 0 !important;
}
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 999; transform: translateY(-150%); background: #fff; color: #000; padding: .65rem 1rem; }
.skip-link:focus { transform: none; }

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h); padding: 0 clamp(16px, 3vw, 44px);
  display: grid; grid-template-columns: minmax(120px, 190px) 1fr; align-items: center; gap: 28px;
  background: rgba(0, 0, 0, .70); border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(14px) saturate(120%); -webkit-backdrop-filter: blur(14px) saturate(120%);
}
.brand-home { display: flex; align-items: center; height: 58px; text-decoration: none; }
.brand-home img { width: 100%; max-height: 54px; object-fit: contain; object-position: left center; }
.primary-nav { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: clamp(14px, 2vw, 32px); }
.nav-pages { display: flex; align-items: center; gap: clamp(13px, 1.65vw, 28px); }
.nav-link {
  position: relative; padding: 26px 0 22px; color: rgba(255,255,255,.85); text-decoration: none;
  font-family: "CC Mild Mannered", Arial, sans-serif; font-weight: 700; font-style: italic;
  font-size: clamp(.8rem, 1.05vw, 1.05rem); line-height: 1; white-space: nowrap; transition: color .2s ease;
}
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 14px; height: 1px; background: #c8b5ff; box-shadow: 0 0 7px #9c7dff; transform: scaleX(0); transition: transform .22s ease; }
.nav-link:hover, .nav-link:focus-visible { color: #fff; }
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link.is-current::after { transform: scaleX(1); }
.social-nav { display: flex; align-items: center; gap: 8px; }
.social-link { display: grid; place-items: center; width: 31px; height: 31px; opacity: .85; transition: opacity .2s, transform .2s; }
.social-link:hover, .social-link:focus-visible { opacity: 1; transform: translateY(-2px); }
.social-link img { width: 27px; height: 27px; object-fit: contain; }
.menu-toggle { display: none; }

main { position: relative; isolation: isolate; }
.page-shell { min-height: 100vh; padding-top: var(--header-h); }
.page-backdrop {
  position: fixed; inset: 0; z-index: -3; background-position: center; background-size: cover; background-repeat: no-repeat;
  transform: scale(1.035) translate3d(0, calc(var(--scroll-y) * -.018), 0); will-change: transform;
}
.page-backdrop::after { content: ""; position: absolute; inset: 0; background: rgba(3, 3, 8, .66); }
.page-home .page-backdrop { background-image: url("../images/backgrounds/home.webp"); background-position: 60% center; }
.page-books .page-backdrop { background-image: url("../images/backgrounds/books.webp"); }
.page-stories .page-backdrop { background-image: url("../images/backgrounds/stories.webp"); }
.page-characters .page-backdrop { background-image: url("../images/backgrounds/characters.webp"); }
.page-media .page-backdrop, .page-downloads .page-backdrop { background-image: url("../images/backgrounds/media.webp"); }
.page-about .page-backdrop { background-image: url("../images/backgrounds/about.webp"); }

.container { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.reading { width: min(100%, var(--reading)); }
.eyebrow { margin-bottom: .75rem; color: #cdbdff; font-size: .9rem; letter-spacing: .15em; }
.lede { color: #f4f1fb; font-size: clamp(1.2rem, 2vw, 1.65rem); line-height: 1.42; }
.muted { color: var(--muted); }
.fine-print { color: #aaa6b4; font-size: .84rem; }
.rule { height: 1px; margin: clamp(2rem, 5vw, 4.5rem) 0; border: 0; background: linear-gradient(90deg, transparent, rgba(191,165,255,.75), transparent); }

.title-banner {
  min-height: clamp(270px, 43vh, 470px); display: flex; align-items: end; padding: clamp(52px, 8vw, 100px) 0 clamp(40px, 7vw, 76px);
  background: linear-gradient(90deg, rgba(4,4,9,.78) 0%, rgba(4,4,9,.32) 56%, transparent 90%);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.title-banner h1 { font-size: clamp(3rem, 7vw, 6.4rem); text-shadow: 0 3px 30px #000; }
.title-banner p { max-width: 700px; margin: 0; color: rgba(255,255,255,.86); font-size: clamp(1.08rem, 1.7vw, 1.35rem); }
.content-panel { padding: clamp(58px, 8vw, 110px) 0; background: linear-gradient(110deg, rgba(5,5,10,.92), rgba(9,9,16,.78) 54%, rgba(6,6,12,.62)); }

.hero {
  position: relative; min-height: calc(100svh - var(--header-h)); display: flex; align-items: center; padding: clamp(58px, 8vw, 110px) 0;
  overflow: hidden; scroll-snap-align: start;
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(3,3,8,.88) 0%, rgba(5,5,12,.63) 42%, rgba(5,5,12,.1) 72%); }
.hero-content { width: min(690px, 68vw); }
.series-logo { width: min(640px, 88vw); max-height: 270px; object-fit: contain; object-position: left center; filter: drop-shadow(0 10px 34px rgba(0,0,0,.8)); }
.tagline { margin: 1rem 0 1.3rem; font-size: clamp(1.3rem, 2.4vw, 2.1rem); line-height: 1.15; text-shadow: 0 3px 20px #000; }
.hero-copy { max-width: 660px; color: rgba(255,255,255,.9); font-size: clamp(1.08rem, 1.45vw, 1.28rem); }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); color: rgba(255,255,255,.7); font-size: .82rem; letter-spacing: .12em; text-decoration: none; }
.scroll-cue::after { content: "↓"; display: block; text-align: center; font-size: 1.35rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .72rem 1.25rem;
  border: 1px solid transparent; border-radius: 5px; text-decoration: none; line-height: 1.1; text-align: center; transition: transform .18s, background .18s, border-color .18s, box-shadow .18s;
}
.button:hover, .button:focus-visible { transform: translateY(-2px); }
.button-primary { background: linear-gradient(135deg, #8260e9, #5d42b7); color: #fff; box-shadow: 0 8px 26px rgba(92,63,183,.34); }
.button-primary:hover { background: linear-gradient(135deg, #9a79fa, #6b4dcc); box-shadow: 0 10px 32px rgba(121,88,224,.42); }
.button-secondary { background: rgba(13,13,22,.66); border-color: rgba(213,199,255,.38); color: #f4efff; backdrop-filter: blur(10px); }
.button-secondary:hover { background: rgba(34,28,51,.78); border-color: rgba(229,219,255,.7); }
.button-disabled { opacity: .65; cursor: default; }
.button-disabled:hover { transform: none; }

.home-intro { padding: clamp(75px, 10vw, 140px) 0; background: linear-gradient(110deg, #0a0910 0%, #131020 58%, #09090e); scroll-snap-align: start; }
.home-intro .reading { margin-left: clamp(0px, 6vw, 80px); }
.home-intro strong { color: #fff; }
.book-environment {
  position: relative; min-height: 88vh; display: flex; align-items: center; padding: clamp(70px, 10vw, 130px) 0; overflow: hidden; scroll-snap-align: start;
}
.book-environment::before, .book-environment::after { content: ""; position: absolute; inset: -5%; z-index: -2; }
.book-environment::before { background: var(--book-bg) center / cover no-repeat; filter: blur(6px) saturate(.85); transform: scale(1.09) translate3d(0, calc(var(--scroll-y) * -.012), 0); }
.book-environment::after { z-index: -1; background: linear-gradient(var(--shade-direction, 90deg), rgba(4,4,9,.9), rgba(4,4,9,.6) 53%, rgba(4,4,9,.75)); }
.book-grid { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(36px, 8vw, 100px); }
.book-environment:nth-of-type(even) .book-cover { order: 2; }
.book-environment:nth-of-type(even) .book-copy { order: 1; }
.book-cover { max-height: 680px; margin: auto; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(0,0,0,.72)); }
.wrap-cover { width: 100%; max-height: 560px; border-radius: 7px; object-fit: contain; box-shadow: 0 22px 60px rgba(0,0,0,.65); }
.book-number { color: #c7b6ff; letter-spacing: .16em; font-size: .85rem; }
.book-copy { max-width: 680px; padding: clamp(24px, 4vw, 54px); border-left: 1px solid rgba(205,187,255,.42); background: linear-gradient(105deg, rgba(9,8,17,.74), rgba(9,8,17,.15)); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.card { overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: rgba(10,10,17,.82); box-shadow: 0 18px 52px rgba(0,0,0,.3); }
.card-image-link { display: block; overflow: hidden; background: #050508; }
.card-image { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; transition: transform .35s ease; }
.card-image-link:hover .card-image { transform: scale(1.025); }
.card-body { padding: clamp(24px, 4vw, 42px); }
.card-kicker { color: #bca9f5; font-size: .82rem; letter-spacing: .13em; }

.story-card { display: grid; grid-template-columns: minmax(190px, .68fr) minmax(0, 1.32fr); }
.story-card .card-image-link { height: 100%; }
.story-card .card-image { height: 100%; aspect-ratio: auto; object-fit: cover; }
.story-stack { display: grid; gap: clamp(34px, 5vw, 62px); }

.character-list { display: grid; gap: clamp(70px, 10vw, 140px); }
.character-profile { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); align-items: center; gap: clamp(34px, 7vw, 90px); }
.character-profile:nth-child(even) .character-copy { order: 2; }
.character-profile:nth-child(even) .character-portrait { order: 1; }
.character-copy { padding: clamp(24px, 4vw, 52px); background: linear-gradient(110deg, rgba(8,8,15,.85), rgba(15,13,26,.46)); border-left: 1px solid rgba(183,159,255,.45); }
.character-portrait img { width: 100%; max-height: 690px; object-fit: cover; object-position: top center; border: 1px solid rgba(255,255,255,.14); border-radius: 7px; box-shadow: 0 22px 60px rgba(0,0,0,.52); }

.media-stack { display: grid; gap: clamp(60px, 9vw, 110px); }
.media-feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); align-items: center; gap: clamp(32px, 6vw, 76px); }
.media-feature:nth-child(even) .media-visual { order: 2; }
.media-feature:nth-child(even) .media-copy { order: 1; }
.media-visual img { width: 100%; border: 1px solid rgba(255,255,255,.14); border-radius: 7px; box-shadow: 0 22px 60px rgba(0,0,0,.48); }
.media-copy { padding: clamp(18px, 3vw, 42px); background: linear-gradient(115deg, rgba(8,8,14,.8), rgba(14,12,25,.3)); }
.trailer-shell { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; background: #000; box-shadow: 0 22px 60px rgba(0,0,0,.55); }
.trailer-shell video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.trailer-play { position: absolute; inset: 0; border: 0; cursor: pointer; color: #fff; background: linear-gradient(0deg, rgba(0,0,0,.58), transparent 65%); display: grid; place-items: end start; padding: 24px; font: inherit; text-align: left; }
.trailer-play span { display: inline-flex; align-items: center; gap: .7rem; padding: .65rem 1rem; border-radius: 5px; background: rgba(9,8,16,.72); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(8px); }
.trailer-play span::before { content: "▶"; }
.trailer-play.is-hidden { display: none; }

.wallpaper-book + .wallpaper-book { margin-top: clamp(80px, 11vw, 150px); }
.wallpaper-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.wallpaper { overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: rgba(7,7,12,.82); }
.wallpaper a.preview { display: block; overflow: hidden; background: #020204; }
.wallpaper img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s; }
.wallpaper.portrait img { aspect-ratio: 4 / 5; object-fit: cover; object-position: center; }
.wallpaper a:hover img { transform: scale(1.018); }
.wallpaper-info { padding: 18px 20px 22px; }
.wallpaper-info h4 { margin-bottom: .15rem; }
.wallpaper-info p { margin-bottom: .7rem; color: var(--muted); font-size: .9rem; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); align-items: start; gap: clamp(40px, 8vw, 100px); }
.author-portrait { position: sticky; top: calc(var(--header-h) + 28px); }
.author-portrait img { border: 1px solid rgba(255,255,255,.14); border-radius: 7px; box-shadow: 0 22px 60px rgba(0,0,0,.5); }
.about-section + .about-section { margin-top: clamp(50px, 8vw, 90px); }
.personal-statement { margin-top: clamp(90px, 13vw, 170px); padding-top: clamp(65px, 9vw, 110px); border-top: 1px solid rgba(197,177,255,.4); }
.personal-statement blockquote { margin: 0; padding-left: clamp(20px, 4vw, 48px); border-left: 2px solid rgba(190,165,255,.62); }
.closing-line { font-size: clamp(1.35rem, 2.4vw, 2rem); color: #fff; }

.wiki-cta { margin-top: clamp(70px, 10vw, 130px); padding: clamp(32px, 6vw, 66px); border: 1px solid rgba(196,176,255,.32); border-radius: 7px; background: linear-gradient(120deg, rgba(40,30,72,.66), rgba(8,8,14,.74)); text-align: center; }
.wiki-cta p { max-width: 760px; margin: 0 auto 1.2rem; }

.amazon-cta { position: relative; z-index: 2; padding: clamp(65px, 9vw, 110px) 20px; display: grid; place-items: center; gap: 16px; background: radial-gradient(circle at 50% 30%, rgba(77,57,125,.32), transparent 43%), #08080d; text-align: center; }
.amazon-cta img { width: min(430px, 78vw); max-height: 270px; object-fit: contain; transition: transform .25s, filter .25s; }
.amazon-cta a:hover img { transform: translateY(-3px); filter: drop-shadow(0 0 18px rgba(164,132,255,.36)); }
.amazon-text { font-size: clamp(1.05rem, 2vw, 1.35rem); }
.site-footer { position: relative; z-index: 2; padding: 25px max(20px, 4vw); background: rgba(0,0,0,.78); border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.72); text-align: center; font-size: .78rem; line-height: 1.45; }
.site-footer p { margin: .25rem auto; max-width: 1000px; }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (min-width: 900px) {
  .page-home { scroll-snap-type: y proximity; }
}

@media (max-width: 1120px) {
  :root { --header-h: 70px; }
  .site-header { grid-template-columns: minmax(100px, 145px) 1fr; gap: 15px; padding-inline: 18px; }
  .nav-pages { gap: 13px; }
  .nav-link { font-size: .77rem; }
  .social-nav { gap: 4px; }
  .social-link { width: 26px; height: 26px; }
  .social-link img { width: 23px; height: 23px; }
}

@media (max-width: 880px) {
  :root { --header-h: 68px; }
  .site-header { grid-template-columns: minmax(120px, 175px) auto; }
  .menu-toggle { display: grid; width: 44px; height: 44px; padding: 9px; place-content: center; gap: 5px; border: 1px solid rgba(255,255,255,.2); border-radius: 4px; background: rgba(0,0,0,.3); }
  .menu-toggle > span:not(.sr-only) { display: block; width: 23px; height: 2px; background: rgba(255,255,255,.88); transition: transform .25s, opacity .2s; }
  .menu-open .menu-toggle > span:nth-of-type(2) { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-toggle > span:nth-of-type(3) { opacity: 0; }
  .menu-open .menu-toggle > span:nth-of-type(4) { transform: translateY(-7px) rotate(-45deg); }
  .primary-nav { position: fixed; inset: var(--header-h) 0 0; display: flex; flex-direction: column; justify-content: center; gap: 28px; visibility: hidden; opacity: 0; transform: translateY(-12px); background: rgba(4,4,9,.97); transition: opacity .22s, transform .22s, visibility .22s; }
  .menu-open .primary-nav { visibility: visible; opacity: 1; transform: none; }
  .nav-pages { flex-direction: column; gap: 3px; }
  .nav-link { padding: 9px 6px; font-size: clamp(1.2rem, 5vw, 1.7rem); }
  .nav-link::after { bottom: 4px; }
  .social-nav { gap: 14px; }
  .social-link { width: 38px; height: 38px; }
  .social-link img { width: 33px; height: 33px; }
  .hero-content { width: min(100%, 660px); }
  .hero::before { background: linear-gradient(90deg, rgba(3,3,8,.89), rgba(4,4,10,.58) 80%, rgba(4,4,10,.35)); }
  .book-grid, .media-feature, .about-grid { grid-template-columns: 1fr; }
  .book-environment:nth-of-type(even) .book-cover, .book-environment:nth-of-type(even) .book-copy, .media-feature:nth-child(even) .media-visual, .media-feature:nth-child(even) .media-copy { order: initial; }
  .book-cover { max-height: 520px; }
  .author-portrait { position: static; width: min(420px, 100%); }
  .story-card { grid-template-columns: minmax(170px, .55fr) minmax(0, 1.45fr); }
}

@media (max-width: 660px) {
  .container { width: min(calc(100% - 28px), var(--content)); }
  .page-backdrop { background-position: center; }
  .page-home .page-backdrop { background-position: 68% center; }
  .title-banner { min-height: 300px; }
  .title-banner h1 { font-size: clamp(2.55rem, 15vw, 4.7rem); }
  .hero { min-height: calc(100svh - var(--header-h)); align-items: end; padding-bottom: 92px; }
  .series-logo { max-height: 190px; }
  .cards, .wallpaper-grid { grid-template-columns: 1fr; }
  .story-card, .character-profile { grid-template-columns: 1fr; }
  .story-card .card-image-link { max-height: 540px; }
  .story-card .card-image { height: auto; max-height: 540px; object-fit: contain; }
  .character-profile .character-copy, .character-profile .character-portrait, .character-profile:nth-child(even) .character-copy, .character-profile:nth-child(even) .character-portrait { order: initial; }
  .character-profile .character-portrait { order: -1 !important; }
  .character-portrait img { max-height: 560px; }
  .button { width: 100%; }
  .book-copy, .character-copy { padding: 24px 20px; }
  .media-feature { display: block; }
  .media-copy { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
  .page-backdrop, .book-environment::before { transform: scale(1.035); }
  [data-reveal] { opacity: 1; transform: none; }
}
