:root {
  --gold: #ecd2a1;
  --gold-bright: #f5dfb8;
  --gold-soft: rgba(236, 210, 161, 0.74);
  --gold-line: rgba(236, 210, 161, 0.28);
  --gold-line-strong: rgba(236, 210, 161, 0.46);

  --ivory: #f7efe2;
  --text: rgba(247, 239, 226, 0.92);
  --text-soft: rgba(247, 239, 226, 0.76);

  --panel: rgba(8, 10, 24, 0.42);
  --panel-strong: rgba(8, 10, 24, 0.74);
  --panel-hover: rgba(8, 10, 24, 0.88);

  --shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  --shadow-deep: 0 20px 52px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.46)),
    url("images/nightsky.PNG");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
}

.twinkle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.site-shell {
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

.twinkle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.8),
    0 0 18px rgba(255, 255, 255, 0.45);
  animation: twinkle 4.8s ease-in-out infinite;
  opacity: 0.35;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.18;
    transform: scale(1);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.9);
  }
}

img {
  max-width: 100%;
  height: auto;
}

.site-shell {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.twinkle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.twinkle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  animation: twinkle 5s ease-in-out infinite;
  opacity: 0.22;
}

.t1  { top: 8%; left: 10%; animation-delay: 0s; }
.t2  { top: 13%; left: 24%; animation-delay: 1.1s; }
.t3  { top: 10%; left: 43%; animation-delay: 2.4s; }
.t4  { top: 16%; left: 67%; animation-delay: 0.8s; }
.t5  { top: 11%; left: 84%; animation-delay: 3s; }
.t6  { top: 30%; left: 15%; animation-delay: 1.8s; }
.t7  { top: 35%; left: 36%; animation-delay: 0.4s; }
.t8  { top: 28%; left: 58%; animation-delay: 2.2s; }
.t9  { top: 38%; left: 78%; animation-delay: 1.6s; }
.t10 { top: 56%; left: 22%; animation-delay: 3.2s; }
.t11 { top: 62%; left: 52%; animation-delay: 0.9s; }
.t12 { top: 70%; left: 81%; animation-delay: 2.8s; }

@keyframes twinkle {
  0%, 100% {
    opacity: 0.18;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.7);
  }
}

.hero {
  position: relative;
  min-height: 360px;
  padding: 52px 24px 42px;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 12%, rgba(255,255,255,0.07), transparent 14%),
    linear-gradient(rgba(5, 8, 20, 0.12), rgba(5, 8, 20, 0.34));
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  animation: heroFade 1.1s ease;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  margin: 0;
  color: var(--gold);
  font-weight: normal;
  letter-spacing: 0.08em;
  font-size: clamp(3rem, 6vw, 5.4rem);
  text-shadow:
    0 0 14px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(236, 210, 161, 0.08);
}

.tagline {
  margin: 12px 0 14px;
  color: var(--ivory);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.9rem);
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.55);
}

.hero-intro {
  max-width: 760px;
  margin: 0 auto 32px;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.8;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.55);
}

.nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.nav a {
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.84rem;
  color: var(--ivory);
  opacity: 0.9;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  transition: color 0.24s ease, opacity 0.24s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--gold-soft);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.24s ease;
}

.nav a:hover {
  color: var(--gold);
  opacity: 1;
}

.nav a:hover::after {
  transform: scaleX(1);
}

.hero-constellation {
  position: absolute;
  top: 26px;
  width: 240px;
  height: 110px;
  opacity: 0.9;
  z-index: 1;
}

.hero-left {
  left: 32px;
}

.hero-right {
  right: 32px;
}

.hero-constellation .star,
.card-constellation .star {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 0 12px rgba(236, 210, 161, 0.75),
    0 0 24px rgba(236, 210, 161, 0.18);
}

.hero-constellation .line,
.card-constellation .line {
  position: absolute;
  height: 1px;
  background: var(--gold-line);
  transform-origin: left center;
  transition: background 0.28s ease, opacity 0.28s ease;
}

