:root {
  --bg: #050505;
  --bg-2: #0a0a0a;
  --panel: rgba(10, 10, 10, .92);
  --panel-solid: #0f0f0f;
  --line: rgba(255,255,255,.11);
  --line-strong: rgba(255,255,255,.22);
  --text: #f5f5f3;
  --muted: #a4a8b1;
  --red: #a00800;
  --red-bright: #a00800;
  --shadow: 0 32px 90px rgba(0,0,0,.58);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background: #050505;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

.site-header {
  height: 112px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(1.2rem, 4vw, 5rem);
  border-bottom: 1px solid var(--red);
  background: rgba(4, 5, 7, .86);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
}

body.reading .site-header,
body.reading .site-footer {
  display: none;
}

.brand {
  width: fit-content;
  padding: 0;
  background: transparent;
  justify-self: start;
}

.brand-logo {
  width: 90px;
  height: auto;
  display: block;
}

.main-nav {
  display: flex;
  gap: 2.6rem;
  justify-content: center;
  justify-self: center;
  align-items: center;
}

.nav-link {
  position: relative;
  padding: .4rem 0 .55rem;
  color: var(--text);
  background: transparent;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 900;
  font-size: .95rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--red-bright);
  transition: width .18s ease;
}

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

.header-tools {
  display: flex;
  justify-content: flex-end;
  justify-self: end;
}

#searchInput {
  width: 100%;
  max-width: 260px;
  color: white;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .75rem 1rem;
  outline: none;
}

#searchInput:focus {
  border-color: rgba(227,32,24,.7);
}

.view { display: none; }
.view.active { display: block; }

.home-hero {
  min-height: 510px;
  position: relative;
  display: flex;
  align-items: center;
  padding: clamp(3rem, 7vw, 7rem) clamp(1.5rem, 6vw, 7.5rem);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0,0,0,.96) 0%, rgba(0,0,0,.78) 32%, rgba(0,0,0,.24) 70%, rgba(0,0,0,.9) 100%),
    var(--hero-image),
    linear-gradient(120deg, #111, #260705);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(0deg, var(--bg), transparent);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 580px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(5rem, 10vw, 9rem);
  line-height: .82;
  letter-spacing: -.075em;
  text-transform: uppercase;
  font-weight: 1000;
  text-shadow: 0 12px 40px rgba(0,0,0,.9);
}

.hero-series-logo {
  width: min(520px, 90vw);
  max-height: 180px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.series-card-logo {
  position: relative;
  inset: auto;
  width: auto;
  height: auto;
  max-width: 260px;
  max-height: 60px;
  object-fit: contain;
  object-position: left center;
  display: block;
  margin-bottom: .75rem;
}

.series-detail-logo {
  width: min(720px, 90vw);
  max-height: 190px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.hero-red-line {
  width: 70px;
  height: 3px;
  margin: 1.65rem 0 1.3rem;
  background: var(--red-bright);
}

.hero-copy p {
  margin: 0;
  max-width: 540px;
  color: #e7e8eb;
  font-size: clamp(1rem, 1.5vw, 1.28rem);
  line-height: 1.65;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.2rem;
}

.primary-btn,
.secondary-btn,
.outline-btn {
  min-width: 154px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .8rem;
  padding: .92rem 1.25rem;
  text-transform: uppercase;
  letter-spacing: .035em;
  font-weight: 950;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--red-bright), var(--red));
}

.secondary-btn {
  color: white;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
}

.outline-btn {
  color: white;
  background: transparent;
  border: 1px solid var(--line-strong);
}

.primary-btn:hover,
.outline-btn:hover,
.secondary-btn:hover,
.small-btn:hover {
  background: #a00800;
  border-color: #a00800;
  color: #ffffff;
  transform: translateY(-2px);
}

.home-panel,
.latest-section,
.page-view,
.site-footer {
  width: min(1720px, calc(100% - 7vw));
  margin-left: auto;
  margin-right: auto;
}

