@import url("fonts.css");

:root {
  --paper: #F4EDDF;
  --sheet: #FFFBF2;
  --kraft: #DCC6A0;
  --ink: #1E1A17;
  --ink-soft: #5A514A;
  --red: #B8323A;
  --rose: #F2B8B5;
  --marker: #F7D96A;
  --display: "Playfair Display", Georgia, serif;
  --body: "Lora", Georgia, serif;
  --hand: "Caveat", "Segoe Print", cursive;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --torn-a: polygon(0% 6%, 4% 1%, 13% 3%, 27% 0%, 41% 2%, 58% 0%, 72% 3%, 86% 0%, 96% 2%, 100% 7%, 99% 34%, 100% 63%, 99% 93%, 95% 99%, 82% 97%, 67% 100%, 51% 98%, 36% 100%, 20% 97%, 6% 100%, 1% 95%, 0% 66%, 1% 35%);
  --torn-b: polygon(1% 3%, 9% 0%, 24% 2%, 39% 0%, 55% 3%, 70% 1%, 84% 3%, 97% 0%, 100% 5%, 99% 41%, 100% 72%, 98% 97%, 88% 100%, 73% 97%, 57% 100%, 42% 97%, 26% 100%, 11% 98%, 2% 100%, 0% 78%, 1% 44%, 0% 15%);
  --torn-c: polygon(0% 2%, 18% 0%, 33% 3%, 49% 0%, 63% 2%, 81% 0%, 99% 2%, 100% 30%, 98% 58%, 100% 98%, 79% 100%, 62% 97%, 44% 100%, 28% 98%, 12% 100%, 0% 97%, 2% 64%, 0% 33%);
  --pad: clamp(16px, 5vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
.mono { font-family: var(--mono); font-size: .78em; letter-spacing: .04em; text-transform: uppercase; }

/* Paper grain multiplied over the whole page. */
.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: .28; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .2 0 0 0 0 .12 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page { max-width: 1120px; margin: 0 auto; padding: 0 var(--pad); }

/* ---------- masthead ---------- */
.masthead { padding: 22px 0 0; text-align: center; }
.mast-top, .mast-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  padding: 6px 0;
}
.mast-top { border-bottom: 1px solid var(--ink); }
@media (max-width: 520px) { .mast-top span:nth-child(2) { display: none; } }
.mast-bottom { border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink); }
.mast-title {
  font: 900 clamp(44px, 12.5vw, 132px)/.95 var(--display);
  letter-spacing: -.02em;
  padding: 14px 0 10px;
}
.mast-title em { color: var(--red); font-style: italic; }
.mast-sub { font: italic 15px var(--body); color: var(--ink-soft); padding-bottom: 10px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1fr; gap: 28px; padding: 34px 0 52px; }
.ransom { display: flex; flex-wrap: wrap; gap: 8px 12px; font: 900 clamp(40px, 10vw, 92px)/1 var(--display); }
.scrap {
  display: inline-block; padding: .08em .26em .14em;
  background: var(--sheet); clip-path: var(--torn-a);
  filter: drop-shadow(2px 3px 0 rgba(0,0,0,.12));
  transform: rotate(var(--r, 0deg));
  animation: drop .8s cubic-bezier(.2, 1.4, .4, 1) var(--d, 0s) both;
}
.scrap.ink { background: var(--ink); color: var(--sheet); clip-path: var(--torn-b); }
.scrap.red { background: var(--red); color: var(--sheet); clip-path: var(--torn-c); font-style: italic; }
.scrap.kraft { background: var(--kraft); }
@keyframes drop {
  from { opacity: 0; transform: translateY(-60px) rotate(calc(var(--r, 0deg) * -4)) scale(1.3); }
  to { opacity: 1; transform: translateY(0) rotate(var(--r, 0deg)); }
}
.lead { font-size: 19px; max-width: 560px; margin-top: 22px; }
.lead::first-letter { float: left; font: 900 3.4em/.8 var(--display); padding: .06em .08em 0 0; color: var(--red); }
.byline { margin-top: 14px; color: var(--ink-soft); }

