@font-face {
  font-family: "Cormorant Garamond";
  src: url("./assets/cormorant.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("./assets/cormorant-italic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("./assets/dm.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

.gift-chapter {
  --paper: #fcf8f2;
  --white: #fffcf8;
  --ink: #352c29;
  --muted: #62544f;
  --accent: #774851;
  --tint: #f2dede;
  --eucalyptus: #dfe8dd;
  --lilac: #ece3ed;
  --rule: #dbcbbe;
  --button-tint: #eee4d9;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --gutter: clamp(1rem, 5vw, 5rem);
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--sans);
  overflow-wrap: anywhere;
}
[data-palette] {
  --paper: #fcf8f2;
  --accent: #774851;
  --tint: #f2dede;
}
:is(.gift-chapter[data-theme="sage"], [data-palette="sage"]) {
  --paper: #f4f7f0;
  --white: #fbfdf8;
  --accent: #405b49;
  --tint: #dfe8dd;
  --rule: #cbd9cb;
  --button-tint: #e2ebdc;
}
:is(.gift-chapter[data-theme="lilac"], [data-palette="lilac"]) {
  --paper: #f8f4fa;
  --white: #fdfaff;
  --accent: #654568;
  --tint: #ece3ed;
  --rule: #dbcddd;
  --button-tint: #eee3ef;
}
:is(.gift-chapter[data-theme="champagne"], [data-palette="champagne"]) {
  --paper: #faf5e9;
  --white: #fffbf1;
  --accent: #6c522d;
  --tint: #eee3c9;
  --rule: #e0d4b9;
  --button-tint: #ede1c8;
}
:is(.gift-chapter[data-theme="blue"], [data-palette="blue"]) {
  --paper: #f1f6fa;
  --white: #f9fcff;
  --accent: #37566b;
  --tint: #dfebf3;
  --rule: #c6d8e4;
  --button-tint: #e0ebf4;
}
:is(.gift-chapter[data-theme="apricot"], [data-palette="apricot"]) {
  --paper: #fff5ed;
  --white: #fffbf7;
  --accent: #7b4734;
  --tint: #f7e0d3;
  --rule: #e7cfc0;
  --button-tint: #f5e3d7;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
img { display: block; max-inline-size: 100%; }
p { margin: 0 0 1rem; }
a { color: inherit; text-underline-offset: 0.26em; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid #8b5d23; outline-offset: 4px; }
main:focus { outline: 0; }
.skip {
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-start: 0.5rem;
  z-index: 3;
  padding: 0.75rem 1rem;
  background: var(--white);
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

.site-header, .site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem var(--gutter);
  background: var(--white);
}
.site-header { border-bottom: 1px solid var(--rule); }
.site-header nav, .site-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(0.65rem, 2.8vw, 2.5rem);
  font-size: 0.88rem;
}
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.site-header nav a:hover, .site-header nav a[aria-current] { text-decoration: underline; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font: 1.88rem/1 var(--serif);
  letter-spacing: -0.035em;
  text-decoration: none;
}
.brand span { color: #826b5b; font-size: 1.6rem; }
.site-footer {
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
  padding-block: 1.7rem;
}
.site-footer p { color: var(--muted); font-size: 0.85rem; margin: 0.5rem 0 0; }

.button, .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 99px;
  background: var(--accent);
  color: white;
  text-align: center;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}
.button:hover:not(:disabled) { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--accent); }
.button.glass:not(:disabled) {
  color: var(--ink);
  border-color: #9b8575;
  background: linear-gradient(155deg, var(--white), var(--button-tint));
  box-shadow: inset 0 1px 0 white, 0 2px 5px #32231912;
}
.button.glass:hover:not(:disabled) {
  border-color: #755e53;
  background: var(--paper);
  box-shadow: inset 0 1px 0 white, 0 3px 8px #32231921;
}
.button.outline, .chip { color: var(--ink); background: transparent; border-color: #b99e8c; }
.button:disabled { background: #eae1d9; border-color: var(--rule); color: #64564e; }
.button.apple-pay-demo:disabled {
  background: #ede9e6;
  color: #625952;
  border: 1px dashed #9e9085;
}
.apple-pay-help { margin: 0.55rem 0 0; }
.rsvp-link { padding-inline: 1.35rem; }
.chip { padding-inline: 0.95rem; }
.chip:hover:not(:disabled), .chip[aria-pressed="true"], .chip[aria-current] { background: var(--tint); border-color: var(--accent); }
.chip:disabled { opacity: 0.6; }
.actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1.35rem; }
.back { display: inline-block; min-height: 44px; font-size: 0.92rem; }

h1, h2, h3 { margin: 0 0 0.55rem; font: 2rem/1.06 var(--serif); letter-spacing: -0.035em; }
h1 { font-size: clamp(3.15rem, 6vw, 5.1rem); }
h2 { font-size: clamp(2rem, 3vw, 2.65rem); }
h1 i, h2 i { color: var(--accent); }
.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.79rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  text-transform: uppercase;
}
.lead { font-size: 1.1rem; max-width: 46rem; }
.subtle { color: var(--muted); font-size: 0.9rem; }
.preline, .schedule p, .note blockquote { white-space: pre-line; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(30rem, 42vw, 39rem);
  padding: clamp(2rem, 5vw, 4.75rem) clamp(1.25rem, 6vw, 6rem);
  background: #403830;
}
.hero > img {
  position: absolute;
  z-index: -1;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center 10%;
}
.hero-copy {
  min-width: 0;
  width: min(100%, 35rem);
  padding: clamp(1.35rem, 3vw, 2.75rem);
  border: 1px solid #ffffffa6;
  border-radius: clamp(1.35rem, 3vw, 2.1rem);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 44px #231c222b, inset 0 1px 0 #ffffffc2;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .hero-copy {
    background: color-mix(in srgb, var(--paper) 85%, transparent);
    -webkit-backdrop-filter: blur(22px) saturate(1.16);
    backdrop-filter: blur(22px) saturate(1.16);
  }
}
.hero h1 { font-size: clamp(4rem, 7vw, 6.15rem); line-height: 0.95; margin: 0.12em 0; }
.hero .long-names { font-size: clamp(2.8rem, 5vw, 4.25rem); }
.hero-date { font-size: 0.92rem; margin-block: 1rem 0.65rem; }
.hero-date span[aria-hidden] { margin-inline: 0.25rem; }
.sample-date { display: block; color: var(--muted); font-size: 0.8rem; }
.hero-message { max-width: 26rem; margin-bottom: 1.2rem; }

.section, .page { max-width: 88rem; margin-inline: auto; padding: clamp(2.5rem, 4vw, 3.85rem) var(--gutter); }
.page { min-height: 66vh; }
.section-head {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  align-items: end;
  gap: 1.25rem 3rem;
  margin-bottom: 1.5rem;
}
.section-head h2 { font-size: clamp(3rem, 5vw, 4.75rem); margin: 0; }
.section-head > p { max-width: 29rem; justify-self: end; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.85rem, 2vw, 1.7rem); }
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
}
.art { position: relative; aspect-ratio: 1.72; overflow: hidden; background: var(--tint); }
.art img, .summary-photo { width: 100%; height: 100%; object-fit: cover; }
.art .photo-coast { object-position: 50% 47%; }
.art .photo-dinner { object-position: 60% 55%; }
.art .photo-pottery { object-position: 50% 52%; }
.art .badge { position: absolute; top: 0.8rem; left: 0.8rem; }
.badge {
  display: inline-block;
  padding: 0.28rem 0.68rem;
  border-radius: 99px;
  background: #fcf8f2;
  color: var(--ink);
  font-size: 0.84rem;
}
.badge.shared { background: var(--eucalyptus); }
.badge.voucher { background: var(--lilac); }
.badge.closed { background: #f2dede; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 1.15rem; }
.card-body h3 { font-size: clamp(1.75rem, 2.45vw, 2.5rem); }
.card-body .eyebrow { margin-bottom: 0.3rem; }
.card-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.75rem;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  margin-top: auto;
  padding-top: 0.35rem;
}
.card-bottom small { color: var(--muted); }
.card-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.88rem;
}
.card-link:disabled { color: var(--muted); }
.celebration { background: var(--tint); }
.celebration-inner, .gift-layout, .checkout-layout {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 3rem);
}
.celebration-inner h2 { font-size: clamp(3rem, 4.5vw, 4.2rem); }
.schedule { border: 1px solid var(--accent); padding: clamp(1rem, 3vw, 2rem); }
.schedule p { margin: 0; line-height: 2; }

