/* Sample reunion: a scrapbook. Yearbook cover, notebook paper, report card, corkboard, permission slip. */
:root {
  --paper: #fbf6e9; --line: #c9dbe9; --margin: #e8a3a3; --maroon: #7a1f2b; --maroon-deep: #4f121b; --gold: #e0b84a; --gold-light: #f4dc96;
  --ink: #2a2a2e; --pen: #1e3a8a; --sticky: #ffe98a; --cork: #c08a55;
  --varsity: 'Graduate', 'Rockwell', serif; --hand: 'Caveat', 'Segoe Print', cursive; --body: 'Libre Franklin', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; overflow-x: clip; color: var(--ink); font: 400 1.02rem/1.6 var(--body);
  background: linear-gradient(90deg, transparent 30px, var(--margin) 30px, var(--margin) 32px, transparent 32px), repeating-linear-gradient(180deg, var(--paper) 0 31px, var(--line) 31px 32px); }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.hand { font-family: var(--hand); color: var(--pen); }

.sample-banner { position: relative; z-index: 5; background: var(--maroon-deep); color: #f4dfb0; text-align: center; font: 600 .74rem var(--body); letter-spacing: .08em; text-transform: uppercase; padding: 9px 10px; white-space: nowrap; }
.sample-banner a { color: #fff; margin-left: 10px; }

/* ---------- yearbook cover ---------- */
.cover { position: relative; padding: 34px 18px 70px; min-height: calc(100svh - 36px); display: grid; place-items: center; }
.cover__book { position: relative; width: min(420px, 100%); aspect-ratio: 3 / 4; padding: 40px 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--gold);
  border-radius: 6px 14px 14px 6px;
  background: radial-gradient(120% 80% at 30% 20%, rgba(255, 255, 255, .08), transparent 60%), repeating-radial-gradient(circle at 20% 30%, rgba(0, 0, 0, .05) 0 1px, transparent 1px 3px), linear-gradient(135deg, #8d2533, var(--maroon) 50%, #5c1620);
  box-shadow: inset 12px 0 0 rgba(0, 0, 0, .25), inset 14px 0 0 rgba(255, 255, 255, .06), 0 30px 50px -20px rgba(0, 0, 0, .55), 8px 8px 0 #e7dfcc, 9px 9px 0 #cbbf9f; }
.corner { position: absolute; width: 34px; height: 34px; background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, #a8812a); }
.corner--tl { top: 0; left: 0; clip-path: polygon(0 0, 100% 0, 0 100%); border-top-left-radius: 6px; }
.corner--tr { top: 0; right: 0; clip-path: polygon(0 0, 100% 0, 100% 100%); border-top-right-radius: 14px; }
.corner--bl { bottom: 0; left: 0; clip-path: polygon(0 0, 0 100%, 100% 100%); }
.corner--br { bottom: 0; right: 0; clip-path: polygon(100% 0, 0 100%, 100% 100%); border-bottom-right-radius: 14px; }
.cover__school { font: 400 .8rem var(--varsity); letter-spacing: .2em; text-transform: uppercase; }
.cover__crest { width: 62px; height: 72px; margin: 18px 0 10px; }
.cover__title { font: 400 clamp(3.4rem, 18vw, 5.4rem)/.9 var(--varsity); background: linear-gradient(180deg, var(--gold-light), var(--gold) 50%, #a8812a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .35)); }
.cover__title span { display: block; font-size: .36em; letter-spacing: .3em; }
.cover__sub { font: 700 1.5rem var(--hand); color: var(--gold-light); margin-top: 10px; }
.cover__rule { width: 60%; height: 2px; margin: 14px 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.cover__date { font: 400 .78rem var(--varsity); letter-spacing: .1em; }
.sticker { position: absolute; top: 40px; right: max(14px, calc(50% - 250px)); width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; transform: rotate(14deg);
  background: var(--sticky); color: var(--maroon); font: 700 1.9rem var(--hand); box-shadow: 0 6px 10px -4px rgba(0, 0, 0, .4); animation: bounce 3s ease-in-out infinite; }
@keyframes bounce { 50% { transform: rotate(8deg) scale(1.06); } }
.cover__doodle { position: absolute; bottom: 22px; right: 12%; font-size: 1.6rem; transform: rotate(-6deg); }

/* ---------- scrapbook spread ---------- */
.spread { padding: 30px 16px 70px 44px; max-width: 900px; margin: 0 auto; }
.spread__note { font-size: 1.7rem; line-height: 1.25; transform: rotate(-1.5deg); margin-bottom: 30px; }
.collage { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 16px; align-items: start; }
@media (min-width: 760px) { .collage { grid-template-columns: repeat(3, 1fr); gap: 34px 26px; } }
.polaroid { position: relative; margin: 0; cursor: pointer; perspective: 900px; }
.polaroid::before { content: ''; position: absolute; z-index: 3; top: -10px; left: 50%; width: 60px; height: 20px; transform: translateX(-50%) rotate(-4deg); background: rgba(255, 233, 138, .8); }
.pol-inner { position: relative; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, 1.3, .5, 1); }
.flipped .pol-inner { transform: rotateY(180deg); }
.pol-front, .pol-back { background: #fff; box-shadow: 0 12px 18px -10px rgba(0, 0, 0, .4); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.pol-front { position: relative; padding: 8px 8px 32px; }
.pol-back { position: absolute; inset: 0; transform: rotateY(180deg); padding: 18px 14px; display: flex; flex-direction: column; justify-content: center; background: repeating-linear-gradient(180deg, #fff 0 25px, #dbe7f0 25px 26px); }
.pol-back .hand { font-size: 1.2rem; line-height: 1.15; }
.pol-hint { margin-top: 8px; font: 500 .7rem var(--body); color: #888; }
.polaroid:focus-visible { outline: 3px solid var(--maroon); outline-offset: 4px; }
.polaroid svg { display: block; width: 100%; height: auto; }
.polaroid figcaption { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font: 700 1.15rem var(--hand); color: var(--pen); }
.pol-1 { transform: rotate(-5deg); } .pol-2 { transform: rotate(4deg); margin-top: 24px; } .pol-3 { transform: rotate(-3deg); }
.scrap { position: relative; padding: 18px 16px 20px; background: #fff; box-shadow: 0 10px 16px -10px rgba(0, 0, 0, .35);
  clip-path: polygon(0 4%, 6% 0, 14% 3%, 22% 0, 31% 2%, 40% 0, 50% 3%, 60% 0, 70% 2%, 80% 0, 90% 3%, 100% 0, 100% 96%, 92% 100%, 82% 97%, 72% 100%, 62% 97%, 52% 100%, 42% 97%, 32% 100%, 22% 97%, 12% 100%, 0 97%); }
.scrap__label { font: 400 .78rem var(--varsity); color: var(--maroon); text-transform: uppercase; letter-spacing: .1em; }
.scrap .hand { font-size: 1.4rem; line-height: 1.2; margin-top: 4px; }
.scrap--where { grid-column: 1 / -1; transform: rotate(1.5deg); background: #fffbe8; }
@media (min-width: 760px) { .scrap--where { grid-column: auto; } }
.scrap--count { align-self: center; transform: rotate(-1deg); background: #eef6ff; }
@media (min-width: 760px) { .scrap--count { grid-column: 2 / span 2; } }
.scrap b { color: var(--maroon); font-size: 1.2em; }
.map { display: inline-block; margin-top: 6px; color: var(--maroon) !important; }

/* ---------- report card ---------- */
.report-wrap { padding: 40px 16px 60px; }
.report { max-width: 700px; margin: 0 auto; background: #fffdf5; border: 2px solid var(--maroon); box-shadow: 6px 6px 0 rgba(122, 31, 43, .25); transform: rotate(-.6deg); }
.report__head { background: var(--maroon); color: var(--gold-light); text-align: center; padding: 14px; }
.report__head p:first-child { font: 400 1.2rem var(--varsity); letter-spacing: .08em; text-transform: uppercase; }
.report__sub { font-size: .8rem; letter-spacing: .1em; opacity: .85; }
.report table { width: 100%; border-collapse: collapse; }
.report th, .report td { padding: 12px 12px; border-bottom: 1px solid #e3d9c2; text-align: left; vertical-align: top; }
.report th { font: 400 .72rem var(--varsity); letter-spacing: .1em; text-transform: uppercase; color: var(--maroon); background: #f6eedb; }
.report td:first-child { font: 400 .8rem var(--varsity); color: var(--maroon); white-space: nowrap; }
.report td:nth-child(2) { font-size: .95rem; }
.grade { font: 700 2rem/1 var(--hand); color: #c62828; text-align: center !important; transform: rotate(-6deg); }
.report__remark { padding: 14px 16px 18px; font-size: 1.35rem; }

/* ---------- clipboard schedule ---------- */
.clip-wrap { padding: 40px 16px 60px; }
.clipboard { position: relative; max-width: 560px; margin: 0 auto; padding: 56px 16px 18px; border-radius: 16px; background: linear-gradient(135deg, #b98a5c, #8c6239); box-shadow: 0 20px 30px -16px rgba(0, 0, 0, .5); transform: rotate(1deg); }
.clipboard__clip { position: absolute; top: -14px; left: 50%; width: 130px; height: 50px; transform: translateX(-50%); border-radius: 10px 10px 6px 6px; background: linear-gradient(180deg, #d9dbe1, #8d929c); box-shadow: 0 4px 6px rgba(0, 0, 0, .35); }
.clipboard__clip::after { content: ''; position: absolute; top: 10px; left: 50%; width: 40px; height: 14px; transform: translateX(-50%); border-radius: 999px; background: #6b707b; }
.clipboard h2, .sched { background: #fff; }
.clipboard h2 { margin: 0; padding: 18px 16px 6px; font: 400 1.5rem var(--varsity); color: var(--maroon); text-align: center; }
.sched { list-style: none; margin: 0; padding: 6px 16px 18px; }
.sched li { display: grid; grid-template-columns: 76px 52px 1fr; gap: 8px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid #e5e0d2; }
.sched b { font: 400 .72rem var(--varsity); color: var(--maroon); }
.sched .hand { font-size: 1.4rem; font-weight: 700; }

/* ---------- corkboard ---------- */
.cork { margin: 30px 0; padding: 60px 16px 70px; background: radial-gradient(circle at 20% 30%, rgba(0, 0, 0, .12) 0 1px, transparent 2px) 0 0 / 9px 9px, radial-gradient(circle at 60% 70%, rgba(255, 255, 255, .15) 0 1px, transparent 2px) 0 0 / 13px 11px, var(--cork);
  border-block: 14px solid #7a5230; overflow: hidden; }
.cork__title { text-align: center; font: 400 clamp(1.8rem, 8vw, 2.4rem) var(--varsity); color: #fff; text-shadow: 2px 2px 0 rgba(0, 0, 0, .3); margin-bottom: 30px; }
.notes { list-style: none; margin: 0 auto; padding: 0; max-width: 820px; display: grid; gap: 26px; }
@media (min-width: 760px) { .notes { grid-template-columns: repeat(3, 1fr); } }
.notes li { position: relative; padding: 28px 18px 26px; background: var(--sticky); font: 700 1.6rem/1.2 var(--hand); color: var(--ink); box-shadow: 0 10px 14px -8px rgba(0, 0, 0, .45); }
.notes li::before { content: ''; position: absolute; top: 8px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a8a, #c62828); box-shadow: 0 3px 3px rgba(0, 0, 0, .4); }
.notes li:nth-child(1) { transform: rotate(-3deg); } .notes li:nth-child(2) { transform: rotate(2deg); background: #ffc6d9; } .notes li:nth-child(3) { transform: rotate(-1deg); background: #c8f0d2; }

/* ---------- permission slip ---------- */
.rsvp { padding: 50px 16px 70px 40px; }
.cut { max-width: 600px; margin: 0 auto 14px; display: flex; align-items: center; gap: 10px; font: 700 1.2rem var(--hand); color: #777; }
.cut::after { content: ''; flex: 1; border-top: 2px dashed #999; }
.cut span { font-size: 1.4rem; }
.slip { position: relative; max-width: 600px; margin: 0 auto; padding: 30px 20px 30px; background: #fff; border: 2px dashed #999; box-shadow: 0 14px 24px -12px rgba(0, 0, 0, .35); }
@media (min-width: 720px) { .slip { padding: 40px 40px 36px; } }
.slip h2 { font: 400 clamp(1.6rem, 7vw, 2.2rem) var(--varsity); color: var(--maroon); text-align: center; text-transform: uppercase; }
.slip__sub { text-align: center; font-size: .9rem; color: #666; margin: 4px 0 22px; }
.slip__sub b { color: var(--maroon); }
.form, .more { display: grid; gap: 18px; }
.sentence { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field--inline { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.field--inline label { margin: 0; font: 700 1.6rem var(--hand); color: var(--ink); text-transform: none; letter-spacing: 0; }
.field--inline input, .field--inline select { flex: 1; min-width: 0; }
.field--inline .rsvp-field-error { flex-basis: 100%; }
label, legend { display: block; padding: 0; margin-bottom: 4px; font: 400 .8rem var(--varsity); letter-spacing: .04em; color: var(--maroon); }
legend { font: 700 1.5rem var(--hand); color: var(--ink); letter-spacing: 0; }
small { font-family: var(--body); color: #777; }
input[type=text], select, textarea { width: 100%; font: 700 1.45rem var(--hand); color: var(--pen); background: transparent; border: 0; border-bottom: 2px solid #9fb6c9; padding: 4px 4px; min-height: 46px; border-radius: 0; }
input::placeholder { color: #aab8c6; font-weight: 500; }
textarea { border: 2px solid #9fb6c9; background: repeating-linear-gradient(180deg, transparent 0 31px, #dbe7f0 31px 32px); line-height: 32px; padding: 0 8px; resize: vertical; }
select { appearance: none; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--maroon); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; margin: 0; cursor: pointer; letter-spacing: 0; }
.choice input { position: absolute; opacity: 0; }
.choice span { position: relative; display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px; font: 700 1.4rem var(--hand); color: var(--pen); border-radius: 50%; }
.choice input:checked + span::after { content: ''; position: absolute; inset: 2px -4px; border: 3px solid #c62828; border-radius: 50%; transform: rotate(-4deg); }
.choice input:focus-visible + span { outline: 2px solid var(--maroon); }
.has-error input, .has-error select, .has-error textarea { border-color: #c62828; }
.has-error .choice span { color: #c62828; }
.rsvp-field-error { font: 700 1.2rem var(--hand); color: #c62828; margin-top: 2px; }
.hp { position: absolute; left: -9999px; }
.btn { width: 100%; min-height: 56px; font: 400 1.05rem var(--varsity); letter-spacing: .06em; color: var(--gold); background: var(--maroon); border: 0; box-shadow: 4px 4px 0 var(--maroon-deep); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--maroon-deep); }
.btn:disabled { opacity: .6; }
.link { background: none; border: 0; font: 700 1.3rem var(--hand); color: var(--maroon); text-decoration: underline; cursor: pointer; }
.msg { text-align: center; }
.approved { display: inline-block; margin-bottom: 10px; padding: 4px 14px; border: 3px solid #2e7d32; color: #2e7d32; font: 400 1.3rem var(--varsity); text-transform: uppercase; transform: rotate(-8deg); }
.msg h3 { font: 400 1.5rem var(--varsity); color: var(--maroon); margin-bottom: 8px; }
.msg p { margin-bottom: 10px; }
.demo-note { font-size: .88rem; color: #666; }

.foot { text-align: center; padding: 20px 20px calc(60px + env(safe-area-inset-bottom)); }
.stamp { display: inline-block; padding: 8px 16px; border: 3px double var(--maroon); color: var(--maroon); font: 400 1.1rem var(--varsity); transform: rotate(-3deg); background: rgba(255, 255, 255, .5); }

/* ---------- effects ---------- */
/* polaroids develop from washed-out to full colour */
.js .polaroid svg { filter: sepia(.9) brightness(1.55) contrast(.55) blur(1.5px); transition: filter 2.4s ease .4s; }
.js .polaroid.in svg { filter: none; }
/* gold shine across the yearbook title */
.shine { background: linear-gradient(110deg, #a8812a 0 38%, #fff6d1 48%, #ffe9a6 52%, #a8812a 62% 100%), linear-gradient(180deg, var(--gold-light), var(--gold) 50%, #a8812a); background-size: 300% 100%, 100% 100%; background-position: 100% 0, 0 0;
  -webkit-background-clip: text; background-clip: text; animation: shine 6s ease-in-out 1s infinite; }
@keyframes shine { 0%, 50% { background-position: 100% 0, 0 0; } 80%, 100% { background-position: 0 0, 0 0; } }
/* report card grades stamped on one by one */
.js .report .grade { opacity: 0; }
.js .report.in .grade { animation: gradein .45s cubic-bezier(.3, 1.6, .5, 1) both; }
.js .report.in tr:nth-child(1) .grade { animation-delay: .3s; } .js .report.in tr:nth-child(2) .grade { animation-delay: .6s; }
.js .report.in tr:nth-child(3) .grade { animation-delay: .9s; } .js .report.in tr:nth-child(4) .grade { animation-delay: 1.2s; }
@keyframes gradein { from { opacity: 0; transform: scale(2.6) rotate(-30deg); } to { opacity: 1; transform: rotate(-6deg); } }
/* schedule lines ticked off */
.sched li { position: relative; }
.sched li::after { content: '✓'; position: absolute; right: 0; top: 6px; font: 700 1.6rem var(--hand); color: #2e7d32; opacity: 0; transform: scale(.4); }
.js .clipboard.in .sched li::after { animation: tickin .4s cubic-bezier(.3, 1.6, .5, 1) both; }
.js .clipboard.in .sched li:nth-child(1)::after { animation-delay: .5s; } .js .clipboard.in .sched li:nth-child(2)::after { animation-delay: .8s; }
.js .clipboard.in .sched li:nth-child(3)::after { animation-delay: 1.1s; } .js .clipboard.in .sched li:nth-child(4)::after { animation-delay: 1.4s; } .js .clipboard.in .sched li:nth-child(5)::after { animation-delay: 1.7s; }
@keyframes tickin { to { opacity: 1; transform: rotate(-8deg); } }
.sched li span:last-child { padding-right: 26px; }
/* sticky notes sway; tap to flutter */
.notes li { cursor: pointer; transform-origin: 50% 8px; }
.js .notes li.in { animation: sway 4s ease-in-out infinite; }
.js .notes li.in:nth-child(2) { animation-delay: -1.3s; } .js .notes li.in:nth-child(3) { animation-delay: -2.6s; }
@keyframes sway { 0%, 100% { rotate: -1.5deg; } 50% { rotate: 1.5deg; } }
.notes li.flutter { animation: flutter .8s ease !important; }
@keyframes flutter { 20% { rotate: -9deg; } 40% { rotate: 7deg; } 60% { rotate: -5deg; } 80% { rotate: 3deg; } 100% { rotate: 0; } }
/* "Approved" stamp slams down */
.approved { animation: slam .55s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes slam { from { opacity: 0; transform: scale(3) rotate(-25deg); } to { opacity: 1; transform: rotate(-8deg); } }

/* reveal: pieces drop onto the page */
.spread, .report-wrap, .clip-wrap { overflow: hidden; }
.js .rv { opacity: 0; transform: translateY(-24px) rotate(-6deg) scale(1.05); transition: opacity .6s ease, transform .8s cubic-bezier(.34, 1.4, .64, 1); }
.js .rv.in { opacity: 1; transform: none; }
.js .pol-1.rv.in { transform: rotate(-5deg); } .js .pol-2.rv.in { transform: rotate(4deg); } .js .pol-3.rv.in { transform: rotate(-3deg); }
.js .scrap--where.rv.in { transform: rotate(1.5deg); } .js .scrap--count.rv.in { transform: rotate(-1deg); }
.js .report.rv.in { transform: rotate(-.6deg); } .js .clipboard.rv.in { transform: rotate(1deg); } .js .spread__note.rv.in { transform: rotate(-1.5deg); }
.js .notes li.rv.in:nth-child(1) { transform: rotate(-3deg); } .js .notes li.rv.in:nth-child(2) { transform: rotate(2deg); } .js .notes li.rv.in:nth-child(3) { transform: rotate(-1deg); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } .js .rv { opacity: 1; transition: none; } }