.hero-photos { position: relative; min-height: 340px; }
.hero-photos .polaroid { position: absolute; width: min(62%, 280px); }
.hero-photos .polaroid:nth-child(1) { left: 2%; top: 0; --r: -6deg; }
.hero-photos .polaroid:nth-child(2) { right: 2%; top: 30px; --r: 5deg; }
.hero-photos .polaroid:nth-child(3) { left: 22%; top: 150px; --r: -1deg; }

@media (min-width: 860px) {
  .hero { grid-template-columns: 1.15fr 1fr; align-items: center; }
  .hero-photos { min-height: 480px; }
  .hero-photos .polaroid:nth-child(3) { top: 210px; }
}

/* ---------- polaroid ---------- */
.polaroid {
  background: #fff; padding: 10px 10px 0; margin: 0;
  box-shadow: 0 10px 24px rgba(40, 28, 12, .18), 0 1px 2px rgba(0,0,0,.12);
  transform: rotate(var(--r, 0deg));
  transition: transform .4s cubic-bezier(.3, 1.4, .5, 1), box-shadow .4s;
  cursor: zoom-in;
}
.polaroid img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--kraft); }
.polaroid figcaption { font: 600 21px/1.15 var(--hand); padding: 8px 4px 12px; text-align: center; }
.polaroid:hover { transform: rotate(0) scale(1.04); z-index: 5; box-shadow: 0 18px 36px rgba(40, 28, 12, .26); }

.tape {
  position: absolute; top: -12px; left: 50%; width: 86px; height: 26px; z-index: 2;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(247, 217, 106, .65);
  clip-path: polygon(0 10%, 4% 0, 8% 12%, 12% 0, 88% 0, 92% 12%, 96% 0, 100% 10%, 100% 90%, 96% 100%, 92% 88%, 88% 100%, 12% 100%, 8% 88%, 4% 100%, 0 90%);
}
.tape.pink { background: rgba(242, 184, 181, .75); transform: translateX(-50%) rotate(3deg); }

/* ---------- sections ---------- */
.section { padding: 56px 0; border-top: 1px solid var(--ink); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.section-head h2 { font: 900 clamp(32px, 7vw, 56px)/1.05 var(--display); }
.section-head h2 i { color: var(--red); }
.section-head .mono { color: var(--ink-soft); }
.rule { height: 4px; border-top: 3px double var(--ink); margin: 0; }

.marker {
  background: linear-gradient(100deg, transparent 2%, var(--marker) 4%, var(--marker) 96%, transparent 98%) no-repeat 0 62% / 0% 68%;
  padding: 0 .1em;
  transition: background-size .9s cubic-bezier(.6, 0, .2, 1) .3s;
}
.in .marker, .marker.in { background-size: 100% 68%; }

.reveal { opacity: 0; transform: translateY(22px) rotate(var(--r, 0deg)); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .9, .3, 1); }
.reveal.in { opacity: 1; transform: translateY(0) rotate(var(--r, 0deg)); }
html:not(.js) .reveal { opacity: 1; transform: none; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 18px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  position: relative; isolation: isolate; padding: 22px 16px 18px; text-align: center;
  filter: drop-shadow(3px 5px 6px rgba(40, 30, 10, .16));
}
.stat::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sheet); clip-path: var(--torn-a); }
.stat:nth-child(3n+2)::before { clip-path: var(--torn-b); }
.stat:nth-child(3n)::before { clip-path: var(--torn-c); }
.stat:nth-child(4n+1)::before { background: var(--kraft); }
.stat b { display: block; font: 900 clamp(32px, 8vw, 50px)/1 var(--display); color: var(--red); font-variant-numeric: lining-nums; }
.stat span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.35; }
.stat small { display: block; margin-top: 6px; font: 600 18px/1.1 var(--hand); color: var(--ink-soft); }

