/* ===========================
   ROOT TOKENS
   =========================== */
:root {
  /* Palette */
  --snow: #f7f3ea;
  --snow-soft: rgba(247, 243, 234, 0.9);
  --forest: #2c4a3b;
  --forest-soft: rgba(44, 74, 59, 0.5);
  --moss: #4e6b54;
  --gold: #c8a96b;

  /* Neutrals */
  --ink: #1e2723;

  /* Layout */
  --radius: 18px;
  --radius-pill: 999px;
  --shadow-soft: 2px 5px 4px rgba(0, 0, 0, 0.7);

  /* Typography */
  --font-sans: "Raleway", sans-serif;

  /* Header height (matches your fixed banner) */
  --header-h: 10vh;

  /* Glass and borders */
  --glass-forest: rgba(44, 74, 59, 0.82);
  --glass-forest-strong: rgba(44, 74, 59, 0.94);
  --glass-snow-weak: rgba(247, 243, 234, 0.08);
  --glass-snow-hover: rgba(247, 243, 234, 0.14);
  --glass-snow-active: rgba(247, 243, 234, 0.22);
  --gold-border-25: rgba(200, 169, 107, 0.25);
  --gold-border-35: rgba(200, 169, 107, 0.35);
  --gold-border-45: rgba(200, 169, 107, 0.45);
  --gold-border-65: rgba(200, 169, 107, 0.65);

  /* Blur */
  --blur-1: 4px;
  --blur-2: 10px;

  /* Additional color tokens */
  --black-18: rgba(0, 0, 0, 0.18);
  --black-22: rgba(0, 0, 0, 0.22);
  --black-25: rgba(0, 0, 0, 0.25);
  --black-28: rgba(0, 0, 0, 0.28);
  --black-35: rgba(0, 0, 0, 0.35);
  --black-50: rgba(0, 0, 0, 0.5);

  --snow-06: rgba(247, 243, 234, 0.06);
  --snow-10: rgba(247, 243, 234, 0.1);
  --snow-65: rgba(247, 243, 234, 0.65);
  --snow-75: rgba(247, 243, 234, 0.75);
  --snow-78: rgba(247, 243, 234, 0.78);
  --snow-82: rgba(247, 243, 234, 0.82);
  --snow-85: rgba(247, 243, 234, 0.85);
  --snow-88: rgba(247, 243, 234, 0.88);
  --snow-90: rgba(247, 243, 234, 0.9);
  --snow-95: rgba(247, 243, 234, 0.95);

  --ink-75: rgba(30, 39, 35, 0.75);
  --ink-78: rgba(30, 39, 35, 0.78);

  --forest-05: rgba(44, 74, 59, 0.05);
  --forest-06: rgba(44, 74, 59, 0.06);
  --forest-12: rgba(44, 74, 59, 0.12);
  --forest-28: rgba(44, 74, 59, 0.28);
  --forest-92: rgba(44, 74, 59, 0.92);

  --gold-18: rgba(200, 169, 107, 0.18);
  --gold-border-80: rgba(200, 169, 107, 0.8);
  --gold-border-85: rgba(200, 169, 107, 0.85);

  --bg-dark: #111;
  --success: #b8f2c2;
  --error: #ffd1d1;
}

/* ===========================
   FONT FACE (self-hosted Raleway VF)
   =========================== */
