/* Greg Abbott & the Data Centers. A parody wedding site.
   Fonts: Pinyon Script (names), Cormorant Garamond (headings), Jost (body). */

:root {
  color-scheme: light;
  --paper: #FBF7F1;
  --paper-2: #F6EEE6;
  --card: #FFFDF9;
  --ivory: #FFFBF5;
  --blush: #F3DCD4;
  --blush-2: #EAC6BC;
  --rose: #B9757A;
  --rose-deep: #8F4F57;
  --rose-ink: #763F47;
  --gold: #A6874F;
  --gold-soft: #D9C59E;
  --gold-text: #80653A;
  --sage: #AEB79A;
  --ink: #3A3230;
  --ink-2: #6E625D;
  --line: #E7DACB;
  --field: #D8C9B6;
  --night: #2B2422;

  --script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 56px;
  --pad-x: max(var(--gutter), calc((100% - var(--wrap)) / 2));
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body:has(dialog[open]) { overflow: hidden; }

img, svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--rose-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--rose-ink); }

:focus-visible {
  outline: 2px solid var(--rose-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
/* Longhand, so nowrap set elsewhere still holds. site.js also glues each block's last two words. */
li, dd, dt, summary, figcaption, blockquote, .gift-status { text-wrap-style: pretty; }

sup { font-size: .6em; line-height: 0; vertical-align: super; }
sup a {
  padding: 0 1px 0 2px;
  font-family: var(--sans);
  font-weight: 500;
  font-style: normal;
  color: var(--rose-deep);
  text-decoration: none;
}
sup a:hover { text-decoration: underline; }

.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;
}

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 50;
  padding: 10px 16px; border-radius: 2px;
  background: var(--night); color: var(--ivory); text-decoration: none;
}
.skip:focus { top: 16px; color: var(--ivory); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 30px;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; text-align: center;
  text-decoration: none; line-height: 1.25; text-wrap: balance;
  border: 1px solid transparent; border-radius: 2px; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--rose-deep); border-color: var(--rose-deep); color: var(--ivory); }
.btn-primary:hover { background: var(--rose-ink); border-color: var(--rose-ink); color: var(--ivory); }
.btn-ghost { background: transparent; border-color: var(--rose-deep); color: var(--rose-deep); }
.btn-ghost:hover { background: var(--blush); color: var(--rose-ink); }
.btn-gift {
  width: 100%; min-height: 46px; padding: 8px 14px;
  font-size: 15px; letter-spacing: .01em; text-transform: none;
  background: transparent; border-color: var(--rose-deep); color: var(--rose-deep);
}
.btn-gift:hover { background: var(--rose-deep); color: var(--ivory); }
.btn-light { background: var(--ivory); border-color: var(--ivory); color: var(--night); }
.btn-light:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--night); }
.btn-lg { min-height: 58px; padding: 0 32px; font-size: 14px; }
.btn-block { width: 100%; }

/* Masthead */
.masthead {
  padding: clamp(28px, 5vw, 56px) var(--gutter) clamp(22px, 3vw, 34px);
  text-align: center;
}
.monogram {
  position: relative;
  display: inline-grid; place-items: center;
  width: 104px; height: 104px;
  color: var(--ink); text-decoration: none;
}
.monogram img { position: absolute; inset: 0; width: 100%; height: 100%; }
.monogram span {
  position: relative;
  font-family: var(--serif); font-size: 17px; font-weight: 500;
  letter-spacing: .02em; line-height: 1;
}
.monogram i {
  margin: 0 1px;
  font-family: var(--script); font-size: 1.2em; font-style: normal;
  color: var(--gold-text);
}
.names {
  margin: 12px 0 10px;
  font-family: var(--script); font-weight: 400;
  font-size: clamp(46px, 7.4vw, 88px); line-height: 1.08;
  color: var(--ink);
}
.names .amp { color: var(--gold); }
.nobr { white-space: nowrap; }
/* Wraps as one unit: the line breaks before the phrase, and inside it only if it can't fit */
.phrase { display: inline-block; }
.when {
  margin: 0;
  font-size: 13px; font-weight: 500; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-2);
}
.when .sep { margin: 0 .7em; color: var(--gold); }
.nda {
  margin: 6px 0 0;
  font-family: var(--serif); font-size: 17px; font-style: italic;
  color: var(--ink-2);
}