.home-panel {
  min-height: 320px;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 2.6rem;
  margin-top: -28px;
  padding: 2rem 3rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(10,10,10,.96), rgba(10,10,10,.88)),
    url("assets/panel-texture.png");
  background-size: cover;
  box-shadow: var(--shadow);
}

.panel-divider {
  width: 1px;
  min-height: 100%;
  background: var(--line-strong);
}

.panel-half {
  min-width: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.5rem;
}

.section-title span {
  width: 4px;
  height: 24px;
  background: var(--red-bright);
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.section-title-row {
  justify-content: space-between;
  align-items: center;
}

.section-title-row > div {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.continue-feature {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 2rem;
  align-items: center;
}

.continue-cover {
  width: 170px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}

.continue-info h3 {
  margin: 0 0 .5rem;
  font-size: 1.55rem;
}

.continue-info p {
  margin: 0 0 .75rem;
  color: var(--red-bright);
  font-weight: 800;
}

.progress-track {
  width: min(380px, 100%);
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  margin: 1rem 0 1.4rem;
}

.progress-track span {
  display: block;
  height: 100%;
  width: var(--progress);
  background: var(--red-bright);
}

.new-reader {
  position: relative;
  display: grid;
  align-items: center;
}

.new-reader-art {
  position: absolute;
  inset: -2rem -3rem -2rem 25%;
  opacity: .2;
  background: url("assets/new-here-art.png") center/cover no-repeat;
  mix-blend-mode: screen;
}

.new-reader-content {
  position: relative;
  z-index: 2;
  max-width: 390px;
  margin-left: 2rem;
}

.red-star {
  margin: 0 0 .6rem;
  color: var(--red-bright);
  font-size: 1.5rem;
}

.new-reader-content h2 {
  margin: 0 0 .8rem;
  text-transform: uppercase;
}

.new-reader-content p {
  color: #d6d8de;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.latest-section {
  padding: 1.6rem 0 2.5rem;
  border: 1px solid var(--line);
  border-top: 0;
  background: rgba(10,10,10,.65);
}

.latest-section .section-title-row {
  padding: 0 3rem;
}

.text-link {
  color: var(--red-bright);
  background: transparent;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 900;
}

.horizontal-issue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.8rem;
  padding: 0 3rem;
}

.issue-card {
  position: relative;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.65rem;
  min-height: 210px;
  padding: 1rem;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
}

.issue-cover {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
}

.issue-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.issue-info h3 {
  margin: 0 0 .5rem;
  font-size: 1.35rem;
}

.issue-info .soon,
.issue-info .series-name {
  margin: 0 0 .6rem;
  color: var(--red-bright);
  font-weight: 800;
}

.issue-info .desc {
  margin: 0 0 1.4rem;
  color: var(--muted);
}

.card-actions {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
}

.small-btn,
.heart-btn {
  padding: .65rem 1rem;
  color: white;
  background: transparent;
  border: 1px solid var(--line-strong);
  text-transform: uppercase;
  font-weight: 850;
}

.heart-btn.active {
  color: white;
  background: var(--red);
  border-color: var(--red);
}

.page-view {
  padding: 3rem 0 5rem;
}

.page-heading {
  margin-bottom: 2rem;
}

.eyebrow {
  color: var(--red-bright);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .75rem;
  font-weight: 950;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: .9;
}

.page-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
}

.series-card {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 1.4rem;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  cursor: pointer;
}

.series-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.86), rgba(0,0,0,.18));
}

.series-card-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.series-card h2 {
  margin: 0;
  font-size: 2.4rem;
  line-height: .95;
}

.series-card p {
  color: #d6d8de;
}

.detail-back,
.reader-back {
  padding: .7rem 1rem;
  color: white;
  background: transparent;
  border: 1px solid var(--line-strong);
  text-transform: uppercase;
  font-weight: 850;
}

.detail-back {
  margin-bottom: 1rem;
}