@font-face {
  font-family: "Raleway";
  src: url("/assets/fonts/raleway-vf.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

/* ===========================
   GLOBAL RESET / BASE
   =========================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--snow);
}

/* Fixed header offset for anchor jumps + prevents section content under the banner */
section[id] {
  scroll-margin-top: var(--header-h);
  padding-top: var(--header-h);
}

a {
  color: var(--snow);
  text-decoration: none;
  font-weight: bold;
}
a:hover {
  color: var(--snow-soft);
}
a:active,
a:focus {
  color: var(--moss);
}

/* Content links on light backgrounds (Info page, etc.) */
section.section-snow a,
section.section-snow a:visited {
  color: var(--forest) !important;
  text-decoration: underline;
}
section.section-snow a:hover,
section.section-snow a:focus {
  color: var(--moss) !important;
}
section.section-snow a:active {
  color: var(--moss) !important;
}

/* ===========================
   GRID HELPERS
   =========================== */

.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

.grid-one-third {
  grid-column: auto / span 4;
}
.grid-half {
  grid-column: auto / span 6;
}
.grid-two-thirds {
  grid-column: auto / span 8;
}
.grid-three-fourths {
  grid-column: auto / span 9;
}
.grid-one-sixth {
  grid-column: auto / span 2;
}
.grid-five-sixth {
  grid-column: auto / span 10;
}

.grid-start-first {
  grid-column-start: 1;
}
.grid-start-second {
  grid-column-start: 2;
}
.grid-start-third {
  grid-column-start: 3;
}
.grid-start-fourth {
  grid-column-start: 4;
}
.grid-start-fifth {
  grid-column-start: 5;
}
.grid-start-half {
  grid-column-start: 7;
}
.grid-start-two-thirds {
  grid-column-start: 9;
}
.grid-start-three-fourths {
  grid-column-start: 10;
}

/* ===========================
   NAVBAR (modern + responsive)
   =========================== */

.banner.navbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;

  width: 100%;
  min-height: var(--header-h);

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  padding: 0 2vw;
  background: var(--glass-forest); /* forest, slightly translucent */
  backdrop-filter: blur(var(--blur-2));
  border-bottom: 1px solid var(--gold-border-35);
  box-shadow: 0 10px 24px var(--black-25);
}

/* Left brand */
.banner.navbar .navbar__brand {
  grid-column: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Right user area */
.banner.navbar .navbar__user {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 1rem;
  align-items: center;
  white-space: nowrap;
}

/* Center menu as pill */
.menu {
  grid-column: 2;
  padding: 0.35rem;
  border-radius: var(--radius-pill);
  background: var(--glass-snow-weak);
  border: 1px solid var(--gold-border-35);
}

.menu__list {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu__item {
  display: contents;
}

/* Links as “chips” */
.navbar .menu a {
  color: var(--snow);
  font-weight: 650;
  font-size: 0.95rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-pill);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

/* Hide items marked mobile-only on desktop */
.menu__item--mobile-only {
  display: none;
}

.navbar .menu a:hover {
  background: var(--glass-snow-hover);
  transform: translateY(-1px);
}

/* visible keyboard focus */
.navbar .menu a:focus-visible,
.nav-toggle:focus-visible,
.site-user__logout:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.navbar .menu a.active {
  background: var(--glass-snow-active);
  color: var(--snow);
  border: 1px solid var(--gold-border-45);
}

/* Hamburger (hidden on desktop) */
.nav-toggle {
  display: none;
  grid-column: 2;
  justify-self: center;

  width: 44px;
  height: 44px;
  border-radius: 12px;

  background: var(--glass-snow-weak);
  border: 1px solid var(--gold-border-35);
  box-shadow: 0 8px 18px var(--black-18);

  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  background: var(--snow);
  border-radius: var(--radius-pill);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    top 0.2s ease;
}

.nav-toggle span:nth-child(1) {
  top: 14px;
}
.nav-toggle span:nth-child(2) {
  top: 21px;
}
.nav-toggle span:nth-child(3) {
  top: 28px;
}

/* Animated X state */
.nav-toggle.is-open span:nth-child(1) {
  transform: translateX(-50%) rotate(45deg);
  top: 21px;
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateX(-50%) rotate(-45deg);
  top: 21px;
}

/* ===========================
   MOBILE
   =========================== */

@media (max-width: 900px) {
  .banner.navbar {
    grid-template-columns: 1fr auto 1fr;
    padding: 0 4vw;
  }

  /* show hamburger, hide pill menu by default */
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 11;

    display: none; /* closed by default */

    padding: 1rem 4vw 2.4rem; /* more bottom padding to avoid overlap */
    border-radius: 0 0 18px 18px;

    background: var(--glass-forest-strong);
    border-top: 1px solid var(--gold-border-35);
    border-bottom: 1px solid var(--gold-border-35);

    /* allow long menus without overlapping content */
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;

    box-shadow: 0 18px 40px var(--black-35);
  }

  .menu.menu--open {
    display: block;
  }

  /* hide mobile-only menu items on desktop (outside media query they default to contents) */
  .menu__item--mobile-only {
    display: none;
  }

  .menu__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem; /* increased gap to prevent overlap */
  }

  /* show mobile-only items inside the dropdown */
  .menu__item--mobile-only {
    display: block;
  }

  /* on narrow screens keep greeting visible, hide only the Logout (duplicated inside menu) */
  .banner.navbar .site-user__logout {
    display: none;
  }

  .navbar .menu a {
    width: 100%;
    text-align: center;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: var(--snow-10);

    border: 1px solid var(--gold-border-25);
  }

  /* tighten left/right blocks */
  .banner.navbar .navbar__brand {
    font-size: 0.95rem;
  }
  .banner.navbar .navbar__user {
    gap: 0.75rem;
    font-size: 0.9rem;
  }

  .site-user__logout {
    padding: 0.45rem 0.7rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--gold-border-35);
    background: var(--glass-snow-weak);
  }
}
/* ===========================
   NAV "COMING SOON" BADGE
   =========================== */

