:root {
  --bg: #04111f;
  --bg-elevated: #08182d;
  --panel: rgba(9, 24, 44, 0.82);
  --panel-warm: rgba(255, 248, 243, 0.76);
  --text: #eef5ff;
  --text-dark: #18212f;
  --muted: rgba(238, 245, 255, 0.72);
  --muted-dark: rgba(24, 33, 47, 0.72);
  --line: rgba(255,255,255,0.1);
  --blue: #3ea7ff;
  --blue-strong: #1b7be0;
  --gold: #ffb173;
  --gold-strong: #ff7d4d;
  --warm-bg: linear-gradient(180deg, #fff8f2 0%, #f4ebe5 100%);
  --max: 1240px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

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

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0b2540 0%, var(--bg) 35%, #030a13 100%);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-shell { overflow: hidden; }
.container { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.section { padding: 110px 0; position: relative; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(4, 13, 24, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrap {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.nav-links a,
.eyebrow {
  font-family: Orbitron, Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.brand {
  font-weight: 800;
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  color: rgba(238, 245, 255, 0.88);
}

.nav-links a {
  position: relative;
  font-size: 0.76rem;
  opacity: 0.92;
  padding-bottom: 6px;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #3ea7ff, #6ec7ff);
  transition: width 0.25s ease;
}

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

.nav-links a:hover {
  color: #ffffff;
}

.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}

.hero-media,
.hero-overlay,
.hero-atmosphere,
.hero-particles,
.hero-grid {
  position: absolute;
  inset: 0;
}

.hero-media {
  background: url('assets/images/global-divide-hero.png') center center / cover no-repeat;
  transform: scale(1.04);
  animation: heroDrift 14s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(2, 8, 16, 0.92) 0%, rgba(4, 13, 24, 0.66) 36%, rgba(4, 13, 24, 0.2) 58%, rgba(4, 13, 24, 0.88) 100%),
    linear-gradient(180deg, rgba(4, 13, 24, 0.15) 0%, rgba(4, 13, 24, 0.15) 72%, rgba(4, 13, 24, 0.92) 100%);
}

.hero-atmosphere {
  background:
    radial-gradient(circle at 22% 30%, rgba(62,167,255,0.10), transparent 24%),
    radial-gradient(circle at 72% 38%, rgba(255,168,110,0.16), transparent 30%),
    radial-gradient(circle at 60% 78%, rgba(255,120,80,0.10), transparent 22%);
  mix-blend-mode: screen;
  opacity: 0.9;
  animation: atmosphereDrift 18s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-particles {
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.22) 1.2px, transparent 1.2px),
    radial-gradient(circle, rgba(255,190,140,0.20) 1.4px, transparent 1.4px),
    radial-gradient(circle, rgba(62,167,255,0.18) 1px, transparent 1px);
  background-size: 180px 180px, 240px 240px, 210px 210px;
  background-position: 0 0, 40px 80px, 120px 40px;
  opacity: 0.28;
  animation: particlesFloat 28s linear infinite;
  pointer-events: none;
}

.hero-grid {
  background-image:
    linear-gradient(rgba(62,167,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62,167,255,0.08) 1px, transparent 1px);
  background-size: 70px 70px;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 20%, rgba(0,0,0,1) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(3, 14, 28, 0.88) 0%,
    rgba(3, 14, 28, 0.68) 32%,
    rgba(3, 14, 28, 0.38) 58%,
    rgba(3, 14, 28, 0.12) 78%,
    rgba(3, 14, 28, 0) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 140px 0 120px;
  width: min(720px, 100%);
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.86);
}

.accent-blue { color: #87cfff; }
.accent-gold { color: #ffc89b; }

.hero h1,
.section-heading h2,
.universe-card h3,
.book-panel h3,
.about-section h2 {
  margin: 0;
  font-family: Orbitron, Inter, sans-serif;
  line-height: 0.98;
}

.hero h1 {
  font-size: clamp(3.2rem, 8vw, 6.4rem);
  max-width: 12ch;
  position: relative;
  text-shadow:
    0 12px 40px rgba(0,0,0,0.45),
    0 0 30px rgba(62,167,255,0.15),
    0 0 60px rgba(62,167,255,0.08);
}

.hero h1::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: radial-gradient(
    circle at center,
    rgba(62,167,255,0.18),
    transparent 70%
  );
  z-index: -1;
  filter: blur(40px);
}

.hero-copy {
  width: min(580px, 100%);
  margin: 24px 0 0;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.96rem;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease;
  border: 1px solid transparent;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, #2f94ff 0%, #176cd7 100%);
  box-shadow: 0 18px 40px rgba(34, 120, 214, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 22px 46px rgba(34, 120, 214, 0.42);
}

.btn-secondary {
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.04);
}

.btn-secondary:hover {
  border-color: rgba(255,255,255,0.42);
}

.btn-warm {
  background: linear-gradient(135deg, #ffb57a 0%, #ff7f53 100%);
  box-shadow: 0 18px 40px rgba(255, 130, 80, 0.28);
  color: white;
}

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

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin-top: 12px;
}

.section-heading p:last-child {
  margin-top: 16px;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.7;
}

.center p:last-child {
  margin-left: auto;
  margin-right: auto;
}

.universe-gateway {
  background:
    radial-gradient(circle at 20% 10%, rgba(62,167,255,0.12), transparent 22%),
    radial-gradient(circle at 80% 10%, rgba(255,177,115,0.16), transparent 24%),
    linear-gradient(180deg, #071524 0%, #081624 100%);
}

.universe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.universe-card {
  min-height: 430px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-end;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.universe-card::before,
.universe-card::after,
.universe-card__glow {
  content: "";
  position: absolute;
  inset: 0;
}

.universe-card::before {
  z-index: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  transition: transform 0.45s ease, filter 0.45s ease;
}

.universe-card::after {
  z-index: 1;
  background: linear-gradient(180deg, rgba(5, 12, 20, 0.12) 0%, rgba(5, 12, 20, 0.8) 70%, rgba(5, 12, 20, 0.96) 100%);
}

.universe-card__glow {
  z-index: 1;
  opacity: 0.45;
  mix-blend-mode: screen;
}

.sci-fi-card::before {
  background-image:
    linear-gradient(135deg, rgba(4, 19, 34, 0.22) 0%, rgba(4, 19, 34, 0.22) 100%),
    url('assets/images/global-divide-hero.png');
}

.sci-fi-card__fallback { background: none; }

.sci-fi-card .universe-card__glow {
  background:
    radial-gradient(circle at 28% 16%, rgba(62,167,255,0.45), transparent 20%),
    radial-gradient(circle at 82% 72%, rgba(62,167,255,0.18), transparent 32%);
}

.romance-card::before {
  background-image:
    linear-gradient(135deg, rgba(48,23,38,0.45), rgba(48,23,38,0.85)),
    url('assets/images/jsywg-universe-bg.png');
  background-size: cover;
  background-position: right center;
}

.romance-card::after {
  background: linear-gradient(180deg, rgba(40, 19, 30, 0.14) 0%, rgba(40, 19, 30, 0.72) 70%, rgba(35, 18, 28, 0.92) 100%);
}

.romance-card .universe-card__glow {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 183, 129, 0.38), transparent 18%),
    radial-gradient(circle at 80% 28%, rgba(255, 235, 208, 0.16), transparent 34%);
}

.universe-card:hover::before {
  transform: scale(1.08);
  filter: saturate(1.08);
}

.universe-card:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.universe-card__content {
  position: relative;
  z-index: 2;
  padding: 34px;
}

.universe-card h3 {
  margin-top: 10px;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.universe-card h3 span { font-size: 0.9em; }

.universe-card p:not(.eyebrow) {
  margin: 18px 0 24px;
  max-width: 36ch;
  line-height: 1.7;
  color: rgba(255,255,255,0.8);
}

.dark-block {
  background: linear-gradient(180deg, #061423 0%, #081a2f 100%);
}

.warm-block {
  background: var(--warm-bg);
  color: var(--text-dark);
}

.warm-block .section-heading p:last-child,
.warm-card p,
.world-tile p,
.about-section p,
.about-panel li,
.book-panel p {
  color: var(--muted-dark);
}

.character-grid {
  display: grid;
  gap: 24px;
}

.character-grid-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.character-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.character-card {
  min-height: 100%;
  border-radius: 24px;
  padding: 28px 20px 26px;
  text-align: center;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.24s ease;
}

.character-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.dark-card {
  background: linear-gradient(180deg, rgba(8, 25, 45, 0.86) 0%, rgba(7, 20, 36, 0.86) 100%);
  border-color: rgba(62,167,255,0.14);
}

.dark-card:hover {
  box-shadow: 0 15px 40px rgba(0,140,255,0.35);
  border-color: rgba(62,167,255,0.32);
}

.warm-card {
  background: rgba(255,255,255,0.52);
  border-color: rgba(209, 143, 94, 0.14);
  box-shadow: 0 20px 56px rgba(119, 82, 56, 0.08);
}

.warm-card:hover {
  box-shadow: 0 15px 40px rgba(255,140,100,0.35);
  border-color: rgba(223, 146, 89, 0.28);
}

.character-figure {
  height: 360px;
  display: flex;
  align-items: end;
  justify-content: center;
  margin-bottom: 20px;
}

.character-figure img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,0.25));
}

.character-card h3 {
  margin: 0;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.character-card p {
  margin: 10px auto 0;
  max-width: 24ch;
  font-size: 0.95rem;
  line-height: 1.6;
}

.dark-card p { color: rgba(238,245,255,0.72); }

.worlds-section {
  background: linear-gradient(180deg, #f5ede7 0%, #fdf8f4 100%);
  color: var(--text-dark);
}

.worlds-grid,
.books-grid {
  display: grid;
  gap: 24px;
}

.worlds-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.world-tile,
.book-panel,
.about-panel {
  border-radius: var(--radius-lg);
}

.world-tile {
  background: rgba(255,255,255,0.76);
  padding: 34px;
  border: 1px solid rgba(18, 29, 43, 0.08);
  box-shadow: 0 16px 40px rgba(46, 34, 27, 0.08);
}

.world-tile h3,
.book-panel h3 {
  margin: 0;
  font-size: 1.6rem;
}

.world-tile p {
  margin-top: 14px;
  line-height: 1.75;
}

.books-section {
  background: linear-gradient(180deg, #081523 0%, #050f1a 100%);
}

.books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.book-panel {
  min-height: 280px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow);
}

.book-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.92;
}

.book-panel > * { position: relative; z-index: 1; }

.book-tag {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
}

.book-panel h3 { margin-top: 18px; }

.book-panel p {
  margin-top: 14px;
  line-height: 1.75;
  color: rgba(238,245,255,0.75);
  max-width: 28ch;
}

.sci-fi-book::before {
  background:
    radial-gradient(circle at 22% 18%, rgba(62,167,255,0.34), transparent 20%),
    linear-gradient(135deg, #0c2847 0%, #11263a 44%, #0a1726 100%);
}

.romance-book::before {
  background:
    radial-gradient(circle at 76% 18%, rgba(255,192,140,0.34), transparent 20%),
    linear-gradient(135deg, #5b2e44 0%, #8b504c 44%, #e39f71 100%);
}

.future-book::before {
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,0.14), transparent 18%),
    linear-gradient(135deg, #222f40 0%, #17202d 44%, #0a1018 100%);
}

.about-section {
  background: linear-gradient(180deg, #0a1726 0%, #07111d 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: stretch;
}

.about-section p {
  line-height: 1.8;
  color: var(--muted);
}

.about-panel {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  padding: 34px;
}

.about-panel__label {
  margin: 0 0 18px;
  font-family: Orbitron, Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}

.about-panel ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 14px;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.js-animate .fade-in {
  opacity: 0;
  transform: translateY(40px);
}

.js-animate .fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

.universe-divider {
  position: relative;
  background: linear-gradient(
    180deg,
    #071524 0%,
    #1a0e14 50%,
    #2a1418 100%
  );
  padding: 120px 0;
  text-align: center;
  overflow: hidden;
}

.universe-divider::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(255,120,90,0.18), transparent 60%);
  opacity: 0.6;
  pointer-events: none;
}

.universe-divider h2 {
  font-family: Orbitron, sans-serif;
  font-size: 2rem;
  letter-spacing: 0.22em;
  margin: 0;
  position: relative;
}

.universe-divider p {
  margin-top: 14px;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  opacity: 0.8;
  text-transform: uppercase;
}

.divider-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.4),
    transparent
  );
}

.universe-divider h2 {
  font-family: Orbitron, sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.18em;
}

.universe-divider p {
  position: absolute;
  transform: translateY(28px);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  opacity: 0.7;
}

@media (max-width: 1200px) {
  .character-grid-five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .books-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .nav-wrap { padding: 14px 0; }
  .nav-links { gap: 16px; }

  .universe-grid,
  .worlds-grid,
  .about-grid,
  .character-grid-four,
  .character-grid-five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section { padding: 88px 0; }
  .hero { min-height: auto; }
  .hero-content { padding: 120px 0 96px; }

  .hero-particles { opacity: 0.16; }
  .hero-atmosphere { opacity: 0.72; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 24px), var(--max)); }
  .site-header { position: static; }

  .nav-wrap,
  .nav-links,
  .hero-actions,
  .universe-grid,
  .worlds-grid,
  .about-grid,
  .character-grid-four,
  .character-grid-five {
    grid-template-columns: 1fr;
    display: grid;
  }

  .nav-links { gap: 10px; }
  .hero-content { padding: 88px 0 82px; }
  .hero h1 { max-width: 8ch; }
  .section-heading { margin-bottom: 34px; }
  .universe-card { min-height: 380px; }
  .character-figure { height: 320px; }

  .character-card,
  .world-tile,
  .book-panel,
  .about-panel,
  .universe-card__content {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-particles { display: none; }
  .hero-atmosphere { opacity: 0.55; }
}

