/* Modelo de casamento — papelaria de casarão mineiro */
:root {
  --bg: #dedad3;
  --surface: #d3cec6;
  --paper: #ebe9e5;
  --ink: #0a0a0a;
  --muted: #5c5852;
  --accent: #256f82;
  --accent-ink: #fff;

  --f-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-text: 'Barlow', system-ui, sans-serif;

  --t-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --t-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --t-lead: clamp(1.25rem, 1.1rem + 0.45vw, 1.5rem);
  --t-h3: 1.75rem;
  --t-head: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --t-mega: clamp(3.5rem, 1.5rem + 7.4vw, 9rem);

  --m: 12px;
  --pad: clamp(20px, 4vw, 64px);
  --gap: clamp(120px, 14vw, 200px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--t-body)/1.55 var(--f-text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
figure { margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 99; }
.skip:focus { left: 8px; }
main:focus { outline: none; }

.h1, .h2, .h3, .sign {
  font-family: var(--f-display); text-transform: uppercase;
  letter-spacing: -0.02em; line-height: 0.9; text-wrap: balance;
}
.h1 { font-size: var(--t-mega); }
.h2 { font-size: var(--t-head); }
.h3 { font-size: var(--t-h3); }

/* stripes */
.stripes {
  height: 56px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='8' preserveAspectRatio='none'%3E%3Crect width='28' height='8' fill='%230a0a0a'/%3E%3C/svg%3E") 0 0 / 56px 100%;
}
.stripes-thin { height: 8px; margin: var(--gap) var(--m) 0; background-size: auto; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border: 0; border-radius: 0;
  background: var(--accent); color: var(--accent-ink);
  font: 700 1.25rem/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em;
  text-decoration: none; position: relative; overflow: hidden; isolation: isolate;
  transition: color .3s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='8' preserveAspectRatio='none'%3E%3Crect width='14' height='8' fill='%230a0a0a'/%3E%3C/svg%3E") 0 0 / 28px 100%;
  transform: translateY(101%); transition: transform .45s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink::before { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='8' preserveAspectRatio='none'%3E%3Crect width='14' height='8' fill='%23256f82'/%3E%3C/svg%3E") 0 0 / 28px 100%; }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper::before { background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='8' preserveAspectRatio='none'%3E%3Crect width='14' height='8' fill='%23d3cec6'/%3E%3C/svg%3E") 0 0 / 28px 100%; }
.linklike {
  background: none; border: 0; padding: 0; text-align: inherit; text-decoration: underline;
  text-underline-offset: 0.2em; text-decoration-thickness: 2px;
}
.sq {
  width: 52px; height: 52px; display: inline-grid; place-items: center;
  border: 0; border-radius: 0; background: var(--ink); color: var(--paper);
  font: 700 1.5rem/1 var(--f-display); transition: background .25s;
}
.sq:hover { background: var(--accent); }
.sq:disabled { opacity: .35; cursor: default; background: var(--ink); }
.sq svg { width: 22px; height: 22px; }

.demo-note {
  display: inline-block; background: var(--surface); color: var(--muted);
  font-size: var(--t-small); padding: 6px 10px;
}

/* ------------------------------------------------ HERO */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--m);
  padding: var(--m); min-height: 100svh;
}
.hero-card {
  background: var(--paper); display: flex; flex-direction: column;
  min-height: calc(100svh - 2 * var(--m));
}
.card-top {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px var(--pad) 0;
}
.mark { white-space: nowrap; font: 700 1.75rem/1 var(--f-display); text-decoration: none; letter-spacing: -0.01em; }
.card-nav { display: flex; gap: 22px; font-weight: 500; }
.card-nav a { text-decoration: none; padding: 6px 0; position: relative; }
.card-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.card-nav a:hover::after { transform: none; }
.card-body {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 48px var(--pad);
}
.for { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 28px; font-size: var(--t-lead); }
.for label { color: var(--muted); }
.for input {
  flex: 1 1 8ch; min-width: 8ch; max-width: 22ch; border: 0; border-radius: 0;
  border-bottom: 2px dotted var(--ink); background: transparent;
  font: 600 var(--t-lead)/1.2 var(--f-text); padding: 2px 0;
}
.for input::placeholder { color: var(--muted); opacity: .7; font-weight: 400; }
.for input:focus { outline: none; border-bottom-style: solid; border-bottom-color: var(--accent); }
.when { font: 600 var(--t-lead)/1.2 var(--f-display); text-transform: uppercase; margin-top: 22px; letter-spacing: 0.01em; }
.lead-line { max-width: 36ch; margin: 22px 0 36px; }
.card-body .btn { align-self: flex-start; }
.card-foot {
  display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0 var(--pad) 28px;
  font-weight: 500;
}
.hero-photo { position: relative; overflow: hidden; background: var(--surface); min-height: calc(100svh - 2 * var(--m)); }
.hero-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.6s ease; transform: scale(1.06);
}
.hero-photo img.is-on { opacity: 1; animation: drift 9s linear forwards; }
@keyframes drift { from { transform: scale(1.06); } to { transform: scale(1); } }