/* Tabs */
.tabs {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251, 247, 241, .94);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  backdrop-filter: saturate(1.2) blur(8px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.tabs ul {
  position: relative;
  display: flex; gap: clamp(2px, 1.6vw, 22px);
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  list-style: none;
  overflow-x: auto; scrollbar-width: none;
}
.tabs ul::-webkit-scrollbar { display: none; }
.tabs li:first-child { margin-left: auto; }
.tabs li:last-child { margin-right: auto; }
.tabs a {
  position: relative; display: block;
  height: var(--nav-h); padding: 0 8px;
  line-height: var(--nav-h); white-space: nowrap;
  font-size: 13px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none;
}
.tabs a::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 14px;
  height: 1px; background: var(--rose-deep);
  transform: scaleX(0); transition: transform .25s ease;
}
.tabs a:hover { color: var(--ink); }
.tabs a:hover::after, .tabs a[aria-current="true"]::after { transform: scaleX(1); }
.tabs a[aria-current="true"] { color: var(--rose-deep); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) var(--gutter) clamp(48px, 7vw, 88px);
}
.hero-art { position: relative; margin: 0; aspect-ratio: 1 / 1.1; }
.arch {
  position: absolute; width: 56%; aspect-ratio: 5 / 7; overflow: hidden;
  background: var(--card);
  border-radius: 999px 999px 6px 6px;
  box-shadow: 0 0 0 1px var(--line), 0 0 0 9px var(--paper), 0 0 0 10px var(--gold-soft),
              0 40px 70px -46px rgba(58, 50, 48, .5);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
.arch-greg { left: 0; top: 0; z-index: 2; }
.arch-greg img { object-position: 50% 18%; }
.arch-dc { right: 0; bottom: 0; }
.amp-badge {
  position: absolute; z-index: 3; left: 50%; top: 52%;
  display: grid; place-items: center;
  width: 76px; height: 76px; margin: -38px 0 0 -38px; padding-top: 8px;
  border-radius: 50%; background: var(--paper);
  box-shadow: 0 0 0 1px var(--gold-soft), 0 10px 24px -14px rgba(58, 50, 48, .5);
  font-family: var(--script); font-size: 48px; line-height: 1; color: var(--gold);
}
.hero h1 {
  font-size: clamp(40px, 5.4vw, 68px);
  line-height: 1.02; letter-spacing: -.01em;
}
/* .9em keeps "Save the date anyway." on one line from 320px up. If it ever can't fit,
   the HTML lets it break only before "anyway." */
.hero h1 em {
  display: block; margin-top: .14em;
  font-size: .9em; font-style: italic; font-weight: 400; color: var(--rose-deep);
}
.lede {
  max-width: 31em; margin: 22px 0 30px;
  font-size: clamp(18px, 1.6vw, 20px); color: var(--ink-2);
}
.countdown {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 440px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.countdown div { padding: 14px 4px 12px; text-align: center; }
.countdown div + div { border-left: 1px solid var(--line); }
.countdown b {
  display: block;
  font-family: var(--serif); font-size: clamp(34px, 4vw, 46px); font-weight: 500; line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}
.countdown span {
  display: block; margin-top: 7px;
  font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-2);
}
.cd-caption {
  max-width: 440px; margin: 12px 0 30px;
  font-family: var(--serif); font-size: 20px; font-style: italic; text-align: center;
  color: var(--ink-2);
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-row .btn { white-space: nowrap; }
.hero-note { margin: 22px 0 0; font-size: 15px; color: var(--ink-2); }
.hero-note a { font-weight: 500; }
.hero-note .dot { margin: 0 .5em; color: var(--gold); }

/* Welcome note */
.welcome {
  max-width: 700px; margin: 0 auto;
  padding: 0 var(--gutter) clamp(64px, 9vw, 104px);
  text-align: center;
}
.welcome .divider { width: 170px; margin: 0 auto 30px; }
.note p {
  margin-bottom: .7em;
  font-family: var(--serif); font-size: clamp(21px, 2.3vw, 25px); line-height: 1.5;
}
.note .signoff {
  margin: 18px 0 0;
  font-family: var(--script); font-size: clamp(36px, 4.4vw, 46px); line-height: 1.2;
  color: var(--rose-deep);
}

/* Sections */
.section { padding: clamp(68px, 9vw, 112px) var(--pad-x); }
.party, .registry { background: var(--paper-2); }
.sec-head {
  max-width: 640px; margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}
.sec-head h2 { font-size: clamp(42px, 5vw, 58px); }
.sec-head h2::after {
  content: ""; display: block;
  width: 150px; height: 21px; margin: 16px auto 0;
  background: url("../img/divider.svg") center / contain no-repeat;
}
.sec-head p {
  margin: 18px 0 0;
  font-family: var(--serif); font-size: clamp(20px, 2vw, 23px); font-style: italic; line-height: 1.45;
  color: var(--ink-2);
}

/* Our Story */
.couple {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start; gap: clamp(16px, 3vw, 40px);
  max-width: 860px; margin: 0 auto clamp(72px, 9vw, 112px);
}
.partner { text-align: center; }
.partner-photo {
  width: min(220px, 100%); aspect-ratio: 1; margin: 0 auto 22px;
  border-radius: 50%; overflow: hidden; background: var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 0 0 8px var(--paper), 0 0 0 9px var(--gold-soft);
}
.partner-photo img { width: 100%; height: 100%; object-fit: cover; }
.partner:first-child .partner-photo img { object-position: 50% 22%; }
.partner h3 {
  font-family: var(--script); font-size: clamp(42px, 4.4vw, 52px); font-weight: 400; line-height: 1.15;
}
.partner-role {
  margin: 4px 0 12px;
  font-family: var(--serif); font-size: 20px; font-style: italic; color: var(--rose-deep);
}
.partner p:last-child { max-width: 30ch; margin: 0 auto; color: var(--ink-2); }
.couple-amp {
  margin-top: 74px; text-align: center;
  font-family: var(--script); font-size: clamp(56px, 6vw, 76px); line-height: 1;
  color: var(--gold);
}

.timeline {
  position: relative;
  max-width: 980px; margin: 0 auto; padding: 0;
  list-style: none;
}
.timeline::before {
  content: ""; position: absolute; top: 40px; bottom: 40px; left: 50%;
  width: 1px; margin-left: -.5px; background: var(--gold-soft);
}
.moment {
  display: grid; grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
  align-items: center;
}
.moment + .moment { margin-top: clamp(44px, 6vw, 76px); }
.moment::before {
  content: ""; grid-column: 2; grid-row: 1; justify-self: center;
  position: relative; z-index: 1;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--paper) url("../img/node-heart.svg") center / 18px no-repeat;
  box-shadow: 0 0 0 1px var(--gold-soft), 0 0 0 7px var(--paper);
}
.moment-art, .portrait {
  display: grid; place-items: center;
  aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: var(--card);
}
.moment-art {
  grid-column: 1; grid-row: 1; justify-self: end;
  width: clamp(190px, 22vw, 240px);
  box-shadow: 0 0 0 1px var(--line), 0 0 0 8px var(--paper), 0 0 0 9px var(--gold-soft);
}
.moment-art img, .portrait img { width: 100%; }
.moment-copy { grid-column: 3; grid-row: 1; max-width: 400px; }
.moment:nth-child(even) .moment-art { grid-column: 3; justify-self: start; }
.moment:nth-child(even) .moment-copy { grid-column: 1; justify-self: end; text-align: right; }
.moment-date {
  margin: 0 0 6px;
  font-family: var(--serif); font-size: 20px; font-style: italic; font-weight: 500;
  color: var(--gold-text);
}
.moment h3 { margin-bottom: 12px; font-size: clamp(30px, 3vw, 36px); }
.moment-copy p:last-child { margin-bottom: 0; }

/* Wedding party */
.party-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin: 0; padding: 0; list-style: none;
}
.member { text-align: center; }
.portrait {
  width: min(210px, 100%); margin: 0 auto 26px;
  box-shadow: 0 0 0 1px var(--line), 0 0 0 8px var(--paper-2), 0 0 0 9px var(--gold-soft);
}
.member h3 { font-size: 32px; }
.member .role {
  margin: 4px 0 12px;
  font-family: var(--serif); font-size: 20px; font-style: italic; color: var(--rose-deep);
}
.member p:last-child { max-width: 26ch; margin: 0 auto; color: var(--ink-2); }