.navbar .menu a.is-soon {
  position: relative;
  opacity: 0.65;
  pointer-events: none; /* disable click */
}

/* small gold badge */
.navbar .menu a.is-soon::after {
  content: "in arrivo";
  position: absolute;
  top: -6px;
  right: -6px;

  font-size: 0.4rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;

  color: var(--forest);
  background: var(--gold);
  border: 1px solid var(--gold-border-35);

  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px var(--black-25);
}

/* ===========================
   SPOSI HERO (image left + card right, partial overlap)
   =========================== */

.sposi-hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  padding: 0 0 2vh;
}

.sposi-photo {
  min-height: 72vh;
  background-image: url("/assets/carloeginny.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  border: 1px solid var(--gold);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius);

  margin-right: 2rem;
}

.sposi-frame {
  background-color: var(--snow-78);
  border: 1px solid var(--gold-border-65);
  box-shadow: 0 18px 45px var(--black-22);
  border-radius: var(--radius);

  padding: 2.25rem 2.5rem;
  max-width: 520px;

  margin-left: -4rem; /* overlap onto the photo */
  z-index: 2;

  backdrop-filter: blur(var(--blur-1));
}
.sposi-heading {
  text-align: center;
  margin-bottom: 1.5rem;
}

.sposi-date {
  color: var(--forest-soft);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

/* subtle divider */
.sposi-date::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: var(--forest-soft);
  margin: 0.8rem auto 0;
}

.sposi-names {
  color: var(--ink);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.04em;
  margin-top: 0.8rem;
}

.sposi-text h2 {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 1rem 0 0.85rem;
  text-align: left;
}

.sposi-text p {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.75;
  margin-bottom: 0.9rem;
  text-align: left;
}

@media (max-width: 900px) {
  .sposi-hero {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .sposi-photo {
    min-height: 48vh;
    margin-right: 0;
  }

  .sposi-frame {
    margin-left: 0; /* disable overlap on small screens */
    max-width: 100%;
  }
}

/* ===========================
   LOCATION SECTION (vertical overlap cards)
   =========================== */

/* IMPORTANT: location should behave like a normal section, not a centered full-screen hero */
#location .location {
  min-height: auto;
  height: auto;
  display: grid; /* ensure grid layout */
  align-items: stretch;
  justify-content: stretch;
  padding-top: 0; /* section already has padding-top via section[id] */
}

/* two cards side by side */
.location {
  grid-template-columns: 1fr 1fr;
  display: grid;
  gap: 2rem;
  align-items: stretch;
}

/* card wrapper */
.location > div {
  border: 1px solid var(--gold);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* image top */
.location .box-image {
  height: 24vh;
  min-height: 200px;
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
}

/* images */
.madesimo-img {
  background-image: url("/assets/madesimo.jpeg");
}
.montespluga-img {
  background-image: url("/assets/montespluga.jpeg");
}

/* overlapped body */
.location .card-body {
  flex: 1; /* equal-height bodies */
  background-color: var(--forest-soft);
  border-top: 1px solid rgba(200, 169, 107, 0.65);
  padding: 1.4rem 1.7rem 1.7rem;

  margin-top: -3rem; /* vertical overlap */
  border-radius: 16px 16px 0 0;

  position: relative;
  z-index: 2;

  backdrop-filter: blur(var(--blur-1));

  /* prevents text from being cut on shorter viewports */
  overflow: auto;
  scrollbar-gutter: stable;
}

.location .card-body h3 {
  color: var(--snow);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.location .card-body p {
  color: var(--snow);
  line-height: 1.7;
  text-align: justify;
}
/* ===========================
   PROGRAMMA (snow + timeline)
   =========================== */

.section-snow {
  background: var(--snow);
}

.programma {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 0 0 4vh;
}

/* Photo panel (uses your attached jpg) */
.programma-photo {
  min-height: 72vh;
  background-image: url("/assets/chiesa_madesimo_style.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* Snow-glass frame overlaps the photo */
.programma-frame {
  background: var(--snow-82);
  border: 1px solid var(--gold-border-65);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px var(--black-18);
  backdrop-filter: blur(var(--blur-1));

  padding: 2.2rem 2.3rem;
  max-width: 560px;

  margin-left: -4rem; /* overlap */
  position: relative;
  z-index: 2;
}

.programma-heading {
  text-align: left;
  margin-bottom: 1.4rem;
}

.programma-kicker {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.programma-title {
  color: var(--ink);
  font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 0.55rem;
}

.programma-subtitle {
  color: var(--ink-75);
  line-height: 1.6;
}

/* Timeline layout */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

/* Each row: time | dot/line | content */
.timeline__item {
  display: grid;
  grid-template-columns: 4.5rem 1.2rem 1fr;
  column-gap: 1rem;
  align-items: start;
  position: relative;
  padding: 0.5rem 0;
}

.timeline__time {
  color: var(--ink-75);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  text-align: right;
  padding-top: 0.1rem;
}

/* Dot + vertical line */
.timeline__dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--gold);
  margin-top: 0.25rem;
  position: relative;
}

.timeline__item:not(:last-child) .timeline__dot::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% + 14px);
  background: var(--gold-border-45);
}

/* Content */
.timeline__title {
  color: var(--ink);
  font-weight: 800;
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.25rem;
}

.timeline__icon {
  width: 1.6rem;
  height: 1.6rem;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: var(--gold-18);
  border: 1px solid var(--gold-border-35);
}

.timeline__meta {
  color: var(--ink-78);
  line-height: 1.65;
}

/* ===========================
   RSVP (forest theme + photo)
   =========================== */

.section-forest {
  background:
    radial-gradient(
      1200px 600px at 20% 10%,
      var(--gold-border-25),
      transparent 60%
    ),
    linear-gradient(180deg, var(--forest-12), var(--forest-06));
}

.rsvp {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 2rem;
  padding: 0 0 4vh;
}

/* Left photo panel (your cute image) */
.rsvp-photo {
  min-height: 72vh;
  background-image: url("/assets/athena_rsvp.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

/* subtle forest overlay so it blends with the theme */
.rsvp-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, var(--forest-28), var(--forest-05));
}

/* Form “glass” card */
.rsvp-frame {
  background: var(--glass-forest);
  border: 1px solid var(--gold-border-65);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px var(--black-22);
  backdrop-filter: blur(var(--blur-1));

  padding: 2.2rem 2.3rem;
  max-width: 620px;

  margin-left: -4rem; /* overlap onto the photo */
  position: relative;
  z-index: 2;
  color: var(--snow);
}

.rsvp-kicker {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.rsvp-title {
  font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 0.55rem;
}

.rsvp-subtitle {
  color: var(--snow-88);
  line-height: 1.6;
}

/* Form layout */
.rsvp-form {
  margin-top: 1.4rem;
}

.rsvp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.2rem;
  align-items: start;
}

.rsvp-field {
  display: grid;
  gap: 0.45rem;
}
.rsvp-field--inline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
}

.rsvp-field label {
  color: var(--snow-95);
  letter-spacing: 0.02em;
}

.rsvp-field input,
.rsvp-field select,
.rsvp-field textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;

  background: rgba(247, 243, 234, 0.08);
  color: var(--snow);

  border: 1px solid var(--gold-border-35);
  outline: none;
}

