/* ------------------------------------------------------------------ base */

:root {
  --paper: #f6eddd;
  --paper-deep: #efe1cb;
  --paper-shade: #e6d5ba;
  --ink: #241c16;
  --ink-soft: #5b4c3f;
  --red: #a4232a;
  --red-deep: #7c151b;
  --green: #1d4334;
  --gold: #bd9445;
  --film: #171311;
  --film-edge: #241d18;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --type: "Special Elite", "Courier New", monospace;
  --hand: "Caveat", "Bradley Hand", cursive;
  --shadow-card: 0 24px 60px -32px rgba(46, 30, 16, .65), 0 2px 0 rgba(255, 255, 255, .6) inset;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, #fdf7ea 0%, rgba(253, 247, 234, 0) 55%),
    radial-gradient(90% 60% at 110% 20%, rgba(189, 148, 69, .16), transparent 60%),
    radial-gradient(80% 50% at -10% 70%, rgba(29, 67, 52, .12), transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  line-height: 1.55;
  overflow-x: hidden;
}

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

a { color: inherit; }

button { font: inherit; color: inherit; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .3;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(246, 237, 221, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(36, 28, 22, .12);
}

.brand {
  font-family: var(--type);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}

.brand span { color: var(--red); }

.topbar nav {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
}

.topbar nav a {
  font-family: var(--type);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}

.topbar nav a:hover,
.topbar nav a:focus-visible { color: var(--red); border-color: currentColor; }

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

.hero {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 110px) clamp(20px, 5vw, 40px) clamp(40px, 8vh, 90px);
  text-align: center;
}

.hero-stamp {
  position: absolute;
  top: clamp(18px, 5vh, 54px);
  right: clamp(8px, 4vw, 36px);
  width: clamp(86px, 12vw, 130px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed rgba(164, 35, 42, .55);
  display: grid;
  place-items: center;
  transform: rotate(9deg);
  color: var(--red);
  opacity: .85;
}

.stamp-inner {
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(164, 35, 42, .45);
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 8px;
  font-family: var(--type);
  font-size: clamp(.42rem, .8vw, .55rem);
  letter-spacing: .12em;
}

.stamp-inner strong {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1;
  font-weight: 600;
}

.kicker {
  font-family: var(--type);
  font-size: clamp(.62rem, 1.4vw, .78rem);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 clamp(10px, 2vh, 20px);
}

.hero h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(3.6rem, 13.5vw, 10.5rem);
  line-height: .82;
  letter-spacing: -.035em;
  font-variation-settings: "SOFT" 40, "WONK" 1;
}

.hero h1 .line { display: block; }

.hero h1 .italic {
  font-style: italic;
  font-weight: 400;
  color: var(--red);
  letter-spacing: -.02em;
  padding-right: .06em;
}

.hero-year {
  font-family: var(--type);
  font-size: clamp(.68rem, 1.6vw, .85rem);
  letter-spacing: .5em;
  color: var(--gold);
  margin: clamp(14px, 2.5vh, 24px) 0 clamp(30px, 5vh, 46px);
}

/* --------------------------------------------------------------- letter */

.letter {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.letter-seal {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.seal {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 48% 52% 47% 53% / 52% 46% 54% 48%;
  background:
    radial-gradient(circle at 34% 30%, #cf4449 0%, #a4232a 42%, #6d1015 100%);
  color: #f8e7d3;
  font-family: var(--serif);
  font-size: 2rem;
  font-style: italic;
  box-shadow: 0 10px 22px -10px rgba(109, 16, 21, .9), inset 0 2px 6px rgba(255, 255, 255, .35), inset 0 -6px 12px rgba(0, 0, 0, .35);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

.letter-seal:hover .seal,
.letter-seal:focus-visible .seal {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 16px 30px -12px rgba(109, 16, 21, .95), inset 0 2px 6px rgba(255, 255, 255, .4), inset 0 -6px 12px rgba(0, 0, 0, .35);
}

.seal-hint {
  font-family: var(--type);
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.letter[data-open="true"] .letter-seal { display: none; }

.letter-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  text-align: left;
  background:
    linear-gradient(rgba(255, 255, 255, .32), rgba(255, 255, 255, 0) 40%),
    var(--paper-deep);
  border: 1px solid rgba(36, 28, 22, .14);
  border-radius: 3px;
  box-shadow: var(--shadow-card);
  transition: max-height .9s var(--ease), opacity .6s ease .1s, padding .6s var(--ease);
  padding: 0 clamp(20px, 5vw, 52px);
}

.letter[data-open="true"] .letter-body {
  max-height: 1600px;
  opacity: 1;
  padding: clamp(26px, 4vw, 52px) clamp(20px, 5vw, 52px);
}

.letter-to {
  font-family: var(--hand);
  font-size: 1.5rem;
  color: var(--red-deep);
  margin: 0 0 6px;
}

.letter-body h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 500;
  margin: 0 0 clamp(14px, 2vw, 22px);
  letter-spacing: -.01em;
}

.message p {
  margin: 0 0 1em;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  color: #33291f;
}

.message p:last-child { margin-bottom: 0; }

.signoff {
  font-family: var(--hand);
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  color: var(--green);
  margin: clamp(20px, 3vw, 30px) 0 0;
}

.scroll-hint {
  margin: clamp(40px, 7vh, 70px) 0 0;
  font-family: var(--type);
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: .7;
}

/* ------------------------------------------------------------ section kit */

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto clamp(30px, 5vw, 52px);
  padding: 0 22px;
}

.eyebrow {
  font-family: var(--type);
  font-size: .64rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 12px;
}

.section-head h2,
.collage-copy h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.025em;
  margin: 0 0 14px;
}

.section-note {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0;
}

/* ------------------------------------------------------------------ reel */

.reel-section {
  padding: clamp(40px, 8vh, 90px) 0 clamp(30px, 6vh, 70px);
}

.reel-shell {
  max-width: 1320px;
  margin: 0 auto;
  background: linear-gradient(#211a15, #12100e 70%);
  border-radius: 6px;
  padding: clamp(10px, 2vw, 20px) 0 clamp(12px, 2vw, 18px);
  box-shadow: 0 40px 80px -50px rgba(20, 12, 6, .9), inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.reel-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(18px, 3vw, 34px) 10px;
  font-family: var(--type);
  font-size: .56rem;
  letter-spacing: .22em;
  color: #c8a86a;
  opacity: .8;
  text-transform: uppercase;
}

.reel {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #4a3d32 transparent;
  padding: 22px 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 20px, rgba(255, 255, 255, .06) 20px 21px, transparent 21px 42px);
}

.reel::before,
.reel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background:
    repeating-linear-gradient(90deg, transparent 0 10px, #f6eddd 10px 22px, transparent 22px 34px);
  opacity: .85;
  z-index: 2;
  pointer-events: none;
}

.reel::before { top: 6px; }
.reel::after { bottom: 6px; }

.reel::-webkit-scrollbar { height: 8px; }
.reel::-webkit-scrollbar-track { background: #1a1512; }
.reel::-webkit-scrollbar-thumb { background: #4a3d32; border-radius: 99px; }

.reel-track {
  display: flex;
  gap: clamp(12px, 2vw, 22px);
  padding: 0 clamp(18px, 3vw, 34px);
  align-items: stretch;
  width: max-content;
  margin: 0 auto;
}

.frame {
  flex: 0 0 auto;
  width: clamp(190px, 24vw, 280px);
  scroll-snap-align: center;
  background: #0d0b0a;
  border: 0;
  border-radius: 2px;
  padding: 8px 8px 10px;
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 10px 20px -14px #000;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
  position: relative;
}

.frame:hover,
.frame:focus-visible {
  transform: translateY(-6px) rotate(-.5deg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 26px 40px -22px #000;
  outline: none;
}

.frame-no {
  position: absolute;
  top: 2px;
  right: 12px;
  font-family: var(--type);
  font-size: .5rem;
  letter-spacing: .16em;
  color: #c8a86a;
  opacity: .8;
  z-index: 2;
}

.frame-photo {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #241d18;
  position: relative;
}

.frame-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.94) contrast(1.02) sepia(.06);
  transition: transform .6s var(--ease);
}

.frame:hover .frame-photo img { transform: scale(1.035); }

.frame-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 244, 214, .16), transparent 55%);
  pointer-events: none;
}