/* Photos */
/* The meme: a framed print with a place-card tag on each man, and the joke as its caption */
.meme { max-width: 960px; margin: 0 auto clamp(56px, 7vw, 88px); }
.meme-photo {
  position: relative; overflow: hidden;
  border-radius: 3px; background: var(--paper-2);
  box-shadow: 0 0 0 1px var(--line), 0 0 0 9px var(--paper), 0 0 0 10px var(--gold-soft),
              0 40px 70px -46px rgba(58, 50, 48, .5);
}
.meme-photo img { display: block; width: 100%; height: auto; }
.meme-tag {
  position: absolute;
  padding: .62em .95em .55em;
  font-family: var(--sans); font-size: clamp(10px, 1.35vw, 13px); font-weight: 500; line-height: 1;
  letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  color: var(--rose-ink); background: var(--ivory);
  border: 1px solid var(--gold-soft); border-radius: 2px;
  box-shadow: 0 10px 22px -12px rgba(58, 50, 48, .6);
}
/* On Abbott's jacket, and on the CEO's jacket clear of the mic and the hands */
.meme-tag-greg { left: 9%; top: 62%; }
.meme-tag-ceo { right: 3%; top: 70%; }
.meme-cap {
  margin: 34px 0 0;
  font-family: var(--serif); font-size: clamp(22px, 2.8vw, 32px); font-style: italic; line-height: 1.3;
  text-align: center; color: var(--ink);
}
/* Hearts that burst from the meme photo (site.js): over everything for about three seconds, never in the way */
.hearts { position: fixed; inset: 0; z-index: 30; width: 100%; height: 100%; pointer-events: none; }

