:root {
  --accent: #6f715c;
  --bg: #fcfcf5;
  --card: #d7d7cc;
  --text: #41432a;
  --light-text: #fafaf2;
  --muted: #6b7280;
  --ring: rgba(141, 92, 246, .25);
  --maxw: 1100px;
  --radius: 16px;
  --shadow: 0 6px 30px rgba(0, 0, 0, .06);
  --nav-h: 64px; /* measured in JS for scroll-padding */
  --row-gap: 18px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fcfcf5;
    --card: #d7d7cc;
    --text: #41432a;
    --muted: #41432a;
    --shadow: 0 6px 30px rgba(0, 0, 0, .35);
  }
}

html {
  box-sizing: border-box;
  scroll-padding-top: var(--nav-h);
  scroll-behavior: smooth;
}

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

html, body {
  height: 100%;
}

body, button {
  font-family: "Cormorant Garamond", "Noto Serif SC", Garamond, serif;
  font-weight: 300;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  padding-top: var(--nav-h); /* offset for fixed header on desktop */
  overflow-x: hidden;
}

/* Headings */
h1 {
  font-size: 72px;
  font-weight: 300;
}

h2 {
  font-size: 1.5em;
  font-weight: 700;
  margin-block: .83em;
}

/* Layout container */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 24px;
}

/* Sections */
.section {
  scroll-margin-top: calc(var(--nav-h) + 8px);
  margin-block: 80px;
}

.section>*+* {
  margin-top: 18px;
}

/* Navbar (fixed for desktop) */
.nav-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background-color: color-mix(in oklab, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid color-mix(in oklab, var(--muted) 20%, transparent);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: relative;
}

.brand {
  font-weight: 300;
  letter-spacing: .5px;
}

.spacer {
  flex: 1;
}

/* Centered logo */
nav .logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

nav .logo img {
  max-height: 80px;
  max-width: 200px;
  width: auto;
  height: auto;
  display: block;
}

/* Tabs + language */
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tabs a {
  text-decoration: none;
  color: inherit;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  /* invisible by default */
  transition: border-color .2s ease;
}

.tabs a[aria-current="page"],
.tabs a:hover {
  border-bottom: 1px solid currentColor;
}

.lang-picker button {
  text-decoration: none;
  color: inherit;
  padding: 10px 12px;
  border: 1px solid transparent;
  background: var(--bg);
}

.lang-picker button[aria-pressed="true"] {
  background: var(--card);
  border-color: color-mix(in oklab, var(--accent) 30%, var(--card));
}

.tabs a:focus-visible,
.lang-picker button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.lang-picker button:hover {
  filter: brightness(0.95);
}

/* Grids/Cards/Buttons */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: var(--row-gap);
  column-gap: 50px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: var(--row-gap);
  column-gap: 18px;
}

.two-col {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  row-gap: var(--row-gap);
  column-gap: 18px;
}

@media (max-width: 900px) {
  .grid-2, .grid-3, .two-col {
    grid-template-columns: 1fr;
  }

  .ww-left {
    text-align: center;
  }
}

.ww-left {
  text-align: left;
  max-width: 620px;
  margin: 0 auto;
}

.ww-right iframe {
  width: 100%;
  height: 360px;
  border: 0;
  border-radius: 6px;
}

.card {
  background: transparent;
  border-radius: 0;
  padding: 10px 0;
  box-shadow: none;
}

.card-background {
  background: var(--card);
  padding: 18px;
}

.card h1 {
  margin: 0 0 .5em;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  background: var(--accent);
  color: var(--light-text);
  font-size: 12px;
}

.btn {
  display: inline-block;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--light-text);
  text-decoration: none;
}

.btn:hover {
  filter: brightness(0.7);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
}

thead {
  background: var(--accent);
  color: var(--light-text);
}

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid color-mix(in oklab, var(--muted) 25%, transparent);
}

.footer {
  padding: 36px 0;
  text-align: center;
  color: var(--muted);
}

/* Form */
form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input, select, textarea {
  border: 1px solid color-mix(in oklab, var(--muted) 35%, transparent);
  background: var(--bg);
  color: var(--text);
  padding: 12px;
  border-radius: 12px;
  font-family: "Cormorant Garamond", "Noto Serif SC", Garamond, serif;
  font-size: 1rem;
}

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.muted {
  color: var(--muted);
}

