:root {
  color-scheme: light;
  --ink: #2f2a26;
  --muted-ink: #655c54;
  --paper: #fff8e8;
  --paper-deep: #f5dfb8;
  --cream: #fffdf6;
  --rose: #e86f73;
  --rose-soft: #ffd6cf;
  --teal: #2b8c88;
  --teal-soft: #bfe5dc;
  --blue: #4b79a8;
  --mustard: #e8b44f;
  --olive: #7d8b59;
  --shadow: 0 22px 45px rgba(57, 37, 16, 0.16);
  --shadow-small: 0 12px 24px rgba(57, 37, 16, 0.12);
  --hand: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body);
  background:
    radial-gradient(circle at 12% 18%, rgba(232, 111, 115, 0.16), transparent 22rem),
    radial-gradient(circle at 84% 10%, rgba(43, 140, 136, 0.14), transparent 18rem),
    linear-gradient(135deg, #f7ead3 0%, #fffaf0 45%, #e7f0ea 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(47, 42, 38, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 42, 38, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(47, 42, 38, 0.025) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.32) 0 1px, transparent 1px 7px);
  mix-blend-mode: multiply;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.is-hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    linear-gradient(rgba(255, 248, 232, 0.92), rgba(255, 248, 232, 0.92)),
    linear-gradient(135deg, #f3c9b8, #d8eadb);
}

.loader__paper {
  width: min(26rem, 100%);
  padding: 2rem;
  text-align: center;
  background: var(--paper);
  border: 1px solid rgba(47, 42, 38, 0.16);
  box-shadow: var(--shadow);
  transform: rotate(-1.3deg);
  clip-path: polygon(1% 3%, 10% 0, 21% 3%, 34% 1%, 45% 4%, 60% 1%, 75% 3%, 90% 0, 99% 4%, 97% 19%, 100% 35%, 96% 50%, 99% 67%, 96% 84%, 99% 98%, 82% 96%, 69% 100%, 54% 96%, 39% 99%, 26% 96%, 12% 100%, 2% 96%, 4% 80%, 1% 66%, 3% 49%, 0 34%, 4% 17%);
}

.loader__stamp,
.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border: 2px solid var(--rose);
  border-radius: 50%;
  color: var(--rose);
  font-family: var(--hand);
  font-size: 1rem;
  transform: rotate(-8deg);
  text-transform: lowercase;
}

.loader p {
  margin: 1.4rem 0 1rem;
  font-family: var(--hand);
  font-size: clamp(1.8rem, 6vw, 3rem);
  line-height: 1;
}

.loader__bar {
  height: 0.7rem;
  overflow: hidden;
  border: 1px solid rgba(47, 42, 38, 0.22);
  border-radius: 999px;
  background: var(--cream);
}

.loader__bar span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: repeating-linear-gradient(45deg, var(--rose), var(--rose) 8px, var(--mustard) 8px, var(--mustard) 16px);
  animation: load-slide 1.1s ease-in-out infinite alternate;
}

@keyframes load-slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(125%);
  }
}

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.gate__card {
  position: relative;
  width: min(34rem, 100%);
  padding: clamp(1.6rem, 5vw, 3.25rem);
  text-align: center;
}

.gate h1 {
  margin: 0.35rem 0 0.75rem;
  font-family: var(--hand);
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  line-height: 0.92;
}

.gate__copy,
.hint,
.form-note {
  color: var(--muted-ink);
}

.gate__form,
.secret-form {
  display: flex;
  gap: 0.65rem;
  margin-top: 1.4rem;
}

input {
  min-width: 0;
  width: 100%;
  min-height: 3.1rem;
  border: 1px solid rgba(47, 42, 38, 0.24);
  border-radius: 0.35rem;
  padding: 0 0.95rem;
  color: var(--ink);
  background: rgba(255, 253, 246, 0.86);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(43, 140, 136, 0.14);
}

.form-note {
  min-height: 1.35rem;
  margin: 0.85rem 0 0;
}

.shake {
  animation: shake 0.28s linear;
}

@keyframes shake {
  25% {
    transform: translateX(-0.35rem) rotate(-0.8deg);
  }
  75% {
    transform: translateX(0.35rem) rotate(0.8deg);
  }
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0.75rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem 0 1.25rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(47, 42, 38, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 246, 0.82);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(16px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: max-content;
  text-decoration: none;
}

.brand-mark__initial {
  display: grid;
  place-items: center;
  width: 2.4rem;
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--cream);
  font-family: var(--hand);
  font-size: 1.45rem;
  background: var(--teal);
}

