/* ============================================================
   Shoebox — base theme
   Sunbleached photo-album palette: warm sand paper, faded
   guava/coral, deep teal-green ink, soft sun gold.
   Deliberately NOT tiki/turquoise-beach — this reads more like
   an aged 1986 print box than a postcard.
   ============================================================ */

:root {
  /* -- palette -- */
  --sand: #f7ecd9;        /* page background — warm parchment */
  --paper: #fffbf3;       /* card / print background */
  --ink: #2b433d;         /* primary text — deep shaded teal-green */
  --ink-soft: #5c766e;    /* secondary text */
  --guava: #d9694f;       /* accent — faded coral/guava */
  --gold: #c8963c;        /* accent — sun gold, links & highlights */
  --mist: #cfdccf;        /* dividers, placeholder texture */
  --shadow: rgba(43, 67, 61, 0.14);

  /* -- type -- */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --font-hand: "Caveat", cursive;
  --font-utility: "Public Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sand);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(217, 105, 79, 0.05), transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(200, 150, 60, 0.06), transparent 45%);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); }
a:hover { color: var(--guava); }

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: rgba(247, 236, 217, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(43, 67, 61, 0.1);
}

.site-header__mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-utility);
  font-size: 0.78rem;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
}
.site-nav a:hover { color: var(--guava); }

/* below this width, the nav is hidden behind a hamburger toggle instead
   of wrapping to multiple lines — clicking .nav-toggle adds/removes
   .is-open on .site-nav via a small script (see nav.js) */