.filters { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.75rem 1rem; }
.categories, .filter-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: end; }
.filter-controls label { margin: 0; }
.filter-controls .check { align-items: center; min-height: 44px; padding-inline: 0.4rem; }
.result-count { margin: 1rem 0 0.7rem; font-size: 0.9rem; color: var(--muted); }
.empty { padding: 1.2rem; border: 1px solid var(--rule); }
.narrow { max-width: 55rem; }
.gift-layout { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); align-items: center; }
.detail-photo {
  width: 100%;
  max-height: 34rem;
  aspect-ratio: 1 / 1.02;
  object-fit: cover;
  border-radius: 45% 45% 0.5rem 0.5rem / 34% 34% 0.5rem 0.5rem;
}
.rules { border-block: 1px solid var(--rule); padding-block: 0.9rem; }
.gift-value { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; }
.gift-value strong { font-size: 1.35rem; }
.funding p { margin-top: 0.4rem; }
progress { accent-color: var(--accent); width: min(100%, 28rem); }
.checkout-layout { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); }
.checkout-page { max-width: 76rem; }
.checkout-page h1 { font-size: clamp(2.65rem, 4.5vw, 4rem); }
.gift-summary { border: 1px solid var(--rule); border-radius: 0.45rem; overflow: hidden; background: var(--white); }
.gift-summary .summary-photo { height: clamp(11rem, 22vw, 19rem); }
.gift-summary > div { padding: 1.05rem; }
.gift-summary p:last-child { margin-bottom: 0; }
.summary-location { color: var(--muted); margin-bottom: 0.35rem; }
.paper, dialog {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  padding: clamp(1rem, 2.25vw, 1.85rem);
}
.paper + .paper { margin-top: 1rem; }
#rsvp + p { margin-top: 1rem; }
label { display: grid; gap: 0.3rem; margin: 0.9rem 0; font-size: 0.9rem; min-width: 0; }
input:not([type="checkbox"]), textarea, select {
  border: 1px solid #a79587;
  background: #fff;
  border-radius: 0.35rem;
  min-height: 44px;
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  font-size: 1rem;
}
input:disabled, select:disabled { background: #f5eee7; }
textarea { min-height: 5.7rem; resize: vertical; }
.check { display: flex; align-items: start; gap: 0.55rem; }
input[type="checkbox"] { flex: none; accent-color: var(--accent); width: 1.2rem; height: 1.2rem; margin: 0.1rem 0 0; }
input[type="file"]::file-selector-button { max-width: 100%; }
.problem { border-left: 3px solid var(--accent); background: var(--tint); padding: 0.65rem 0.8rem; }
.summary { margin: 1rem 0; }
.summary div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0.85rem; border-bottom: 1px solid var(--rule); padding-block: 0.55rem; }
.summary dd { margin: 0; }
.summary dt { color: var(--muted); }
.reference { margin-top: 1rem; }
.status {
  position: fixed;
  z-index: 2;
  bottom: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 1.6rem);
  padding: 0.7rem 1rem;
  border-radius: 0.45rem;
  background: var(--ink);
  color: white;
}
.status:empty { display: none; }
.loading { padding: 2rem var(--gutter); }

