/* ── Tokens ───────────────────────────────────────────────── */
:root {
  --paper: #F3ECDF;      /* warm beige card stock */
  --paper-2: #EAE0CF;    /* raised surfaces, inputs */
  --ink: #1F2B3D;        /* letterpress navy */
  --muted: #5C6372;
  --sage: #7E8F76;
  --gold: #7D5E30;       /* foil accent, text-safe on paper */
  --line: #DCD0BC;
  --error: #9B2C2C;

  --display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --text: 'Jost', 'Futura', 'Avenir Next', system-ui, sans-serif;

  /* Type scale (perfect fourth) */
  --s-1: 0.875rem;
  --s0: 1.0625rem;
  --s1: 1.375rem;
  --s2: 1.875rem;
  --s3: 2.5rem;

  /* Small gold ornaments (colour = --gold, inlined because SVG data URIs can't read variables) */
  --ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16'%3E%3Cg fill='%237D5E30'%3E%3Cpath d='M0 7.6h44v.8H0zM76 7.6h44v.8H76z'/%3E%3Cpath d='M51 8Q48 4.2 44.5 8 48 11.8 51 8zM69 8q3-3.8 6.5 0-3.5 3.8-6.5 0z' opacity='.75'/%3E%3Cellipse cx='60' cy='4' rx='1.7' ry='3.2'/%3E%3Cellipse cx='60' cy='12' rx='1.7' ry='3.2'/%3E%3Cellipse cx='56' cy='8' rx='3.2' ry='1.7'/%3E%3Cellipse cx='64' cy='8' rx='3.2' ry='1.7'/%3E%3C/g%3E%3Ccircle cx='60' cy='8' r='1.5' fill='%23F3ECDF'/%3E%3C/svg%3E");
  --blossom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cg fill='%237D5E30'%3E%3Ccircle cx='6' cy='3' r='2.2'/%3E%3Ccircle cx='8.85' cy='5.07' r='2.2'/%3E%3Ccircle cx='7.76' cy='8.43' r='2.2'/%3E%3Ccircle cx='4.24' cy='8.43' r='2.2'/%3E%3Ccircle cx='3.15' cy='5.07' r='2.2'/%3E%3C/g%3E%3Ccircle cx='6' cy='6.2' r='1.4' fill='%23F3ECDF'/%3E%3C/svg%3E");

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 36rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 300 var(--s0)/1.65 var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
img { max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--gold); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 20;
  background: var(--ink); color: var(--paper); padding: 0.5rem 1rem;
}
.skip:focus { top: 1rem; }

/* ── Top bar ──────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.9rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar__brand {
  font: italic 400 var(--s1)/1 var(--display);
  text-decoration: none;
  white-space: nowrap;
  margin-right: auto;
}
.nav { display: flex; gap: 1.75rem; }
.nav__link {
  font-size: var(--s-1); font-weight: 400; letter-spacing: 0.04em;
  text-decoration: none; color: var(--muted); white-space: nowrap;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
}
.nav__link:hover { color: var(--ink); }
.nav__link[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }

.topbar__menu {
  display: none;
  width: 2.5rem; height: 2.5rem; padding: 0;
  background: none; border: 0; cursor: pointer; color: var(--ink);
  flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.topbar__menu span { display: block; width: 20px; height: 1px; background: currentColor; transition: transform 0.2s; }
.menu-open .topbar__menu span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .topbar__menu span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* Language switcher — always the right-most item */
.lang { position: relative; order: 99; }
.lang__button {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: 500 var(--s-1)/1 var(--text); letter-spacing: 0.08em;
  color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.5rem 0.8rem; cursor: pointer;
}
.lang__button:hover { border-color: var(--ink); }
.lang__list {
  position: absolute; right: 0; top: calc(100% + 0.5rem);
  min-width: 10rem; margin: 0; padding: 0.35rem; list-style: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 10px 30px -12px rgb(31 43 61 / 0.35);
}
.lang__list li {
  padding: 0.55rem 0.75rem; border-radius: 4px; cursor: pointer;
  font-size: var(--s-1); font-weight: 400;
}
.lang__list li:hover, .lang__list li:focus { background: var(--paper-2); outline: none; }
.lang__list li[aria-selected="true"] { color: var(--gold); }