.hero-left .s1 { top: 34px; left: 8%; }
.hero-left .s2 { top: 18px; left: 28%; }
.hero-left .s3 { top: 36px; left: 50%; }
.hero-left .s4 { top: 22px; left: 72%; }
.hero-left .s5 { top: 44px; left: 89%; }
.hero-left .l1 { top: 38px; left: 11%; width: 20%; transform: rotate(-18deg); }
.hero-left .l2 { top: 22px; left: 31%; width: 22%; transform: rotate(18deg); }
.hero-left .l3 { top: 39px; left: 53%; width: 21%; transform: rotate(-18deg); }
.hero-left .l4 { top: 28px; left: 75%; width: 16%; transform: rotate(22deg); }

.hero-right .s1 { top: 26px; left: 10%; }
.hero-right .s2 { top: 12px; left: 29%; }
.hero-right .s3 { top: 22px; left: 48%; }
.hero-right .s4 { top: 14px; left: 66%; }
.hero-right .s5 { top: 28px; left: 84%; }
.hero-right .s6 { top: 48px; left: 60%; }
.hero-right .l1 { top: 30px; left: 13%; width: 18%; transform: rotate(-24deg); }
.hero-right .l2 { top: 16px; left: 32%; width: 18%; transform: rotate(16deg); }
.hero-right .l3 { top: 24px; left: 50%; width: 17%; transform: rotate(-18deg); }
.hero-right .l4 { top: 18px; left: 69%; width: 16%; transform: rotate(22deg); }
.hero-right .l5 { top: 28px; left: 49%; width: 13%; transform: rotate(52deg); }

.section {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 22px 68px;
}

.compact {
  padding-top: 18px;
  padding-bottom: 52px;
}

.section-rule {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 0 0 32px;
}

.section-rule span {
  height: 1px;
  background: var(--gold-line);
}

.section-rule h2 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  font-style: italic;
  font-weight: normal;
  text-align: center;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 10px rgba(0, 0, 0, 0.55),
    0 0 20px rgba(236, 210, 161, 0.05);
}

/* home page series cards */

.universe-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.universe-card {
  position: relative;
  min-height: 640px;
  padding: 24px 24px 28px;
  text-decoration: none;
  color: var(--ivory);
  border: 1px solid var(--gold-line);
  background:
    linear-gradient(rgba(8, 10, 24, 0.18), rgba(8, 10, 24, 0.46)),
    rgba(10, 13, 30, 0.18);
  backdrop-filter: blur(3px);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    transform 0.32s ease,
    background 0.32s ease,
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

.universe-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.03),
    rgba(255,255,255,0)
  );
  pointer-events: none;
  z-index: 0;
}

.universe-card:hover {
  transform: translateY(-6px);
  background:
    linear-gradient(rgba(8, 10, 24, 0.26), rgba(8, 10, 24, 0.58)),
    rgba(10, 13, 30, 0.24);
  border-color: var(--gold-line-strong);
  box-shadow: var(--shadow-deep);
}

.card-constellation,
.universe-card h3,
.series-hook,
.card-front {
  position: relative;
  z-index: 2;
}

.card-constellation {
  height: 92px;
  margin-bottom: 18px;
}

.universe-card:hover .card-constellation .star {
  box-shadow:
    0 0 14px rgba(236, 210, 161, 0.9),
    0 0 28px rgba(236, 210, 161, 0.28);
}

.universe-card:hover .card-constellation .line {
  background: rgba(236, 210, 161, 0.48);
}

.universe-card h3 {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 1.28rem;
  line-height: 1.25;
  text-align: center;
  font-weight: normal;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.55);
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.series-hook {
  color: var(--text-soft);
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.45;
  margin: 0 0 16px;
  text-align: center;
  min-height: 4.3em;
}

.card-front {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  opacity: 1;
  visibility: visible;
}

.card-front img,
.series-feature-image {
  display: block !important;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
  opacity: 1 !important;
  visibility: visible !important;
  object-fit: contain;
  border: 1px solid rgba(236, 210, 161, 0.22);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.38),
    0 0 24px rgba(0, 0, 0, 0.16);
}

