/* Mara & Teo — "Heirloom" system per design-tokens.md (v2).
   Vintage editorial: écru paper, espresso-sepia ink, burgundy as the single accent.
   Two-serif system (Playfair Display + EB Garamond), double-rule ornaments,
   straight framed photographs, slow fades. Serious, adult, elegant, minimal. */
:root {
  --color-ecru: #F5F0E6;
  --color-ecru-deep: #EDE6D6;
  --color-sepia: #362E26;
  --color-sepia-soft: #4A4136;
  --color-text: #3B342B;
  --color-muted: #665C4F; /* darkened from token #7A7062 for AA on écru surfaces */
  --color-wine: #7A3030;
  --color-wine-deep: #5E2424;
  --color-rose: #EBDDD3;
  --color-hairline: #DDD3C0;
  --font-display: "Playfair Display", "Bodoni MT", Didot, Georgia, serif;
  --font-body: "EB Garamond", Garamond, Georgia, serif;
  --max-width: 1040px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-ecru);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 31px;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; color: var(--color-sepia); margin: 0 0 18px; }
h1 { font-size: clamp(56px, 9vw, 104px); line-height: 1.02; letter-spacing: 0.01em; }
h2 { font-size: 38px; line-height: 46px; }
h3 { font-size: 22px; line-height: 30px; font-weight: 600; }

p { margin: 0 0 16px; }
strong { font-weight: 500; }

.caption { font-size: 14.5px; line-height: 21px; color: var(--color-muted); font-style: italic; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 64px; }

section { padding: 104px 0; }

/* ---------- Ornament devices ---------- */
.double-rule {
  border: none;
  border-top: 1px solid var(--color-hairline);
  border-bottom: 1px solid var(--color-hairline);
  height: 3px;
  margin: 0;
}
.ornament-band {
  text-align: center;
  padding: 40px 24px;
}
.ornament-band .rule-row {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 520px;
  margin: 0 auto;
}
.ornament-band .rule-row::before,
.ornament-band .rule-row::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--color-hairline);
  border-bottom: 1px solid var(--color-hairline);
  height: 3px;
}
.ornament-band .diamond {
  font-family: var(--font-body);
  color: var(--color-wine);
  font-size: 15px;
  letter-spacing: 0.4em;
  padding-left: 0.4em; /* balance tracking */
}
.ornament-band .year {
  display: block;
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.34em;
  color: var(--color-muted);
}

.section-head { text-align: center; margin-bottom: 56px; }
.section-head .kicker {
  display: block;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17px;
  color: var(--color-wine-deep);
  margin-bottom: 12px;
}
.section-head h2 { margin-bottom: 0; }
.section-head h2::after {
  content: "";
  display: block;
  width: 48px;
  margin: 22px auto 0;
  border-top: 1px solid var(--color-wine);
}
.section-head p { max-width: 560px; margin: 20px auto 0; color: var(--color-muted); }

/* ---------- Buttons ---------- */
.btn-rsvp {
  display: inline-block;
  background: var(--color-wine);
  color: var(--color-ecru);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 17px 38px 15px;
  border: 1px solid var(--color-wine);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.35s ease, border-color 0.35s ease;
}
.btn-rsvp:hover { background: var(--color-wine-deep); border-color: var(--color-wine-deep); }

/* Quiet fixed RSVP link (appears after hero) */
.float-cta {
  position: fixed;
  right: 28px; bottom: 26px;
  z-index: 60;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-wine-deep);
  background: var(--color-ecru);
  border-top: 1px solid var(--color-wine);
  border-bottom: 1px solid var(--color-wine);
  padding: 10px 18px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.25s ease;
}
.float-cta.visible { opacity: 1; transform: none; pointer-events: auto; }
.float-cta:hover { color: var(--color-sepia); }

/* ---------- Header ---------- */
.site-header { padding: 26px 0; border-bottom: 1px solid var(--color-hairline); }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }

.monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px; height: 44px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 17px;
  color: var(--color-sepia);
  text-decoration: none;
  border: 1px solid var(--color-hairline);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--color-ecru), inset 0 0 0 4px var(--color-hairline);
  transition: border-color 0.3s ease;
}
.monogram:hover { border-color: var(--color-wine); }

/* Language toggle — italic serif with double-rule underline (Heirloom variant) */
.lang-toggle {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 16px;
  color: var(--color-sepia);
  text-decoration: none;
  border-bottom: 3px double var(--color-wine);
  padding-bottom: 3px;
  transition: color 0.3s ease;
}
.lang-toggle:hover { color: var(--color-wine-deep); }