.rsvp-field textarea {
  resize: vertical;
}

/* Transfer block */
.rsvp-transfer {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.4rem;
  background: rgba(247, 243, 234, 0.06);
  border: 1px solid var(--gold-border-35);
  border-radius: var(--radius);
  padding: 0.9rem;
}
.rsvp-transfer__title {
  color: var(--snow-95);
}
.rsvp-transfer__content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 0.7rem;
  align-items: start;
}
.rsvp-transfer__content label {
  color: var(--snow-90);
  line-height: 1.55;
}

.rsvp-field input::placeholder,
.rsvp-field textarea::placeholder {
  color: var(--snow-65);
}

.rsvp-field input:focus-visible,
.rsvp-field select:focus-visible,
.rsvp-field textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.rsvp-actions {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.8rem;
  margin-top: 0.2rem;
}

.rsvp-submit {
  justify-self: start;

  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-pill);

  background: var(--gold);
  color: var(--forest);
  font-weight: 800;
  border: 1px solid var(--gold-border-80);

  cursor: pointer;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.rsvp-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.rsvp-note {
  color: var(--snow-85);
  line-height: 1.55;
  margin: 0;
}

/* Guests block */
.rsvp-guests {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.8rem;
  margin-top: 0.2rem;
}

.rsvp-guests-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.rsvp-add-person {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(247, 243, 234, 0.1);
  border: 1px solid var(--gold-border-35);
  color: var(--snow);
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.rsvp-add-person:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.rsvp-guests-list {
  display: grid;
  gap: 0.85rem;
}

/* Each guest card */
.rsvp-guest {
  border: 1px solid var(--gold-border-35);
  background: rgba(247, 243, 234, 0.06);
  border-radius: var(--radius);
  padding: 0.9rem;
}

.rsvp-guest-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.rsvp-guest-title {
  color: var(--snow-95);
  font-weight: 800;
}

.rsvp-remove-person {
  background: transparent;
  border: 1px solid var(--gold-border-35);
  color: rgba(247, 243, 234, 0.9);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
}

.rsvp-guest-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

/* ===========================
   AUTH PAGES (landing/login/register/logout)
   =========================== */

.auth-hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) * 0.6) 5vw 6vh;

  /* Remove green overlay; use clean photo */
  background-image: url("/assets/montespluga.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  position: relative;
  overflow: hidden;
}

