:root {
  --color-bg: #f3d8bf;
  --color-bg-alt: #ecd0b2;
  --color-card: rgba(252, 247, 239, 0.92);
  --color-card-strong: rgba(252, 247, 239, 0.98);
  --color-clay: #c9774f;
  --color-olive: #24382f;
  --color-sea: #6db5aa;
  --color-sand: #f0c56c;
  --color-ink: #162018;
  --color-muted-ink: #687067;
  --color-accent: var(--color-clay);
  --color-accent-strong: var(--color-olive);
  --color-text: var(--color-ink);
  --color-muted: var(--color-muted-ink);
  --color-border: rgba(36, 56, 47, 0.12);
  --color-white: #fffdf8;
  --shadow-soft: 0 24px 66px rgba(24, 35, 28, 0.1);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% 10%, rgba(109, 181, 170, 0.26) 0 8px, transparent 9px),
    radial-gradient(circle at 84% 10%, rgba(109, 181, 170, 0.26) 0 8px, transparent 9px),
    radial-gradient(circle at 50% 0%, rgba(240, 197, 108, 0.54), transparent 38%),
    linear-gradient(180deg, #f6d4b1 0%, #f2ccab 36%, #f6e0c8 100%);
}

body.site-locked {
  overflow: hidden;
}

.site-shell {
  min-height: 100vh;
}

.site-locked .site-shell {
  display: none;
}

.password-gate {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.52), transparent 42%),
    linear-gradient(180deg, rgba(246, 214, 183, 0.96), rgba(246, 224, 200, 0.98));
}

.password-gate[hidden] {
  display: none !important;
}

.password-gate-card {
  width: min(560px, 100%);
  padding: clamp(1.5rem, 4vw, 2.3rem);
  display: grid;
  gap: 1rem;
  text-align: left;
}

.password-gate-card h1 {
  max-width: 11ch;
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  line-height: 0.9;
}

.password-gate-copy {
  margin: 0;
  max-width: 36rem;
  color: var(--color-muted-ink);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
}

.password-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.password-label {
  font-weight: 700;
  color: var(--color-olive);
}

.password-form input {
  background: rgba(255, 252, 245, 0.98);
  border-color: rgba(36, 56, 47, 0.18);
}

.password-submit {
  width: fit-content;
  min-width: 9rem;
}

.password-status {
  min-height: 1.35em;
  margin: 0;
  font-weight: 700;
}

.password-status.success {
  color: #2f6c48;
}

.password-status.error {
  color: #8f4b38;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(135deg, transparent 0 47.2%, rgba(109, 181, 170, 0.58) 47.2% 50%, transparent 50%),
    linear-gradient(225deg, transparent 0 47.2%, rgba(109, 181, 170, 0.58) 47.2% 50%, transparent 50%),
    linear-gradient(45deg, transparent 0 47.2%, rgba(109, 181, 170, 0.58) 47.2% 50%, transparent 50%),
    linear-gradient(315deg, transparent 0 47.2%, rgba(109, 181, 170, 0.58) 47.2% 50%, transparent 50%),
    linear-gradient(rgba(24, 35, 28, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 35, 28, 0.028) 1px, transparent 1px);
  background-size: 25rem 25rem, 25rem 25rem, 25rem 25rem, 25rem 25rem, 58px 58px, 58px 58px;
  background-position: top left, top right, bottom left, bottom right, center, center;
  opacity: 0.25;
  z-index: -1;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.inline-icon {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
}

.card-panel {
  background: rgba(252, 247, 239, 0.88);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(36, 56, 47, 0.1);
  box-shadow: var(--shadow-soft);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(246, 214, 183, 0.8);
  border-bottom: 1px solid rgba(36, 56, 47, 0.08);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  min-height: 84px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}

.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--color-olive), #354d42);
  color: var(--color-white);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.logo-text {
  line-height: 1.04;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.85rem, 2vw, 1.8rem);
  font-weight: 600;
  color: var(--color-muted-ink);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--color-olive);
}

