:root {
  --cream: #f6f2eb;
  --cream-dark: #ebe4d8;
  --ink: #1c1c1c;
  --ink-soft: #4a4a4a;
  --muted: #7a756c;
  --gold: #b8954a;
  --gold-light: #d4bc82;
  --gold-pale: #f0e6cc;
  --overlay: rgba(12, 10, 8, 0.55);
  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-heading: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-script: "Pinyon Script", "Segoe Script", "Apple Chancery", cursive;
  --font-body: "Raleway", "Segoe UI", Tahoma, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 64px rgba(28, 28, 28, 0.12);
  --shadow-lg: 0 40px 100px rgba(28, 28, 28, 0.18);
  --page-pad: clamp(1.25rem, 4vw, 5rem);
  --section-pad-y: clamp(4rem, 10vw, 8rem);
  --content-max: 1100px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  min-width: 0;
}

body.intro-active { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

p, h1, h2, h3, h4, li {
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

::selection {
  background: var(--gold-pale);
  color: var(--ink);
}

/* Grain texture */
.hero-grain,
.intro-grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Intro screen */
.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}

.intro-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-card {
  text-align: center;
  color: #fff;
  padding: clamp(1.5rem, 4vw, 2rem);
  max-width: min(36rem, 100%);
  animation: intro-rise 1.2s var(--ease) both;
}

@keyframes intro-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-eyebrow {
  font-size: clamp(0.58rem, 1.5vw, 0.65rem);
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
}

.intro-script {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: #fff;
  margin-bottom: 1rem;
}

.intro-monogram {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: clamp(2rem, 6vw, 3rem);
}

.intro-monogram span {
  font-family: var(--font-script);
  color: var(--gold);
  letter-spacing: 0;
}

.intro-open {
  font-family: var(--font-body);
  font-size: clamp(0.62rem, 1.6vw, 0.68rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1.1rem clamp(1.5rem, 5vw, 2.8rem);
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-light);
  cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s, transform 0.4s var(--ease);
}

.intro-open:hover {
  background: var(--gold);
  color: var(--ink);
  transform: translateY(-2px);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem clamp(1.4rem, 4vw, 2.4rem);
  font-family: var(--font-body);
  font-size: clamp(0.62rem, 1.5vw, 0.68rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.4s var(--ease);
  max-width: 100%;
}

.btn-primary {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 8px 28px rgba(184, 149, 74, 0.35);
}

.btn-primary:hover {
  background: #9a7838;
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(184, 149, 74, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--gold);
}

.btn-secondary:hover { background: var(--gold); color: #fff; }
.btn-full { width: 100%; }

/* Section typography */
.section-label {
  font-family: var(--font-script);
  font-size: clamp(2rem, 4vw, 3.6rem);
  color: var(--gold);
  margin-bottom: 0.35rem;
  line-height: 1.15;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.8vw, 2.2rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 2rem;
  line-height: 1.3;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cinematic hero */
.hero-cinematic {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -5%;
  background: url("imgs/IMG_0356.jpeg") center / cover no-repeat;
  animation: ken-burns 20s ease-in-out infinite alternate;
}

@keyframes ken-burns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(12, 10, 8, 0.5) 100%),
    linear-gradient(180deg, rgba(12, 10, 8, 0.4) 0%, rgba(12, 10, 8, 0.25) 40%, rgba(12, 10, 8, 0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(800px, 100%);
  margin-inline: auto;
  padding: clamp(5rem, 12vh, 8rem) var(--page-pad) clamp(5rem, 10vh, 6rem);
}

.hero-guest { margin-bottom: 1.5rem; }

.hero-guest-label {
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--gold-light);
}

.hero-guest-name {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  font-style: italic;
  display: block;
}

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-style: italic;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.25rem;
}

.hero-names {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-name-line { display: block; }

.hero-names .ampersand {
  font-family: var(--font-script);
  font-size: 1em;
  color: var(--gold-light);
  letter-spacing: 0;
  margin: 0.15em 0;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-style: italic;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.25rem;
}

.hero-date {
  font-size: clamp(0.95rem, 2.8vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 2.5rem;
}

/* Countdown */
.countdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(0.75rem, 3vw, 2.5rem);
  margin-bottom: 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.countdown-item {
  text-align: center;
  min-width: 4.25rem;
  flex: 0 1 auto;
}

.countdown-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 500;
  line-height: 1;
  color: #fff;
  margin-bottom: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: clamp(0.5rem, 1.4vw, 0.58rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  animation: float-cue 3s ease-in-out infinite;
}

.scroll-cue svg { opacity: 0.7; }

@keyframes float-cue {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Story editorial */
.story-editorial {
  padding: var(--section-pad-y) var(--page-pad);
  background: var(--cream);
}

.story-editorial .section-label {
  font-size: clamp(2rem, 4vw, 2.5rem);
}

.story-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.story-photo {
  position: relative;
  min-width: 0;
}

.story-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: var(--shadow-lg);
}

.story-photo-accent {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  width: 60%;
  height: 60%;
  border: 1px solid var(--gold);
  z-index: -1;
  pointer-events: none;
}

.story-copy {
  min-width: 0;
}

.story-copy p {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: clamp(0.95rem, 1.5vw, 1.02rem);
}

.story-quote {
  margin-top: 2rem;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--cream-dark);
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-style: italic;
  color: var(--ink);
  line-height: 1.5;
}

/* Details luxe */
.details-luxe {
  padding: var(--section-pad-y) var(--page-pad);
  background: #2b2520;
  color: #fff;
}

.details-head { text-align: center; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.details-head .section-title { color: #fff; }

.details-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(255, 255, 255, 0.1);
  max-width: min(720px, 100%);
  margin: 0 auto;
}

.detail-luxe {
  background: var(--ink);
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 1.75rem);
  text-align: center;
  transition: background 0.4s var(--ease);
  min-width: 0;
}

.detail-luxe:hover { background: #2a2a2a; }

.detail-time {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(2rem, 4vw, 2.5rem);
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.detail-luxe h3 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.detail-luxe h4 {
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1rem;
  line-height: 1.4;
}

.detail-luxe p {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.65;
}

.details-note {
  text-align: center;
  margin-top: 3rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.92rem;
}

/* RSVP card */
.rsvp-luxe {
  padding: calc(var(--section-pad-y) / 2) var(--page-pad) var(--section-pad-y);
  background: #f7f3f0;
}

.rsvp-card {
  max-width: min(640px, 100%);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.75rem) clamp(1.25rem, 5vw, 3.25rem);
  text-align: center;
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 4px 6px rgba(28, 28, 28, 0.04),
    0 18px 48px rgba(28, 28, 28, 0.1);
}

.rsvp-eyebrow {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #c0a060;
  margin-bottom: 0.65rem;
}

.rsvp-deadline {
  font-family: var(--font-heading);
  color: #999;
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  margin-bottom: 2.25rem;
}

.rsvp-question {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.75rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c0a060;
  margin-bottom: 1.5rem;
  text-align: center;
  line-height: 1.35;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #999;
  text-align: center;
}

.form-group-select {
  position: relative;
}

.form-group-select > select {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.form-group textarea {
  font-family: var(--font-heading);
  font-size: 1rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid #e8e2dc;
  background: #f7f3f0;
  color: var(--ink);
  border-radius: 2px;
  transition: border-color 0.3s, box-shadow 0.3s;
  appearance: none;
  width: 100%;
  resize: vertical;
  min-height: 120px;
}

.form-group textarea::placeholder {
  font-family: var(--font-heading);
  font-style: italic;
  color: rgba(122, 117, 108, 0.7);
}

.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 149, 74, 0.12);
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-style: italic;
  padding: 0.95rem 2.5rem;
  border: 1px solid #d4bc82;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23b8964f' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 1.1rem center;
  color: #888;
  border-radius: 2px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.custom-select.is-selected .custom-select-trigger {
  color: var(--ink);
  font-style: normal;
}

.custom-select.is-open .custom-select-trigger,
.custom-select-trigger:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 149, 74, 0.12);
}

.custom-select.is-invalid .custom-select-trigger {
  border-color: #c45c4a;
}

.custom-select-options {
  position: absolute;
  z-index: 5;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #d4bc82;
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(61, 53, 48, 0.12);
}

.custom-select-options li {
  padding: 0.85rem 1.1rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: background 0.2s;
}

.custom-select-options li:hover,
.custom-select-options li[aria-selected="true"] {
  background: rgba(184, 149, 74, 0.1);
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

.rsvp-form .btn-primary {
  margin-top: 0.75rem;
  padding: 1.1rem 2rem;
  letter-spacing: 0.28em;
  background: #b8964f;
  border-radius: 2px;
  box-shadow: 0 6px 20px rgba(184, 150, 79, 0.35);
}

.rsvp-form .btn-primary:hover {
  background: #a68442;
  box-shadow: 0 8px 24px rgba(184, 150, 79, 0.42);
}

.rsvp-error {
  color: #9a3b3b;
  font-size: 0.88rem;
  text-align: center;
  margin-top: -0.5rem;
}

.rsvp-form .btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.rsvp-success {
  text-align: center;
  padding: 2rem 0;
}

.success-icon {
  color: var(--gold);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.rsvp-success h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.rsvp-success p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Map */
.map-luxe {
  padding: var(--section-pad-y) var(--page-pad) calc(var(--section-pad-y) / 2);
  background: var(--cream);
}

.map-section-head {
  max-width: var(--content-max);
  margin: 0 auto 2rem;
  text-align: center;
}

.map-section-head .section-label {
  margin-bottom: 0;
}

.map-venues {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.map-wrap {
  background: #fff;
  border: 1px solid var(--cream-dark);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-copy {
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-width: 0;
}

.map-copy .section-title {
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.map-copy p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: clamp(0.9rem, 1.5vw, 0.95rem);
}

.map-copy strong {
  font-family: var(--font-display);
  font-size: clamp(0.88rem, 1.5vw, 0.95rem);
  letter-spacing: 0.06em;
  color: var(--ink);
  display: block;
  margin-bottom: 0.35rem;
}

/* Footer */
.footer-luxe {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 3rem) var(--page-pad);
  background: #2b2520;
  color: rgba(255, 255, 255, 0.7);
}

.footer-monogram {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.footer-monogram span { font-family: var(--font-script); letter-spacing: 0; }

.footer-names {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-style: italic;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.footer-date {
  font-size: clamp(0.58rem, 1.5vw, 0.65rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.footer-contact {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}

.footer-contact p {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  letter-spacing: 0.02em;
}

.footer-thankyou {
  margin-top: 2.5rem;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  max-width: 36rem;
  margin-inline: auto;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 960px) {
  .story-wrap { grid-template-columns: 1fr; }
  .story-photo-accent { display: none; }
  .map-venues { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero-date { letter-spacing: 0.1em; }
  .countdown { gap: 0.75rem; }
  .countdown-item { min-width: 3.5rem; }
  .btn { padding: 0.95rem 1.6rem; letter-spacing: 0.14em; }
  .rsvp-eyebrow { letter-spacing: 0.18em; }
  .intro-eyebrow { letter-spacing: 0.22em; }
}

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