@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg-deep: #070b12;
  --bg-panel: #0e141d;
  --bg-panel-raised: #131a24;
  --ink: #e7e0cd;
  --ink-dim: #a8a094;
  --slate: #8b96a6;
  --slate-dim: #5b6473;
  --teal: #5fb8ae;
  --teal-dim: #3d7a73;
  --amber: #d9a15b;
  --hairline: rgba(231, 224, 205, 0.1);
  --hairline-strong: rgba(231, 224, 205, 0.18);

  --display: 'Cormorant Garamond', Georgia, serif;
  --body: 'Inter', -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--ink-dim);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

.eyebrow {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
}

h1, h2, h3 {
  font-family: var(--display);
  color: var(--ink);
  margin: 0;
  font-weight: 600;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 64px);
  background: rgba(7, 11, 18, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.nav-mark {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--slate);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--teal); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 64px) clamp(64px, 8vw, 96px);
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 140%;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(95, 184, 174, 0.07), transparent 55%),
    repeating-linear-gradient(115deg, transparent 0 3px, rgba(231,224,205,0.012) 3px 4px);
  pointer-events: none;
  z-index: 0;
}

.hero-cover {
  position: relative;
  z-index: 1;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.7), 0 0 0 1px var(--hairline-strong);
}
.hero-cover img { width: 100%; }

.hero-copy { position: relative; z-index: 1; }

.hero-copy .eyebrow { margin-bottom: 14px; display: block; }

.hero-tagline {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: var(--ink);
  line-height: 1.4;
  margin: 0 0 22px;
  max-width: 30ch;
}

.hero-desc {
  max-width: 46ch;
  margin: 0 0 34px;
  color: var(--slate);
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--teal);
  color: #071013;
}
.btn-primary:hover { background: #75c4ba; }

.btn-ghost {
  background: transparent;
  border-color: var(--hairline-strong);
  color: var(--ink-dim);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

.btn-small {
  padding: 9px 18px;
  font-size: 0.76rem;
}

/* ---------- Wavy divider (signature element) ---------- */
.waterline {
  position: relative;
  height: 64px;
  overflow: hidden;
}
.waterline svg {
  position: absolute;
  top: 0; left: 0;
  width: 200%;
  height: 100%;
  animation: drift 26s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .waterline svg { animation: none; }
}
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 64px);
}

.section-head { margin-bottom: 36px; max-width: 62ch; }
.section-head .eyebrow { display: block; margin-bottom: 12px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }

.synopsis p {
  font-size: 1.02rem;
  max-width: 62ch;
  color: var(--slate);
}
.synopsis p + p { margin-top: 16px; }

/* ---------- Issue cards ---------- */
.issues-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.issue-card {
  background: var(--bg-panel);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  overflow: hidden;
}

.issue-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.issue-card-body {
  padding: 24px;
}

.issue-kicker {
  font-family: var(--display);
  font-style: italic;
  color: var(--teal-dim);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.issue-card h3 {
  font-size: 1.65rem;
  margin: 4px 0 18px;
}

.issue-parts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.issue-parts li + li {
  border-top: 1px solid var(--hairline);
}

.issue-parts a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  color: var(--ink);
  text-decoration: none;
}

.issue-parts a:hover { color: var(--teal); }

.issue-parts span {
  display: grid;
  gap: 2px;
}

.issue-parts small {
  color: var(--slate-dim);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue-parts strong {
  color: var(--teal-dim);
  font-size: 0.78rem;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .issues-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .issues-grid { grid-template-columns: 1fr; }
  .issue-card-body { padding: 20px; }
}

/* ---------- Author ---------- */
.author {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  align-items: start;
}

.author img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--hairline-strong);
}

.author p { max-width: 58ch; font-size: 0.96rem; }

@media (max-width: 560px) {
  .author { grid-template-columns: 84px 1fr; }
  .author img { width: 84px; height: 84px; }
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 28px clamp(20px, 5vw, 64px) 40px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--slate-dim);
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- Reader ---------- */
.reader-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 40px);
  background: rgba(7, 11, 18, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.reader-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.reader-back {
  text-decoration: none;
  color: var(--slate);
  font-size: 0.82rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.reader-back:hover { color: var(--teal); }

.reader-title {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink);
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-strip {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 60px;
}
.reader-strip img {
  width: 100%;
  height: auto;
  display: block;
}

/* Keep every comic page at its natural proportions when its width is responsive. */
.reader-strip img[width][height] {
  aspect-ratio: auto;
}

/* ---------- Image download page ---------- */
.download-page {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(56px, 10vw, 112px) clamp(20px, 5vw, 40px);
  text-align: center;
}
.download-page h1 { font-size: clamp(2rem, 5vw, 3rem); }
.download-page p { color: var(--slate); }
.download-page .download-actions { margin-top: 28px; }
.download-page .btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

.reader-end {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 40px) 100px;
  text-align: center;
  border-top: 1px solid var(--hairline);
}
.reader-end p {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink);
  font-size: 1.2rem;
  margin: 0 0 24px;
}
.reader-end .btn { margin: 0 6px; }

/* Depth gauge — signature element for the reader */
.depth-gauge {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: min(46vh, 340px);
  background: var(--hairline-strong);
  border-radius: 2px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.depth-gauge-fill {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(var(--teal-dim), var(--teal));
  border-radius: 2px;
  transition: height 0.12s linear;
}
.depth-label {
  position: absolute;
  right: 12px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-dim);
  white-space: nowrap;
}
.depth-label.top { top: -18px; }
.depth-label.bottom { bottom: -20px; color: var(--teal-dim); }

@media (max-width: 720px) {
  .depth-gauge { display: none; }
}

/* ---------- Responsive hero ---------- */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero-cover { max-width: 280px; margin: 0 auto; }
}