/* ---------- Hero ---------- */
.hero { padding: 112px 0 88px; text-align: center; }
.hero .eyebrow {
  display: block;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 19px;
  color: var(--color-wine-deep);
  margin-bottom: 30px;
}
.hero h1 .amp {
  font-style: italic;
  color: var(--color-wine);
  padding: 0 0.06em;
}
.hero .date-line {
  font-family: var(--font-body);
  font-size: 19px;
  letter-spacing: 0.06em;
  color: var(--color-text);
  margin: 30px 0 0;
}
.hero .date-line .venue { font-style: italic; }
.days-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  margin: 34px auto 0;
  padding: 14px 30px 12px;
  border-top: 1px solid var(--color-hairline);
  border-bottom: 1px solid var(--color-hairline);
}
.days-chip .num {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--color-wine-deep);
  font-variant-numeric: tabular-nums;
}
.days-chip .label { font-size: 16px; color: var(--color-text); }
.days-chip .caption { font-size: 12.5px; }
.hero .cta-block { margin-top: 40px; }
.hero .deadline-line { margin-top: 18px; font-size: 15.5px; color: var(--color-muted); font-style: italic; }

/* ---------- Story ---------- */
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.story-beat { text-align: center; }
.frame {
  display: block;
  border: 1px solid var(--color-hairline);
  padding: 6px;
  background: #FBF8F1;
}
.frame img { border: 1px solid var(--color-hairline); filter: sepia(0.14) saturate(0.92); transition: filter 0.6s ease; }
.frame:hover img { filter: sepia(0) saturate(1); }
.story-grid .frame { aspect-ratio: 1 / 1; overflow: hidden; }
.story-grid .frame img { width: 100%; height: 100%; object-fit: cover; }
.story-beat .year {
  display: inline-block;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 15px;
  color: var(--color-muted);
  margin: 24px 0 6px;
}
.story-beat h3 { margin-bottom: 10px; }
.story-beat p { margin: 0; font-size: 16.5px; line-height: 27px; color: var(--color-muted); }

/* ---------- The day: sepia timeline ---------- */
.day { background: var(--color-sepia); }
.day .section-head .kicker { color: var(--color-rose); }
.day h2 { color: var(--color-ecru); }
.day .section-head h2::after { border-top-color: var(--color-wine); }
.timeline { max-width: 620px; margin: 0 auto; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 12px; bottom: 12px;
  width: 1px;
  background: rgba(245, 240, 230, 0.28);
}
.tl-item { position: relative; padding: 0 0 40px 44px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--color-sepia);
  border: 1px solid var(--color-rose);
  box-shadow: inset 0 0 0 3px var(--color-sepia), inset 0 0 0 8px rgba(235, 221, 211, 0.35);
}
.tl-item .tl-time {
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.18em;
  color: var(--color-rose);
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 4px;
}
.tl-item h3 { color: var(--color-ecru); font-size: 23px; margin-bottom: 6px; }
.tl-item p { margin: 0; color: rgba(245, 240, 230, 0.72); font-size: 16.5px; line-height: 27px; }

/* ---------- The place ---------- */
.place-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.place-visual { aspect-ratio: 3 / 2; overflow: hidden; }
.place-visual img { width: 100%; height: 100%; object-fit: cover; }
.place .section-head { text-align: left; margin-bottom: 24px; }
.place .section-head h2::after { margin-left: 0; }
.place .address { font-size: 18px; }
.place .address .venue { font-style: italic; color: var(--color-sepia); }
.place-notes { list-style: none; padding: 0; margin: 28px 0 0; }
.place-notes li {
  padding: 16px 0 16px 34px;
  position: relative;
  border-top: 1px solid var(--color-hairline);
  font-size: 16.5px;
  line-height: 27px;
}
.place-notes li:last-child { border-bottom: 1px solid var(--color-hairline); }
.place-notes li::before {
  content: "✦";
  position: absolute;
  left: 4px; top: 16px;
  color: var(--color-wine);
  font-size: 12px;
}

/* ---------- Good to know: ruled ledger, no cards ---------- */
.know-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 72px;
  border-top: 1px solid var(--color-hairline);
}
.know-item {
  padding: 32px 0;
  border-bottom: 1px solid var(--color-hairline);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 20px;
  align-items: start;
}
.know-item .k-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  color: var(--color-wine);
  text-align: center;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  padding-top: 1px;
}
.know-item h3 { grid-column: 2; font-size: 20px; margin-bottom: 6px; }
.know-item p { grid-column: 2; min-width: 0; margin: 0; font-size: 16px; line-height: 26px; color: var(--color-muted); }