@keyframes heroDrift {
  0% {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.07) translate3d(-6px, -10px, 0);
  }
}

@keyframes atmosphereDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1.01);
    opacity: 0.78;
  }
  100% {
    transform: translate3d(-14px, -8px, 0) scale(1.05);
    opacity: 0.98;
  }
}

@keyframes particlesFloat {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-8px, -42px, 0);
  }
}
.sci-fi-card:hover {
  box-shadow:
    0 20px 60px rgba(0,0,0,0.4),
    0 0 54px rgba(62,167,255,0.30);
}

.romance-card:hover {
  box-shadow:
    0 20px 60px rgba(0,0,0,0.4),
    0 0 54px rgba(255,177,115,0.30);
}

.universe-card::before,
.universe-card::after,
.universe-card__glow {
  transition: opacity 0.35s ease, transform 0.45s ease, filter 0.45s ease;
}

.universe-card__content {
  transition: transform 0.3s ease;
}

.universe-card:hover .universe-card__content {
  transform: translateY(-4px);
}

.universe-card::after {
  transition: opacity 0.35s ease;
}

.sci-fi-card:hover::after {
  opacity: 0.88;
}

.romance-card:hover::after {
  opacity: 0.82;
}
.character-card {
  position: relative;
  overflow: hidden;
}

