/* Roi & Geselle — built on the Blush & Dove design tokens */

:root {
  --paper: #fbf9f9;
  --dove-100: #efedee;
  --dove-200: #dedadc;
  --dove-400: #a9a2a6;
  --blush-50: #fcf2f3;
  --blush-200: #f4d6dc;
  --blush-300: #eabdc7;
  --rose-600: #a3506a;
  --rose-700: #86405a;
  --on-rose: #ffffff;
  --ink: #3a3437;
  --ink-muted: #6b6468;
  --hairline: #e4dddf;
  --error: #b3261e;

  --font-display: "Safira March", "Cormorant Garamond", Georgia, serif;
  --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;

  --space-1: 4px; --space-2: 8px; --space-3: 16px; --space-4: 24px;
  --space-5: 40px; --space-6: 64px; --space-7: 112px;
  --radius-sm: 6px; --radius-md: 16px; --radius-arch: 999px;

  /* Photo treatment: slight colour lift, softened contrast, blush veil */
  --shadow-soft: 0 14px 36px rgba(163, 80, 106, .16), 0 2px 8px rgba(58, 52, 55, .06);
  --photo-filter: saturate(1.1) contrast(0.95) brightness(1.04);
  --photo-veil: rgba(252, 242, 243, 0.35);
}

