@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@700;800&display=swap');

:root {
  color-scheme: light;
  --bg: #ECE4D6;
  --ink: #2A2620;
  --ink-muted: #6B6459;

  /* Section fonts — swap any of these to retune a font choice later. */
  --font-writing: "Times New Roman", Times, serif;
  --font-film: "Courier New", Courier, monospace;
  --font-photography: "Baloo 2", sans-serif; /* stand-in for Kodak's wordmark */
  --font-body: system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
}

a {
  color: inherit;
}

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

/* ── Page 1: cover ──────────────────────────────────────────────────────── */
.cover {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.cover-link {
  display: block;
  max-width: min(90vw, 32rem);
}

.cover-link img {
  width: 100%;
  height: auto;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.cover-link:hover img {
  transform: scale(1.01);
}

/* ── Page 2: word menu ──────────────────────────────────────────────────── */
.menu {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2.5rem);
}

.menu a {
  text-decoration: none;
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: 0.02em;
}

.menu a:hover {
  opacity: 0.6;
}

.menu .writing    { font-family: var(--font-writing); }
.menu .film       { font-family: var(--font-film); }
.menu .photography { font-family: var(--font-photography); font-weight: 800; }

/* ── Section chrome (shared by photography/film/writing listing pages) ──── */
.section-header {
  max-width: 60rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.section-header .back {
  font-size: 0.9rem;
  color: var(--ink-muted);
  text-decoration: none;
}

.section-header .back:hover {
  color: var(--ink);
}

.breadcrumb {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--ink);
}

.section-header h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin: 0;
}

.empty-state {
  max-width: 60rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  color: var(--ink-muted);
}

/* ── Photography: series grid ──────────────────────────────────────────── */
/* A fixed 3-across table (2 rows for 6 series), not an auto-filling grid —
   this is a deliberate contact-sheet layout, per Parker's spec. */
.series-grid {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.75rem;
}

@media (max-width: 56rem) {
  .series-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 34rem) {
  .series-grid { grid-template-columns: 1fr; }
}

.series-card {
  text-decoration: none;
  display: block;
}

.series-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.series-card:hover img {
  transform: scale(1.015);
}

.series-card .title {
  margin-top: 0.75rem;
  font-family: var(--font-photography);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
}

/* ── Photography: gallery ──────────────────────────────────────────────── */
.gallery {
  max-width: 70rem;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 2.5rem;
}

.gallery figure {
  margin: 0;
}

/* Portrait photos are narrowed so they don't tower over their landscape
   neighbors at full column width — cropping isn't the goal, just parity. */
.gallery figure.portrait {
  max-width: 70%;
  margin: 0 auto;
}

.gallery .photo-frame {
  position: relative;
  cursor: zoom-in;
}

.gallery .photo-frame img {
  transition: transform 0.3s ease;
}

.gallery figure:hover .photo-frame img {
  transform: scale(1.015);
}

.gallery figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Buy Print stays out of sight until the photo is hovered (or, on touch
   devices with no hover, is always present but unobtrusive). */
.buy-print {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--ink-muted);
  border-radius: 999px;
  background: rgba(236, 228, 214, 0.9);
  color: var(--ink-muted);
  cursor: not-allowed;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery figure:hover .buy-print,
.gallery figure:focus-within .buy-print {
  opacity: 1;
}

@media (hover: none) {
  .buy-print {
    opacity: 1;
  }
}

/* ── Photography: lightbox ─────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 18, 14, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.lightbox-overlay.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-stage {
  max-width: 90vw;
  max-height: 88vh;
  text-align: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  margin: 0 auto;
  user-select: none;
}

.lightbox-caption {
  margin-top: 1.25rem;
  color: #eee;
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #eee;
  cursor: pointer;
  font-size: 1.75rem;
  line-height: 1;
  padding: 0.75rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-close {
  top: 0.5rem;
  right: 0.75rem;
  font-size: 2.1rem;
}

.lightbox-prev {
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
}

.lightbox-next {
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
}

@media (max-width: 40rem) {
  .lightbox-prev, .lightbox-next { font-size: 2rem; padding: 0.5rem; }
}

body.lightbox-locked {
  overflow: hidden;
}

/* ── Film / writing listings ───────────────────────────────────────────── */
.film-list, .writing-list {
  list-style: none;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.writing-list {
  padding-left: 3rem;
}

.film-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.writing-list li {
  padding: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.writing-row {
  display: block;
  padding: 1.25rem 1rem;
  margin: 0 -1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.writing-row:hover {
  background-color: rgba(0, 0, 0, 0.035);
  transform: scale(1.01) rotate(-0.4deg);
}

.writing-list h3 {
  margin: 0 0 0.25rem;
}

.writing-meta {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.writing-logline {
  margin: 0;
  font-family: var(--font-writing);
  font-style: italic;
}

/* ── Film: listing row (thumbnail + details) ───────────────────────────── */
.film-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
}

.film-thumb {
  flex: 0 0 auto;
  width: 9rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease;
}

.film-row:hover .film-thumb {
  transform: scale(1.015);
}

.film-thumb--empty {
  display: block;
}

.film-details h3 {
  margin: 0 0 0.25rem;
}

.film-meta {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* ── Film: collection page (trailer + Q&As side by side) ───────────────── */
.collection-extras {
  max-width: 60rem;
  margin: 2.5rem auto 4rem;
  padding: 0 1.5rem;
}

.collection-extras h2 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
}

.extras-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.extras-row li {
  flex: 0 1 14rem;
}

.extras-row a {
  display: block;
  text-decoration: none;
}

.extras-row img, .extras-row .film-thumb--empty {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.06);
  display: block;
  transition: transform 0.3s ease;
}

.extras-row a:hover img {
  transform: scale(1.015);
}

.extra-title {
  display: block;
  margin-top: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.extra-runtime {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.extra-description {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--font-writing);
  font-style: italic;
  font-size: 0.9rem;
}

.film-description {
  margin: 0;
  font-family: var(--font-writing);
  font-style: italic;
}

/* ── Film: watch page ───────────────────────────────────────────────────── */
.video-wrap {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  aspect-ratio: 16 / 9;
}

.video-wrap iframe, .video-wrap video {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.video-description {
  max-width: 60rem;
  margin: 1.5rem auto 4rem;
  padding: 0 1.5rem;
  color: var(--ink-muted);
}

/* ── Writing: reading page ─────────────────────────────────────────────── */
.writing-page-meta {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.5rem 0 3rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.prose {
  max-width: 60rem;
  margin: 1rem auto 10rem;
  padding: 0 1.5rem 0 3rem;
  font-family: var(--font-writing);
  font-size: 1.15rem;
  line-height: 1.75;
}

.prose p {
  max-width: 38rem;
  margin: 0 0 1.25em;
  text-indent: 2em;
}

/* ── Site footer (every page with art on it) ────────────────────────────── */
.site-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* ── Easter egg: trailing cursor echoes ─────────────────────────────────── */
.cursor-echo {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 26px;
  margin: 0;
  color: var(--ink);
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.cursor-echo svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Easter egg: sentences from the stories, written on the cover page ──── */
.home-sentence {
  position: fixed;
  display: block;
  font-family: var(--font-writing);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink-muted);
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.7s ease, color 0.2s ease;
  z-index: 20;
}

.home-sentence:hover {
  color: var(--ink);
}

.home-sentence-text {
  display: block;
}

.home-sentence-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.48s ease, transform 0.48s ease;
}

.home-sentence-attr {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-style: normal;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.5s ease;
}

