:root{
  --bg:#07070a;
  --panel:#0f1016;
  --panel2:#121424;
  --text:#f4f4f7;
  --muted:#b9bac6;
  --line:rgba(255,255,255,.10);
  --accent:#7c5cff;
  --accent2:#00d4ff;
  --radius:18px;
  --shadow: 0 18px 60px rgba(0,0,0,.45);

  /* 3D Book */
  --bookW: 260px;
  --bookH: 390px;
  --bookT: 56px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: radial-gradient(1200px 700px at 20% 0%, rgba(124,92,255,.22), transparent 60%),
              radial-gradient(900px 600px at 90% 10%, rgba(0,212,255,.15), transparent 60%),
              var(--bg);
  color:var(--text);
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
.wrap{ width:min(1120px, 92vw); margin:0 auto; }

.skip{
  position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip:focus{
  left:12px; top:12px; width:auto; height:auto; padding:10px 12px;
  background:var(--panel); border:1px solid var(--line); border-radius:12px; z-index:999;
}

/* Topbar */
.topbar{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(7,7,10,.55);
  border-bottom:1px solid var(--line);
}
.topbar__inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 0 8px; gap:14px;
}
.brand{ display:flex; align-items:center; }
.brand__logo{ height:28px; width:auto; }

.nav{ display:none; gap:16px; }
.nav a{ color:var(--muted); font-weight:750; }
.nav a:hover{ color:var(--text); }

.socialIcons{
  display: none;
  align-items: center;
  gap: 6px;
}
.socialIcons a{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--muted);
  transition: color .15s, background .15s;
}
.socialIcons a:hover{
  color: var(--text);
  background: rgba(255,255,255,.08);
}
.socialIcons svg{
  width: 18px;
  height: 18px;
}

.menuBtn{
  background:transparent;
  border:1px solid var(--line);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
}
.mobileNav{
  padding:10px 0 14px;
  display:grid; gap:8px;
}
.mobileNav[hidden]{
  display:none;
}
.mobileNav a{
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background: rgba(255,255,255,.03);
  color:var(--muted);
  font-weight:750;
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  font-weight:900;
  font-size: 14px;
  letter-spacing:.2px;
  cursor:pointer;
  min-width: 120px;
  user-select:none;
}
.btn.primary{
  background: linear-gradient(135deg, rgba(124,92,255,1), rgba(0,212,255,.95));
  border-color: rgba(255,255,255,.12);
  color:#06060a;
}
.btn.ghost{
  background: rgba(255,255,255,.04);
  color:var(--text);
}
.btn.disabled{
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0px); }

.ctaRow{ display:flex; gap:8px; flex-wrap:wrap; margin: 8px 0 10px; }

