/* ==========================================================================
   Sophia & Alexander — Elegant Black-Tie Wedding Site
   ========================================================================== */

/* ----- Reset & base ----- */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --black: #0a0a0c;
  --ink: #121214;
  --charcoal: #1b1b1e;
  --ivory: #f7f3ec;
  --ivory-dim: #eee7d9;
  --paper: #fbf9f5;
  /* Gold tuned for contrast in both contexts:
     --gold-on-dark is light enough on near-black backgrounds (~7:1 contrast)
     --gold-on-light is dark enough to read on ivory/paper backgrounds (~5:1 contrast) */
  --gold-on-dark: #e3bf6a;
  --gold-on-light: #92701f;
  --gold-line: #cba135;
  --text-dark-bg: #f1ece1;
  --text-light-bg: #26221a;
  --muted-dark-bg: #cfc6b3;
  --muted-light-bg: #55503f;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --accent-serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --header-height: 84px;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--paper);
  color: var(--text-light-bg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0;
  padding: 0;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.75rem;
}

.container-narrow {
  max-width: 760px;
}

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--gold-line);
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  background: transparent;
}

.btn-gold {
  background: var(--gold-line);
  color: var(--black);
  border-color: var(--gold-line);
}

.btn-gold:hover, .btn-gold:focus-visible {
  background: var(--gold-on-dark);
  border-color: var(--gold-on-dark);
}

.btn-outline {
  color: var(--gold-on-dark);
  border-color: var(--gold-on-dark);
  background: transparent;
}

.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--gold-on-dark);
  color: var(--black);
}

/* ----- Ornament divider ----- */
.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  color: var(--gold-line);
  margin: 1.1rem 0 2.75rem;
}

.ornament-divider span {
  display: block;
  width: 72px;
  height: 1px;
  background: linear-gradient(to right, transparent, currentColor);
}

.ornament-divider span:last-child {
  background: linear-gradient(to left, transparent, currentColor);
}

.ornament-divider svg {
  flex-shrink: 0;
}

.ornament-divider-footer {
  margin: 1.5rem auto;
}

/* ----- Header / Nav ----- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  border-bottom: 1px solid rgba(203, 161, 53, 0.35);
}

/* The translucent blur lives on a pseudo-element rather than on
   .site-header directly. backdrop-filter/filter/transform on an
   element creates a new containing block for its position:fixed
   descendants — since #primaryNav becomes position:fixed on mobile,
   putting the filter on .site-header itself would trap the nav's
   fixed positioning inside the (short) header box instead of the
   viewport, collapsing it to a sliver instead of covering the screen. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(6px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dark-bg);
}

.brand-mono {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--gold-on-dark);
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-names {
  font-family: var(--accent-serif);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-names em {
  font-style: normal;
  color: var(--gold-on-dark);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.primary-nav ul {
  display: flex;
  gap: 1.9rem;
  list-style: none;
}

.primary-nav a {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dark-bg);
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.primary-nav a:hover, .primary-nav a:focus-visible {
  color: var(--gold-on-dark);
  border-color: var(--gold-on-dark);
}

.nav-cta {
  padding: 0.6rem 1.4rem;
  font-size: 0.7rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid rgba(203, 161, 53, 0.5);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--gold-on-dark);
  margin: 0 auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--black);
  overflow: hidden;
  padding: 6rem 1.5rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  opacity: 0.9;
}

.hero-bg::after {
  content: "";
}

.hero-frame {
  position: absolute;
  inset: 24px;
  pointer-events: none;
  border: 1px solid rgba(203, 161, 53, 0.35);
}

.corner {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 1px solid var(--gold-on-dark);
}

.corner-tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.corner-tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.corner-bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.corner-br { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.eyebrow {
  color: var(--gold-on-dark);
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.hero-names {
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  color: var(--text-dark-bg);
  line-height: 1.1;
}

.hero-names .amp {
  color: var(--gold-on-dark);
  font-style: italic;
  font-family: var(--accent-serif);
  padding: 0 0.15em;
}

.hero-hr {
  width: 120px;
  height: 1px;
  background: var(--gold-line);
  margin: 1.75rem auto;
}

.hero-date {
  font-family: var(--accent-serif);
  font-size: 1.5rem;
  color: var(--gold-on-dark);
  margin-bottom: 0.4rem;
}

.hero-venue {
  font-size: 1.05rem;
  color: var(--text-dark-bg);
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.hero-tagline {
  color: var(--muted-dark-bg);
  font-size: 1rem;
  margin-bottom: 2.25rem;
}

.scroll-cue {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold-on-dark);
  font-size: 1.3rem;
  z-index: 2;
  animation: floatDown 2.4s ease-in-out infinite;
}

@keyframes floatDown {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ----- Sections (general) ----- */
.section {
  padding: 5.5rem 0;
  background: var(--paper);
}