.album {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: clamp(190px, 21vw, 250px);
  gap: clamp(14px, 2vw, 22px);
  margin: 0; padding: 0; list-style: none;
}
.ph { display: flex; flex-direction: column; min-height: 0; }
.ph-tall { grid-row: span 2; }
.ph-wide { grid-column: 1 / -1; }
.ph-frame {
  position: relative; flex: 1; min-height: 0;
  display: block; width: 100%; padding: 0; border: 0;
  border-radius: 3px; overflow: hidden;
  background: var(--paper-2); cursor: zoom-in;
}
.ph-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--pos, 50% 50%);
  transition: transform .5s ease;
}
.ph-frame:hover img { transform: scale(1.03); }
.ph-doc .ph-frame { background: var(--card); }
.ph-doc .ph-frame::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid var(--line); border-radius: inherit; pointer-events: none;
}
.ph-cap {
  margin: 10px 0 0;
  font-family: var(--serif); font-size: 18px; font-style: italic; line-height: 1.3;
  color: var(--ink-2);
}
.album-credit { margin: 22px 0 0; font-size: 14px; text-align: center; }

/* Registry */
.gifts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin: 0; padding: 0; list-style: none;
}
.gift {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  overflow: hidden;
}
.gift-art {
  display: grid; place-items: center; aspect-ratio: 1;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.gift-art img { width: 84%; }
.gift-body { display: flex; flex: 1; flex-direction: column; padding: 20px 20px 22px; }
.gift h3 { font-size: 25px; line-height: 1.12; }
.gift-note { margin: 8px 0 16px; font-size: 15px; color: var(--ink-2); }
.gift-status {
  margin: auto 0 14px;
  font-size: 13px; font-weight: 500; letter-spacing: .03em; color: var(--gold-text);
}
.meter {
  display: block; height: 4px; margin-bottom: 8px; border-radius: 4px;
  background: var(--line); overflow: hidden;
}
.meter i { display: block; width: var(--pct); height: 100%; background: var(--rose); }

/* Q + A */
.qa-list { max-width: 780px; margin: 0 auto; border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 22px 4px; cursor: pointer; list-style: none;
  font-family: var(--serif); font-size: clamp(23px, 2.4vw, 27px); font-weight: 500; line-height: 1.25;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background:
    linear-gradient(var(--rose-deep), var(--rose-deep)) center / 14px 1.5px no-repeat,
    linear-gradient(var(--rose-deep), var(--rose-deep)) center / 1.5px 14px no-repeat;
}
.qa details[open] summary::after {
  background:
    linear-gradient(var(--rose-deep), var(--rose-deep)) center / 14px 1.5px no-repeat;
}
.qa summary:hover { color: var(--rose-deep); }
.qa-a { max-width: 64ch; padding: 0 4px 24px; color: var(--ink-2); }
.qa-a p { margin: 0; }
.inline-cta { margin-left: 4px; font-weight: 500; white-space: nowrap; }

/* RSVP */
.rsvp { background: linear-gradient(180deg, var(--paper) 0%, var(--blush) 100%); }
.reply-card {
  max-width: 600px; margin: 0 auto; padding: 10px;
  background: var(--card); border-radius: 2px;
  box-shadow: 0 34px 70px -40px rgba(58, 50, 48, .5);
}
.reply-inner {
  padding: clamp(34px, 6vw, 56px) clamp(20px, 5vw, 48px);
  border: 1px solid var(--gold-soft);
  box-shadow: inset 0 0 0 5px var(--card), inset 0 0 0 6px var(--gold-soft);
  text-align: center;
}
.rsvp h2 { font-size: clamp(46px, 6vw, 62px); letter-spacing: .14em; padding-left: .14em; }
.reply-by {
  margin: 8px 0 30px;
  font-family: var(--script); font-size: clamp(27px, 3.4vw, 33px); line-height: 1.25;
  color: var(--rose-deep);
}
.choices {
  display: grid; gap: 14px; width: fit-content;
  margin: 0 auto; padding: 0; border: 0;
  text-align: left;
}
.choice {
  position: relative; display: flex; align-items: center; gap: 14px; cursor: pointer;
  font-family: var(--serif); font-size: 24px; line-height: 1.3;
}
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice .box {
  display: grid; place-items: center; flex: none;
  width: 24px; height: 24px;
  border: 1.5px solid var(--ink-2); border-radius: 2px; background: var(--card);
}
.choice:hover .box { border-color: var(--rose-deep); }
.choice input:checked + .box { background: var(--rose-deep); border-color: var(--rose-deep); }
.choice input:checked + .box::after {
  content: ""; width: 11px; height: 6px;
  border-left: 2px solid var(--ivory); border-bottom: 2px solid var(--ivory);
  transform: translateY(-1px) rotate(-45deg);
}
.choice input:focus-visible + .box { outline: 2px solid var(--rose-deep); outline-offset: 3px; }
.reply-next {
  margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--line);
  text-align: left;
}
.reply-msg {
  margin: 0 0 22px;
  font-family: var(--serif); font-size: 23px; font-style: italic; line-height: 1.4; text-align: center;
}
.signup-head {
  display: grid; gap: 2px; margin-bottom: 18px; padding: 12px 14px;
  background: var(--paper-2); border-left: 3px solid var(--rose-deep);
  font-size: 14px; line-height: 1.45; color: var(--ink-2);
}
.signup-head strong { font-weight: 500; color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: block; margin-bottom: 14px; }
.field span {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 500; letter-spacing: .05em; color: var(--ink-2);
}
.field input {
  width: 100%; padding: 12px 14px;
  font-family: var(--sans); font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--field); border-radius: 3px;
}
.field input:focus { outline: 2px solid var(--rose-deep); outline-offset: 1px; border-color: var(--rose-deep); }
.field-zip { max-width: 180px; }
.signup .btn { margin-top: 6px; }
.fineprint { margin: 12px 0 0; font-size: 13px; line-height: 1.5; text-align: center; color: var(--ink-2); }