/* hero entrance */
.hero-card > * { animation: rise .9s var(--ease) both; }
.card-body > * { animation: rise .9s var(--ease) both; }
.card-body > :nth-child(1) { animation-delay: .15s; }
.card-body > :nth-child(2) { animation-delay: .25s; }
.card-body > :nth-child(3) { animation-delay: .35s; }
.card-body > :nth-child(4) { animation-delay: .45s; }
.card-body > :nth-child(5) { animation-delay: .55s; }
.stripes { animation: none; }
.hero .stripes { transform-origin: left; animation: wipe 1s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes wipe { from { transform: scaleX(0); } to { transform: none; } }

/* ------------------------------------------------ DAY */
.day { padding: var(--gap) var(--pad) 0; }
.day-head { display: grid; grid-template-columns: 1fr 320px; gap: 64px; align-items: end; }
.side-note { max-width: 34ch; }
.facts {
  display: grid; grid-template-columns: 1fr 1.15fr 1.25fr 1fr; gap: var(--m);
  margin: 64px 0 0;
}
.fact { background: var(--paper); padding: 24px 24px 26px; display: grid; gap: 10px; align-content: space-between; min-height: 150px; }
.fact b { font: 700 var(--t-h3)/0.95 var(--f-display); text-transform: uppercase; letter-spacing: -0.01em; }
.fact span { color: var(--muted); }
.fact-count { background: var(--ink); color: var(--paper); }
.fact-count span { color: #c9c4bc; }
.clock { font-variant-numeric: tabular-nums; }
.clock span { color: inherit; }
.day-pics { display: grid; grid-template-columns: 1fr 1fr; gap: var(--m); margin-top: var(--m); align-items: start; }
.day-pics figure { position: relative; overflow: hidden; }
.day-pics img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.day-text img { aspect-ratio: 4 / 4.2; }
.day-pics figcaption { padding: 14px 0 0; color: var(--muted); font-size: var(--t-small); max-width: 46ch; }
.day-church { margin-top: 120px; }

/* ------------------------------------------------ SHOWCASE */
.show {
  position: relative; margin-top: var(--gap); min-height: 96svh;
  display: grid; grid-template-rows: 1fr auto; color: var(--paper);
  overflow: hidden;
}
.show-photo { position: absolute; inset: 0; }
.show-photo img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.show-photo::after { content: ""; position: absolute; inset: 0; background: rgba(10, 10, 10, .34); }
.show-text { position: relative; padding: 18svh var(--pad) 48px; max-width: 980px; }
.show-text p { margin-top: 24px; max-width: 46ch; font-size: var(--t-lead); line-height: 1.4; }
.slips {
  position: relative; list-style: none; margin: 0; padding: 0 calc(var(--pad) - 18px) var(--m);
  display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--m); align-items: end;
}
.slip {
  background: var(--paper); color: var(--ink); padding: 18px 18px 22px;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateY(40px) rotate(var(--r, 0deg)); opacity: 0;
  transition: transform .9s var(--ease), opacity .9s var(--ease);
}
.slip h3 { font: 700 1.75rem/1 var(--f-display); text-transform: uppercase; margin-bottom: 4px; }
.slip p { line-height: 1.4; }
.slip .slip-sub { color: var(--muted); }
.slip a { margin-top: auto; padding-top: 12px; font-weight: 600; }
.s1 { min-height: 250px; --r: -1.5deg; }
.s2 { min-height: 290px; }
.s3 { min-height: 210px; --r: 1deg; }
.s4 { min-height: 240px; }
.s5 { min-height: 200px; --r: -1deg; background: var(--ink); color: var(--paper); }
.s5 h3 { color: var(--paper); }
.s6 { min-height: 270px; --r: 2deg; }
.is-in .slip { transform: rotate(var(--r, 0deg)); opacity: 1; }
.is-in .s2 { transition-delay: .08s; } .is-in .s3 { transition-delay: .16s; }
.is-in .s4 { transition-delay: .24s; } .is-in .s5 { transition-delay: .32s; } .is-in .s6 { transition-delay: .4s; }

/* ------------------------------------------------ STORY */
.story { padding: var(--gap) 0 0; }
.story-head { padding: 0 var(--pad); }
.story-foot { display: flex; align-items: center; gap: 24px; padding: 0 var(--pad); }
.story-foot .story-bar { flex: 1; margin: 0; order: 2; }
.story-ctl { display: flex; gap: 8px; }
.story .demo-note { margin: 22px var(--pad) 0; }
.story-row {
  display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 48px var(--pad) 28px; scroll-padding: 0 var(--pad);
  scrollbar-width: none; cursor: grab; align-items: start;
}
.story-row::-webkit-scrollbar { display: none; }
.story-row.is-drag { cursor: grabbing; scroll-snap-type: none; }
.story-row.is-drag img { pointer-events: none; }
.chap { flex: 0 0 280px; scroll-snap-align: start; }
.chap img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .8s var(--ease); user-select: none; -webkit-user-drag: none; }
.chap:hover img { transform: scale(.98); }
.chap figcaption { padding-top: 18px; max-width: 30ch; }
.chap b { display: block; font: 700 1.75rem/1 var(--f-display); text-transform: uppercase; margin-bottom: 10px; }
.c2 { margin-top: 72px; } .c3 { margin-top: 24px; flex-basis: 340px; } .c4 { margin-top: 110px; } .c5 { margin-top: 40px; flex-basis: 420px; }
.c5 img { aspect-ratio: 3 / 2; }
.story-bar { height: 6px; margin: 0 var(--pad); background: var(--surface); }
.story-bar span { display: block; height: 100%; width: 20%; background: var(--ink); transform-origin: left; transition: width .2s linear; }

