*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #010101;
  --text: #E0DDD4;
  --muted: #5A6660;
  --water: #6B8E80;
  --paper: #C8C2B0;
  --ui-fg: #e8e5dc;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Karla', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  transition: background-color 1.4s ease;
}

/* ── Waterline progress ── */
#waterline {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 0%;
  background: #fff;
  z-index: 100;
  transition: width 0.1s linear;
}

/* ── Intro ── */
#intro {
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(2rem, 8vw, 8rem);
  position: relative;
}
#intro::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, var(--intro-fade, var(--bg)));
  pointer-events: none;
}

h1 {
  font-family: 'Old Standard TT', serif;
  font-style: normal;
  font-weight: 300;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  line-height: 1.6;
  color: #fff;
  letter-spacing: 0.02em;
  margin-bottom: 0;
  text-transform: uppercase;
}
h1 span {
  display: inline;
  font-size: clamp(0.9rem, 1.4vw, 1.1rem);
  color: #fff;
  font-style: normal;
  font-weight: 300;
  letter-spacing: 0.02em;
  text-transform: none;
}

.author {
  font-family: 'Old Standard TT', serif;
  font-weight: 300;
  font-size: clamp(0.9rem, 1.4vw, 1.1rem);
  letter-spacing: 0.02em;
  color: #fff;
}

.lang-switch,
.ig-handle {
  position: fixed;
  top: clamp(1.5rem, 3vw, 2.5rem);
  font-family: 'Karla', sans-serif;
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ui-fg);
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
  z-index: 999;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.6s forwards;
}
.lang-switch { right: clamp(1.5rem, 3vw, 2.5rem); }
.ig-handle   { left: clamp(1.5rem, 3vw, 2.5rem); }
.lang-switch:hover,
.ig-handle:hover { opacity: 0.5; }


/* ── Gallery ── */
#gallery {
  padding: 0;
}

.page-item {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(1rem, 3vw, 4rem) clamp(1rem, 5vw, 6rem);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.page-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.page-item.landscape {
  padding: clamp(0.5rem, 2vw, 2.5rem) clamp(0.5rem, 3vw, 4rem);
}
.page-item.landscape img {
  width: 100%;
  max-height: 92svh;
  object-fit: contain;
  aspect-ratio: 3400 / 2200;
}

.page-item img {
  display: block;
}

/* ── Series index ── */
.series-index {
  display: flex;
  gap: 3px;
  padding: 0;
  align-items: flex-end;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.series-section {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
}

.series-section:nth-child(1) { flex: 4; }
.series-section:nth-child(2) { flex: 5; }
.series-section:nth-child(3) { flex: 3; }
.series-section:nth-child(4) { flex: 4; }

.series-label {
  font-family: 'Karla', sans-serif;
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  padding: clamp(0.8rem, 1.5vw, 1.5rem) 0 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.series-title {
  font-family: 'Old Standard TT', serif;
  font-weight: 400;
  font-size: clamp(0.75rem, 1vw, 0.95rem);
  color: var(--text);
  padding-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.series-thumbs {
  display: flex;
  gap: 3px;
}

.series-thumbs a {
  display: block;
  flex: 1;
  min-width: 0;
}

.series-thumbs img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  opacity: 0.65;
  transition: opacity 0.4s ease;
  cursor: pointer;
}

.series-thumbs a:hover img { opacity: 1; }

@media (max-width: 700px) {
  .series-index { flex-wrap: wrap; align-items: flex-start; width: 95%; }
  .series-section { flex: none !important; width: 100%; }
  .series-label, .series-title { white-space: normal; }
}

/* ── Poem section ── */
.poem-section {
  padding: clamp(6rem, 12vw, 12rem) clamp(2rem, 8vw, 8rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.poem-title {
  font-family: 'Old Standard TT', serif;
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  color: var(--text);
  margin-bottom: 3rem;
}

.poem-body {
  font-family: 'Old Standard TT', serif;
  font-style: normal;
  font-weight: 400;
  font-size: clamp(0.88rem, 1.15vw, 1.05rem);
  line-height: 1.9;
  color: var(--text);
  width: 100%;
  max-width: 44ch;
}

.poem-body .stanza {
  margin-bottom: 2em;
}

.poem-colophon {
  margin-top: 2em;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 44ch;
  width: 100%;
}

.poem-colophon span,
.poem-colophon a {
  font-family: 'Old Standard TT', serif;
  font-size: clamp(0.88rem, 1.15vw, 1.05rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.9;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0;
  text-transform: none;
}

.poem-colophon a:hover { color: #fff; }

/* ── Footer ── */
footer {
  padding: clamp(3rem, 8vw, 8rem) clamp(2rem, 8vw, 8rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
footer p {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.back-top-fixed {
  position: fixed;
  bottom: clamp(1.5rem, 3vw, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.1rem;
  color: var(--ui-fg);
  text-decoration: none;
  transition: opacity 0.3s ease;
  z-index: 999;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.6s forwards;
}
.back-top-fixed:hover { opacity: 0.5; }

/* ── Intro animation ── */
#intro h1,
#intro .author {
  opacity: 0;
  animation: fadeIn 2.4s ease forwards;
}
#intro h1      { animation-delay: 0.4s; }
#intro .author { animation-delay: 1.2s; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Questions slide ── */
.questions-scroll-section {
  height: 130vh;
  position: relative;
}
.questions-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(4rem, 10vw, 10rem) clamp(2rem, 10vw, 14rem);
}
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  width: 100%;
  max-width: 80ch;
}
.questions-list .q {
  font-family: 'Old Standard TT', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 2.2vw, 2.2rem);
  line-height: 1.25;
  color: var(--text);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.questions-list .q.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Text page ── */
.text-page {
  display: flex;
  align-items: center;
  height: 100svh;
  padding: clamp(1.5rem, 3vw, 3rem) clamp(1.5rem, 4vw, 5rem);
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.text-page.visible {
  opacity: 1;
  transform: translateY(0);
}
.text-content {
  max-width: 100%;
  width: 100%;
}
.text-columns {
  column-count: 2;
  column-gap: clamp(2rem, 4vw, 4rem);
}
.text-columns p {
  font-family: 'Cormorant', serif;
  font-weight: 300;
  font-size: clamp(1.05rem, 1.25vw, 1.15rem);
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 0.9em;
  break-inside: avoid;
}
@media (max-width: 700px) {
  .text-columns { column-count: 1; }
  .text-page { height: auto; overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::after { animation: none !important; transition: none !important; }
  .page-item { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
  .page-item.portrait {
    padding: 1.5rem 1rem;
  }
  .page-item.landscape {
    padding: 0.5rem 0;
  }
}