.frame-caption {
  display: block;
  font-family: var(--type);
  font-size: .58rem;
  line-height: 1.5;
  letter-spacing: .02em;
  color: #e6d5ba;
  padding: 8px 2px 0;
  min-height: 2.4em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.frame-date {
  display: block;
  font-family: var(--type);
  font-size: .52rem;
  letter-spacing: .12em;
  color: #e8842c;
  padding: 4px 2px 0;
  text-shadow: 0 0 6px rgba(232, 132, 44, .35);
}

.frame.is-empty {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(246, 237, 221, .18);
  cursor: default;
}

.frame.is-empty .frame-photo {
  background: repeating-linear-gradient(135deg, #1b1613 0 10px, #201a16 10px 20px);
  display: grid;
  place-items: center;
}

.frame.is-empty .frame-photo::before {
  content: "UNEXPOSED";
  font-family: var(--type);
  font-size: .55rem;
  letter-spacing: .3em;
  color: #7d6a55;
}

.frame.is-empty .frame-caption { color: #7d6a55; }

.reel-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 4px 20px 0;
}

.frame-count {
  font-family: var(--type);
  font-size: .6rem;
  letter-spacing: .22em;
  color: #c8a86a;
  margin: 0;
  min-width: 130px;
  text-align: center;
}

.frame-count .of { opacity: .55; }

.reel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(246, 237, 221, .3);
  background: transparent;
  color: #e6d5ba;
  cursor: pointer;
  font-size: 1rem;
  transition: background .2s, border-color .2s, transform .2s;
}

.reel-btn:hover,
.reel-btn:focus-visible {
  background: rgba(246, 237, 221, .1);
  border-color: rgba(246, 237, 221, .6);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------- collage */

.collage-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(50px, 9vh, 110px) clamp(22px, 5vw, 40px);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(30px, 6vw, 70px);
  align-items: center;
}

.collage-copy p {
  color: var(--ink-soft);
  max-width: 46ch;
}

.collage-copy h2 { margin-bottom: 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--type);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s;
}