@media (max-width: 980px) {
  .topbar { gap: 0.5rem; }
  .topbar__menu { display: flex; order: 98; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1rem;
  }
  .menu-open .nav { display: flex; }
  .nav__link { font-size: var(--s0); padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .nav__link:last-child { border-bottom: 0; }
  .nav__link[aria-current="page"] { border-bottom-color: var(--line); color: var(--gold); }
}

/* ── Hero (welcome) ───────────────────────────────────────── */
.hero {
  text-align: center;
  overflow-x: clip; /* the roses may extend past narrow screens */
  padding: clamp(3rem, 9vw, 6.5rem) var(--gutter) clamp(2.5rem, 6vw, 4rem);
}
/* Photo in an arched frame, with a Redouté rose growing from behind each side */
.portrait {
  position: relative;
  width: min(24rem, 78vw);
  margin: 0 auto clamp(2rem, 5vw, 3rem);
}
.portrait__photo {
  position: relative; z-index: 1;
  display: block; width: 100%; height: auto;
  aspect-ratio: 1200 / 1598;
  object-fit: cover;
  border-radius: 999px 999px 6px 6px;
  box-shadow: 0 24px 50px -28px rgb(31 43 61 / 0.55);
  background: var(--paper-2);
}
.portrait__rose {
  position: absolute; z-index: 0;
  height: auto; pointer-events: none;
}
.portrait__rose--a { width: 52%; left: -36%; bottom: -4%; transform: rotate(-8deg); }
.portrait__rose--b { width: 48%; right: -33%; top: 14%; transform: scaleX(-1) rotate(-6deg); }
@media (max-width: 560px) {
  .portrait { width: 64vw; }
  .portrait__rose--a { width: 50%; left: -38%; }
  .portrait__rose--b { width: 46%; right: -36%; top: 8%; }
}
.hero__names {
  font: 400 var(--s2)/1.2 var(--display);
  margin: 0 0 1rem;
}
.hero__when, .hero__where { margin: 0; letter-spacing: 0.03em; }
.hero__when { font-weight: 400; }
.hero__where { color: var(--muted); }
.hero__where::after {
  content: ''; display: block;
  width: 7.5rem; height: 1rem; margin: 1.75rem auto 0;
  background: var(--ornament) center / contain no-repeat;
}

/* One orchestrated entrance: the photo develops, then the roses unfurl */
@media (prefers-reduced-motion: no-preference) {
  .ready .portrait__photo { animation: develop 1.2s cubic-bezier(.2,.7,.2,1) both; }
  .ready .portrait__rose { animation: unfurl 1.4s cubic-bezier(.2,.7,.2,1) 0.35s both; }
  .ready .portrait__rose--b { animation-delay: 0.55s; }
  .sprig { animation: unfurl 1.2s cubic-bezier(.2,.7,.2,1) 0.1s both; }
}
@keyframes develop {
  from { opacity: 0; filter: blur(6px); transform: translateY(0.75rem); }
  to { opacity: 1; filter: none; transform: none; }
}
@keyframes unfurl {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Page frame ───────────────────────────────────────────── */
.page { position: relative; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 4rem; margin: 0 auto; }

/* Rose in the page's top corner: beside the text column on wide screens,
   tucked next to the title on narrower ones. */
.sprig {
  position: absolute; z-index: 0; pointer-events: none;
  top: 1rem; right: var(--gutter);
  width: auto; height: clamp(6.5rem, 20vw, 8rem);
}
.sprig ~ .page__title { padding-right: 6.5rem; }
@media (min-width: 1100px) {
  .sprig { top: 2.5rem; right: auto; left: calc(100% - var(--gutter) + 2rem); width: 13rem; height: auto; }
  .sprig ~ .page__title { padding-right: 0; }
}
.page--narrow { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.page--wide { max-width: 72rem; }
.hero + .page { padding-top: 0; }

.page__title {
  font: 400 var(--s3)/1.1 var(--display);
  margin: 0 0 1.5rem;
}
.page__title::after {
  content: ''; display: block;
  width: 6rem; height: 0.8rem; margin-top: 0.9rem;
  background: var(--ornament) left center / contain no-repeat;
}
.section-title {
  font: italic 400 var(--s2)/1.2 var(--display);
  margin: 3rem 0 1rem;
}
.lede { font-size: var(--s1); line-height: 1.55; font-weight: 300; margin: 0 0 1rem; }
p { margin: 0 0 1rem; }

/* Schedule: a true sequence, so a timeline rule */
.schedule { list-style: none; margin: 2rem 0 0; padding: 0; border-left: 1px solid var(--line); }
.schedule__item {
  position: relative;
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem;
  padding: 0 0 1.6rem 1.5rem;
}
.schedule__item::before {
  content: ''; position: absolute; left: -7.5px; top: 0.35em;
  width: 14px; height: 14px;
  background: var(--paper) var(--blossom) center / contain no-repeat;
}
.schedule__time { font-weight: 400; font-variant-numeric: tabular-nums; color: var(--muted); }
.schedule__title { font: 400 var(--s1)/1.3 var(--display); margin: 0; }
.schedule__detail { margin: 0.15rem 0 0; color: var(--muted); }
.schedule__intro { margin: 0; }
@media (max-width: 560px) {
  .schedule__item { grid-template-columns: 1fr; gap: 0.1rem; }
}
.welcome { text-align: center; }
.welcome__cta { margin-top: 2.5rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

/* Photos inside pages */
.photo { margin: 2rem 0 0; }
.photo img { display: block; width: 100%; height: auto; background: var(--paper-2); }
.photo--wide img { border-radius: 6px; box-shadow: 0 18px 40px -26px rgb(31 43 61 / 0.5); }
.photo--arch { width: min(22rem, 72vw); margin: 2.5rem auto 0; }
.photo--arch img { border-radius: 999px 999px 6px 6px; box-shadow: 0 24px 50px -28px rgb(31 43 61 / 0.55); }

/* ── Content pages ────────────────────────────────────────── */
.block + .block { margin-top: 3rem; }
.block + .block::before {
  content: ''; display: block;
  width: 7.5rem; height: 1rem; margin: 0 auto;
  background: var(--ornament) center / contain no-repeat;
}
.block .section-title { margin-top: 2.5rem; }
.items { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.75rem; }
.item__name { font: 400 var(--s1)/1.3 var(--display); margin: 0 0 0.25rem; }
.item__detail { margin: 0 0 0.25rem; }
.item__address { margin: 0 0 0.25rem; color: var(--muted); font-size: var(--s-1); }
.item__link { font-size: var(--s-1); font-weight: 400; }

/* ── Buttons ─────────────────────────────────────────────── */
.button {
  display: inline-block;
  font: 400 var(--s0)/1 var(--text); letter-spacing: 0.03em;
  color: var(--paper); background: var(--ink);
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 0.95rem 1.8rem;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.button:hover { background: #2C3B52; }
.button:disabled { opacity: 0.6; cursor: progress; }
.button--ghost { background: transparent; color: var(--ink); }
.button--ghost:hover { background: var(--paper-2); }

/* ── Forms ───────────────────────────────────────────────── */
.form { margin-top: 2rem; display: grid; gap: 1.5rem; }
.field { display: grid; gap: 0.4rem; }
.field--short { max-width: 22rem; }
.field-row { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
label, legend { font-weight: 400; font-size: var(--s-1); letter-spacing: 0.02em; }
.field__optional { color: var(--muted); font-weight: 300; }
input, select, textarea {
  font: 300 var(--s0)/1.4 var(--text); color: var(--ink);
  width: 100%;
  background: #fff;
  border: 1px solid var(--line); border-radius: 4px;
  padding: 0.75rem 0.85rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(125 94 48 / 0.25); }
textarea { resize: vertical; }
[aria-invalid="true"] { border-color: var(--error); }
.field__error { color: var(--error); font-size: var(--s-1); margin: 0; font-weight: 400; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* Attending choice: two large tiles */
.choice legend { margin-bottom: 0.6rem; }
.choice__options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 560px) { .choice__options { grid-template-columns: 1fr; } }
.choice__option { position: relative; cursor: pointer; }
.choice__option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice__option span {
  display: block; height: 100%;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
  font: 400 var(--s1)/1.3 var(--display);
  transition: border-color 0.15s, background 0.15s;
}
.choice__option:hover span { border-color: var(--muted); }
.choice__option input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.choice__option input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }

.party { display: grid; gap: 1.5rem; padding: 1.5rem; background: var(--paper-2); border-radius: 6px; }
.guest { display: grid; gap: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.guest__legend { font: italic 400 var(--s1)/1.3 var(--display); padding: 0; float: left; width: 100%; margin-bottom: 0.25rem; }
.guest__legend + * { clear: both; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice { padding: 1rem 1.2rem; background: var(--paper-2); border-left: 2px solid var(--gold); }
.notice--error { border-left-color: var(--error); color: var(--error); }

.thanks { margin-top: 2rem; padding: 2rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; outline: none; }
.thanks__title { font: italic 400 var(--s2)/1.2 var(--display); margin: 0 0 0.75rem; }
.thanks__title::before {
  content: ''; display: inline-block; vertical-align: 0.15em;
  width: 0.8em; height: 0.8em; margin-right: 0.45em;
  background: var(--blossom) center / contain no-repeat;
}
.thanks__note { color: var(--muted); font-size: var(--s-1); }

/* ── Admin ───────────────────────────────────────────────── */
.admin__login { max-width: 24rem; }
.stats { display: flex; flex-wrap: wrap; gap: 2rem 3rem; margin: 1rem 0 2rem; }
.stats dt { font-size: var(--s-1); color: var(--muted); }
.stats dd { margin: 0; font: 400 var(--s3)/1.1 var(--display); }
.admin__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; margin-top: 1.5rem; }
.table { width: 100%; border-collapse: collapse; font-size: var(--s-1); }
.table th, .table td { text-align: left; vertical-align: top; padding: 0.75rem 1rem 0.75rem 0; border-bottom: 1px solid var(--line); }
.table th { font-weight: 500; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  text-align: center; color: var(--muted); font-size: var(--s-1);
  padding: 2rem var(--gutter) 2.5rem; border-top: 1px solid var(--line);
}
.footer::before {
  content: ''; display: block;
  width: 1.1rem; height: 1.1rem; margin: 0 auto 0.9rem;
  background: var(--blossom) center / contain no-repeat;
}
.footer p { margin: 0; }
.footer__email { white-space: nowrap; }