.btn {
  border-radius: 999px;
  padding: 0.78rem 1.25rem;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.btn-ghost {
  background: transparent;
  color: var(--color-olive);
  border-color: rgba(36, 56, 47, 0.18);
}

.btn-solid {
  background: linear-gradient(135deg, #24382f, #315044);
  color: var(--color-white);
  box-shadow: 0 18px 30px rgba(36, 56, 47, 0.14);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 2rem;
  align-items: center;
  position: relative;
}

.hero-grid::before {
  content: "";
  position: absolute;
  top: -1.4rem;
  right: 14%;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffcf45 0 42%, rgba(255, 207, 69, 0.15) 43% 100%);
  box-shadow: 0 0 0 0.6rem rgba(109, 181, 170, 0.25);
  pointer-events: none;
}

.hero-grid::after {
  content: "";
  position: absolute;
  top: 0.9rem;
  right: 3%;
  width: 5rem;
  height: 5rem;
  background: conic-gradient(from 0deg, #c9774f 0 8deg, transparent 8deg 16deg, #c9774f 16deg 24deg, transparent 24deg 32deg, #c9774f 32deg 40deg, transparent 40deg 48deg, #c9774f 48deg 56deg, transparent 56deg 64deg, #c9774f 64deg 72deg, transparent 72deg 80deg, #c9774f 80deg 88deg, transparent 88deg 100%);
  filter: drop-shadow(0 10px 18px rgba(24, 35, 28, 0.1));
  pointer-events: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(3.35rem, 8vw, 7.8rem);
  line-height: 0.88;
  max-width: 8ch;
  margin: 0.2rem 0 1rem;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

h2 {
  font-size: clamp(2.2rem, 4.4vw, 4.8rem);
  line-height: 0.96;
}

h3 {
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  line-height: 1.04;
}

.eyebrow {
  margin: 0 0 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-clay);
}

.hero-subtitle,
.section-text,
.about-copy p,
.lineup-card p,
.tip-card p,
.rsvp-intro {
  font-size: clamp(1rem, 1.05vw, 1.12rem);
  color: var(--color-muted-ink);
}

.hero-copy {
  display: grid;
  gap: 1rem;
}

.hero-subtitle {
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
  max-width: 32ch;
  margin: 0;
  color: var(--color-text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  padding-top: 0.7rem;
  color: var(--color-olive);
  font-weight: 700;
}

.hero-note span + span {
  position: relative;
  padding-left: 1rem;
}

.hero-note span + span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 1px;
  height: 1rem;
  background: rgba(36, 56, 47, 0.22);
}

.hero-aside {
  display: grid;
  gap: 1rem;
}

.hero-media {
  margin: 0;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(36, 56, 47, 0.1);
  position: relative;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 0.8rem;
  border: 2px solid rgba(109, 181, 170, 0.52);
  border-radius: 20px;
  pointer-events: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 5 / 6;
}

.hero-card {
  padding: 1.15rem 1.2rem;
  border-radius: 22px;
  display: grid;
  gap: 0.35rem;
  background: rgba(251, 244, 233, 0.98);
}

.card-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--color-clay);
}

.about-disclosure,
.countdown-panel,
.rsvp-card {
  padding: 2rem;
}

.about-disclosure,
.countdown-panel,
.rsvp-card,
.map-layout {
  position: relative;
  overflow: hidden;
}

.about-disclosure::before,
.countdown-panel::before,
.rsvp-card::before,
.map-layout::before {
  content: "";
  position: absolute;
  inset: 0.9rem;
  border: 1px solid rgba(109, 181, 170, 0.34);
  border-radius: calc(var(--radius-lg) - 10px);
  pointer-events: none;
}

.about-disclosure summary {
  list-style: none;
  display: grid;
  gap: 0.4rem;
  cursor: pointer;
  padding-bottom: 0.75rem;
}

.about-disclosure summary::-webkit-details-marker {
  display: none;
}

.about-disclosure summary::after {
  content: "";
  width: 1rem;
  height: 1rem;
  justify-self: end;
  align-self: start;
  border-right: 2px solid var(--color-olive);
  border-bottom: 2px solid var(--color-olive);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  margin-top: 0.2rem;
}

.about-disclosure[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 0.6rem;
}

.summary-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 3.2vw, 3.3rem);
  line-height: 1;
  color: var(--color-text);
}

.about-copy {
  display: grid;
  gap: 1rem;
  padding-top: 0.5rem;
}

.section-heading {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
}

.section-heading.compact {
  max-width: 42rem;
}

.section-heading.left-aligned {
  text-align: left;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.countdown-item {
  padding: 1rem;
  border-radius: 22px;
  background: rgba(247, 222, 178, 0.58);
  border: 1px solid rgba(36, 56, 47, 0.08);
  text-align: center;
  display: grid;
  gap: 0.3rem;
}

.countdown-value {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: 1;
  font-weight: 600;
  color: var(--color-olive);
}

.countdown-label {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-muted-ink);
}

.lineup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.lineup-card,
.tip-card,
.attendance-card {
  background: rgba(251, 246, 238, 0.95);
  border: 1px solid rgba(36, 56, 47, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 30px rgba(22, 33, 26, 0.05);
}

.lineup-card {
  padding: 1.05rem;
  display: grid;
  gap: 0.8rem;
  align-content: start;
  min-height: 100%;
  position: relative;
}

.lineup-card::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.8rem;
  height: 0.35rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-sea), var(--color-sand), var(--color-clay));
  opacity: 0.8;
}

.lineup-media {
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 4 / 5;
  background: rgba(36, 56, 47, 0.08);
}

.lineup-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lineup-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.lineup-day {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-clay);
}