/* ---------- Gallery: framed plates, straight ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  align-items: start;
}
.gallery-grid .frame:nth-child(even) { margin-top: 36px; } /* calm editorial offset, no tilt */
.gallery-grid .frame { overflow: hidden; }
.gallery-grid .frame:nth-child(odd) { aspect-ratio: 4 / 5; }
.gallery-grid .frame:nth-child(even) { aspect-ratio: 1 / 1; }
.gallery-grid .frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- RSVP ---------- */
.rsvp { background: var(--color-ecru-deep); border-top: 1px solid var(--color-hairline); border-bottom: 1px solid var(--color-hairline); }
.rsvp-card {
  max-width: 640px;
  margin: 0 auto;
  background: #FBF8F1;
  border: 1px solid var(--color-hairline);
  box-shadow: inset 0 0 0 5px #FBF8F1, inset 0 0 0 6px var(--color-hairline);
  padding: 56px;
}
.rsvp-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.rsvp-form .field { margin-bottom: 24px; }
.rsvp-form label {
  display: block;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-sepia);
  margin-bottom: 6px;
}
.rsvp-form label .caption { font-size: 13.5px; }
.rsvp-form input, .rsvp-form select, .rsvp-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16.5px;
  color: var(--color-text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-hairline);
  border-radius: 0;
  padding: 8px 2px;
  transition: border-color 0.3s ease;
}
.rsvp-form select { appearance: none; }
.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus {
  outline: none;
  border-bottom-color: var(--color-wine);
}
.rsvp-form textarea { resize: vertical; min-height: 64px; }
.rsvp-form input::placeholder { color: var(--color-muted); font-style: italic; }
.rsvp-form .check-row { display: flex; align-items: center; gap: 12px; margin: 4px 0 30px; }
.rsvp-form .check-row input { width: 17px; height: 17px; accent-color: var(--color-wine); }
.rsvp-form .check-row label { margin: 0; }
.rsvp-form .btn-rsvp { width: 100%; text-align: center; }
.form-confirm {
  display: none;
  margin-top: 24px;
  padding: 16px 20px;
  border-top: 1px solid var(--color-wine);
  border-bottom: 1px solid var(--color-wine);
  font-size: 16px;
  line-height: 26px;
  text-align: center;
  font-style: italic;
}
.form-confirm.visible { display: block; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-list details { border-top: 1px solid var(--color-hairline); }
.faq-list details:last-child { border-bottom: 1px solid var(--color-hairline); }
.faq-list summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  color: var(--color-sepia);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--color-wine);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin: 0; padding: 0 44px 24px 0; color: var(--color-muted); font-size: 16.5px; line-height: 27px; }
.faq-list .faq-answer {
  overflow: hidden;
  transition: height 0.45s cubic-bezier(0.33, 1, 0.68, 1),
              opacity 0.35s ease,
              transform 0.45s cubic-bezier(0.33, 1, 0.68, 1);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-sepia);
  color: rgba(245, 240, 230, 0.75);
  padding: 72px 0 56px;
  text-align: center;
  font-size: 16px;
  line-height: 28px;
}
.site-footer .monogram {
  color: var(--color-ecru);
  border-color: rgba(245, 240, 230, 0.35);
  box-shadow: inset 0 0 0 3px var(--color-sepia), inset 0 0 0 4px rgba(245, 240, 230, 0.35);
  margin-bottom: 24px;
}
.site-footer a { color: var(--color-ecru); }
.site-footer .lang-toggle { color: var(--color-ecru); border-bottom-color: var(--color-rose); display: inline-block; margin-top: 22px; }
.site-footer .lang-toggle:hover { color: var(--color-rose); }
.site-footer .legal {
  max-width: 660px;
  margin: 38px auto 0;
  padding-top: 26px;
  border-top: 1px solid rgba(245, 240, 230, 0.2);
  font-size: 13.5px;
  line-height: 21px;
  color: rgba(245, 240, 230, 0.55);
  font-style: italic;
}

/* ---------- Scroll reveal: slow fades only ---------- */
html.anim .reveal { opacity: 0; transform: translateY(14px); }
html.anim .reveal.revealed {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s ease var(--rd, 0ms),
              transform 0.9s ease var(--rd, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  .btn-rsvp, .float-cta, .monogram, .lang-toggle, .frame img, .faq-list .faq-answer { transition: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  body { font-size: 17px; line-height: 29px; }
  h2 { font-size: 29px; line-height: 37px; }
  .container { padding: 0 24px; }
  section { padding: 60px 0; }
  .hero { padding: 64px 0 56px; }
  .story-grid { grid-template-columns: 1fr; gap: 44px; }
  .place-layout { grid-template-columns: 1fr; gap: 40px; }
  .know-grid { grid-template-columns: 1fr; }
  .know-item { grid-template-columns: 32px minmax(0, 1fr); column-gap: 14px; padding: 26px 0; }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .gallery-grid .frame:nth-child(even) { margin-top: 20px; }
  .rsvp-card { padding: 32px 22px; }
  .rsvp-form .row { grid-template-columns: 1fr; gap: 0; }
  .float-cta { right: 16px; bottom: 16px; }
}