.brand-mark__text {
  font-family: var(--hand);
  font-size: 1.3rem;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a,
.site-footer a,
.text-button {
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted-ink);
  text-decoration: none;
  background: transparent;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a:focus-visible,
.site-footer a:hover,
.text-button:hover {
  color: var(--ink);
  background: rgba(232, 180, 79, 0.22);
}

.hero-spread {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(20rem, 1.05fr);
  align-items: center;
  gap: clamp(1.4rem, 5vw, 4rem);
  min-height: min(780px, calc(100vh - 6.4rem));
  padding: clamp(1.6rem, 5vw, 4rem) 0 clamp(3rem, 8vw, 6rem);
}

.hero-spread::before {
  content: "";
  position: absolute;
  left: -4vw;
  right: -4vw;
  bottom: 4%;
  height: 44%;
  z-index: -1;
  background: rgba(191, 229, 220, 0.34);
  clip-path: polygon(0 17%, 12% 10%, 22% 18%, 34% 9%, 47% 15%, 59% 7%, 73% 14%, 86% 8%, 100% 15%, 100% 100%, 0 100%);
}

.hero-spread h1 {
  margin: 0.2rem 0 1rem;
  max-width: 10ch;
  font-family: var(--hand);
  font-size: clamp(4rem, 12vw, 8.2rem);
  line-height: 0.8;
  text-wrap: balance;
}

.hero-spread p:not(.eyebrow) {
  max-width: 38rem;
  color: var(--muted-ink);
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.button,
.icon-button {
  border: 1px solid rgba(47, 42, 38, 0.2);
  border-radius: 0.4rem;
  box-shadow: 0 4px 0 rgba(47, 42, 38, 0.13);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0 1.05rem;
  font-weight: 750;
  text-decoration: none;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(47, 42, 38, 0.13);
}

.button:active,
.icon-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(47, 42, 38, 0.13);
}

.button--ink {
  color: #fffdf6;
  background: var(--ink);
}

.button--paper {
  background: var(--paper);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 3.1rem;
  aspect-ratio: 1;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
}

.icon-button svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.paper-card {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 248, 232, 0.9)),
    var(--paper);
  border: 1px solid rgba(47, 42, 38, 0.14);
  box-shadow: var(--shadow);
  clip-path: polygon(0.8% 1.2%, 8% 0, 18% 1.4%, 31% 0.3%, 44% 1.4%, 58% 0.2%, 72% 1.3%, 86% 0.4%, 99% 1.2%, 98.6% 15%, 99.4% 29%, 98.3% 44%, 99.2% 60%, 98.1% 73%, 99% 88%, 98.2% 99%, 83% 98.5%, 70% 99.6%, 57% 98.2%, 43% 99.3%, 30% 98.4%, 17% 99.6%, 1% 98.8%, 1.5% 84%, 0.5% 70%, 1.3% 55%, 0.4% 40%, 1.1% 25%);
}

.paper-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    repeating-linear-gradient(0deg, rgba(47, 42, 38, 0.035) 0 1px, transparent 1px 9px),
    radial-gradient(circle at 20% 30%, rgba(232, 180, 79, 0.12), transparent 18rem);
  mix-blend-mode: multiply;
}

.eyebrow {
  margin: 0;
  color: var(--rose);
  font-family: var(--hand);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 700;
}

.photo-stack {
  position: relative;
  min-height: 36rem;
}

.polaroid {
  position: absolute;
  width: min(18rem, 44vw);
  margin: 0;
  padding: 0.75rem 0.75rem 2.5rem;
  border: 1px solid rgba(47, 42, 38, 0.12);
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.polaroid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -1.1rem;
  width: 6rem;
  height: 2rem;
  background: rgba(255, 221, 155, 0.72);
  border: 1px solid rgba(47, 42, 38, 0.08);
  transform: translateX(-50%) rotate(-3deg);
}

.polaroid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--teal-soft);
}

.polaroid figcaption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.55rem;
  overflow: hidden;
  font-family: var(--hand);
  font-size: 1.35rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.polaroid--one {
  top: 5%;
  left: 4%;
  transform: rotate(-8deg);
}