.btn-red {
  background: linear-gradient(180deg, #b32a31, #8d1b22);
  color: #fdf3e3;
  box-shadow: 0 14px 26px -16px rgba(124, 21, 27, .9), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.btn-red:hover,
.btn-red:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 32px -18px rgba(124, 21, 27, .95), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.btn-ink {
  background: var(--ink);
  color: var(--paper);
}

.btn-ink:hover:not(:disabled),
.btn-ink:focus-visible {
  transform: translateY(-2px);
  background: var(--green);
}

.btn-ink:disabled { opacity: .5; cursor: progress; }

.btn-ghost {
  background: transparent;
  border-color: rgba(36, 28, 22, .25);
  color: var(--ink);
}

.btn-ghost:hover { background: rgba(36, 28, 22, .06); }

.contact-sheet {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
  background: #1a1512;
  border-radius: 4px;
  transform: rotate(2deg);
  box-shadow: 0 40px 60px -40px rgba(30, 20, 10, .8);
}

.contact-sheet::after {
  content: "2026 · CONTACT SHEET";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  text-align: center;
  font-family: var(--type);
  font-size: .43rem;
  letter-spacing: .28em;
  color: #c8a86a;
  opacity: .75;
}

.sheet-photo {
  aspect-ratio: 5 / 4;
  border-radius: 1px;
  background:
    radial-gradient(90% 80% at 30% 20%, rgba(255, 236, 199, .75), transparent 62%),
    linear-gradient(150deg, #a9b79c, #5d715a 55%, #3a4a38);
}

.sheet-photo.p2 { background: radial-gradient(80% 70% at 70% 30%, rgba(255, 226, 179, .8), transparent 58%), linear-gradient(160deg, #d09a6f, #8c5a3f 60%, #4a3125); }
.sheet-photo.p3 { background: radial-gradient(70% 80% at 40% 70%, rgba(255, 233, 195, .7), transparent 62%), linear-gradient(140deg, #c39a7b, #6f5240 60%, #3b2c23); }
.sheet-photo.p4 { background: radial-gradient(80% 60% at 60% 40%, rgba(255, 238, 208, .75), transparent 58%), linear-gradient(150deg, #e0c691, #a1895c 60%, #5c5036); }

.sheet-photo::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .35) 0 3px, transparent 3px 9px);
  opacity: .25;
}

.sheet-hole {
  min-height: 26px;
  align-self: center;
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, rgba(246, 237, 221, .55) 0 12px, transparent 12px 26px);
  opacity: .5;
}

/* -------------------------------------------------------------- guestbook */

.guestbook {
  padding: clamp(50px, 9vh, 100px) clamp(22px, 5vw, 40px) clamp(60px, 9vh, 110px);
  border-top: 1px solid rgba(36, 28, 22, .1);
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(189, 148, 69, .12), transparent 70%);
}

.guestbook-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.sign-form {
  background: #fbf5e9;
  border: 1px solid rgba(36, 28, 22, .14);
  border-radius: 3px;
  padding: clamp(22px, 3vw, 30px);
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 88px;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-family: var(--type);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(36, 28, 22, .3);
  padding: 8px 2px;
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--ink);
  border-radius: 0;
  transition: border-color .2s;
  resize: vertical;
}

.field textarea {
  border: 1px solid rgba(36, 28, 22, .22);
  padding: 10px;
  background: rgba(255, 255, 255, .5);
  min-height: 96px;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
}

.field input::placeholder,
.field textarea::placeholder { color: #a4947f; }

.form-msg {
  font-family: var(--type);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--green);
  margin: 14px 0 0;
  min-height: 1.4em;
}

.form-msg.is-error { color: var(--red); }

.sign-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-content: flex-start;
}

.sig {
  position: relative;
  flex: 1 1 240px;
  max-width: 330px;
  background: #fbf5e9;
  border: 1px solid rgba(36, 28, 22, .12);
  padding: 26px 20px 18px;
  box-shadow: 0 18px 30px -26px rgba(46, 30, 16, .8);
  transform: rotate(var(--tilt, -.4deg));
  transition: transform .3s var(--ease);
}

.sig:nth-child(3n) { --tilt: .55deg; }
.sig:nth-child(4n) { --tilt: -.8deg; }
.sig:nth-child(5n) { --tilt: .3deg; }

.sig:hover { transform: rotate(0) translateY(-3px); }

.sig::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 62px;
  height: 18px;
  margin-left: -31px;
  background: rgba(197, 166, 108, .5);
  transform: rotate(-2deg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.sig-note {
  font-family: var(--hand);
  font-size: 1.28rem;
  line-height: 1.32;
  margin: 0 0 12px;
  color: #2c231b;
}

.sig-name {
  font-family: var(--type);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

.sig-date {
  font-family: var(--type);
  font-size: .55rem;
  letter-spacing: .1em;
  color: #a4947f;
  margin: 2px 0 0;
}

.sign-wall-empty {
  font-family: var(--hand);
  font-size: 1.4rem;
  color: var(--ink-soft);
  padding: 20px 4px;
}

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

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vw, 28px);
  padding: clamp(16px, 4vw, 48px);
  background: rgba(18, 13, 10, .92);
  backdrop-filter: blur(6px);
}

.lightbox[hidden] { display: none; }

.lightbox figure {
  margin: 0;
  max-width: min(90vw, 900px);
  max-height: 88vh;
  background: #0d0b0a;
  padding: 12px 12px 0;
  box-shadow: 0 50px 90px -40px #000;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(88vh - 100px);
  object-fit: contain;
  margin: 0 auto;
}

.lightbox figcaption {
  padding: 12px 4px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.lb-caption {
  margin: 0;
  font-family: var(--type);
  font-size: .68rem;
  letter-spacing: .06em;
  color: #e6d5ba;
}

.lb-date {
  margin: 0;
  font-family: var(--type);
  font-size: .58rem;
  letter-spacing: .14em;
  color: #e8842c;
  white-space: nowrap;
}

.lb-close,
.lb-nav {
  background: transparent;
  border: 1px solid rgba(246, 237, 221, .25);
  color: #f6eddd;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background .2s, border-color .2s;
}

.lb-close { position: absolute; top: 18px; right: 18px; }
.lb-close:hover, .lb-nav:hover, .lb-close:focus-visible, .lb-nav:focus-visible {
  background: rgba(246, 237, 221, .12);
  border-color: rgba(246, 237, 221, .6);
}

/* ----------------------------------------------------------- collage modal */

.collage-dialog {
  width: min(94vw, 880px);
  max-height: 92vh;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 60px 120px -40px #000;
}

.collage-dialog::backdrop {
  background: rgba(20, 14, 10, .78);
  backdrop-filter: blur(4px);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(36, 28, 22, .12);
}

.dialog-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -.01em;
}

.dialog-close {
  background: transparent;
  border: 1px solid rgba(36, 28, 22, .2);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
}

.canvas-holder {
  padding: 18px;
  background:
    repeating-linear-gradient(45deg, rgba(36, 28, 22, .04) 0 8px, transparent 8px 16px);
  display: grid;
  place-items: center;
  overflow: auto;
}

#collageCanvas {
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  box-shadow: 0 24px 40px -28px rgba(40, 25, 10, .85);
  background: #f8f1e2;
}

.dialog-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 22px 6px;
}