.lineup-icons {
  display: inline-flex;
  gap: 0.45rem;
  color: var(--color-olive);
}

.lineup-time {
  margin: 0;
  font-weight: 700;
  color: var(--color-olive);
}

.lineup-place,
.lineup-card p {
  margin: 0;
}

.lineup-card h3 {
  margin-top: 0.05rem;
}

.lineup-card p:last-child {
  color: var(--color-clay);
  font-weight: 700;
}

.map-layout {
  padding: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1.1rem;
}

.map-column {
  display: grid;
  gap: 1rem;
}

#wedfest-map {
  height: min(66vh, 700px);
  border-radius: 22px;
  border: 1px solid rgba(36, 56, 47, 0.1);
  overflow: hidden;
}

.map-legend {
  background: rgba(255, 249, 241, 0.97);
  border: 1px solid rgba(36, 56, 47, 0.1);
  border-radius: 14px;
  padding: 0.65rem;
  box-shadow: var(--shadow-soft);
  color: var(--color-text);
  font: 600 0.84rem/1.25 "DM Sans", sans-serif;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.map-legend-item + .map-legend-item {
  margin-top: 0.35rem;
}

.map-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.map-popup {
  display: grid;
  gap: 0.4rem;
  min-width: 190px;
}

.map-popup strong {
  font-size: 1rem;
  color: var(--color-olive);
}

.map-popup span {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-clay);
}

.map-popup p {
  margin: 0;
  color: var(--color-muted-ink);
  font-size: 0.92rem;
}

.map-popup a {
  font-weight: 700;
  color: var(--color-olive);
}

.tips-column {
  display: grid;
  gap: 1rem;
}

.tip-card {
  padding: 1.2rem;
}

.tip-card h3 {
  margin-bottom: 0.45rem;
}

.tip-quote {
  display: grid;
  align-items: center;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 600;
  color: var(--color-olive);
  background: linear-gradient(135deg, rgba(36, 56, 47, 0.07), rgba(109, 181, 170, 0.08), rgba(201, 119, 79, 0.08));
}

.tip-quote p {
  margin: 0;
  font-size: inherit;
  color: inherit;
}

.rsvp-intro {
  max-width: 52rem;
  margin: 0 0 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-grid-spaced {
  margin-top: 1rem;
}

.form-grid label,
.attendance-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 700;
}

.attendance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.attendance-card {
  padding: 1rem;
  min-height: 100%;
}

.full-width {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(36, 56, 47, 0.14);
  background: rgba(255, 252, 245, 0.97);
  padding: 0.8rem 0.9rem;
  color: var(--color-text);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(109, 181, 170, 0.24);
  outline-offset: 2px;
  border-color: rgba(109, 181, 170, 0.44);
}

.form-actions {
  margin-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

#form-status {
  margin: 0;
  font-weight: 700;
}

#form-status.success {
  color: #2f6c48;
}

#form-status.error {
  color: #8f4b38;
}

.map-locate-control {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.map-locate-button {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.98);
  color: var(--color-olive);
  font: 700 0.82rem/1 "DM Sans", sans-serif;
  padding: 0.78rem 0.95rem;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.map-locate-button:disabled {
  opacity: 0.7;
  cursor: progress;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: rgba(255, 252, 245, 0.98);
  color: var(--color-text);
}

.leaflet-popup-content {
  margin: 0.95rem 1rem;
  font: 400 0.95rem/1.45 "DM Sans", sans-serif;
}

.site-footer {
  margin-top: 3rem;
  padding: 2.4rem 0 3rem;
  border-top: 1px solid rgba(36, 56, 47, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  gap: 1.2rem;
}

.footer-grid h4 {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  margin-bottom: 0.5rem;
}

.footer-grid p {
  margin: 0.14rem 0;
  color: var(--color-muted-ink);
}

.footer-legal {
  text-align: right;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .hero-grid,
  .map-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .lineup-grid,
  .attendance-grid {
    grid-template-columns: 1fr;
  }

  .hero-aside {
    max-width: 32rem;
  }

  .footer-legal {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--container), calc(100% - 1.2rem));
  }

  .section {
    padding: 3.2rem 0;
  }

  .nav-wrap {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 0.8rem 0;
  }

  .main-nav {
    justify-content: flex-start;
    gap: 0.7rem 0.95rem;
  }

  .hero-grid {
    gap: 1.2rem;
  }

  h1 {
    max-width: 100%;
  }

  .countdown-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .about-disclosure,
  .countdown-panel,
  .rsvp-card,
  .map-layout {
    padding: 1.1rem;
  }

  #wedfest-map {
    height: 380px;
  }

  .hero-media img {
    aspect-ratio: 4 / 5;
  }

  .hero-note {
    gap: 0.45rem;
  }

  .hero-note span + span {
    padding-left: 0;
  }

  .hero-note span + span::before {
    display: none;
  }
}