.polaroid--two {
  top: 25%;
  right: 5%;
  transform: rotate(7deg);
}

.polaroid--three {
  left: 22%;
  bottom: 4%;
  transform: rotate(-2deg);
}

.section {
  padding: clamp(3rem, 8vw, 6.5rem) 0;
}

.section-heading {
  width: min(58rem, 100%);
  margin-bottom: 1.4rem;
}

.section-heading--split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.section-heading h2,
.secret-strip h2,
.vault h2,
.photo-modal h2 {
  margin: 0.1rem 0 0;
  font-family: var(--hand);
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 0.9;
}

.letter-card {
  width: min(820px, 100%);
  padding: clamp(1.45rem, 5vw, 3.6rem);
  transform: rotate(-0.8deg);
}

.letter-card__date {
  margin: 0 0 1rem;
  color: var(--muted-ink);
  font-family: var(--serif);
}

.letter-card p:not(.letter-card__date) {
  color: #42362e;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.85;
}

.paperclip {
  position: absolute;
  top: -1rem;
  right: 3rem;
  width: 2.5rem;
  height: 4.2rem;
  border: 0.25rem solid var(--blue);
  border-left-width: 0.35rem;
  border-radius: 1.4rem;
  transform: rotate(8deg);
  opacity: 0.85;
}

.tape {
  position: absolute;
  width: 6.2rem;
  height: 2.1rem;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255, 237, 178, 0.86) 8% 92%, transparent 92%),
    repeating-linear-gradient(45deg, rgba(47, 42, 38, 0.08) 0 1px, transparent 1px 7px);
}

.tape--left {
  top: -0.75rem;
  left: 1.5rem;
  transform: rotate(-11deg);
}

.tape--right {
  top: -0.7rem;
  right: 1.4rem;
  transform: rotate(9deg);
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.2rem;
  padding-left: min(7vw, 4rem);
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 1.15rem;
  width: 0.18rem;
  background: repeating-linear-gradient(var(--teal) 0 0.8rem, transparent 0.8rem 1.4rem);
}

.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.25rem;
  background: rgba(255, 253, 246, 0.84);
  border: 1px solid rgba(47, 42, 38, 0.13);
  box-shadow: var(--shadow-small);
  transform: rotate(var(--rot, 0deg));
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: calc(-1 * min(7vw, 4rem) + 0.72rem);
  top: 1.35rem;
  width: 1rem;
  aspect-ratio: 1;
  border: 0.2rem solid var(--paper);
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 0.15rem var(--rose);
}

.timeline-card time {
  color: var(--teal);
  font-family: var(--hand);
  font-size: 1.45rem;
  font-weight: 700;
}

.timeline-card h3 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

.timeline-card p {
  margin: 0;
  color: var(--muted-ink);
  line-height: 1.65;
}

.timeline-card.reveal-on-scroll {
  transform: translateY(1.2rem) rotate(var(--rot, 0deg));
}

.timeline-card.reveal-on-scroll.is-visible {
  transform: translateY(0) rotate(var(--rot, 0deg));
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.filter-button {
  min-height: 2.55rem;
  padding: 0 0.85rem;
  border: 1px solid rgba(47, 42, 38, 0.16);
  border-radius: 999px;
  color: var(--muted-ink);
  background: rgba(255, 253, 246, 0.72);
}

.filter-button.is-active {
  color: var(--cream);
  background: var(--teal);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(0.85rem, 2.2vw, 1.3rem);
}

.gallery-card {
  grid-column: span 4;
  min-width: 0;
  padding: 0.7rem 0.7rem 1rem;
  border: 0;
  color: var(--ink);
  text-align: left;
  background: #fffdf8;
  box-shadow: var(--shadow-small);
  transform: rotate(var(--rot, 0deg));
  transform-origin: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
  will-change: transform;
}

.gallery-card:hover {
  transform: translateY(-0.35rem) rotate(var(--rot, 0deg)) scale(1.012);
  box-shadow: var(--shadow);
}

.gallery-card.reveal-on-scroll {
  transform: translateY(1.2rem) rotate(var(--rot, 0deg));
}

.gallery-card.reveal-on-scroll.is-visible {
  transform: translateY(0) rotate(var(--rot, 0deg));
}

.gallery-card.reveal-on-scroll.is-visible:hover {
  transform: translateY(-0.35rem) rotate(var(--rot, 0deg)) scale(1.012);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 1 / 0.86;
  object-fit: cover;
  background: var(--paper-deep);
}

.gallery-card h3 {
  margin: 0.75rem 0 0.2rem;
  font-family: var(--hand);
  font-size: 1.55rem;
}

.gallery-card p {
  margin: 0;
  color: var(--muted-ink);
  line-height: 1.45;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  min-height: 11rem;
  padding: 1.2rem;
  border: 1px solid rgba(47, 42, 38, 0.13);
  background: rgba(255, 253, 246, 0.78);
  box-shadow: var(--shadow-small);
}

.stat-card:nth-child(2n) {
  background: rgba(191, 229, 220, 0.58);
}

.stat-card:nth-child(3n) {
  background: rgba(255, 214, 207, 0.64);
}

.stat-card__value {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--hand);
  font-size: clamp(2.8rem, 8vw, 4.4rem);
  font-weight: 700;
  line-height: 0.9;
}