/* Speak now */
.speak {
  padding: clamp(76px, 10vw, 128px) max(var(--gutter), calc((100% - 820px) / 2));
  background: var(--night); color: #EFE6DA;
}
.speak h2 {
  font-size: clamp(56px, 8.4vw, 96px); font-style: italic; font-weight: 500;
  color: var(--ivory);
}
.speak-lede {
  margin: 14px 0 30px;
  font-family: var(--serif); font-size: clamp(23px, 2.6vw, 29px); font-style: italic; line-height: 1.4;
  color: var(--gold-soft);
}
.speak p { font-size: clamp(17px, 1.5vw, 19px); }
.speak sup a { color: var(--gold-soft); }
.speak :focus-visible { outline-color: var(--gold-soft); }
.speak h3 { margin: 44px 0 20px; font-size: clamp(30px, 3vw, 36px); color: var(--ivory); }
.wants {
  display: grid; gap: 18px;
  margin: 0; padding: 0; list-style: none; counter-reset: want;
}
.wants li {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 16px; align-items: start;
  counter-increment: want;
  font-size: clamp(17px, 1.5vw, 19px);
}
.wants li::before {
  content: counter(want);
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--gold); border-radius: 50%;
  font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--gold-soft);
}
.wants strong { font-weight: 500; color: var(--ivory); }
.vote-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 22px 32px;
  margin-top: 48px; padding: 28px;
  border: 1px solid rgba(217, 197, 158, .35); border-radius: 4px;
}
.vote-dates { display: flex; flex-wrap: wrap; gap: 14px 32px; margin: 0; }
.vote-dates dt, .vote-dates dd { white-space: nowrap; }
.vote-dates dt {
  font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-soft);
}
.vote-dates dd {
  margin: 4px 0 0;
  font-family: var(--serif); font-size: 28px; font-weight: 500; line-height: 1.1;
  color: var(--ivory);
}
.speak-more { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 0; font-size: 16px; }
.speak-more span { color: var(--gold); }
.speak-more a { color: var(--ivory); }
.speak-more a:hover { color: var(--gold-soft); }