/* ---------- chart ---------- */
.chart-wrap { margin-top: 46px; }
.chart-wrap h3 { font: 700 22px var(--display); margin-bottom: 4px; }
.chart-note { font: 600 20px var(--hand); color: var(--ink-soft); margin-bottom: 14px; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 6px; height: 200px; border-bottom: 2px solid var(--ink); padding-top: 22px; }
.bar { position: relative; height: 100%; display: flex; align-items: flex-end; }
.bar i {
  display: block; width: 100%; height: var(--h); background: var(--ink);
  transform-origin: bottom; transform: scaleY(0);
  transition: transform 1s cubic-bezier(.2, .9, .3, 1) calc(var(--n) * 60ms);
}
.bar.top i { background: var(--red); }
.bar em { position: absolute; left: 50%; bottom: calc(var(--h) + 4px); transform: translateX(-50%); font: 10px var(--mono); font-style: normal; opacity: 0; transition: opacity .4s calc(var(--n) * 60ms + .6s); }
.in .bar i { transform: scaleY(1); }
.in .bar em { opacity: 1; }
.bar-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-top: 6px; font: 10px var(--mono); text-align: center; text-transform: uppercase; }
.hours .bars { height: 120px; gap: 2px; }
.hours .bar-labels { gap: 2px; }

/* ---------- who is who ---------- */
.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; border: 2px solid var(--ink); background: var(--sheet); }
.versus > div { padding: 16px 14px; }
.versus h3 { font: 900 clamp(22px, 5vw, 32px)/1.1 var(--display); text-align: center; padding-bottom: 10px; border-bottom: 1px solid var(--ink); margin-bottom: 8px; }
.versus .vs { display: grid; place-items: center; border-left: 1px solid var(--ink); border-right: 1px solid var(--ink); font: 900 italic 26px var(--display); color: var(--red); padding: 0 10px; writing-mode: vertical-rl; }
.vrow { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px dotted var(--ink-soft); font-size: 14px; }
.vrow:last-child { border-bottom: 0; }
.vrow b { font: 700 20px var(--display); white-space: nowrap; }
.vrow.win b { color: var(--red); }
.vrow.win b::after { content: " ♥"; font-size: .7em; }
@media (max-width: 520px) {
  .versus { grid-template-columns: 1fr; }
  .versus .vs { writing-mode: horizontal-tb; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 4px; }
}