.stat-card__label {
  display: block;
  color: var(--muted-ink);
  line-height: 1.35;
}

.future-intro {
  max-width: 23rem;
  margin: 0;
  color: var(--muted-ink);
  font-family: var(--serif);
  line-height: 1.65;
}

.future-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  align-items: start;
  gap: clamp(1rem, 3vw, 1.4rem);
}

.future-note {
  min-height: 26rem;
  padding: clamp(1.4rem, 5vw, 3rem);
  transform: rotate(-0.8deg);
}

.future-note__stamp {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  z-index: 1;
}

.future-note__date {
  position: relative;
  z-index: 1;
  margin: 0 0 1.2rem;
  color: var(--teal);
  font-family: var(--hand);
  font-size: 1.55rem;
  font-weight: 700;
}

.future-note h3 {
  position: relative;
  z-index: 1;
  max-width: 12ch;
  margin: 0 0 1rem;
  font-family: var(--hand);
  font-size: clamp(3rem, 8vw, 5.4rem);
  line-height: 0.86;
}

.future-note p:last-child {
  position: relative;
  z-index: 1;
  max-width: 38rem;
  margin: 0;
  color: #42362e;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.85;
}

.future-note.is-turning {
  animation: note-turn 460ms cubic-bezier(.18,.86,.25,1);
}

.future-note.reveal-on-scroll {
  transform: translateY(1.2rem) rotate(-0.8deg);
}

.future-note.reveal-on-scroll.is-visible {
  transform: translateY(0) rotate(-0.8deg);
}

.future-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.future-card {
  min-height: 9rem;
  padding: 1rem;
  border: 1px solid rgba(47, 42, 38, 0.13);
  color: var(--ink);
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 248, 232, 0.92)),
    var(--paper);
  box-shadow: var(--shadow-small);
  transform: rotate(var(--rot, 0deg));
  transform-origin: center;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.future-card:hover,
.future-card.is-active {
  background: linear-gradient(135deg, rgba(255, 214, 207, 0.82), rgba(255, 248, 232, 0.94));
  box-shadow: var(--shadow);
  transform: translateY(-0.25rem) rotate(var(--rot, 0deg));
}

.future-card__when {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--teal);
  font-family: var(--hand);
  font-size: 1.25rem;
  font-weight: 700;
}

.future-card strong {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
}

.future-card.reveal-on-scroll {
  transform: translateY(1.2rem) rotate(var(--rot, 0deg));
}

.future-card.reveal-on-scroll.is-visible {
  transform: translateY(0) rotate(var(--rot, 0deg));
}

.future-card.reveal-on-scroll.is-visible:hover,
.future-card.reveal-on-scroll.is-visible.is-active {
  transform: translateY(-0.25rem) rotate(var(--rot, 0deg));
}

@keyframes note-turn {
  0% {
    opacity: 0.72;
    transform: translateY(0.65rem) rotate(-2deg) scale(0.985);
  }
  62% {
    opacity: 1;
    transform: translateY(-0.28rem) rotate(0.6deg) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(-0.8deg) scale(1);
  }
}

.secret-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.secret-form {
  width: min(26rem, 100%);
  margin: 0;
}