/* Countdown */
.countdown {
  --num-size: clamp(48px, 6vw, 72px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 36px;
  text-align: center;
}

.countdown .unit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown .num {
  font-size: var(--num-size);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum"1;
  display: inline-block;
  min-width: 2ch;
}

.countdown .unit:first-child .num {
  min-width: 3ch;
}

.countdown .label {
  margin-top: 12px;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* separators: before every unit after the first */
.countdown .unit+.unit {
  position: relative;
}

.countdown .unit+.unit::before {
  content: ":";
  position: absolute;
  left: -22px;
  top: 50%;
  transform: translateY(-52%);
  font-size: var(--num-size);
  line-height: 1;
  color: currentColor;
  pointer-events: none;
}

/* Animations */
@keyframes fadeInUp {
  0% {
    transform: translateY(200px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

:root {
  animation: 1.5s fadeInUp;
}

.full-bleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Banners */
.banner {
  position: relative;
  height: var(--banner-h);
  overflow: clip;
}

.banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner .overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: inherit;
  text-align: inherit;
}

.banner .card-background {
  max-width: 980px;
  width: 100%;
  padding: 36px;
  text-align: left;
  background-color: #fcfcf4;
}

.divider {
  border: none;
  height: 1px;
  background: #41432a;
  margin: 40px auto;
  width: 80%;
}

/* Collapsible */
.collapsible {
  display: grid;
  grid-template-rows: 1fr;
  overflow: clip;
  transition: grid-template-rows 520ms cubic-bezier(.2, .7, .2, 1), opacity 400ms ease;
  opacity: 1;
}

.collapsible.is-closed {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.collapsible>.collapsible__inner {
  min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  .collapsible {
    transition: none !important;
  }
}

.collapse-block {
  margin-block: 0;
}

/* Spacing in collapsibles (mainly for RSVP form) */
.collapsible__inner> :not(:first-child) {
  margin-top: var(--row-gap);
}

/* Grids manage their own gaps—avoid extra margins on grid children */
.grid-2>*, .grid-3>*, .two-col>* {
  margin: 0;
}

.collapse-block[data-collapse-mode="flow"].is-closed {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* Mobile settings */
@media (max-width: 600px) {
  /* stop page slide-down (caused blank space) */
  :root {
    animation: none;
    --row-gap: 12px;
  }

  /* Set navbar to disappear on mobile */
  .nav-wrap {
    position: sticky;
    top: 0;
    margin: 0;
    padding: 8px 0;
  }

  .nav-wrap .container {
    padding: 8px 16px 10px;
  }

  nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    min-height: auto;
  }

  .spacer {
    display: none;
  }

  nav .logo {
    position: static;
    transform: none;
    margin: 4px 0 6px;
  }

  nav .logo img {
    max-height: 44px;
    width: auto;
    height: auto;
    display: block;
  }

  /* tabs wrap neatly; hide scrollbar line */
  .tabs {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    margin: 0;
    overflow: visible;
  }

  .tabs a {
    padding: 6px 8px;
    white-space: nowrap;
    border-bottom-width: 1px;
  }

  /* no fixed-header offset needed on mobile */
  body {
    padding-top: 0;
  }

  /* countdown tweaks */
  .countdown {
    --num-size: clamp(32px, 10vw, 48px);
    gap: 18px;
  }

  .countdown .label {
    margin-top: 10px;
    font-size: 12px;
  }

  .countdown .unit+.unit::before {
    left: -14px;
  }

  /* h1 scale on phones */
  h1 {
    font-size: 36px;
  }

  /* images safe */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  .banner-form .overlay {
    padding: 2rem 1rem;
  }

  .banner-form .card-background {
    padding: 1.5rem;
  }
}

/* Tablet downscale for h1 */
@media (max-width: 900px) {
  h1 {
    font-size: 48px;
  }
}

/* Restore form/card overlay on the banner-form page */
.banner-form {
  position: relative;
  min-height: 100vh;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Center the card on top of the image */
.banner-form .overlay {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 4rem 1rem;
}

/* Translucent card with rounding + shadow */
.banner-form .card-background {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  background: rgba(255, 255, 246, 0.85);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  text-align: center;
}

/* RSVP form labels: left-align text */
#rsvp-form label {
  text-align: left;
  font-weight: 600;
}