/* ---------- timeline ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; border-left: 2px dashed var(--ink); }
.month { position: relative; margin-bottom: 38px; }
.month::before {
  content: ""; position: absolute; left: -28px; top: 8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 4px var(--paper);
}
.month h3 { font: 900 28px/1.1 var(--display); }
.month h3 small { font: 600 20px var(--hand); color: var(--red); margin-left: 8px; }
.month-body { display: grid; gap: 14px; margin-top: 12px; }
@media (min-width: 760px) {
  .timeline { padding-left: 0; }
  .timeline::before { left: 50%; }
  .month { width: 50%; padding-right: 36px; }
  .month:nth-child(even) { margin-left: 50%; padding: 0 0 0 36px; }
  .month::before { left: auto; right: -8px; }
  .month:nth-child(even)::before { right: auto; left: -8px; }
  .month:nth-child(odd) { text-align: right; }
}
.event { background: var(--sheet); padding: 12px 14px; border-left: 4px solid var(--ink); text-align: left; }
.event b { display: block; font: 700 17px/1.3 var(--display); }
.event p { font-size: 15px; color: var(--ink-soft); }
.event .mono { color: var(--red); }
.month-photo { width: 62%; max-width: 230px; margin-top: 6px; }
.month:nth-child(odd) .month-photo { margin-left: auto; }

/* ---------- quotes ---------- */
.quotes { columns: 1; column-gap: 26px; }
@media (min-width: 640px) { .quotes { columns: 2; } }
@media (min-width: 980px) { .quotes { columns: 3; } }
.quote {
  break-inside: avoid; position: relative; isolation: isolate; margin: 0 0 26px; padding: 26px 20px 16px;
  filter: drop-shadow(3px 5px 6px rgba(40, 30, 10, .16));
}
.quote::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sheet); clip-path: var(--torn-b); }
.quote:nth-child(3n)::before { background: #FBE3E1; clip-path: var(--torn-a); }
.quote:nth-child(4n+1)::before { clip-path: var(--torn-c); }
.quote p { font: italic 19px/1.4 var(--body); }
.quote p::before { content: "«"; color: var(--red); font: 900 30px/0 var(--display); margin-right: 2px; vertical-align: -6px; }
.quote p::after { content: "»"; color: var(--red); font: 900 30px/0 var(--display); margin-left: 2px; vertical-align: -6px; }
.quote footer { margin-top: 10px; display: flex; justify-content: space-between; color: var(--ink-soft); }
.quote footer b { font: 700 20px var(--hand); color: var(--ink); text-transform: none; letter-spacing: 0; }

/* ---------- dictionary ---------- */
.dict { display: grid; gap: 0 40px; }
@media (min-width: 760px) { .dict { grid-template-columns: 1fr 1fr; } }
.entry { padding: 14px 0; border-bottom: 1px solid rgba(30, 26, 23, .25); }
.entry dt { font: 900 italic 24px/1.2 var(--display); }
.entry dt .mono { font-style: normal; color: var(--red); margin-left: 6px; }
.entry dd { margin: 4px 0 0; font-size: 16px; }

/* ---------- album ---------- */
.album { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
@media (min-width: 640px) { .album { grid-template-columns: repeat(3, 1fr); gap: 34px 26px; } }
@media (min-width: 980px) { .album { grid-template-columns: repeat(4, 1fr); } }
.album .polaroid figcaption { font-size: 18px; }
.album .polaroid { position: relative; }
.album-more { display: block; margin: 34px auto 0; padding: 12px 28px; border: 0; background: var(--ink); color: var(--sheet); font: 700 18px var(--display); clip-path: var(--torn-c); cursor: pointer; transform: rotate(-1.5deg); transition: transform .25s; }
.album-more:hover { transform: rotate(0) scale(1.05); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 18px; background: rgba(20, 16, 12, .86); opacity: 0; pointer-events: none; transition: opacity .3s; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox figure { background: #fff; padding: 12px 12px 0; max-width: min(92vw, 900px); transform: scale(.92) rotate(-1deg); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1); }
.lightbox.open figure { transform: scale(1) rotate(0); }
.lightbox img { max-height: 76vh; width: auto; margin: 0 auto; }
.lightbox figcaption { font: 600 24px var(--hand); text-align: center; padding: 10px 0 12px; }

/* ---------- letter ---------- */
.letter {
  position: relative; max-width: 720px; margin: 0 auto; padding: 44px clamp(22px, 6vw, 56px) 40px;
  background: repeating-linear-gradient(transparent 0 35px, rgba(184, 50, 58, .16) 35px 36px), var(--sheet);
  box-shadow: 0 14px 34px rgba(40, 28, 12, .18);
  transform: rotate(-.6deg);
}
.letter p { font: 500 clamp(23px, 5.4vw, 28px)/36px var(--hand); margin-bottom: 18px; }
.letter .sign { text-align: right; color: var(--red); font-size: 32px; }

/* ---------- footer ---------- */
.footer { padding: 30px 0 46px; border-top: 3px double var(--ink); text-align: center; color: var(--ink-soft); }
.footer p { font: italic 15px var(--body); }
.heart { display: inline-block; color: var(--red); animation: beat 1.4s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .bar i { transform: none; }
  .marker { background-size: 100% 68%; }
}