/* Cinematic dark vignette overlay */
.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      1000px 600px at 50% 35%,
      rgba(0, 0, 0, 0) 55%,
      rgba(0, 0, 0, 0.5) 100%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

/* Optional: if you want a mountain photo behind, uncomment and set the URL
.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/assets/madesimo.jpeg");
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  filter: saturate(0.9) contrast(1.05);
}
*/

.auth-hero__content {
  width: min(980px, 100%);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(720px, 100%);
  border-radius: var(--radius);
  border: 1px solid var(--gold-border-65);
  background: var(--snow-10);
  box-shadow: 0 18px 45px var(--black-28);
  backdrop-filter: blur(var(--blur-2));
  overflow: hidden;
}

/* variant you already use in logout/register */
.auth-card--registry {
  background: var(--glass-forest);
  border-color: var(--gold-border-65);
}

.auth-card__inner {
  padding: clamp(1.2rem, 2.2vw, 2rem);
  color: var(--snow);
  font-size: 0.9rem;
}

.auth-title {
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}

.auth-subtitle {
  color: var(--snow-85);
  margin-bottom: 1.1rem;
  line-height: 1.6;
  font-size: 0.9rem;
}

.auth-note {
  color: var(--snow-85);
  line-height: 1.6;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin-top: 1.2rem;
}