.series-detail-hero {
  min-height: 410px;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  padding: 2.6rem;
  border: 1px solid var(--line);
  background: var(--panel-solid);
}

.series-detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.88), rgba(0,0,0,.16));
}

.series-detail-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.series-detail-copy h1 {
  margin: 0;
  font-size: clamp(4rem, 8vw, 8rem);
  line-height: .85;
}

.series-detail-copy p:not(.eyebrow) {
  color: #d7dbe2;
  line-height: 1.55;
}

.series-continue-block {
  margin-bottom: 2rem;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--muted);
  font-weight: 850;
}

.sort-control select {
  color: white;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  padding: .65rem .9rem;
}

.empty-state {
  padding: 2rem;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
}

.reader-view {
  min-height: 100vh;
  background: #050607;
}

.reader-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: .75rem clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(5,6,7,.82);
  backdrop-filter: blur(18px);
}

.reader-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.reader-meta span {
  color: var(--red-bright);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.reader-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  color: var(--muted);
  font-weight: 850;
}

.reader-pill {
  padding: .55rem .8rem;
  color: white;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
}

.reader-shell {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
}

.page-stage {
  min-height: calc(100vh - 155px);
  display: grid;
  place-items: center;
}

#bookSpread {
  display: grid;
  gap: 10px;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: calc(100vh - 175px);
}

#bookSpread.single {
  grid-template-columns: minmax(0, auto);
}

#bookSpread.double {
  grid-template-columns: minmax(0, auto) minmax(0, auto);
  background: linear-gradient(90deg, transparent 49.4%, rgba(0,0,0,.55) 50%, transparent 50.6%);
}

.book-page {
  max-width: 100%;
  max-height: calc(100vh - 175px);
  object-fit: contain;
  background: white;
  box-shadow: 0 28px 90px rgba(0,0,0,.7);
}

#bookSpread.single .book-page {
  border-radius: 8px;
}

#bookSpread.double .book-page.left {
  border-radius: 8px 2px 2px 8px;
}

#bookSpread.double .book-page.right {
  border-radius: 2px 8px 8px 2px;
}

.page-btn {
  width: 54px;
  height: 88px;
  border-radius: 0;
  color: white;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 2.3rem;
}

.reader-controls {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 2rem));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .8rem;
  padding: .75rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 0;
  background: rgba(5,6,7,.82);
  backdrop-filter: blur(18px);
}

#pageSlider {
  width: 100%;
  accent-color: var(--red);
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(12px);
}

.dialog-backdrop.active {
  display: grid;
}