.section-dark {
  background: var(--ink);
  color: var(--text-dark-bg);
}

.section-dark .section-title {
  color: var(--text-dark-bg);
}

.section-dark p {
  color: var(--muted-dark-bg);
}

.section-kicker {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-on-light);
  margin-bottom: 0.65rem;
}

.section-dark .section-kicker {
  color: var(--gold-on-dark);
}

.section-title {
  text-align: center;
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  color: var(--text-light-bg);
}

/* ----- Our Story ----- */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.story-card {
  text-align: center;
}

.story-img {
  border: 1px solid var(--gold-line);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.story-card h3 {
  font-size: 1.2rem;
  color: var(--gold-on-light);
  margin-bottom: 0.85rem;
}

.story-card p {
  color: var(--muted-light-bg);
  font-size: 0.98rem;
}

/* ----- Event Details ----- */
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.detail-card {
  border: 1px solid rgba(203, 161, 53, 0.35);
  padding: 2.25rem 2rem;
  text-align: center;
  background: rgba(203, 161, 53, 0.03);
}

.detail-icon {
  display: inline-block;
  color: var(--gold-on-dark);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.detail-card h3 {
  font-size: 1.25rem;
  color: var(--text-dark-bg);
  margin-bottom: 0.4rem;
}

.detail-time {
  font-family: var(--accent-serif);
  font-size: 1.35rem;
  color: var(--gold-on-dark);
  margin-bottom: 0.6rem;
}

.detail-note {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--muted-dark-bg);
  margin-bottom: 0;
}

.venue-figure {
  margin: 0 auto;
  max-width: 720px;
  text-align: center;
}

.venue-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--gold-line);
  margin: 0 auto;
}

.venue-figure figcaption {
  margin-top: 1rem;
  font-family: var(--accent-serif);
  font-style: italic;
  color: var(--gold-on-dark);
  font-size: 1.05rem;
}

/* ----- Travel ----- */
.travel-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.travel-copy h3 {
  font-size: 1.3rem;
  color: var(--gold-on-light);
  margin-bottom: 0.75rem;
}

.travel-copy h3:not(:first-child) {
  margin-top: 2rem;
}

.travel-copy p, .travel-list li {
  color: var(--muted-light-bg);
}

.travel-list {
  list-style: none;
  padding: 0;
}

.travel-list li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.85rem;
}

.travel-list li::before {
  content: "\2726";
  position: absolute;
  left: 0;
  color: var(--gold-on-light);
  font-size: 0.75rem;
  top: 0.35rem;
}

.hotel-figure {
  text-align: center;
}

.hotel-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--gold-line);
}

.hotel-figure figcaption {
  margin-top: 1rem;
  font-family: var(--accent-serif);
  font-style: italic;
  color: var(--gold-on-light);
  font-size: 1.05rem;
}

/* ----- RSVP ----- */
.rsvp-intro {
  text-align: center;
  color: var(--muted-dark-bg);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.rsvp-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

.form-row label,
.form-fieldset legend {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-on-dark);
}