.card-hover {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .card-hover {
    position: absolute;
    inset: 0;
    z-index: 5;
    padding: 32px 24px;
    background: linear-gradient(rgba(8, 10, 24, 0.80), rgba(8, 10, 24, 0.92));
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
  }

  .card-hover p {
    margin: 0;
    max-width: 24ch;
    color: var(--ivory);
    text-align: center;
    font-style: italic;
    line-height: 1.52;
    font-size: 0.98rem;
  }

  .universe-card:hover .card-front {
    visibility: hidden;
  }

  .universe-card:hover .card-hover {
    display: flex;
  }
}

/* essential lies books */

.books-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

.book-card {
  position: relative;
  text-align: center;
  border: 1px solid var(--gold-line);
  background:
    linear-gradient(rgba(8, 10, 24, 0.16), rgba(8, 10, 24, 0.40)),
    rgba(10, 13, 30, 0.18);
  padding: 14px 14px 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.book-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-line-strong);
  box-shadow: var(--shadow-deep);
}

.book-front img {
  display: block;
  width: 100%;
  max-width: 165px;
  height: auto;
  margin: 0 auto 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.45);
  border: 1px solid rgba(236, 210, 161, 0.16);
}

.book-front h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--gold);
  font-weight: normal;
  min-height: 2.7em;
}

.book-hover {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(236, 210, 161, 0.16);
}

.book-hover p {
  margin: 4px 0;
  color: var(--text);
  line-height: 1.5;
  font-size: 0.95rem;
}