/* Hero */
.hero{
  padding: 24px 0 0;
  margin-top: -12px;
  background: linear-gradient(145deg, #f8f8fc, #eef0f8);
  overflow: hidden;
  position: relative;
}
.hero::before{
  content: '';
  position: absolute;
  top: -30%;
  left: -30%;
  right: -30%;
  bottom: -30%;
  background-image: radial-gradient(circle, rgba(124,92,255,0.35) 2px, transparent 2px),
                    radial-gradient(circle, rgba(0,180,255,0.25) 1.5px, transparent 1.5px);
  background-size: 20px 20px, 30px 30px;
  background-position: 0 0, 10px 10px;
  animation: scrollDots 14s linear infinite;
  transform: rotate(-8deg);
  mask-image: linear-gradient(to bottom, 
    rgba(0,0,0,0.5) 0%, 
    rgba(0,0,0,0.4) 40%,
    transparent 70%,
    transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, 
    rgba(0,0,0,0.5) 0%, 
    rgba(0,0,0,0.4) 40%,
    transparent 70%,
    transparent 100%);
  pointer-events: none;
  z-index: 0;
}
@keyframes scrollDots{
  0%{ background-position: 0 0, 12px 12px; }
  100%{ background-position: 180px 60px, 192px 72px; }
}
.hero__grid{
  display: grid;
  gap: 24px;
  align-items: end;
  position: relative;
  z-index: 1;
}

.hero__copy{
  color: #1a1a2e;
  max-width: 420px;
  padding-top: 32px;
}

.pill{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border-radius:999px;
  border:1px solid rgba(124,92,255,.25);
  background: rgba(124,92,255,.1);
  color: #5c4db3; font-weight:800;
  font-size: 13px;
  width:fit-content;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.hero__copy h1{
  margin:0 0 8px;
  font-size: clamp(2.2rem, 4.5vw, 2.8rem);
  line-height:1.02;
  letter-spacing:-.5px;
  color: #1a1a2e;
}
.hero__copy .subhead{ 
  margin:0 0 16px; 
  color: #5a5a70; 
  font-size: 15px; 
  line-height:1.4;
  max-width: 38ch;
}

.hero__copy .btn.primary{
  background: linear-gradient(135deg, #7c5cff, #5a3fd6);
  border-color: rgba(124,92,255,.3);
  color: #fff;
}
.hero__copy .btn.ghost{
  background: rgba(26,26,46,.06);
  border-color: rgba(26,26,46,.15);
  color: #3a3a50;
}

.meta{
  display:flex;
  gap:16px;
  margin-top:8px;
  flex-wrap:wrap;
}
.meta__item{
  background: transparent;
  border:none;
  border-radius: 0;
  padding:0;
}
.meta__label{ display:block; color: #7a7a90; font-weight:700; font-size:11px; text-transform:uppercase; letter-spacing:0.03em; }
.meta__value{ display:block; font-weight:800; margin-top:2px; color: #2a2a3e; font-size:14px; }

.socialRow{ display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.chip{
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  padding:10px 12px;
  border-radius:999px;
  color:var(--muted);
  font-weight:800;
}
.chip:hover{ color:var(--text); }

.hero__art{
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  right: 0;
  padding: 0 16px;
  margin: 0 auto;
}
.hero__art img{
  width: 100%;
  max-width: 500px;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 12px;
  margin: 0 auto;
}
.bannerFrame{
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  background: transparent;
}
.bannerFrame img{
  width:100%;
  height:auto;
  object-fit:cover;
}

.glowCard{
  border:1px solid rgba(124,92,255,.2);
  border-radius: calc(var(--radius) + 8px);
  padding:14px;
  background: linear-gradient(135deg, rgba(124,92,255,.12), rgba(0,180,220,.08));
}
.glowCard__title{ font-weight:950; letter-spacing:-.2px; color: #2a2a3e; }
.glowCard__text{ margin-top:6px; color: #5a5a70; line-height:1.5; }

/* Sections */
.section{ padding: 34px 0; }
.sectionHead h2{
  margin:0;
  font-size: 26px;
  letter-spacing:-.2px;
}
.sectionHead p{ margin:8px 0 0; color:var(--muted); line-height:1.55; }

.cards{ margin-top:16px; display:grid; gap:12px; }
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding:14px;
}
.card h3{ margin:0 0 8px; }
.card ul{ margin:0; padding-left:18px; color:var(--muted); }
.card p{ margin:0; color:var(--muted); line-height:1.6; }

.muted{ color:var(--muted); }

/* Book Feature Section */
.bookFeature__grid {
  display: grid;
  gap: 28px;
}

.bookVisual {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

.bookDetails h2 {
  margin: 0 0 12px;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.bookSynopsis {
  color: var(--muted);
  line-height: 1.6;
  max-width: 48ch;
  margin: 0 0 16px;
}

.bookMeta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.bookMeta li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Related Media (demoted content zone) */
.relatedMedia{
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.relatedMedia__label{
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  opacity: 0.7;
  margin-bottom: 16px;
}
.relatedMedia__item{
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 420px;
}
.relatedMedia__item img{
  width: 100px;
  height: auto;
  border-radius: 6px;
  filter: saturate(0.5) brightness(0.85);
  opacity: 0.7;
  flex-shrink: 0;
}
.relatedMedia__caption{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.relatedMedia__caption strong{
  font-size: 0.9rem;
  color: var(--muted);
}
.relatedMedia__caption span{
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.7;
  line-height: 1.5;
}

/* Legacy altCover - deprecated */
.altCover{
  display: none;
  border:1px solid var(--line);
  border-radius: calc(var(--radius) + 10px);
  overflow:hidden;
  background: rgba(255,255,255,.03);
  opacity: 0.65;
  filter: saturate(0.85) contrast(0.95);
  transform: scale(0.92);
  box-shadow: none;
}
.altCover img{
  width:100%;
  height:auto;
  object-fit:cover;
}
.altCover__cap{
  padding:10px 12px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* 3D Book */
.book3d{
  width: var(--bookW);
  height: var(--bookH);
  position: relative;
  transform-style: preserve-3d;
  transform: perspective(1400px) rotateY(14deg) rotateX(-6deg) translateX(-6px);
  transition: transform .2s ease-out;
  filter: drop-shadow(-20px 30px 40px rgba(0,0,0,.65));
}

@media (hover: none) {
  .book3d {
    transform: perspective(1400px) rotateY(10deg) rotateX(-5deg) translateX(-6px);
  }
}

.face{
  position:absolute;
  inset:0;
  border-radius: 6px;
  overflow:hidden;
  backface-visibility: hidden;
}
.front{
  transform: translateZ(calc(var(--bookT) / 2));
  background:#111;
}
.front img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius: 6px;
}
.back{
  transform: rotateY(180deg) translateZ(calc(var(--bookT) / 2));
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.10);
}
.spine{
  width: var(--bookT);
  left: calc(var(--bookT) * -1);
  right: auto;
  transform-origin: right center;
  transform: rotateY(-90deg) translateZ(calc(var(--bookT) / 2));
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(255,255,255,.08));
  box-shadow: inset -2px 0 4px rgba(0,0,0,.35), 2px 0 10px rgba(0,0,0,.45);
  border-radius: 6px;
}
.pages{
  width: var(--bookT);
  left: auto;
  right: calc(var(--bookT) * -1);
  transform-origin: left center;
  transform: rotateY(90deg) translateZ(calc(var(--bookW) - var(--bookT)));
  background:
    repeating-linear-gradient(
      180deg,
      #f4f4f4 0px,
      #f4f4f4 2px,
      #eaeaea 4px
    );
  filter: brightness(.96);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
  border-radius: 6px;
}
.top{
  height: var(--bookT);
  top: calc(var(--bookT) * -1);
  bottom: auto;
  transform-origin: center bottom;
  transform: rotateX(90deg) translateZ(calc(var(--bookT) / 2));
  background: linear-gradient(90deg, rgba(255,255,255,.78), rgba(240,240,240,.88));
  border-radius: 12px;
}
.bottom{
  height: var(--bookT);
  top: auto;
  bottom: calc(var(--bookT) * -1);
  transform-origin: center top;
  transform: rotateX(-90deg) translateZ(calc(var(--bookH) - var(--bookT)));
  background: linear-gradient(90deg, rgba(235,235,235,.85), rgba(255,255,255,.75));
  border-radius: 12px;
}

/* Cast */
.castGrid{
  margin-top:16px;
  display:grid;
  gap:12px;
}
.castCard{
  display:grid;
  grid-template-columns: 96px 1fr;
  gap:12px;
  align-items:center;
  background: rgba(255,255,255,.025);
  border:1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  padding:12px;
}
.castCard img{
  width:96px; height:96px;
  border-radius: 16px;
  object-fit:cover;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
}
.castCard h3{ margin:0 0 4px; font-size: 1.1rem; letter-spacing: 0.02em; }
.castCard p{ margin:0; color:var(--muted); line-height:1.45; }

/* Preview */
.previewPanel{
  margin-top:16px;
  display:grid;
  gap:12px;
  border:1px solid var(--line);
  border-radius: calc(var(--radius) + 10px);
  background: rgba(255,255,255,.03);
  overflow:hidden;
}
.previewPanel__left{ padding:16px; }
.previewPanel__right{
  border-top:1px solid var(--line);
  background: rgba(0,0,0,.20);
  min-height: 280px;
}
.previewPanel__right img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}

.miniCards{ display:grid; gap:10px; margin:12px 0; }
.miniCard{
  border:1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding:12px;
  background: rgba(0,0,0,.18);
}
.miniCard p{ margin:6px 0 0; }

/* FAQ */
.faq-container{
  margin-top:16px;
  display:flex;
  flex-direction:column;
  gap:20px;
}
.faq{ display:grid; gap:8px; flex:1; }
details{
  background: rgba(255,255,255,.03);
  border:1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding:10px 12px;
}
summary{ cursor:pointer; font-weight:950; font-size:14px; }
details p{ margin:8px 0 0; color:var(--muted); line-height:1.5; font-size:14px; }
.discord-widget{
  border-radius:12px;
  overflow:visible;
  background:#5865F2;
  min-height:350px;
  min-width:350px;
  border: 3px solid #5865F2;
  display:block !important;
}
.discord-widget iframe{
  display:block !important;
  border-radius:12px;
  width:350px;
  height:350px;
}

/* Footer */
.footer{
  border-top:1px solid var(--line);
  padding: 26px 0 90px; /* room for sticky bar on mobile */
}
.footer__inner{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  flex-wrap:wrap;
}
.footer__logo{ height:22px; width:auto; }
.footer__links{ display:flex; flex-direction:column; gap:8px; }
.footer__links a{ color:var(--muted); font-weight:800; }
.footer__links a:hover{ color:var(--text); }

/* Sticky CTA */
.stickyCta{
  position:fixed;
  left:0; right:0; bottom:0;
  padding:10px;
  background: rgba(7,7,10,.75);
  backdrop-filter: blur(10px);
  border-top:1px solid var(--line);
  display:flex;
  gap:10px;
  justify-content:center;
  z-index:60;
}
.stickyCta .btn{ min-width: 140px; }

@media (min-width: 860px){
  .nav{ display:flex; }
  .socialIcons{ display:flex; }
  .menuBtn{ display:none; }
  .mobileNav{ display:none !important; }
  .hero::before{
    top: -50%;
    left: -30%;
    right: -30%;
    bottom: -30%;
    background-size: 24px 24px, 36px 36px;
    background-position: 0 0, 12px 12px;
    transform: rotate(-12deg);
    mask-image: linear-gradient(to right, 
      rgba(0,0,0,0.5) 0%, 
      rgba(0,0,0,0.6) 10%, 
      rgba(0,0,0,0.5) 35%,
      transparent 55%,
      transparent 100%);
    -webkit-mask-image: linear-gradient(to right, 
      rgba(0,0,0,0.5) 0%, 
      rgba(0,0,0,0.6) 10%, 
      rgba(0,0,0,0.5) 35%,
      transparent 55%,
      transparent 100%);
  }
  .hero__grid{
    grid-template-columns: 1fr 1fr;
    align-items: flex-end;
    gap: 0;
  }
  .hero__copy{
    padding: 40px 0 50px 0;
    z-index: 2;
    position: relative;
    max-width: 420px;
  }
  .hero__art{
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    height: 100%;
    position: relative;
    right: -80px;
    margin-right: 0;
    padding: 0;
  }
  .hero__art img{
    max-height: none;
    height: auto;
    width: 155%;
    max-width: none;
    display: block;
    position: relative;
    z-index: 1;
    border-radius: 0;
    margin: 0;
  }
  .cards{ grid-template-columns: repeat(3, minmax(0,1fr)); }
  .faq-container{
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
  }
  .faq{ flex:1; }
  .discord-widget iframe{
    width:350px;
    height:350px;
  }
  .bookFeature__grid{
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
  }
  .castGrid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .previewPanel{ grid-template-columns: 1fr 1fr; }
  .previewPanel__right{ border-top:none; border-left:1px solid var(--line); }
  .stickyCta{ display:none; }
  .footer{ padding-bottom: 26px; }
}

/* Read Online CTA Section */
.readOnlineCta {
  background: linear-gradient(135deg, rgba(124,92,255,0.15) 0%, rgba(124,92,255,0.05) 100%);
  border-top: 1px solid rgba(124,92,255,0.3);
  border-bottom: 1px solid rgba(124,92,255,0.3);
  padding: 32px 0;
}
.readOnlineCta__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.readOnlineCta__text h2 {
  font-size: 1.75rem;
  margin-bottom: 8px;
  color: var(--text);
}
.readOnlineCta__text p {
  color: var(--muted);
  font-size: 1rem;
}
.btn.large {
  padding: 16px 40px;
  font-size: 1.1rem;
}
@media (min-width: 800px) {
  .readOnlineCta__content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