.vault {
  margin-top: 1rem;
  padding: clamp(1.25rem, 4vw, 2.25rem);
}

.vault p {
  color: var(--muted-ink);
  line-height: 1.7;
}

.stamp--tilted {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
}

.coupon-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.coupon {
  min-height: 8rem;
  padding: 1rem;
  border: 1px dashed rgba(47, 42, 38, 0.32);
  background: rgba(255, 253, 246, 0.72);
}

.coupon strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--hand);
  font-size: 1.65rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.5rem 0 3rem;
  color: var(--muted-ink);
}

dialog {
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(47, 42, 38, 0.42);
  backdrop-filter: blur(5px);
}

.photo-modal[open]::backdrop {
  animation: scrapbook-backdrop 280ms ease both;
}

.letter-modal {
  width: min(780px, calc(100% - 28px));
}

.letter-modal__sheet {
  max-height: min(82vh, 48rem);
  padding: clamp(1.4rem, 5vw, 3rem);
  overflow: auto;
}

.letter-modal__close,
.photo-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
}

.letter-modal h2 {
  margin: 0.2rem 3rem 1rem 0;
  font-family: var(--hand);
  font-size: clamp(2.8rem, 9vw, 5rem);
  line-height: 0.9;
}

.letter-modal__body {
  position: relative;
  z-index: 1;
  color: #42362e;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.85;
}

.photo-modal {
  width: min(660px, calc(100% - 28px));
}

.photo-modal__card {
  position: relative;
  padding: 0.75rem 0.75rem 1.2rem;
  background: #fffdf8;
  box-shadow: var(--shadow);
  transform-origin: center;
  will-change: transform, opacity, filter;
}

.photo-modal__card::before,
.photo-modal__card::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 6.1rem;
  height: 2rem;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255, 237, 178, 0.82) 8% 92%, transparent 92%),
    repeating-linear-gradient(45deg, rgba(47, 42, 38, 0.07) 0 1px, transparent 1px 7px);
  pointer-events: none;
}

.photo-modal__card::before {
  top: -0.85rem;
  left: 2.2rem;
  transform: rotate(-10deg);
}

.photo-modal__card::after {
  right: 2.2rem;
  bottom: -0.55rem;
  transform: rotate(7deg);
}

.photo-modal__card img {
  width: 100%;
  max-height: 64vh;
  object-fit: cover;
  background: var(--paper-deep);
}

.photo-modal__caption {
  padding: 1rem 0.4rem 0;
}

.photo-modal__caption p:last-child {
  margin: 0.3rem 0 0;
  color: var(--muted-ink);
  line-height: 1.55;
}

@keyframes scrapbook-backdrop {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(5px);
  }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(1.2rem);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    border-radius: 1.2rem;
    flex-direction: column;
  }

  .hero-spread {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-spread h1 {
    max-width: 12ch;
  }

  .photo-stack {
    min-height: 28rem;
  }

  .polaroid {
    width: min(15rem, 54vw);
  }

  .section-heading--split,
  .secret-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-row {
    justify-content: flex-start;
  }

  .gallery-card {
    grid-column: span 6;
  }

  .stats-grid,
  .future-layout,
  .coupon-row {
    grid-template-columns: 1fr 1fr;
  }

  .future-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 20px, 1180px);
  }

  .gate__form,
  .secret-form,
  .site-footer {
    flex-direction: column;
  }

  .gate__form .button,
  .site-footer a,
  .text-button {
    width: 100%;
  }

  .hero-spread {
    padding-top: 1rem;
  }

  .hero-actions {
    flex-wrap: wrap;
  }

  .photo-stack {
    min-height: 23rem;
  }

  .polaroid {
    width: min(12.5rem, 60vw);
    padding-bottom: 2.2rem;
  }

  .polaroid--one {
    left: 0;
  }

  .polaroid--two {
    right: 0;
  }

  .polaroid--three {
    left: 15%;
  }

  .timeline {
    padding-left: 1.7rem;
  }

  .timeline::before {
    left: 0.42rem;
  }

  .timeline-card {
    grid-template-columns: 1fr;
  }

  .timeline-card::before {
    left: -1.72rem;
  }

  .gallery-card,
  .stats-grid,
  .future-layout,
  .future-stack,
  .coupon-row {
    grid-column: span 12;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
