@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cormorant.woff2') format('woff2');
  font-weight: 500 700;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cormorant-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 500 700;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('fonts/dm-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6eddb;
  --letter: #fffaf0;
  --ink: #25372f;
  --green: #204239;
  --green-deep: #17372f;
  --muted: #555a4e;
  --red: #a42636;
  --red-deep: #802332;
  --gold: #c89346;
  --gold-light: #f3dca7;
  --line: #d7bc8f;
  --stripes: repeating-linear-gradient(134deg, var(--red) 0 13px, #fff7e5 13px 27px);
  --display: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --shell-max: 1200px;
  --shell-inset: clamp(3.25rem, 6vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(#977c471a .65px, transparent .8px),
    radial-gradient(#a4773917 .65px, transparent .8px);
  background-position: 0 0, 4px 6px;
  background-size: 9px 9px, 11px 11px;
  color: var(--ink);
  font: 1rem/1.5 var(--sans);
}
body::before, body::after {
  position: absolute;
  z-index: -1;
  inset-block: 5rem 0;
  width: max(var(--shell-inset), calc((100% - var(--shell-max)) / 2));
  background-repeat: repeat;
  background-size: min(100%, 8rem) auto;
  pointer-events: none;
  content: '';
}
body::before {
  left: 0;
  background-image: url('images/marge-gauche.webp');
  background-position: right top;
}
body::after {
  right: 0;
  background-image: url('images/marge-droite.webp');
  background-position: left top;
}
h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 3px solid #b13442; outline-offset: 4px; }
ul { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
.shell { width: min(calc(100% - 2 * var(--shell-inset)), var(--shell-max)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: .75rem; left: .75rem; transform: translateY(-180%); background: white; padding: .65rem 1rem; }
.skip-link:focus { transform: none; }

.masthead {
  border-bottom: 3px double var(--gold);
  background: var(--green-deep);
  color: var(--letter);
}
.masthead-inner { min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; font: 700 1.55rem/1 var(--display); text-decoration: none; }
.wordmark:focus-visible { outline-color: var(--gold-light); }
.star { color: var(--gold-light); font: 1.05rem/1 var(--sans); }
.edition {
  flex: none;
  color: var(--gold-light);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero {
  margin-top: clamp(1.35rem, 3vw, 2.35rem);
  padding: clamp(.52rem, 1.2vw, .95rem);
  border: 1px solid #9f30334d;
  background: var(--stripes);
  box-shadow: 0 14px 29px #492b161a, 0 3px 6px #492b1617;
}
.hero-sheet {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(1.15rem, 3vw, 3rem);
  min-height: 480px;
  padding: clamp(2rem, 4.5vw, 4.25rem);
  background: radial-gradient(ellipse at 75% 70%, #f1dec0, transparent 65%), var(--letter);
}
.hero-sheet::before {
  position: absolute;
  z-index: -1;
  inset: .52rem;
  border: 1px solid #c3934985;
  pointer-events: none;
  content: '';
}
.hero-message { display: flex; flex-direction: column; align-items: start; }
.letter-holly { width: clamp(4.6rem, 9vw, 8rem); height: auto; margin: 0 0 .75rem -.18rem; }
.hero h1 {
  color: var(--red);
  font: 700 clamp(4.4rem, 7.1vw, 7.1rem)/.83 var(--display);
  letter-spacing: -.045em;
}
.hero h1 em { font-weight: 700; }
.hero p { max-width: 32ch; margin: 1.4rem 0 1.5rem; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 49px;
  padding: .65rem 1.35rem;
  border: 1px solid #ba8843;
  border-radius: 2px;
  background: var(--green-deep);
  color: var(--letter);
  font-size: .9375rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .18s ease;
}
.button:hover { background: var(--red-deep); }

.hero-visual { position: relative; isolation: isolate; padding: .2rem .65rem 1rem .4rem; }
.hero-visual::before {
  position: absolute;
  z-index: -1;
  inset: 3.5% 2% 7% 2%;
  border: 1px solid #af874f;
  background: var(--green);
  box-shadow: 0 8px 19px #54351b28;
  transform: rotate(4.3deg);
  content: '';
}
.postcard {
  padding: clamp(.34rem, .75vw, .64rem);
  border: 1px solid #c8a56b;
  background: #fcf1dc;
  box-shadow: 0 5px 12px #4a321b33;
  transform: rotate(-3deg);
}
.hero-image {
  width: 100%;
  height: auto;
}
.postage-stamp {
  position: absolute;
  right: -1.3rem;
  bottom: -.65rem;
  width: clamp(5.75rem, 10vw, 9.6rem);
  padding: .45rem;
  filter: drop-shadow(0 3px 5px #51301d57);
  transform: rotate(8deg);
}
.postage-stamp::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: #fff6df;
  mask:
    radial-gradient(circle at top, transparent 2.45px, #000 2.7px) top left / 8px 100% repeat-x,
    radial-gradient(circle at bottom, transparent 2.45px, #000 2.7px) bottom left / 8px 100% repeat-x,
    radial-gradient(circle at left, transparent 2.45px, #000 2.7px) top left / 100% 8px repeat-y,
    radial-gradient(circle at right, transparent 2.45px, #000 2.7px) top right / 100% 8px repeat-y;
  mask-composite: intersect;
  content: '';
}
.postage-stamp img {
  width: 100%;
  height: auto;
  border: 1px solid #b78b54;
}

.themes { margin-top: clamp(2.4rem, 5vw, 4rem); scroll-margin-top: 1.5rem; }
.themes:focus { outline: none; }
.section-heading { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.section-heading::after { flex: 1; height: 3px; border-block: 1px solid #bb8d4f; content: ''; }
.section-heading h2 { color: var(--red-deep); font: 700 clamp(2.25rem, 4vw, 3.4rem)/1 var(--display); letter-spacing: -.035em; }
.section-heading img { order: 1; flex: none; width: clamp(2.7rem, 6vw, 4.7rem); height: auto; }
.theme-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.2rem; }
.theme-grid > li { grid-column: span 2; }
.theme-grid > li:nth-child(n + 4) { grid-column: span 3; }
.theme-card {
  --ribbon: var(--green);
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: .3rem;
  border: 1px solid var(--line);
  background: var(--letter);
  color: var(--letter);
  text-decoration: none;
  box-shadow: 0 2px 5px #492b160d;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.theme-grid > li:nth-child(odd) .theme-card { --ribbon: var(--red-deep); }
.theme-card:hover, .theme-card:focus-visible { border-color: #9f672c; box-shadow: 0 5px 12px #492b1624; }
.theme-card img { width: 100%; height: clamp(9rem, 15vw, 13.5rem); object-fit: cover; transition: filter .18s ease; }
.theme-card:hover img, .theme-card:focus-visible img { filter: brightness(1.08); }
.theme-card-text {
  position: relative;
  flex: 1;
  padding: .78rem 2.2rem .92rem 1rem;
  border-top: 1px solid var(--gold);
  background: var(--ribbon);
}
.theme-card-text::after {
  position: absolute;
  top: 1rem;
  right: .8rem;
  color: var(--gold-light);
  content: '✦';
}
.theme-card-title { display: block; font: 700 clamp(1.9rem, 3vw, 2.5rem)/1 var(--display); }
.theme-card-count { display: block; margin-top: .3rem; color: var(--gold-light); font-size: .875rem; }

.gallery { min-height: 60vh; padding-top: 1.15rem; }
.back-link { display: inline-flex; margin-bottom: 1.1rem; padding-block: .4rem; color: var(--red-deep); font-size: .9375rem; font-weight: 700; text-underline-offset: .24em; }
.gallery-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 220px;
  padding: .46rem;
  border: 1px solid #9f30334d;
  background: var(--stripes);
  color: var(--letter);
}
.gallery-heading-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.8rem clamp(1.5rem, 5vw, 4.3rem);
  background: var(--green-deep);
}
.gallery-heading h1 { font: 600 clamp(2.6rem, 6vw, 5rem)/.97 var(--display); letter-spacing: -.027em; }
.gallery-heading p { margin-top: .6rem; color: var(--gold-light); }
.gallery-heading img { width: 100%; height: 100%; max-height: 232px; object-fit: cover; }
.gallery-note { color: var(--muted); margin: 1.55rem 0 1rem; }
.gift-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
.gift-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--line); background: var(--letter); }
.gift-visual { display: flex; flex: none; width: 100%; aspect-ratio: 1.22; contain: size; align-items: center; justify-content: center; padding: .8rem; background: #fff; color: var(--muted); text-align: center; }
.gift-visual img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.gift-visual.duo { display: grid; grid-template: minmax(0, 1fr) / repeat(2, minmax(0, 1fr)); gap: .35rem; }
.gift-caption { padding: .85rem .9rem .95rem; border-top: 1px dashed #c5a877; }
.gift-caption h2 { font: 700 1.55rem/1.04 var(--display); }
.gift-caption p { color: var(--muted); margin-top: .4rem; font-size: .875rem; }
.gift-caption a { display: inline-block; margin-top: .45rem; color: var(--red-deep); font-size: .875rem; text-underline-offset: .18em; }

.footer {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1.15rem;
  margin-block: 3.2rem 1.8rem;
  padding-block: .9rem;
  border-block: 3px double #bd9356;
}
.footer-greeting { color: var(--red-deep); font: italic 700 1.8rem/1.2 var(--display); }
.footer-greeting span { margin-right: .22rem; color: var(--green); font: 1rem/1 var(--sans); }
.credits { color: var(--ink); max-width: 310px; padding-top: .23rem; font-size: .875rem; }
.credits summary { cursor: pointer; }
.credits ul { margin-top: .5rem; display: grid; gap: .25rem; }
.credits a { text-underline-offset: .18em; }

@media (max-width: 980px) {
  :root { --shell-inset: clamp(1.75rem, 4.6vw, 2.5rem); }
  body::before, body::after {
    background-image: url('images/marge-fine.webp');
    background-size: 100% auto;
  }
  body::after { background-position: left top 3.65rem; }
  .hero-sheet { min-height: 390px; }
  .hero h1 { font-size: clamp(3.7rem, 8vw, 5.5rem); }
  .gift-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  :root { --shell-inset: clamp(1rem, 5.25vw, 1.375rem); }
  body::before, body::after { inset-block-start: 4.7rem; }
  .masthead-inner { min-height: 57px; }
  .wordmark { gap: .45rem; font-size: 1.33rem; }
  .edition { font-size: .8125rem; letter-spacing: .09em; }
  .hero-sheet { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; padding: 1.65rem 1.45rem 2rem; }
  .hero-message { align-items: center; text-align: center; }
  .letter-holly { margin: 0 0 .56rem; }
  .hero h1 { font-size: clamp(3.4rem, 14.2vw, 6rem); }
  .hero p { margin: 1.05rem 0 1.15rem; }
  .hero-visual { max-width: 450px; margin-inline: auto; padding: .15rem .2rem .45rem; }
  .postage-stamp { right: -.65rem; width: clamp(4.8rem, 18.5vw, 6.2rem); padding: .33rem; }
  .section-heading { gap: .55rem; }
  .section-heading h2 { font-size: clamp(1.95rem, 8vw, 2.6rem); }
  .section-heading img { width: clamp(2.4rem, 9vw, 3.3rem); }
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .theme-grid > li, .theme-grid > li:nth-child(n + 4) { grid-column: auto; }
  .theme-grid > li:last-child { grid-column: 1 / -1; }
  .theme-card { padding: .22rem; }
  .theme-card img { height: clamp(6.3rem, 27vw, 9rem); }
  .theme-card-text { padding: .66rem .72rem .76rem; }
  .theme-card-text::after { display: none; }
  .theme-card-title { font-size: clamp(1.45rem, 5.3vw, 1.95rem); }
  .gallery-heading { min-height: 145px; }
  .gallery-heading-text { padding: 1rem .8rem 1rem 1rem; }
  .gallery-heading h1 { font-size: clamp(1.9rem, 7vw, 2.75rem); }
  .gift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .gift-visual { padding: .55rem; }
  .gift-caption { padding: .65rem .55rem .75rem; }
  .gift-caption h2 { font-size: clamp(1.12rem, 5vw, 1.45rem); }
  .footer { gap: .75rem; margin-top: 2.35rem; }
  .footer-greeting { flex: none; font-size: 1.45rem; }
}

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