.dialog-note {
  margin: 0;
  padding: 0 22px 18px;
  font-family: var(--type);
  font-size: .6rem;
  letter-spacing: .1em;
  color: var(--ink-soft);
  text-align: right;
}

/* ----------------------------------------------------------------- footer */

.site-foot {
  text-align: center;
  padding: clamp(36px, 6vh, 60px) 22px clamp(40px, 6vh, 66px);
  border-top: 1px solid rgba(36, 28, 22, .1);
  font-size: .95rem;
  color: var(--ink-soft);
}

.foot-mark { color: var(--red); margin: 0 0 12px; font-size: 1.1rem; }

.foot-sub {
  font-family: var(--type);
  font-size: .58rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 14px 0 0;
}

.foot-sub a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }

.noscript {
  padding: 20px;
  text-align: center;
  font-family: var(--type);
  font-size: .8rem;
  color: var(--red);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .collage-section,
  .guestbook-grid { grid-template-columns: 1fr; }

  .contact-sheet { max-width: 420px; margin: 0 auto; }

  .sign-form { position: static; }
}

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 8px; }
  .topbar nav { gap: 16px; }
  .hero-stamp { display: none; }
  .lightbox { gap: 0; padding: 12px; }
  .lightbox figure { max-width: 100%; }
  .lb-nav { position: absolute; bottom: 18px; }
  .lb-prev { left: 18px; }
  .lb-next { right: 18px; }
  .lightbox figure { max-height: 82vh; }
  .lightbox img { max-height: calc(82vh - 110px); }
  .reel-label span:nth-child(2) { display: none; }
  .frame { width: 62vw; }
  .reel { padding: 18px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* --------------------------------------------------------------- focus */

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.letter-body:focus { outline: none; }

/* ----------------------------------------------------------- reel entrance */

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

/* ------------------------------------------------------------ photo lab */

.admin {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(34px, 6vh, 64px) clamp(18px, 4vw, 36px) clamp(60px, 10vh, 100px);
}

.admin h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.025em;
  margin: 0 0 12px;
}

