@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-latin-wght-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #f4eee8;
  --paper-2: #ebe2d8;
  --wine: #74151f;
  --wine-deep: #5c0f18;
  --wine-soft: #8a3d44;
  --cream: #f6eee4;
  --rule: rgb(116 21 31 / 0.22);
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 3rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--wine) var(--paper);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--wine);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.15rem, 1rem + 0.45vw, 1.3rem);
  line-height: 1.5;
  caret-color: var(--wine);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--wine); color: var(--cream); }
.rsvp ::selection, .foot ::selection { background: var(--cream); color: var(--wine); }

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-style: italic; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 1px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--wine);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 0.8rem;
}
.skip:focus { top: 1rem; }

/* Small mono voice: dates, places, times, labels */
.meta, .bar, .vow__side, .label, .facts dt, .run__time, .gifts__name small, .copy, .rsvp__note, .foot__places, .foot__links {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* ---------- Top: the names, edge to edge ---------- */
.top { padding: clamp(0.5rem, 1.5vw, 1.25rem) var(--gutter) 0; }

.mark {
  font-weight: 500;
  font-size: clamp(3rem, 11.9vw, 12.5rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}
.mark__line { display: inline-block; animation: rise 1.6s var(--ease) both; }
.mark__line + .mark__line { animation-delay: 0.18s; }
.mark em { font-weight: 400; letter-spacing: 0; }

@keyframes rise {
  from { clip-path: inset(-0.2em -0.2em 100% -0.2em); transform: translateY(0.18em); }
  to { clip-path: inset(-0.2em); transform: none; }
}
@media (prefers-reduced-motion: reduce) { .mark__line { animation: none; } }

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  margin-top: clamp(1rem, 2.5vw, 2rem);
  padding: 0.85rem var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.bar a { text-decoration: none; }
.bar a:hover { text-decoration: underline; }
.bar__home {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}
.bar__home em { text-transform: none; }
.bar__lang { display: flex; gap: 0.9rem; }
.bar__lang [aria-current] { text-decoration: underline; text-underline-offset: 0.35em; }
.bar__nav { display: flex; gap: clamp(1rem, 2.5vw, 2rem); margin: 0 auto; }
.bar__rsvp {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline !important;
}

/* ---------- Intro ---------- */
.intro {
  display: grid;
  justify-items: center;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  padding: clamp(4rem, 12vw, 9rem) var(--gutter) clamp(5rem, 13vw, 10rem);
  text-align: center;
}
.meta { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.orn { width: 1.4rem; height: auto; flex: none; }

.vow {
  display: grid;
  grid-template-columns: 1fr minmax(0, 40rem) 1fr;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  width: 100%;
}
.vow__side:first-child { justify-self: end; }
.vow__side:last-child { justify-self: start; }
.vow__text {
  font-size: clamp(1.5rem, 1rem + 1.9vw, 2.4rem);
  line-height: 1.12;
  text-transform: uppercase;
  text-wrap: balance;
}

.link {
  font-style: italic;
  font-size: clamp(1.6rem, 1.2rem + 1vw, 2rem);
  text-underline-offset: 0.18em;
  transition: text-underline-offset 0.4s var(--ease);
}
.link:hover { text-underline-offset: 0.3em; }
.link--big { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }

/* Optional photo band (see EDIT note in index.html) */
.photos {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(13rem, 1fr);
  gap: clamp(0.75rem, 2vw, 1.5rem);
  overflow-x: auto;
  padding: 0 var(--gutter) clamp(4rem, 9vw, 7rem);
}
.photos img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: grayscale(1) sepia(0.18) contrast(1.05);
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(5rem, 11vw, 8.5rem) var(--gutter);
  border-top: 1px solid var(--rule);
  text-align: center;
}
.section--tint { background: var(--paper-2); border-top: 0; }
[id] { scroll-margin-top: 4.5rem; }

.title, .rsvp__title {
  font-weight: 500;
  font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.lede {
  max-width: 34rem;
  margin: 1.5rem auto 0;
  text-wrap: pretty;
}

/* Programme: two cities side by side */
.cities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 64rem;
  margin: clamp(3rem, 7vw, 5rem) auto 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.city { padding: clamp(2.5rem, 5vw, 3.75rem) clamp(1rem, 4vw, 3.5rem); }
.city + .city { border-left: 1px solid var(--rule); }
.city__name {
  display: grid;
  gap: 0.6rem;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.75rem, 1.8rem + 3vw, 4.25rem);
  line-height: 1;
}
.city__name span {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.facts {
  display: grid;
  gap: 0.35rem;
  margin: 2rem 0 2.25rem;
}
.facts div { display: flex; justify-content: center; align-items: baseline; gap: 0.75rem; }
.facts dt::after { content: ":"; }
.facts dd { font-size: 1.15em; }

.run { border-top: 1px solid var(--rule); text-align: left; }
.run li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.run__time { justify-self: end; order: 2; color: var(--wine-soft); }
.run__what {
  text-transform: uppercase;
  font-size: 1.2em;
  letter-spacing: 0.02em;
}

/* Dress code */
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  max-width: 52rem;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
}
.pair p { margin-top: 0.75rem; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); line-height: 1.2; }

/* Gifts */
.gifts {
  max-width: 46rem;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  border-top: 1px solid var(--rule);
  text-align: left;
}
.gifts li {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) 2fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}
.gifts__name { text-transform: uppercase; letter-spacing: 0.02em; }
.gifts__name small { display: block; color: var(--wine-soft); }
.gifts__value { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tba { font-style: italic; color: var(--wine-soft); }
.copy {
  padding: 0.3rem 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.3em;
  cursor: pointer;
}
.copy[hidden] { display: none; }
.copy[data-state="done"] { text-decoration-style: dotted; }

/* RSVP & footer: the wine block */
.rsvp, .foot { background: var(--wine); color: var(--cream); }
.rsvp {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  padding: clamp(5.5rem, 13vw, 10rem) var(--gutter) clamp(4.5rem, 10vw, 7rem);
  text-align: center;
}
.rsvp .lede { margin-top: 0; }
.rsvp .link { margin-top: 0.75rem; }
.rsvp__note { opacity: 0.8; }

.foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem var(--gutter) 2rem;
  border-top: 1px solid rgb(246 238 228 / 0.25);
}
.foot__names { font-size: 1.2rem; }
.foot__links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem 1.5rem; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---------- Small screens ---------- */
@media (max-width: 46rem) {
  .mark { font-size: 21vw; line-height: 0.9; }
  .mark__line { display: block; }
  .bar__nav { display: none; }
  .bar__lang { margin-left: auto; }
  .vow { grid-template-columns: 1fr 1fr; }
  .vow__text { grid-column: 1 / -1; grid-row: 1; }
  .vow__side:first-child { justify-self: start; }
  .vow__side:last-child { justify-self: end; }
  .cities, .pair { grid-template-columns: 1fr; }
  .city + .city { border-left: 0; border-top: 1px solid var(--rule); }
  .gifts li { grid-template-columns: 1fr auto; }
  .gifts__value { grid-column: 1; }
  .copy { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
  .foot { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