.auth-links a {
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(247, 243, 234, 0.08);
  border: 1px solid var(--gold-border-35);
}

/* Form */
.form-group {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.form-group label {
  color: var(--snow-95);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.form-control {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: rgba(247, 243, 234, 0.08);
  color: var(--snow);
  border: 1px solid var(--gold-border-35);
  outline: none;
}

.form-control:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-pill);
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;

  transition:
    transform 0.2s ease,
    filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.btn-primary {
  background: var(--gold);
  color: var(--forest);
  border-color: rgba(200, 169, 107, 0.85);
}

.btn-wide {
  width: 100%;
}

/* Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.form-hint {
  color: rgba(247, 243, 234, 0.75);
  font-size: 0.8rem;
}

.text-success {
  color: var(--success);
}

.text-error {
  color: var(--error);
}

/* ===========================
   INFO PAGE VISUAL CARDS
   =========================== */
.info-card-wrap {
  border: 1px solid var(--gold);
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.info-image {
  height: 24vh;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
}
.info-card {
  background: var(--snow-78);
  border-top: 1px solid var(--gold-border-65);
  border-radius: 16px 16px 0 0;
  padding: 1.4rem 1.7rem 1.7rem;
  margin-top: -3rem; /* overlap image */
  position: relative;
  z-index: 2;
  backdrop-filter: blur(var(--blur-1));
  color: var(--ink);
}
.info-card > * + * { margin-top: 0.7rem; }
.info-card h2, .info-card h3 { color: var(--ink); }
.info-card a { text-decoration: underline; }
.info-card ul { padding-left: 1.2rem; }
.info-card li + li { margin-top: 0.3rem; }

/* Image variants */
.info-img-arrivare { background-image: url("/assets/come_arrivare.jpg"); }
.info-img-dormire  { background-image: url("/assets/dove_dormire.jpg"); }
.info-img-chiesa   { background-image: url("/assets/chiesa_madesimo_style.png"); }
.info-img-capriata { background-image: url("/assets/montespluga.jpg"); }
.info-img-lista    { background-image: url("/assets/lista-nozze.png"); }

@media (max-width: 900px) {
  .info-image { min-height: 180px; }
  .info-card { margin-top: -2.4rem; }
}

/* ===========================
   INFO PAGE: LEFT PHOTO + RIGHT CARD
   =========================== */
.info-split {
  min-height: 80vh;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 2rem;
  padding: 0 0 4vh;
}
.info-photo {
  min-height: 60vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.info-frame {
  background: var(--snow-82);
  border: 1px solid var(--gold-border-65);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px var(--black-18);
  backdrop-filter: blur(var(--blur-1));
  padding: 2.2rem 2.5rem;
  max-width: 560px;
  margin-left: -4rem; /* overlap onto the photo */
  position: relative;
  z-index: 2;
  color: var(--ink);
}
.info-frame h2 { margin-top: 0; }

/* Variants */
.info-arrivare { background-image: url("/assets/come_arrivare.jpg"); }
.info-dormire  { background-image: url("/assets/dove_dormire.jpg"); }
.info-chiesa   { background-image: url("/assets/chiesa_madesimo_style.png"); }
.info-capriata { background-image: url("/assets/montespluga.jpg"); }
.info-lista    { background-image: url("/assets/lista-nozze.png"); }

@media (max-width: 900px) {
  .info-split {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .info-photo {
    min-height: 42vh;
  }
  .info-frame {
    margin-left: 0;
    max-width: 100%;
  }
}

/* Subtle callout inside info-frame */
.info-callout {
  background: var(--snow-88);
  border: 1px solid var(--gold-border-35);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem; /* spacing before next paragraph */
}
.info-callout > * + * { margin-top: 0.6rem; }

/* Readability tweaks for info page */
.info-frame p,
.info-frame li {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.75;
}
.info-frame ul { padding-left: 1.2rem; }
.info-frame li + li { margin-top: 0.25rem; }
.info-frame h2 { margin-bottom: 0.6rem; }
.info-frame h3 { margin-top: 1.1rem; }

/* Emphasized intro card on Info page */
.info-intro {
  background: var(--snow-90);
  border: 1px solid var(--gold-border-65);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px var(--black-22);
  padding: 2rem 2.3rem;
  margin-top: 1.2rem;
}
.info-intro h1 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  letter-spacing: 0.02em;
}
.info-intro p {
  font-size: 1.06rem;
  line-height: 1.8;
  color: var(--ink-78);
  margin-top: 0.6rem;
}

/* ===========================
   PAGES: errors (401/404)
   =========================== */
.error-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #111;
}
.error-wrapper img {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  display: block;
}
.error-caption {
  margin-top: 0.8rem;
  color: var(--snow);
  font-size: 0.9rem;
  text-align: center;
}
.error-caption a {
  color: var(--snow);
  text-decoration: underline;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 900px) {
  .location {
    grid-template-columns: 1fr;
  }

  .location .box-image {
    height: 30vh;
    min-height: 200px;
  }

  .location .card-body {
    margin-top: -2.4rem;
  }
  .programma {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .programma-photo {
    min-height: 42vh;
  }

  .programma-frame {
    margin-left: 0; /* disable overlap */
    max-width: 100%;
  }

  .timeline__item {
    grid-template-columns: 4rem 1.2rem 1fr;
  }
  .rsvp {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .rsvp-photo {
    min-height: 42vh;
  }

  .rsvp-frame {
    margin-left: 0; /* disable overlap on small screens */
    max-width: 100%;
  }

  .rsvp-grid {
    grid-template-columns: 1fr;
  }

  .rsvp-submit {
    width: 100%;
    justify-self: stretch;
    text-align: center;
  }
  .rsvp-guest-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .auth-links {
    flex-direction: column;
    align-items: stretch;
  }
  .auth-links a {
    text-align: center;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion: respect user preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Password visibility toggle */
.pw-wrap { position: relative; }
.pw-wrap > .form-control { padding-right: 2.75rem; }
.pw-toggle {
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  z-index: 2;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
  -webkit-tap-highlight-color: transparent;
}
.pw-toggle:hover,
.pw-toggle[aria-pressed="true"] { color: var(--snow); }
.pw-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: .25rem; }
.pw-toggle .off { display: none; }
.pw-toggle[aria-pressed="true"] .on { display: none; }
.pw-toggle[aria-pressed="true"] .off { display: inline; }

/* Backdrop fallback for browsers without support */
@supports not (backdrop-filter: blur(1px)) {
  .banner.navbar {
    background: rgba(44, 74, 59, 0.92);
  }
  .menu,
  .location .card-body,
  .sposi-frame {
    background-color: rgba(247, 243, 234, 0.9);
  }
}