.admin-lede {
  color: var(--ink-soft);
  margin: 0;
  max-width: 52ch;
}

.admin-login {
  max-width: 460px;
  margin: clamp(20px, 6vh, 60px) auto 0;
  background: #fbf5e9;
  border: 1px solid rgba(36, 28, 22, .14);
  border-radius: 3px;
  padding: clamp(24px, 4vw, 38px);
  box-shadow: var(--shadow-card);
}

.login-form { margin-top: 22px; }

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.admin-status {
  font-family: var(--type);
  font-size: .66rem;
  letter-spacing: .08em;
  color: var(--green);
  margin: 0;
  min-height: 1.3em;
}

.admin-status.is-error { color: var(--red); }

.tabs {
  display: flex;
  gap: 6px;
  margin: clamp(26px, 4vw, 40px) 0 26px;
  border-bottom: 1px solid rgba(36, 28, 22, .15);
  flex-wrap: wrap;
}

.tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  cursor: pointer;
  font-family: var(--type);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: -1px;
}

.tabs button[aria-selected="true"] {
  color: var(--red);
  border-color: var(--red);
}

.tabs button span {
  display: inline-block;
  margin-left: 4px;
  font-size: .58rem;
  color: var(--gold);
}

.panel { animation: panel-in .35s var(--ease); }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.dropzone {
  border: 1px dashed rgba(36, 28, 22, .32);
  border-radius: 4px;
  padding: clamp(24px, 5vw, 44px) 20px;
  text-align: center;
  background: rgba(255, 255, 255, .32);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.dropzone:hover,
.dropzone.is-over {
  border-color: var(--red);
  background: rgba(164, 35, 42, .05);
}

.drop-title { font-size: 1.15rem; margin: 0 0 4px; }

.drop-sub { margin: 0 0 8px; color: var(--ink-soft); }

.drop-note {
  font-family: var(--type);
  font-size: .58rem;
  letter-spacing: .1em;
  color: #8a7965;
  margin: 0;
}

.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  font: inherit;
}