:root[data-theme="night"] {
    --shadow-soft: 0 14px 36px rgba(0, 0, 0, .45);
    --paper: #1e1b1c; --dove-100: #2a2728; --dove-200: #3a3638; --dove-400: #6e676b;
    --blush-50: #2b2124; --blush-200: #563a42; --blush-300: #7a5260;
    --rose-600: #e8a9b8; --rose-700: #f2c3ce; --on-rose: #2a1820;
    --ink: #f4eef0; --ink-muted: #b9b0b4; --hairline: #3c3638; --error: #f2b8b5;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-serif); font-size: 17px; line-height: 28px; }
img { max-width: 100%; display: block; }
a { color: var(--rose-600); }
a:hover { color: var(--rose-700); }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--rose-600); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
.display-lg, .display-md, .hero__names { font-family: var(--font-display); font-weight: 400; margin: 0; }
.display-lg { font-size: clamp(40px, 6vw, 56px); line-height: 1.05; }
.display-md { font-size: 36px; line-height: 1.15; }
.eyebrow { font-size: 13px; line-height: 16px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--rose-600); }
.eyebrow--light { color: #fff; }
.lead { font-size: 19px; line-height: 31px; max-width: 34em; margin-top: var(--space-3); }
.muted { color: var(--ink-muted); }
.caption { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.center { text-align: center; }
.rule { display: block; width: 64px; height: 1px; background: var(--rose-600); margin-top: var(--space-3); }
.rule--light { background: #fff; margin: var(--space-2) 0; }

/* Photo treatment */
.photo { filter: var(--photo-filter); }
.photo-veil { position: absolute; inset: 0; background: var(--photo-veil); mix-blend-mode: soft-light; }

/* Floating Day / Night toggle */
.theme-fab { position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 50; width: 68px; height: 68px; padding: 0;
  display: flex; align-items: center; justify-content: center; border-radius: var(--radius-arch);
  border: 1px solid var(--hairline); background: var(--paper); color: var(--rose-600);
  box-shadow: 0 12px 32px rgba(163, 80, 106, .18); cursor: pointer; transition: transform .2s ease; }
.theme-fab:hover { transform: scale(1.06); }
.theme-fab:active { transform: scale(.96); }
.theme-fab .icon { width: 30px; height: 30px; }
.theme-fab .icon-sun { display: none; }
:root[data-theme="night"] .theme-fab .icon-sun { display: block; }
:root[data-theme="night"] .theme-fab .icon-moon { display: none; }

/* Circular reveal: the new theme grows out of the button */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; color: #fff; }
.hero__media { position: absolute; inset: 0; }
.hero__img { position: absolute; inset: -6% 0; width: 100%; height: 112%; object-fit: cover; object-position: 40% 35%; will-change: transform; }
.hero__shade { position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 45% 55% at 76% 50%, rgba(58, 52, 55, .38) 0%, rgba(58, 52, 55, 0) 75%),
    linear-gradient(180deg, rgba(30, 27, 28, .35) 0%, rgba(30, 27, 28, 0) 22%, rgba(30, 27, 28, 0) 70%, rgba(30, 27, 28, .45) 100%); }
.hero__content { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--space-3); padding: 0 6vw var(--space-6) 52vw; }
.hero__names { font-size: clamp(56px, 8vw, 112px); line-height: .95; letter-spacing: -.01em; text-shadow: 0 2px 24px rgba(30, 27, 28, .35); }
.hero__date { font-size: 22px; line-height: 30px; font-weight: 600; }

/* Nav */
.nav { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); }
.nav__brand { font-family: var(--font-display); font-size: 28px; color: #fff; text-decoration: none; }
.nav__links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2) var(--space-5); }
.nav__links a { color: #fff; text-decoration: none; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; padding: 12px 0; }
.nav__links a:hover { color: var(--blush-200); }
.nav__links .nav__cta { background: #fff; color: #a3506a; padding: 12px var(--space-4); border-radius: var(--radius-arch); }
.nav__links .nav__cta:hover { background: #fcf2f3; color: #86405a; }

/* Sections */
.section { padding: var(--space-7) var(--space-4); }
.section--paper { background: var(--paper); }
.section--blush { background: var(--blush-50); }
.section--dove { background: var(--dove-100); }
.container { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: var(--space-5); }
.container--narrow { max-width: 880px; gap: 56px; }
.container--form { max-width: 560px; }
.heading { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; }

/* Venues: alternating photo + details rows */
.venues { display: flex; flex-direction: column; gap: 80px; width: 100%; max-width: 960px; }
.venue { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5) 72px; }
.venue--reverse { flex-direction: row-reverse; }
.venue__photo { flex: 1 1 280px; max-width: 400px; margin: 0 auto; }
.frame--wide .frame__inner img { aspect-ratio: 4 / 3; }
.venue__body { flex: 1 1 320px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.venue__name { font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 5vw, 44px); line-height: 1.1; margin: 0; }
.venue__rule { width: 48px; height: 1px; background: var(--rose-600); margin: 4px 0; }
.venue__time { display: flex; align-items: center; gap: 10px; font-size: 22px; line-height: 30px; font-weight: 600; }
.venue__date { display: flex; align-items: center; gap: 10px; color: var(--ink-muted); }
.venue__time .icon { color: var(--ink-muted); }
.venue__map { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: 12px; text-decoration: none; align-self: flex-start; }
.venue .venue__map { align-self: flex-start; }
@media (max-width: 720px) {
  .venue__body { align-items: center; text-align: center; }
  .venue .venue__map { align-self: center; }
  .venues { gap: var(--space-6); }
}

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Dress code palette */
.dress { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; margin-top: var(--space-3); }
.dress__row { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.dress__labels { display: flex; justify-content: space-between; gap: var(--space-3); }
.dress__label { font-size: 15px; line-height: 20px; font-weight: 600; }
.dress__swatches { display: flex; gap: 10px; }
.dress__swatches span { width: 40px; height: 40px; border-radius: var(--radius-arch); }

/* Entourage */
.roles { display: grid; gap: var(--space-5); width: 100%; }
.roles--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.roles--3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.roles--tight { gap: 0 var(--space-5); }
.role .eyebrow { margin-bottom: 12px; }

/* Form */
.card { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius-md); }
.form { width: 100%; padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.field { display: grid; gap: var(--space-1); border: 0; padding: 0; margin: 0; }
.field legend { padding: 0; margin-bottom: var(--space-1); }
.input { font: inherit; font-size: 17px; line-height: 24px; color: var(--ink); background: var(--paper); border: 1px solid var(--dove-200); border-radius: var(--radius-sm); padding: 10px var(--space-3); width: 100%; }
.input:focus { outline: 2px solid var(--rose-600); outline-offset: 1px; border-color: var(--rose-600); }
textarea.input { resize: vertical; }
.help { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.field--error .input { border-color: var(--error); }
.field--error .help { color: var(--error); }
.choice { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.choice input { accent-color: var(--rose-600); width: 18px; height: 18px; }
.form__status { text-align: center; color: var(--ink-muted); min-height: 28px; }

/* RSVP card (external form) */
.rsvp-card { width: 100%; padding: var(--space-5); display: flex; flex-direction: column; align-items: center; gap: var(--space-4); text-align: center; }
.rsvp-card .btn { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; }
.rsvp-card .btn:hover { color: var(--on-rose); }

/* Buttons */
.btn { font-family: var(--font-serif); font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: .04em; padding: 12px 40px; border-radius: var(--radius-arch); border: 1px solid transparent; cursor: pointer; align-self: center; }
.btn--primary { background: var(--rose-600); color: var(--on-rose); }
.btn--primary:hover { background: var(--rose-700); }
.btn--primary[disabled] { opacity: .6; cursor: default; }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--blush-300); padding: 10px var(--space-4); }
.btn--secondary:hover { background: var(--blush-50); }

/* Gifts */
.gifts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-4); width: 100%; max-width: 720px; }
.gift { border: 1px solid var(--hairline); border-radius: var(--radius-md); padding: 32px var(--space-4); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; }
.gift .display-md { margin-top: var(--space-3); }
.gift__name { font-weight: 600; }
.gift .btn { margin-top: var(--space-2); }
.qr { background: var(--blush-200); padding: var(--space-3); border-radius: var(--radius-md); }
.qr img, .qr__placeholder { width: 180px; height: 180px; border-radius: var(--radius-sm); background: #fff; }
.qr__placeholder { display: flex; align-items: center; justify-content: center; color: #6b6468; font-size: 14px; }

/* Our story */
.story { max-width: 640px; margin: 0 auto var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); font-size: 19px; line-height: 31px; }
.story .heading { margin-bottom: var(--space-2); }

/* Photo frames (blush mat, arch or rounded) */
.frame { background: var(--blush-200); padding: 5px; border-radius: var(--radius-md); box-shadow: var(--shadow-soft); }
.frame__inner { position: relative; overflow: hidden; border-radius: 11px; }
.frame__inner img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.frame--dove { background: var(--dove-200); }
.frame--arch { border-radius: var(--radius-arch) var(--radius-arch) var(--radius-md) var(--radius-md); }
.frame--arch .frame__inner { border-radius: var(--radius-arch) var(--radius-arch) 11px 11px; }
.frame--tall .frame__inner img { aspect-ratio: 3 / 4.6; }
.gallery { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); align-items: end; }

/* RSVP with photo */
.rsvp-layout { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: var(--space-6); align-items: center; }
.rsvp-layout .frame__inner img { object-position: 50% 100%; }

/* Footer */
.footer { background: var(--blush-50); padding: var(--space-7) var(--space-4) var(--space-6); display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; }
.footer__line { font-family: var(--font-display); font-size: clamp(40px, 6vw, 56px); line-height: 1.05; max-width: 720px; }
.footer__divider { width: 100%; max-width: 480px; height: 1px; background: var(--rose-600); opacity: .35; margin: var(--space-5) 0 var(--space-4); }
.footer__names { font-family: var(--font-display); font-size: 28px; line-height: 1.2; }
@media (max-width: 720px) { .footer { padding: var(--space-6) var(--space-3); } }
.rings circle { fill: none; stroke: var(--rose-600); stroke-width: 1; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .section { padding: var(--space-6) var(--space-3); }
  .nav { padding: var(--space-3); justify-content: center; }
  .nav__links { justify-content: center; gap: var(--space-1) var(--space-4); }
  .form { padding: var(--space-4); }
  .hero__img { object-position: 42% 35%; }
  .hero__content { justify-content: flex-end; padding: 0 var(--space-3) var(--space-6); }
  .hero__shade { background: linear-gradient(180deg, rgba(30, 27, 28, .35) 0%, rgba(30, 27, 28, 0) 25%, rgba(30, 27, 28, 0) 45%, rgba(30, 27, 28, .6) 100%); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