.dialog {
  width: min(460px, 100%);
  padding: 1.35rem;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.dialog p:not(.eyebrow) {
  margin-top: .7rem;
  color: var(--muted);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.site-footer {
  display: flex;
  gap: 1.8rem;
  align-items: center;
  padding: 1.4rem 0 2rem;
  color: rgba(255,255,255,.42);
  border-top: 1px solid rgba(255,255,255,.06);
}

.site-footer button {
  color: rgba(255,255,255,.7);
  background: transparent;
  text-transform: uppercase;
  letter-spacing: .04em;
}

@media (max-width: 1150px) {
  .site-header {
    grid-template-columns: 1fr;
    height: auto;
    gap: 1rem;
    padding: 1rem 1.2rem;
  }

  .brand {
    justify-self: start;
  }

  .main-nav {
    justify-self: start;
    justify-content: flex-start;
    gap: 1.4rem;
    overflow-x: auto;
  }

  .header-tools {
    justify-self: start;
    justify-content: flex-start;
  }

  .home-panel {
    grid-template-columns: 1fr;
  }

  .panel-divider {
    display: none;
  }

  .horizontal-issue-grid,
  .series-grid {
    grid-template-columns: 1fr;
  }

  .issue-card {
    grid-template-columns: 130px 1fr;
  }
}

@media (max-width: 720px) {
.home-hero {
  min-height: auto;
  padding: 2rem 1.2rem 3rem;
  align-items: flex-end;
}

.hero-series-logo {
  width: min(240px, 100%);
  max-height: 120px;
}

.hero-copy {
  max-width: 100%;
}

.hero-copy p {
  max-width: 100%;
}

  .home-panel,
  .latest-section,
  .page-view,
  .site-footer {
    width: min(100% - 1.5rem, 1720px);
  }

  .home-panel {
    padding: 1.2rem;
  }

  .latest-section .section-title-row,
  .horizontal-issue-grid {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }

  .continue-feature {
    grid-template-columns: 90px 1fr;
    gap: 1rem;
  }

  .continue-cover {
    width: 90px;
  }

  .issue-card {
    grid-template-columns: 96px 1fr;
    min-height: 160px;
  }

  .reader-shell {
    grid-template-columns: 1fr;
  }

  .page-btn {
    display: none;
  }

  .reader-topbar {
    grid-template-columns: 1fr;
  }

  .reader-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .reader-controls {
    grid-template-columns: 1fr;
    border-radius: 0;
  }
}


.heart-btn:hover {
  background: #a00800;
  border-color: #a00800;
  color: #ffffff;
  transform: translateY(-2px);
}



.page-btn:hover {
  background: #a00800;
  border-color: #a00800;
  color: #ffffff;
  transform: translateY(-2px);
  transition: all .2s ease;
}



.reader-back:hover,
.detail-back:hover,
.reader-pill:hover {
  background: #a00800;
  border-color: #a00800;
  color: #ffffff;
  transform: translateY(-2px);
  transition: all .2s ease;
}

/* Series card hover effect - static, no motion */
.series-card {
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background-color .18s ease;
}

.series-card:hover {
  border-color: #a00800;
  box-shadow: inset 0 0 0 1px #a00800;
}

.series-card > img {
  transition: filter .18s ease;
}

.series-card:hover > img {
  filter: brightness(1.08);
}

/* Disabled series cards */
.series-card.disabled {
  cursor: default;
}

.series-card.disabled:hover {
  border-color: var(--line);
  box-shadow: none;
}

.series-card.disabled:hover > img {
  filter: none;
}

.series-card.disabled::before {
  content: "COMING SOON";
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  padding: .35rem .6rem;
  background: #a00800;
  color: #ffffff;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.disabled-btn {
  cursor: default;
  opacity: .6;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.disabled-btn:hover {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  transform: none;
}

/* Mobile reader polish */
@media (max-width: 720px) {
  .reader-view {
    min-height: 100vh;
    overflow-x: hidden;
  }

  .reader-topbar {
    position: static;
    gap: .9rem;
    padding: .75rem 1rem;
  }

  #fullscreenBtn {
    display: none;
  }

  .reader-shell {
    display: block;
    padding: 1rem;
  }

  .page-stage {
    min-height: auto;
    display: block;
    padding: 1.25rem 0 1rem;
  }

  #bookSpread,
  #bookSpread.single,
  #bookSpread.double {
    display: block;
    max-width: 100%;
    max-height: none;
    background: none;
  }

  .book-page,
  #bookSpread.single .book-page,
  #bookSpread.double .book-page.left,
  #bookSpread.double .book-page.right {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    margin: 0 auto;
    border-radius: 4px;
  }

  .reader-controls {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    margin: 1rem 0 0;
    padding: .75rem;
    background: rgba(10,10,10,.92);
  }

  .reader-controls .outline-btn,
  .reader-controls .primary-btn {
    width: 100%;
  }
}

/* Mobile series detail hero fix */
@media (max-width: 720px) {
  .series-detail-hero {
    min-height: auto;
    padding: 2rem 1.2rem;
    align-items: flex-end;
  }

  .series-detail-copy {
    max-width: 100%;
  }

  .series-detail-logo {
    width: min(300px, 100%);
    max-height: 140px;
  }

  .series-detail-copy p:not(.eyebrow) {
    max-width: 100%;
    overflow-wrap: break-word;
  }
}