.topbar nav .linkish {
  font-family: var(--type);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.upload-row {
  display: flex;
  gap: 18px;
  margin: 20px 0 0;
  flex-wrap: wrap;
}

.upload-row .grow { flex: 1 1 260px; }

.upload-row .field { margin: 0 0 13px; }

.upload-queue {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.upload-queue:empty { margin: 0; }

.upload-queue li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--type);
  font-size: .6rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
  border-bottom: 1px dotted rgba(36, 28, 22, .18);
  padding: 5px 2px;
}

.queue-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-status { white-space: nowrap; }
.queue-status.ok { color: var(--green); }
.queue-status.bad { color: var(--red); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.photo-card {
  position: relative;
  background: #fbf5e9;
  border: 1px solid rgba(36, 28, 22, .14);
  border-radius: 3px;
  padding: 8px 8px 10px;
  box-shadow: 0 16px 28px -26px rgba(46, 30, 16, .8);
}

.photo-order {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-family: var(--type);
  font-size: .5rem;
  letter-spacing: .14em;
  color: #f6eddd;
  background: rgba(23, 19, 17, .62);
  padding: 2px 6px;
  border-radius: 2px;
}

.photo-thumb {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #241d18;
}

.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

.photo-fields {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.photo-fields input {
  width: 100%;
  border: 1px solid rgba(36, 28, 22, .2);
  background: rgba(255, 255, 255, .55);
  padding: 6px 8px;
  font-family: var(--serif);
  font-size: .86rem;
  color: var(--ink);
  border-radius: 2px;
}

.photo-fields input:focus {
  outline: none;
  border-color: var(--red);
}

.photo-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.mini-btn {
  border: 1px solid rgba(36, 28, 22, .22);
  background: transparent;
  border-radius: 999px;
  padding: 5px 11px;
  font-family: var(--type);
  font-size: .55rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background .18s, border-color .18s, color .18s;
}

.mini-btn:hover:not(:disabled) {
  background: rgba(36, 28, 22, .06);
  border-color: rgba(36, 28, 22, .4);
  color: var(--ink);
}

.mini-btn:disabled { opacity: .35; cursor: not-allowed; }

.mini-save { border-color: var(--green); color: var(--green); }
.mini-save:hover:not(:disabled) { background: rgba(29, 67, 52, .08); color: var(--green); }

.mini-danger { border-color: rgba(164, 35, 42, .45); color: var(--red); }
.mini-danger:hover:not(:disabled) { background: rgba(164, 35, 42, .08); color: var(--red); }

.settings-form {
  max-width: 660px;
  background: #fbf5e9;
  border: 1px solid rgba(36, 28, 22, .14);
  border-radius: 3px;
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow-card);
}

.settings-form .field textarea {
  font-size: 1rem;
  min-height: 190px;
}

.hint {
  font-family: var(--type);
  font-size: .56rem;
  letter-spacing: .08em;
  color: #8a7965;
  margin: 6px 0 0;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.form-actions .form-msg { margin: 0; }

.signature-list {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.signature-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 18px;
  align-items: start;
  background: #fbf5e9;
  border: 1px solid rgba(36, 28, 22, .12);
  border-radius: 3px;
  padding: 14px 18px;
}

.sig-row-note {
  margin: 0;
  font-family: var(--hand);
  font-size: 1.2rem;
  line-height: 1.3;
}

.sig-row-meta {
  grid-column: 1;
  margin: 0;
  font-family: var(--type);
  font-size: .55rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8a7965;
}

.signature-row .mini-btn { grid-row: 1 / span 2; grid-column: 2; align-self: center; }

.empty-note {
  font-family: var(--type);
  font-size: .66rem;
  letter-spacing: .08em;
  color: #8a7965;
  margin: 18px 0 0;
}

@media (max-width: 640px) {
  .signature-row { grid-template-columns: 1fr; }
  .signature-row .mini-btn { grid-row: auto; grid-column: auto; justify-self: start; }
}