.colours-page .palette-card { min-height: 6rem; padding: clamp(0.75rem, 2.4vw, 1.25rem); }
.colours-page .palette-swatches span { width: 1.4rem; height: 1.4rem; }
.palette-picker {
  min-inline-size: 0;
  padding: 0;
  border: 0;
  margin: 1.45rem 0 1.35rem;
}
.palette-picker legend {
  padding: 0;
  font: 1.7rem/1.12 var(--serif);
}
.palette-picker p {
  margin: 0.4rem 0 0.7rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.palettes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.5rem, 1.25vw, 0.95rem);
}
.palette-option {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}
.palette-option input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
}
.palette-card {
  display: grid;
  gap: 0.55rem;
  height: 100%;
  padding: 0.7rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #bdaba0;
  border-radius: 0.6rem;
  font-size: 0.82rem;
  line-height: 1.25;
}
.palette-option:hover .palette-card { border-color: var(--accent); }
.palette-option input:checked + .palette-card {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  font-weight: 700;
}
.palette-option input:focus-visible + .palette-card {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.palette-swatches { display: flex; gap: 3px; }
.palette-swatches span {
  width: 1.13rem;
  height: 1.13rem;
  border-radius: 50%;
  background: var(--accent);
}
.palette-swatches span:nth-child(2) { background: var(--tint); }
.palette-swatches span:nth-child(3) { background: var(--paper); border: 1px solid #b7a79d; }
dialog { width: min(30rem, calc(100% - 2rem)); }
dialog::backdrop { background: #352c2977; }

.note {
  position: relative;
  background: var(--tint);
  border-block: 3px double #a98772;
  padding: 1.35rem;
}
.note blockquote { margin: 0.55rem 0 0.9rem; font: italic 1.95rem/1.13 var(--serif); }
.signature { color: var(--ink); }
.signature { margin: 0; font-size: 0.97rem; }

@media (max-width: 900px) {
  .hero-copy { max-width: min(70vw, 32rem); }
}
@media (max-width: 700px) {
  .site-header { flex-wrap: wrap; gap: 0.1rem 0.5rem; padding-block: 0.65rem 0; }
  .site-header nav { justify-content: center; order: 3; width: 100%; border-top: 1px solid var(--rule); margin-top: 0.5rem; gap: 0.95rem; }
  .brand { font-size: clamp(1.3rem, 6vw, 1.65rem); }
  .hero {
    align-items: end;
    min-height: 34rem;
    padding: 13.5rem 1rem 1rem;
  }
  .hero > img { object-position: 60% 28%; }
  .hero-copy { width: min(100%, 28rem); max-width: none; }
  .hero h1 { font-size: clamp(3rem, 12.2vw, 4.55rem); }
  .hero .long-names { font-size: clamp(2.4rem, 9.2vw, 3.6rem); }
  .section-head, .gift-layout, .checkout-layout, .celebration-inner { grid-template-columns: 1fr; }
  .section-head > p { justify-self: start; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-photo { max-height: 22rem; aspect-ratio: 1.3; }
  .gift-summary { display: grid; grid-template-columns: 0.32fr minmax(0, 1fr); }
  .gift-summary .summary-photo { height: 100%; min-height: 8rem; }
  .gift-summary h2 { font-size: 1.8rem; }
}
@media (max-width: 480px) {
  .palettes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .site-footer nav { gap: 0.65rem 1rem; }
  .site-header .rsvp-link { padding-inline: 0.85rem; }
  .card-body { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