.character-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(255,255,255,0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.character-card:hover::before {
  opacity: 1;
}

.character-figure img {
  transition: transform 0.35s ease, filter 0.35s ease;
}

.character-card:hover .character-figure img {
  transform: scale(1.06);
  filter: drop-shadow(0 22px 40px rgba(0,0,0,0.45));
}
.universe-card::before {
  position: absolute;
  inset: 0;
}

.universe-card::after {
  content: "";
  position: absolute;
  top: -100%;
  left: -60%;
  width: 50%;
  height: 300%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.18),
    transparent
  );
  transform: rotate(25deg);
  transition: transform 0.7s ease;
  pointer-events: none;
}

.universe-card:hover::after {
  transform: translateX(320%) rotate(25deg);
}
/* ==========================================
   BOOK COVERS + PURCHASE BUTTONS UPGRADE
   (Non-destructive addition)
========================================== */

.book-cover {
  margin-top: 18px;
  margin-bottom: 18px;
  display: flex;
  justify-content: center;
}

.book-cover img {
  width: 180px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.book-panel:hover .book-cover img {
  transform: scale(1.05);
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* Purchase buttons */

.book-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.book-actions .btn {
  min-height: 44px;
  font-size: 0.85rem;
  padding: 0 16px;
}

/* Slight spacing improvement for book panels */

.book-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Mobile improvements */

@media (max-width: 640px) {

  .book-cover img {
    width: 140px;
  }

  .book-actions {
    justify-content: center;
  }
}
.book-panel {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.book-panel:hover {
  transform: translateY(-8px);
}

.sci-fi-book:hover {
  box-shadow:
    0 22px 60px rgba(0,0,0,0.42),
    0 0 40px rgba(62,167,255,0.20);
}

.romance-book:hover {
  box-shadow:
    0 22px 60px rgba(0,0,0,0.42),
    0 0 40px rgba(255,177,115,0.20);
}

.book-cover {
  perspective: 1000px;
}

.book-cover img {
  transform: rotateY(-10deg);
  transform-origin: center left;
}

.book-panel:hover .book-cover img {
  transform: rotateY(-14deg) scale(1.06);
}

/* === Studio-level expansion pass === */
.timeline-section {
  background:
    radial-gradient(circle at 18% 20%, rgba(62,167,255,0.12), transparent 22%),
    linear-gradient(180deg, #071525 0%, #091b30 100%);
}

.timeline-shell {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.timeline-line {
  position: absolute;
  top: 28px;
  left: 3%;
  right: 3%;
  height: 2px;
  background: linear-gradient(90deg, rgba(62,167,255,0.08), rgba(62,167,255,0.8), rgba(62,167,255,0.08));
  box-shadow: 0 0 18px rgba(62,167,255,0.2);
}

.timeline-card {
  position: relative;
  z-index: 1;
  padding: 54px 24px 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(9, 24, 44, 0.88) 0%, rgba(7, 18, 33, 0.95) 100%);
  border: 1px solid rgba(62,167,255,0.18);
  min-height: 100%;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.timeline-card::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 24px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle, #9ad5ff 0%, #3ea7ff 60%, rgba(62,167,255,0.18) 100%);
  box-shadow: 0 0 0 7px rgba(62,167,255,0.08), 0 0 24px rgba(62,167,255,0.3);
}

.timeline-card:hover,
.faction-card:hover {
  transform: translateY(-8px);
  border-color: rgba(62,167,255,0.34);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.38);
}

.timeline-card--featured {
  background: linear-gradient(180deg, rgba(12, 34, 62, 0.96) 0%, rgba(8, 22, 41, 0.98) 100%);
  border-color: rgba(120, 203, 255, 0.34);
}

.timeline-era, .faction-label {
  display: inline-block;
  margin-bottom: 14px;
  font-family: Orbitron, Inter, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9dd5ff;
}

.timeline-card h3, .faction-card h3 {
  margin: 0;
  font-size: 1.3rem;
}

.timeline-card p, .faction-card p {
  margin: 14px 0 0;
  line-height: 1.72;
  color: rgba(238,245,255,0.76);
}

.faction-section {
  background: linear-gradient(180deg, #081a2f 0%, #071421 100%);
}

.faction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.faction-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 34px;
  min-height: 260px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.faction-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.95;
}

.faction-card > * { position: relative; z-index: 1; }

.faction-card--command::before {
  background: radial-gradient(circle at 18% 16%, rgba(62,167,255,0.26), transparent 22%), linear-gradient(135deg, #0d2744 0%, #091a2d 100%);
}
.faction-card--academy::before {
  background: radial-gradient(circle at 84% 18%, rgba(138,200,255,0.18), transparent 18%), linear-gradient(135deg, #10253d 0%, #142c47 100%);
}
.faction-card--resistance::before {
  background: radial-gradient(circle at 20% 16%, rgba(255,145,98,0.20), transparent 18%), linear-gradient(135deg, #2f2024 0%, #1a1520 100%);
}
.faction-card--systems::before {
  background: radial-gradient(circle at 78% 18%, rgba(120,205,255,0.18), transparent 18%), linear-gradient(135deg, #10202f 0%, #0b1722 100%);
}

.worlds-grid-expanded {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.book-panel {
  transition: transform 0.34s ease, box-shadow 0.34s ease, border-color 0.34s ease;
}

.book-panel:hover {
  transform: translateY(-10px);
  box-shadow: 0 28px 82px rgba(0,0,0,0.42);
  border-color: rgba(255,255,255,0.18);
}

.book-cover {
  margin-top: 22px;
  width: 160px;
  max-width: 42%;
  transform-origin: center center;
  transition: transform 0.34s ease, filter 0.34s ease;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,0.28));
}

.book-panel:hover .book-cover {
  transform: translateY(-6px) rotate(-2deg) scale(1.04);
  filter: drop-shadow(0 26px 36px rgba(0,0,0,0.42));
}

.book-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.flagship-book {
  border-color: rgba(120, 203, 255, 0.26);
}

.flagship-book::after {
  content: "Flagship Universe";
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(62,167,255,0.14);
  border: 1px solid rgba(120,203,255,0.24);
  font-family: Orbitron, Inter, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b7e5ff;
  z-index: 2;
}

.upgraded-about-grid {
  align-items: stretch;
}

.author-panel, .about-panel--upgraded {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 36px;
  background: rgba(255,255,255,0.04);
  box-shadow: 0 18px 54px rgba(0,0,0,0.24);
}

.author-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.03) 100%);
}

.author-lead {
  max-width: 62ch;
}

.author-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.author-stat {
  padding: 20px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.author-stat__value, .author-stat__label {
  display: block;
}

.author-stat__value {
  font-family: Orbitron, Inter, sans-serif;
  font-size: 1.2rem;
  color: #ffffff;
}

.author-stat__label {
  margin-top: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(238,245,255,0.62);
}

@media (max-width: 1200px) {
  .timeline-shell { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .worlds-grid-expanded { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .timeline-shell, .faction-grid, .author-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .timeline-line { display: none; }
}

@media (max-width: 640px) {
  .timeline-shell, .faction-grid, .worlds-grid-expanded, .author-stats {
    grid-template-columns: 1fr;
  }
  .timeline-card, .faction-card, .author-panel, .about-panel--upgraded {
    padding: 28px 22px;
  }
  .book-cover { max-width: 56%; }
  .flagship-book::after {
    position: static;
    display: inline-block;
    margin-top: 14px;
  }
}


/* =========================================================
   Anime Studio Hub v1.0 — Foundation Hardening
   ========================================================= */
:root {
  --focus-ring: 0 0 0 3px rgba(110, 199, 255, 0.42);
  --header-height: 74px;
  --motion-fast: 180ms;
  --motion-base: 280ms;
  --ease-premium: cubic-bezier(.2,.75,.25,1);
}

html { scroll-padding-top: calc(var(--header-height) + 18px); }
body { overflow-x: hidden; }
body.nav-open { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff;
  color: #08111d;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform var(--motion-fast) ease;
}
.skip-link:focus { transform: translateY(0); }

:where(a, button):focus-visible {
  outline: 2px solid #8ed6ff;
  outline-offset: 4px;
  box-shadow: var(--focus-ring);
}

.site-header {
  transition: background var(--motion-base) ease, box-shadow var(--motion-base) ease, border-color var(--motion-base) ease;
}
.site-header.is-scrolled {
  background: rgba(4, 13, 24, 0.9);
  border-bottom-color: rgba(255,255,255,.13);
  box-shadow: 0 12px 36px rgba(0,0,0,.2);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 42px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--motion-base) var(--ease-premium), opacity var(--motion-fast) ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.universe-link { color: inherit; }
.universe-link:focus-visible { outline-offset: 6px; }

.btn:active { transform: translateY(0) scale(.985); }
.character-card, .world-tile, .book-panel, .timeline-card, .faction-card {
  transition-timing-function: var(--ease-premium);
}

.js-animate .fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease-premium), transform 700ms var(--ease-premium);
}
.js-animate .fade-in.show,
.js-animate .fade-in.is-visible {
  opacity: 1;
  transform: none;
}

img[loading="lazy"] { content-visibility: auto; }

@media (max-width: 860px) {
  :root { --header-height: 68px; }
  .site-header { position: sticky !important; }
  .nav-wrap { min-height: var(--header-height); padding: 10px 0; }
  .brand { max-width: calc(100% - 68px); font-size: .82rem; }
  .nav-toggle { display: block; color: #fff; flex: 0 0 auto; }
  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: grid !important;
    gap: 0 !important;
    padding: 12px 20px 20px;
    background: rgba(4,13,24,.97);
    border-bottom: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 24px 48px rgba(0,0,0,.38);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--motion-base) ease, transform var(--motion-base) var(--ease-premium), visibility var(--motion-base) step-end;
  }
  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity var(--motion-base) ease, transform var(--motion-base) var(--ease-premium), visibility 0s;
  }
  .nav-links a {
    display: block;
    padding: 14px 4px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: .78rem;
  }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a::after { display: none; }
}

@media (max-width: 640px) {
  .hero-actions .btn, .book-actions .btn { width: 100%; }
  .section { padding-top: 76px; padding-bottom: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js-animate .fade-in { opacity: 1; transform: none; }
}