/* Footer */
.foot {
  padding: 64px var(--gutter) 48px;
  background: var(--paper-2); border-top: 1px solid var(--line);
  text-align: center;
}
.monogram-sm { width: 78px; height: 78px; }
.monogram-sm span { font-size: 13px; }
.foot-names { margin: 14px 0 2px; font-family: var(--script); font-size: 38px; line-height: 1.2; }
.foot-date { margin: 0 0 16px; font-size: 13px; letter-spacing: .3em; color: var(--ink-2); }
.foot-links a { font-size: 15px; font-weight: 500; letter-spacing: .04em; }
.made { margin: 16px 0 28px; font-size: 14px; color: var(--ink-2); }
.made .heart { color: var(--rose); }
.gridlocked { font-family: var(--serif); font-size: 18px; font-style: italic; font-weight: 600; color: var(--ink); }
.disclaimer {
  display: inline-block; margin: 0 0 10px; padding: 8px 14px;
  border: 1px solid var(--ink);
  font-size: 14px; font-weight: 500; color: var(--ink);
}
.parody { margin: 0; font-size: 13px; color: var(--ink-2); }

/* Registry dialog */
.gift-dialog {
  width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px);
  padding: clamp(30px, 6vw, 42px) clamp(22px, 5vw, 38px) 26px;
  border: 0; border-radius: 6px;
  background: var(--card); color: var(--ink); text-align: center;
  box-shadow: 0 40px 80px -30px rgba(43, 36, 34, .6);
}
.gift-dialog::backdrop { background: rgba(43, 36, 34, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.gift-dialog[open] { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.gift-dialog .divider { width: 140px; margin: 0 auto 16px; }
.gift-dialog h2 { margin-bottom: 14px; font-size: clamp(31px, 5vw, 38px); }
.gift-dialog p { color: var(--ink-2); }
.gift-dialog .fineprint { margin-top: 14px; }
.dialog-close { position: absolute; top: 6px; right: 6px; margin: 0; }
.dialog-close button {
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-2); cursor: pointer;
  font-family: var(--sans); font-size: 30px; font-weight: 300; line-height: 1;
}
.dialog-close button:hover { background: var(--paper-2); color: var(--ink); }
.link-btn {
  margin-top: 6px; padding: 10px 12px; border: 0; background: none; cursor: pointer;
  font-family: var(--sans); font-size: 14px; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }

/* Photo viewer. It sizes to the photo; the letter scrolls inside it. */
.lightbox {
  max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px);
  padding: 0; border: 0; border-radius: 6px; overflow: hidden;
  background: var(--card); color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(43, 36, 34, .6);
}
.lightbox[open] { display: flex; flex-direction: column; animation: pop .22s ease-out; }
.lightbox::backdrop { background: rgba(43, 36, 34, .72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.lightbox figure { display: flex; flex-direction: column; min-height: 0; margin: 0; }
.lb-img { min-height: 0; overflow: auto; overscroll-behavior: contain; background: var(--night); }
.lb-img img { margin: 0 auto; max-width: min(1000px, calc(100vw - 24px)); max-height: calc(100dvh - 150px); }
.is-doc .lb-img { height: calc(100dvh - 150px); background: var(--line); }
.is-doc .lb-img img { width: min(760px, calc(100vw - 24px)); max-width: none; max-height: none; }
.lightbox figcaption { flex: none; padding: 14px 20px 16px; }
.lb-cap { margin: 0; font-family: var(--serif); font-size: 20px; font-style: italic; line-height: 1.35; }
.lb-credit { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.lightbox .dialog-close { z-index: 1; }
.lightbox .dialog-close button {
  background: rgba(255, 253, 249, .92); color: var(--ink);
  box-shadow: 0 4px 14px -6px rgba(43, 36, 34, .6);
}
.lightbox .dialog-close button:hover { background: var(--card); }

/* Sources page */
.sources-page { max-width: 860px; margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(72px, 9vw, 112px); }
.sources-page h1 { font-size: clamp(46px, 6vw, 64px); text-align: center; }
.sources-page .intro {
  margin: 16px auto 48px; text-align: center;
  font-family: var(--serif); font-size: clamp(21px, 2.2vw, 24px); font-style: italic; color: var(--ink-2);
}
.source-list { margin: 0; padding: 0; list-style: none; counter-reset: src; border-top: 1px solid var(--line); }
.source-list > li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
  counter-increment: src;
}
.source-list > li::before {
  content: counter(src);
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--gold-soft); border-radius: 50%;
  font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--gold-text);
}
.source-list > li:target { background: linear-gradient(90deg, var(--blush), transparent 70%); }
.source-list h2 { font-size: 25px; line-height: 1.2; margin-bottom: 6px; }
.source-list p { margin: 0 0 8px; color: var(--ink-2); }
.source-list .links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.source-list .links a { overflow-wrap: anywhere; }
.credits { margin-top: clamp(56px, 8vw, 88px); }
.credits h2 { font-size: clamp(38px, 4.6vw, 48px); text-align: center; }
.credits-intro {
  margin: 12px auto 32px; text-align: center;
  font-family: var(--serif); font-size: clamp(20px, 2vw, 22px); font-style: italic; color: var(--ink-2);
}
.credit-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.credit-list li {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 18px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.credit-list img { width: 72px; height: 72px; object-fit: cover; border-radius: 3px; }
.credit-list p { margin: 0; font-size: 15px; color: var(--ink-2); }
.credit-list .what { margin-bottom: 2px; font-size: 17px; color: var(--ink); }
.back-link { display: inline-block; margin-top: 36px; font-weight: 500; }

/* Tablet */
@media (max-width: 1000px) {
  .gifts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .hero-art { width: 100%; max-width: 400px; margin: 0 auto; }
  .lede, .countdown, .cd-caption { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
}

/* Phone */
@media (max-width: 760px) {
  .tabs ul {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 30px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 30px), transparent 100%);
  }
  .tabs a { font-size: 12px; letter-spacing: .14em; }

  .timeline::before { left: 52px; top: 52px; bottom: 52px; }
  .moment { grid-template-columns: 104px minmax(0, 1fr); gap: 0 20px; align-items: start; }
  .moment::before { display: none; }
  .moment-art, .moment:nth-child(even) .moment-art {
    grid-column: 1; justify-self: start; width: 104px;
    box-shadow: 0 0 0 1px var(--line), 0 0 0 5px var(--paper), 0 0 0 6px var(--gold-soft);
  }
  .moment-copy, .moment:nth-child(even) .moment-copy {
    grid-column: 2; justify-self: start; text-align: left; padding-top: 4px;
  }
  .moment-date { font-size: 18px; }
  .moment h3 { font-size: 27px; margin-bottom: 8px; }

  .couple { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .couple-amp { margin-top: 0; }
  .partner-photo { width: 180px; }

  .party-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .portrait { width: 172px; }

  .album { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 176px; gap: 12px; }
  .ph-cap { font-size: 16px; }

  .vote-box { padding: 22px; }
  .vote-box .btn { width: 100%; }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .when { letter-spacing: .18em; }
  .when .sep { display: none; }
  .when .where { display: block; margin-top: 2px; }
  .amp-badge { width: 60px; height: 60px; margin: -30px 0 0 -30px; padding-top: 6px; font-size: 38px; }
  .gifts { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .gift { flex-direction: row; }
  .gift-art {
    flex: none; width: 112px; aspect-ratio: auto;
    border-bottom: 0; border-right: 1px solid var(--line);
  }
  .gift-art img { width: 100%; }
  .gift-body { padding: 16px; }
  .gift h3 { font-size: 22px; }
  .gift-note { margin-bottom: 12px; }
  .btn-gift { font-size: 14px; }

  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .field-zip { max-width: none; }
  .choice { font-size: 22px; }
  .countdown b { font-size: 32px; }
  .cta-row .btn { flex: 1 1 140px; padding: 0 18px; }
  .source-list > li { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
}

/* Small phones: room for two-word headings and the vote dates on one line */
@media (max-width: 400px) {
  .timeline::before { left: 40px; top: 40px; bottom: 40px; }
  .moment { grid-template-columns: 80px minmax(0, 1fr); gap: 0 16px; }
  .moment-art, .moment:nth-child(even) .moment-art { width: 80px; }
  .moment h3 { font-size: 24px; }
  .gift-art { width: 96px; }
  .gift h3 { font-size: 21px; }
  .vote-dates { gap: 14px 24px; }
  .vote-dates dd { font-size: 26px; }
  .vote-box { padding: 24px 20px; }
  .vote-box .btn, .signup .btn { padding: 0 20px; }
  /* Keeps "Show me how to vote." on one line down to 320px */
  .vote-box .btn { padding: 0 16px; font-size: 13px; letter-spacing: .12em; }
  .countdown span { letter-spacing: .14em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