/* ------------------------------------------------ PHOTOS */
.photos { padding: var(--gap) var(--pad) 0; }
.photos-head { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: end; margin-bottom: 56px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--m); align-items: start; }
.tile {
  border: 0; padding: 0; text-align: left; background: var(--paper); color: var(--ink);
  display: flex; flex-direction: column; opacity: 0; transform: translateY(30px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.tiles.is-in .tile { opacity: 1; transform: none; }
.tile:nth-child(4n+2) { transition-delay: .08s; } .tile:nth-child(4n+3) { transition-delay: .16s; } .tile:nth-child(4n+4) { transition-delay: .24s; }
.tile .ph { overflow: hidden; }
.tile img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .9s var(--ease); }
.tile:hover img { transform: scale(1.04); }
.tile .strip { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; font-size: var(--t-small); }
.tile .strip b { font: 700 1.25rem/1.1 var(--f-display); text-transform: uppercase; }
.tile .strip span { opacity: .78; text-align: right; }
.tile.p1 .strip { background: var(--ink); color: var(--paper); }
.tile.p2 .strip { background: var(--accent); color: #fff; }
.tile.p3 .strip { background: var(--paper); color: var(--ink); }
.tile.p4 .strip { background: var(--surface); color: var(--ink); }
.tile:nth-child(2), .tile:nth-child(7) { margin-top: 48px; }
.tile:nth-child(4), .tile:nth-child(5) { margin-top: -24px; }

/* ------------------------------------------------ FAQ (index cards) */
.faq { padding: var(--gap) var(--pad) 0; display: grid; grid-template-columns: 1fr 1.5fr; gap: 64px; align-items: start; }
.faq-head { position: sticky; top: 40px; }
.faq-head p { margin-top: 24px; max-width: 34ch; }
.files { position: relative; }
.file-tabs { display: flex; flex-wrap: wrap; position: relative; z-index: 2; }
.file-tab {
  border: 0; padding: 14px 30px 12px 20px; margin-right: -8px; margin-top: 6px;
  background: var(--surface); color: var(--ink); font: 700 1.25rem/1 var(--f-display); text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 100%, 0 100%);
  transition: background .3s, transform .3s var(--ease);
  transform: translateY(4px);
}
.file-tab:nth-child(2n) { background: #c8c2b8; }
.file-tab:hover { transform: none; }
.file-tab[aria-selected="true"] { background: var(--paper); transform: none; }
.file-stack { position: relative; min-height: 340px; }
.file-card {
  background: var(--paper); padding: 40px clamp(24px, 4vw, 52px) 48px;
  min-height: 340px;
}
.file-card[hidden] { display: none; }
.file-card.is-on { animation: card-in .55s var(--ease); }
@keyframes card-in { from { opacity: 0; transform: translateY(16px) rotate(-.6deg); } to { opacity: 1; transform: none; } }
.file-card h3 { font: 700 var(--t-h3)/1 var(--f-display); text-transform: uppercase; margin-bottom: 20px; max-width: 22ch; }
.file-card p { max-width: 54ch; }
.file-card p + p { margin-top: 14px; }
.file-card .muted { color: var(--muted); }
.file-stack::before, .file-stack::after { content: ""; position: absolute; left: 14px; right: 14px; height: 100%; top: 14px; background: var(--surface); z-index: -1; }
.file-stack::after { left: 28px; right: 28px; top: 28px; background: #c8c2b8; z-index: -2; }
.files { isolation: isolate; padding-bottom: 28px; }

/* ------------------------------------------------ NOTES deck */
.notes { margin-top: var(--gap); height: 190svh; position: relative; }
.notes-pin {
  position: sticky; top: 0; height: 100svh; padding: 48px var(--pad);
  display: grid; grid-template-columns: minmax(260px, 0.8fr) 2fr; gap: 56px; align-items: center;
}
.notes-head p { margin: 24px 0 32px; max-width: 32ch; }
.deck { display: flex; gap: 8px; height: min(560px, 72svh); }
.ncard {
  position: relative; flex: 0 0 76px; background: var(--paper); overflow: hidden;
  transition: flex-basis .7s var(--ease), background .4s; border: 0; padding: 0; text-align: left; color: var(--ink);
}
.ncard:nth-child(3n+2) { background: var(--surface); }
.ncard:nth-child(3n+3) { background: #c8c2b8; }
.ncard.is-open { flex: 1 1 auto; background: var(--paper); cursor: default; }
.ncard .spine {
  position: absolute; left: 0; top: 0; bottom: 0; width: 76px;
  display: flex; align-items: flex-end; justify-content: center; padding: 22px 0;
  transition: opacity .3s;
}
.ncard .spine span { writing-mode: vertical-rl; transform: rotate(180deg); font: 700 1.25rem/1 var(--f-display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 100%; }
.ncard.is-open .spine { opacity: 0; }
.ncard .face {
  position: absolute; inset: 0; padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column;
  min-width: 380px; opacity: 0; visibility: hidden; transition: opacity .4s .15s, visibility 0s .55s;
}
.ncard.is-open .face { opacity: 1; visibility: visible; transition: opacity .4s .15s, visibility 0s; }
.ncard blockquote { margin: 0; font: 600 2rem/1.15 var(--f-display); max-width: 26ch; }
.ncard .who { margin-top: auto; display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.ncard .who b { display: block; font-weight: 600; }
.ncard .who time, .ncard .tag { color: var(--muted); font-size: var(--t-small); }
.ncard .tag { background: var(--surface); padding: 4px 8px; }
.ncard .del { font-size: var(--t-small); }

/* ------------------------------------------------ GIFTS */
.gifts {
  margin: 0 var(--m); background: var(--ink); color: var(--paper);
  display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: stretch; min-height: 72svh;
}
.gifts img { width: 100%; height: 100%; object-fit: cover; min-height: 420px; }
.gifts-text { padding: clamp(40px, 6vw, 96px) var(--pad); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.gifts-text p { margin: 28px 0 40px; max-width: 40ch; font-size: var(--t-lead); line-height: 1.4; }

/* ------------------------------------------------ RSVP coupon */
.rsvp { padding: var(--gap) var(--pad) 0; }
.coupon {
  position: relative; display: grid; grid-template-columns: 1fr 1.25fr;
  background: var(--paper); min-height: 520px; isolation: isolate;
}
.coupon::before, .coupon::after {
  content: ""; position: absolute; top: 50%; width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg); transform: translateY(-50%); z-index: 3;
}
.coupon::before { left: -24px; } .coupon::after { right: -24px; }
.coupon-left { padding: clamp(32px, 5vw, 72px); display: flex; flex-direction: column; gap: 24px; position: relative; }
.coupon-left p { max-width: 38ch; }
.coupon-left::after {
  content: ""; position: absolute; right: 0; top: 24px; bottom: 24px;
  border-right: 4px dotted var(--muted); opacity: .55;
}
.coupon-form, .stub { padding: clamp(28px, 4vw, 56px); display: grid; gap: 20px; align-content: start; }
.coupon-form { transition: transform .9s var(--ease), opacity .9s var(--ease); transform-origin: 0 100%; }
.coupon.is-torn .coupon-form { transform: translate(40px, 30px) rotate(5deg); opacity: 0; }
.field { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend, .field .lbl { font-weight: 500; padding: 0; }
.field input[type=text], .field textarea {
  width: 100%; border: 2px solid var(--ink); border-radius: 0; background: var(--bg);
  padding: 13px 14px; font-size: var(--t-body); min-height: 52px;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.field.has-error input, .field.has-error textarea { border-color: #a3261b; }
.err { color: #a3261b; font-size: var(--t-small); min-height: 0; }
.err:empty { display: none; }
.choice { grid-template-columns: 1fr 1fr; gap: 8px; }
.choice legend { margin-bottom: 8px; grid-column: 1 / -1; float: left; width: 100%; }
.choice label { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; min-height: 52px; padding: 0 16px; background: var(--surface);
  font-weight: 600; transition: background .25s, color .25s;
}
.choice input:checked + span { background: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.stepper { grid-template-columns: auto 1fr; align-items: center; column-gap: 20px; }
.step-ctl { display: flex; align-items: center; gap: 0; justify-self: start; }
.step-ctl output { width: 64px; text-align: center; font: 700 1.75rem/1 var(--f-display); }
.comp-fields { grid-column: 1 / -1; display: grid; gap: 10px; }
.comp-fields:empty { display: none; }
.submit {
  min-height: 64px; border: 0; border-radius: 0; background: var(--accent); color: #fff;
  font: 700 var(--t-lead)/1 var(--f-display); text-transform: uppercase; margin-top: 4px;
  position: relative; overflow: hidden; isolation: isolate;
}
.submit::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='8' preserveAspectRatio='none'%3E%3Crect width='14' height='8' fill='%230a0a0a'/%3E%3C/svg%3E") 0 0 / 28px 100%; transform: translateY(101%); transition: transform .45s var(--ease); }
.submit:hover::before, .submit:focus-visible::before { transform: none; }
.stub { grid-column: 2; grid-row: 1; align-content: center; animation: rise .8s .3s var(--ease) both; }
.stub:focus { outline: none; }
.stub h3 { font: 700 var(--t-head)/0.9 var(--f-display); text-transform: uppercase; letter-spacing: -0.02em; }
.stub p { max-width: 40ch; }
.stub .stub-count { display: flex; align-items: baseline; gap: 12px; color: var(--ink); }
.stub-count b { font: 700 var(--t-head)/1 var(--f-display); color: var(--accent); }
.stub .linklike { justify-self: start; font-weight: 600; }
.coupon-form[hidden], .stub[hidden] { display: none; }

/* ------------------------------------------------ FOOTER postcard */
.post {
  margin: 0 var(--m) var(--m); background: var(--paper);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px;
  padding: clamp(40px, 6vw, 88px) var(--pad) 32px;
}
.sign { font-size: clamp(5rem, 2rem + 14vw, 15rem); line-height: .82; }
.post-left p { margin-top: 24px; font-size: var(--t-lead); }
.post-right { display: grid; grid-template-columns: 1fr; justify-items: end; gap: 32px; align-content: start; }
.stamp {
  width: 210px; padding: 12px; background: #f7f6f3; border: 7px dotted var(--paper);
  transform: rotate(3deg); transition: transform .8s var(--ease); background-clip: padding-box;
}
.stamp img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.address { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; justify-items: end; text-align: right; font-weight: 500; }
.imprint { grid-column: 1 / -1; color: var(--muted); font-size: var(--t-small); padding-top: 32px; max-width: 72ch; }

/* floating rsvp */
.float-rsvp {
  position: fixed; right: 16px; bottom: 16px; z-index: 20;
  background: var(--accent); color: #fff; text-decoration: none; padding: 16px 20px;
  font: 700 1.25rem/1 var(--f-display); text-transform: uppercase;
  transform: translateY(140%); transition: transform .5s var(--ease);
}
.float-rsvp.is-on { transform: none; }

/* dialogs */
.dlg { border: 0; border-radius: 0; padding: clamp(24px, 4vw, 44px); background: var(--paper); color: var(--ink); width: min(560px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(10, 10, 10, .6); }
.dlg form { display: grid; gap: 20px; }
.dlg p { margin: 18px 0 28px; color: var(--muted); }
.dlg-actions { display: flex; justify-content: flex-end; align-items: center; gap: 24px; flex-wrap: wrap; }
.dlg[open] { animation: rise .45s var(--ease); }
#note-count { color: var(--muted); font-size: var(--t-small); float: right; }

.lb { border: 0; padding: 0; background: transparent; width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; }
.lb::backdrop { background: rgba(10, 10, 10, .92); }
.lb[open] { display: grid; place-items: center; }
.lb img { max-width: min(92vw, 1100px); max-height: 82svh; width: auto; object-fit: contain; animation: rise .5s var(--ease); }
.lb p { color: var(--paper); margin-top: 14px; text-align: center; }
.lb-x { position: fixed; top: 16px; right: 16px; }
.lb-p, .lb-n { position: fixed; top: 50%; transform: translateY(-50%); }
.lb-p { left: 16px; } .lb-n { right: 16px; }

.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 60; transform: translate(-50%, 160%);
  background: var(--ink); color: var(--paper); padding: 14px 20px; max-width: calc(100vw - 32px);
  transition: transform .45s var(--ease);
}
.toast.is-on { transform: translate(-50%, 0); }

/* reveal */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------ RESPONSIVE */
@media (max-width: 1100px) {
  .slips { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: 1fr 1fr; }
  .faq { grid-template-columns: 1fr; gap: 40px; }
  .faq-head { position: static; }
  .notes-pin { grid-template-columns: 1fr; gap: 28px; align-content: center; }
  .deck { height: min(460px, 56svh); }
}

@media (max-width: 1000px) {
  .coupon { grid-template-columns: 1fr; }
  .coupon::before, .coupon::after { top: var(--notch, 300px); }
  .coupon-left::after { border-right: 0; border-bottom: 4px dotted var(--muted); left: 24px; right: 24px; top: auto; bottom: 0; }
  .stub { grid-column: 1; grid-row: 2; }
}

@media (max-width: 760px) {
  :root { --gap: 120px; --pad: 20px; }
  .hero { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .hero-photo { order: -1; min-height: 48svh; height: 48svh; }
  .hero-card { margin: -24px var(--m) 0; position: relative; z-index: 2; min-height: 0; }
  .stripes { height: 40px; background-size: 40px 100%; }
  .stripes-thin { height: 8px; }
  .card-nav { display: none; }
  .card-body { padding: 36px var(--pad) 32px; }
  .h1 { font-size: clamp(3.25rem, 15vw, 4.5rem); }
  .card-foot { gap: 10px 20px; }
  .day-head, .photos-head { grid-template-columns: 1fr; gap: 20px; }
  .facts { grid-template-columns: 1fr 1fr; margin-top: 40px; gap: 8px; }
  .fact { padding: 16px; }
  .day-pics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .day-church { margin-top: 48px; }
  .show { min-height: 0; display: block; }
  .show-photo { position: relative; height: 70svh; }
  .show-photo img { height: 100%; }
  .show-text { position: absolute; top: 0; left: 0; right: 0; padding: 48px var(--pad); }
  .facts { grid-template-columns: 1fr; }
  .fact { min-height: 0; }
  .ncard blockquote { font-size: var(--t-lead); }
  .slips { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 16px var(--pad) 20px; background: var(--ink); scrollbar-width: none; align-items: stretch; }
  .slip { flex: 0 0 72%; scroll-snap-align: center; min-height: 220px; }
  .story-row { gap: 16px; }
  .chap { flex-basis: 78vw !important; margin-top: 0 !important; }
  .c5 img { aspect-ratio: 4 / 5; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tile:nth-child(n) { margin-top: 0; }
  .tile:nth-child(2n) { margin-top: 32px; }
  .tile .strip { flex-direction: column; gap: 2px; padding: 10px; }
  .tile .strip span { text-align: left; }
  .files { margin-right: 14px; }
  .file-tab { padding: 12px 22px 10px 14px; font-size: 1.0625rem; }
  .file-stack::after, .file-stack::before { display: none; }
  .file-stack { min-height: 0; }
  .files { padding-bottom: 0; }
  .file-card { padding: 28px 22px 32px; min-height: 0; }
  .notes { height: auto; }
  .notes-pin { position: static; height: auto; padding: 0 var(--pad); }
  .deck { flex-direction: column; height: auto; }
  .ncard, .ncard.is-open { flex: none; min-height: 0; }
  .ncard .spine { display: none; }
  .ncard .face { position: static; opacity: 1; visibility: visible; min-width: 0; padding: 24px; gap: 24px; }
  .gifts { grid-template-columns: 1fr; margin: 0; }
  .gifts img { height: 56svh; min-height: 0; }
  .choice { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; margin: 0; gap: 32px; }
  .post-right { justify-items: start; grid-template-columns: 140px 1fr; align-items: start; }
  .stamp { width: 140px; }
  .address { justify-items: start; text-align: left; }
  .stripes-thin { margin: var(--gap) 0 0; }
  .float-rsvp { right: 12px; bottom: 12px; padding: 14px 16px; font-size: 1.0625rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .rv, .slip, .tile { opacity: 1 !important; transform: rotate(var(--r, 0deg)) !important; }
  .tile { transform: none !important; }
  .hero-photo img.is-on { animation: none; transform: none; }
}
