/* Pepeidon journal — single stylesheet */

:root {
  --ink:    #1B2A41;
  --paper:  #F6F1E7;
  --paper-2:#EFE7D5;
  --sun:    #E8B84A;
  --sea:    #5B8FA8;
  --shadow: 0 6px 22px rgba(27,42,65,0.14);
  --shadow-sm: 0 2px 8px rgba(27,42,65,0.10);

  --serif-display: "Playfair Display", Georgia, serif;
  --serif-body: "Lora", Georgia, serif;
  --script: "Caveat", "Brush Script MT", cursive;

  --max-w: 1100px;
  --gutter: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--sea); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

::selection { background: var(--sun); color: var(--ink); }

/* ---------- HERO ---------- */
.hero {
  text-align: center;
  padding: clamp(96px, 20vh, 200px) var(--gutter) clamp(72px, 14vh, 140px);
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero__title {
  font-family: var(--serif-display);
  font-weight: 900;
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: 1;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero__sub {
  font-family: var(--serif-body);
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0;
  color: rgba(27,42,65,0.6);
}

.anthem {
  margin: 36px auto 0;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.anthem__label {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(27,42,65,0.6);
}
.anthem__player {
  width: 100%;
  max-width: 360px;
  height: 36px;
}

/* ---------- SECTIONS ---------- */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter);
}

.section + .section { border-top: 1px solid rgba(27,42,65,0.12); }

.section__title {
  font-family: var(--serif-display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  margin: 0 0 40px;
  letter-spacing: -0.01em;
}

/* ---------- CREW ---------- */
.crew-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(20px, 3vw, 36px) clamp(16px, 2.5vw, 28px);
}
@media (max-width: 1024px) { .crew-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .crew-grid { grid-template-columns: repeat(2, 1fr); } }

.crew-card { text-align: left; transition: transform .25s ease; }
.crew-card:hover { transform: translateY(-4px); }

.crew-card__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
  border: 4px solid var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-radius: 2px;
}
.crew-card__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.crew-card:hover .crew-card__frame img { transform: scale(1.04); }

.crew-card__name {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 14px 0 0;
  line-height: 1.1;
}
.crew-card__role {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 0.92rem;
  margin: 2px 0 0;
  color: rgba(27,42,65,0.6);
}

/* ---------- DAYS ---------- */
.days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 8vw, 96px);
}

.day { position: relative; }

.day__banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 16px 24px;
  padding-bottom: 14px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--ink);
}

.day__weekday {
  font-family: var(--script);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  color: var(--ink);
}
.day__date {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sea);
  justify-self: start;
}
.day__author {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(27,42,65,0.7);
}
@media (max-width: 600px) {
  .day__banner { grid-template-columns: 1fr; gap: 4px; }
  .day__date, .day__author { justify-self: start; }
}

.day__heading {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 40px 0 20px;
  letter-spacing: 0.01em;
}

/* ---------- PROSE / TAG / NOTE / LEDE ---------- */
.day__prose {
  max-width: 720px;
  margin: 0 0 8px;
}
.day__prose p {
  margin: 0 0 18px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
}
.day__prose p:last-child { margin-bottom: 0; }
.day__prose p em {
  font-style: italic;
  color: rgba(27,42,65,0.7);
}

.day__lede {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.3;
  max-width: 820px;
  margin: 0 0 8px;
  color: var(--ink);
}

/* ---------- MOMENTS ---------- */
.moments {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  counter-reset: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 720px;
}
.moment {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: baseline;
}
.moment__num {
  font-family: var(--serif-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  color: var(--sun);
  line-height: 0.9;
  min-width: 1.2em;
}
.moment p {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.55;
}
.moment p em {
  font-style: italic;
  color: rgba(27,42,65,0.65);
}

/* ---------- FRAMES (masonry photo grid) ---------- */
/* CSS columns let each tile keep its natural aspect ratio — landscape and
   portrait photos coexist without cropping or letterboxing. */
.frames {
  list-style: none;
  margin: 0;
  padding: 0;
  column-count: 3;
  column-gap: clamp(10px, 1.4vw, 18px);
}
@media (max-width: 900px) { .frames { column-count: 2; } }
@media (max-width: 540px) { .frames { column-count: 1; } }

.frame {
  position: relative;
  background: var(--paper-2);
  border: 4px solid var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-radius: 2px;
  cursor: zoom-in;
  transition: transform .25s ease;
  break-inside: avoid;
  margin-bottom: clamp(10px, 1.4vw, 18px);
  display: block;
  width: 100%;
}
.frame img, .frame video {
  width: 100%;
  height: auto;
  display: block;
}
.frame--video, .frame--video video { cursor: auto; }

/* polaroid tilt */
.frame:nth-child(odd)  { transform: rotate(-1.2deg); }
.frame:nth-child(even) { transform: rotate(1.5deg); }
.frame:hover           { transform: rotate(0) scale(1.015); z-index: 1; }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15,22,34,0.94);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox__stage {
  max-width: 100%;
  max-height: 100%;
  display: grid;
  place-items: center;
}
.lightbox__stage img {
  max-width: min(96vw, 1600px);
  max-height: 92vh;
  width: auto; height: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  border: 4px solid var(--paper);
}
.lightbox__close {
  position: absolute;
  top: 16px; right: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(246,241,231,0.5);
  background: transparent;
  color: var(--paper);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
}
.lightbox__close:hover { background: rgba(246,241,231,0.15); }

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .frame, .frame:nth-child(n) { transform: none; }
  .reveal { opacity: 1; transform: none; }
  .hero__chevron { animation: none; }
}