@media (max-width: 640px) {
  .nav-toggle { display: block; }

  .site-header {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    flex-basis: 100%;
    gap: 0.75rem;
    padding-top: 0.75rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { white-space: normal; }
}

/* ---------- hero ---------- */

.hero {
  padding: 4.5rem 1.5rem 3rem;
  text-align: center;
}

.hero__eyebrow {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: var(--guava);
  margin: 0 0 0.25rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 0;
  color: var(--ink);
}

.hero__sub {
  max-width: 34rem;
  margin: 0.9rem auto 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.hero__intro {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 40rem;
  margin: 1.75rem auto 0;
  text-align: left;
}

.hero__intro-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* alternate: reverses the row so the photo sits on the right instead of the left */
.hero__intro-row--reverse {
  flex-direction: row-reverse;
}

.hero__intro-photo {
  flex: 0 0 auto;
  width: 150px;
  background: var(--paper);
  border: 1px solid rgba(43, 67, 61, 0.08);
  padding: 0.5rem;
  box-shadow: 0 8px 18px var(--shadow);
  transform: rotate(-1.2deg);
}
.hero__intro-row--reverse .hero__intro-photo {
  transform: rotate(1.2deg);
}
.hero__intro-photo img {
  width: 100%;
  display: block;
}

.hero__intro-text {
  flex: 1 1 auto;
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0;
}

/* stack the photo above the text on narrow screens instead of squeezing side by side —
   applies to every row, regardless of the left/right alternation, since alternating
   sides doesn't make sense once things are stacked */
@media (max-width: 560px) {
  .hero__intro-row,
  .hero__intro-row--reverse {
    flex-direction: column;
    text-align: center;
  }
  .hero__intro-photo { width: 130px; }
}

/* ---------- scrapbook spreads ---------- */

.scrapbook {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.25rem 6rem;
}

.spread {
  padding: 3rem 0;
  border-top: 1px solid rgba(43, 67, 61, 0.12);
}
.spread:first-child { border-top: none; }

.spread__label {
  font-family: var(--font-utility);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.4rem;
}

.spread__count {
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: normal;
  font-style: italic;
}

.spread__title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.spread__intro {
  max-width: 38rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0 0 1.5rem;
}
.spread__intro:empty::before {
  content: "intro text goes here";
  opacity: 0.4;
  font-style: italic;
}

/* inline word/phrase highlight — use inside .spread__intro or captions
   to make a specific word or short phrase pop, like a highlighter mark */
.callout {
  background: linear-gradient(transparent 55%, rgba(217, 105, 79, 0.28) 55%);
  color: var(--ink);
  font-weight: 600;
  padding: 0 0.1rem;
}

/* ---------- filmstrip ---------- */

.filmstrip {
  position: relative;
  overflow: hidden;
  padding: 0.5rem 0 1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.filmstrip__track {
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
  width: max-content;
}

/* looping variant — used when a section has enough photos */
.filmstrip--loop .filmstrip__track {
  animation: filmstrip-scroll var(--duration, 32s) linear infinite;
}
.filmstrip--loop:hover .filmstrip__track,
.filmstrip--loop:focus-within .filmstrip__track {
  animation-play-state: paused;
}

/* static variant — used when a section has too few photos to loop meaningfully */
.filmstrip--static {
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-mask-image: none;
  mask-image: none;
}
.filmstrip--static .photo-card { scroll-snap-align: start; }

@keyframes filmstrip-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .filmstrip--loop .filmstrip__track { animation: none; }
  .filmstrip--loop { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

/* ---------- photo card ---------- */

.photo-card {
  /* height-locked, not width-locked: width comes from the photo's own
     aspect ratio so portrait and landscape frames sit side by side
     without cropping, like a real contact sheet.
     Width is pinned to the frame's own calc() so a long caption wraps
     instead of stretching the card (and its border) wider than the photo. */
  flex: 0 0 auto;
  width: calc(220px * var(--ratio, 0.8) + 1.1rem);
  background: var(--paper);
  border: 1px solid rgba(43, 67, 61, 0.08);
  border-radius: 2px;
  padding: 0.55rem 0.55rem 0.85rem;
  box-shadow: 0 8px 18px var(--shadow);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.2s ease;
}
.photo-card:hover,
.photo-card:focus-within { transform: rotate(0deg) translateY(-3px); }

.photo-card:nth-child(3n+1) { --tilt: -1.4deg; }
.photo-card:nth-child(3n+2) { --tilt: 1deg; }
.photo-card:nth-child(3n)   { --tilt: -0.5deg; }

.photo-card__frame {
  /* fixed height, auto width — set --ratio (width/height) per image inline,
     e.g. style="--ratio:1.5" for a horizontal postcard, --ratio:0.8 for
     a portrait shot. Defaults to a slightly portrait placeholder ratio. */
  height: 220px;
  width: calc(220px * var(--ratio, 0.8));
  background-image: repeating-linear-gradient(
    135deg, var(--mist), var(--mist) 8px, var(--sand) 8px, var(--sand) 16px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem;
  font-family: var(--font-utility);
  font-size: 0.68rem;
  color: var(--ink-soft);
  overflow: hidden;
}
.photo-card__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-card__caption {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--ink);
  margin-top: 0.5rem;
  min-height: 1.3em;
  overflow-wrap: break-word;
}
.photo-card__caption:empty::before {
  content: "";
  opacity: 0.35;
  font-style: italic;
  font-family: var(--font-utility);
  font-size: 0.72rem;
}

/* ---------- lightbox ---------- */

.photo-card__frame img,
.hero__intro-photo img { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(20, 32, 29, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }

.lightbox__img {
  max-width: min(90vw, 1100px);
  max-height: 88vh;
  border: 6px solid var(--paper);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  background: var(--paper);
}

.lightbox__caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--sand);
  background: rgba(20, 32, 29, 0.75);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  text-align: center;
}
.lightbox__caption:empty { display: none; }

.lightbox__close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close:hover { background: var(--gold); color: var(--paper); }

/* ---------- curator's notes ---------- */
/* A themed "island": redefines RCS's own variables locally so every
   existing component (.spread__title, .photo-card, .hero__intro-row,
   etc.) automatically re-skins to a Moondog-esque palette/type here,
   with no new component CSS and no import of moondog-base.css —
   keeps the two projects' stylesheets fully independent. */

.curator-notes {
  --sand: #1c1712;
  --paper: #2a231c;
  --ink: #f0e6d6;
  --ink-soft: #c9baa2;
  --guava: #d99a44;
  --gold: #8fa889;
  --mist: #3c332a;
  --shadow: rgba(0, 0, 0, 0.55);
  --font-display: "Cinzel", Georgia, serif;
  --font-body: "Crimson Pro", Georgia, serif;
  --font-hand: "Crimson Pro", Georgia, serif;
  --font-utility: "Share Tech Mono", monospace;

  background: var(--sand);
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(240, 230, 214, 0.35), transparent),
    radial-gradient(1px 1px at 30% 65%, rgba(240, 230, 214, 0.25), transparent),
    radial-gradient(1.5px 1.5px at 50% 15%, rgba(240, 230, 214, 0.3), transparent),
    radial-gradient(1px 1px at 70% 80%, rgba(240, 230, 214, 0.2), transparent),
    radial-gradient(1.5px 1.5px at 85% 35%, rgba(240, 230, 214, 0.3), transparent),
    radial-gradient(1px 1px at 92% 60%, rgba(240, 230, 214, 0.2), transparent);
  color: var(--ink-soft);
  font-family: var(--font-body);
  padding: 4rem 1.5rem 5rem;
}

.curator-notes__inner {
  max-width: 40rem;
  margin: 0 auto;
}

.curator-notes__label {
  font-family: var(--font-utility);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.5rem;
  text-align: center;
}

.curator-notes__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--ink);
  text-align: center;
  margin: 0 0 2.5rem;
}

.curator-notes .hero__intro-row {
  margin-bottom: 2rem;
}

.curator-notes .hero__intro-row:last-of-type {
  margin-bottom: 0;
}

/* reuse the same alternating photo/text row pattern as the hero intro —
   .hero__intro-row / --reverse / -photo / -text all work unchanged here
   because they read colors from the variables redefined above */

/* ---------- license / about ---------- */

.curator-license {
  max-width: 34rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 1rem;
  text-align: center;
}

.curator-license__label {
  font-family: var(--font-utility);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

.curator-license__block {
  background: var(--paper);
  border: 1px solid rgba(43, 67, 61, 0.1);
  padding: 1.75rem;
  text-align: left;
}

.curator-license__block p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0 0 0.75rem;
}
.curator-license__block p:last-of-type { margin-bottom: 0; }

.curator-license__credit {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(43, 67, 61, 0.1);
  display: flex;
  align-items: center;      /* keeps text vertically centered against the logo */
  justify-content: center;
  gap: 0.85rem;
  text-align: left;
}

.curator-license__logo {	
  height: 50px;              /* slightly smaller logo to match smaller text */
  width: auto;
  flex-shrink: 0;
}

.curator-license__credit-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  font-family: var(--font-utility);
  font-size: 0.68rem;        /* smaller — was 0.78rem */
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.curator-license__credit-text a {
  color: var(--gold);
}

@media (max-width: 500px) {
  .curator-license__credit {
    flex-direction: column;
    text-align: center;
  }
}