.centered-copy {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.centered-copy.narrow {
  max-width: 760px;
}

.centered-copy p,
.family-box p {
  color: var(--text);
  line-height: 1.82;
  font-size: 1rem;
}

.gold-italic {
  color: var(--gold);
  font-style: italic;
}

.families-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.family-box {
  padding: 16px 10px;
  border: 1px solid var(--gold-line);
  background: rgba(10, 13, 30, 0.24);
  text-align: center;
  box-shadow: var(--shadow);
}

.family-box h3 {
  margin: 0;
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: normal;
  white-space: nowrap;   /* forces single line */
}

.cta-wrap {
  margin-top: 24px;
}

.gold-button {
  display: inline-block;
  padding: 12px 24px;
  text-decoration: none;
  color: #16120d;
  background: var(--gold);
  font-weight: bold;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.gold-button:hover {
  background: #f5e4c4;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.constellation-essential .s1 { top: 36px; left: 8%; }
.constellation-essential .s2 { top: 14px; left: 34%; }
.constellation-essential .s3 { top: 28px; left: 63%; }
.constellation-essential .s4 { top: 60px; left: 56%; }
.constellation-essential .s5 { top: 56px; left: 18%; }
.constellation-essential .l1 { top: 40px; left: 11%; width: 28%; transform: rotate(-18deg); }
.constellation-essential .l2 { top: 18px; left: 37%; width: 28%; transform: rotate(18deg); }
.constellation-essential .l3 { top: 31px; left: 24%; width: 41%; transform: rotate(37deg); }
.constellation-essential .l4 { top: 58px; left: 20%; width: 38%; transform: rotate(2deg); }

.constellation-justice .s1 { top: 18px; left: 10%; }
.constellation-justice .s2 { top: 8px; left: 28%; }
.constellation-justice .s3 { top: 18px; left: 49%; }
.constellation-justice .s4 { top: 8px; left: 69%; }
.constellation-justice .s5 { top: 18px; left: 88%; }
.constellation-justice .s6 { top: 56px; left: 49%; }
.constellation-justice .l1 { top: 22px; left: 13%; width: 38%; transform: rotate(0deg); }
.constellation-justice .l2 { top: 22px; left: 50%; width: 38%; transform: rotate(0deg); }
.constellation-justice .l3 { top: 10px; left: 30%; width: 21%; transform: rotate(19deg); }
.constellation-justice .l4 { top: 10px; left: 50%; width: 21%; transform: rotate(-19deg); }
.constellation-justice .l5 { top: 24px; left: 50%; width: 1px; height: 34px; transform: rotate(0deg); }

.constellation-veritas .s1 { top: 34px; left: 8%; }
.constellation-veritas .s2 { top: 14px; left: 23%; }
.constellation-veritas .s3 { top: 6px; left: 49%; }
.constellation-veritas .s4 { top: 14px; left: 73%; }
.constellation-veritas .s5 { top: 34px; left: 88%; }
.constellation-veritas .s6 { top: 60px; left: 25%; }
.constellation-veritas .s7 { top: 60px; left: 71%; }
.constellation-veritas .l1 { top: 38px; left: 10%; width: 16%; transform: rotate(-29deg); }
.constellation-veritas .l2 { top: 16px; left: 26%; width: 25%; transform: rotate(-12deg); }
.constellation-veritas .l3 { top: 10px; left: 50%; width: 24%; transform: rotate(12deg); }
.constellation-veritas .l4 { top: 18px; left: 75%; width: 15%; transform: rotate(29deg); }
.constellation-veritas .l5 { top: 38px; left: 25%; width: 46%; transform: rotate(24deg); }

.constellation-pattern .s1 { top: 18px; left: 9%; }
.constellation-pattern .s2 { top: 10px; left: 33%; }
.constellation-pattern .s3 { top: 24px; left: 69%; }
.constellation-pattern .s4 { top: 60px; left: 21%; }
.constellation-pattern .s5 { top: 64px; left: 59%; }
.constellation-pattern .s6 { top: 36px; left: 46%; }
.constellation-pattern .l1 { top: 22px; left: 12%; width: 23%; transform: rotate(-12deg); }
.constellation-pattern .l2 { top: 14px; left: 36%; width: 36%; transform: rotate(18deg); }
.constellation-pattern .l3 { top: 26px; left: 14%; width: 20%; transform: rotate(56deg); }
.constellation-pattern .l4 { top: 42px; left: 38%; width: 27%; transform: rotate(50deg); }
.constellation-pattern .l5 { top: 64px; left: 24%; width: 36%; transform: rotate(6deg); }

@media (max-width: 1200px) {
  .books-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .universe-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .families-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  body {
    background-attachment: scroll;
  }

  .hero {
    min-height: 260px;
    padding-top: 30px;
    padding-bottom: 28px;
  }

  .hero-left,
  .hero-right {
    display: none;
  }

  h1 {
    font-size: clamp(2.3rem, 9vw, 3.6rem);
  }

  .tagline {
    margin: 10px 0 18px;
    font-size: 1.15rem;
  }

  .hero-intro {
    margin-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .nav {
    gap: 18px;
  }

  .section-rule {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .section-rule span {
    display: none;
  }

  .universe-grid,
  .families-grid,
  .books-grid {
    grid-template-columns: 1fr;
  }

  .universe-card {
    min-height: auto;
    padding: 22px 18px 24px;
  }

  .universe-card:hover {
    transform: none;
  }

  .universe-card h3 {
    min-height: auto;
    margin-bottom: 10px;
  }

  .series-hook {
    min-height: auto;
    margin-bottom: 14px;
  }

  .card-front {
    display: flex;
  }

  .series-feature-image,
  .card-front img {
    max-width: 280px;
  }

  .card-hover {
    display: block;
    position: static;
    margin-top: 16px;
    padding: 16px 0 0;
    border-top: 1px solid rgba(236, 210, 161, 0.18);
    background: none;
    backdrop-filter: none;
  }

  .card-hover p {
    max-width: none;
    margin: 0;
    color: var(--ivory);
    text-align: center;
    font-style: italic;
    line-height: 1.6;
    font-size: 0.98rem;
  }

  .book-front img {
    max-width: 180px;
  }
}

@media (max-width: 520px) {
  .books-grid {
    grid-template-columns: 1fr;
  }
}