.form-row label span[aria-hidden="true"],
.form-fieldset legend span[aria-hidden="true"] {
  color: var(--gold-on-dark);
  margin-left: 0.2rem;
}

.form-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.rsvp-form input[type="text"],
.rsvp-form input[type="email"],
.rsvp-form input[type="number"],
.rsvp-form textarea {
  width: 100%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(203, 161, 53, 0.4);
  color: var(--text-dark-bg);
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0;
}

.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder {
  color: var(--muted-dark-bg);
  opacity: 0.65;
}

.rsvp-form input:focus,
.rsvp-form textarea:focus {
  outline: none;
  border-color: var(--gold-on-dark);
  box-shadow: 0 0 0 1px var(--gold-on-dark);
}

.rsvp-form textarea {
  resize: vertical;
  min-height: 90px;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.radio-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(203, 161, 53, 0.4);
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-dark-bg);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.radio-pill:has(input:checked) {
  border-color: var(--gold-on-dark);
  background: rgba(203, 161, 53, 0.12);
}

.radio-pill input {
  accent-color: var(--gold-line);
  margin: 0;
}

.rsvp-submit {
  align-self: center;
  margin-top: 0.5rem;
}

.rsvp-thankyou {
  text-align: center;
  color: var(--gold-on-dark);
  font-family: var(--accent-serif);
  font-size: 1.15rem;
  border-top: 1px solid rgba(203, 161, 53, 0.35);
  padding-top: 1.5rem;
  margin: 0.5rem 0 0;
}

/* ----- FAQ ----- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid rgba(203, 161, 53, 0.35);
  padding: 1.1rem 1.5rem;
  background: rgba(203, 161, 53, 0.02);
}

.faq-item summary {
  cursor: pointer;
  font-family: var(--accent-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-light-bg);
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--gold-on-light);
  font-size: 1.3rem;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  margin-top: 0.9rem;
  color: var(--muted-light-bg);
}

/* ----- Footer ----- */
.site-footer {
  background: var(--black);
  color: var(--muted-dark-bg);
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-mono {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--gold-on-dark);
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.footer-names {
  font-family: var(--accent-serif);
  font-size: 1.4rem;
  color: var(--text-dark-bg);
  margin-bottom: 0.25rem;
}

.footer-date {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--muted-dark-bg);
  opacity: 0.75;
  margin: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

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

  .hotel-figure {
    order: -1;
  }
}

@media (max-width: 860px) {
  .primary-nav {
    /* Mobile nav menu: fixed full-screen overlay below the header.
       Anchored with top = header height so it starts right under
       the sticky header and always fully covers the remaining
       viewport — no hero text can bleed through beneath it. */
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 190;
    background: #08080a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2.5rem;
    padding: 3rem 1.5rem 3rem;
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }

  .primary-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
  }

  .primary-nav ul a {
    font-size: 1rem;
  }

  .nav-cta {
    padding: 0.85rem 2.25rem;
  }

  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: 72px;
  }

  .header-inner {
    padding: 0 1.1rem;
  }

  .brand-names {
    font-size: 0.98rem;
  }

  /* Reduce vertical section padding on narrow viewports so pages
     don't feel excessively tall/empty on phones. */
  .section {
    padding: 3.5rem 0;
  }

  .hero {
    min-height: 88vh;
    padding: 4rem 1.25rem;
  }

  .hero-frame {
    inset: 12px;
  }

  .container {
    padding: 0 1.25rem;
  }

  .detail-card {
    padding: 1.75rem 1.4rem;
  }

  .ornament-divider {
    margin-bottom: 2rem;
  }

  .ornament-divider span {
    width: 42px;
  }
}

@media (max-width: 480px) {
  .hero-names {
    font-size: clamp(2.25rem, 12vw, 3.25rem);
  }

  .hero-date {
    font-size: 1.2rem;
  }

  .radio-group {
    flex-direction: column;
  }

  .radio-pill {
    width: 100%;
  }
}
