/* ═══════════════════════════════════════════════════════════════════
   Sophie & Sam — Wedding Website
   ═══════════════════════════════════════════════════════════════════ */

/* ── Custom properties ─────────────────────────────────────────── */
:root {
  --cream:       #E8E5DC;
  --lilac-cream: #F5EBF4;
  --wine:        #812437;
  --aubergine:   #410016;
  --mauve:       #B4707F;
  --olive:       #837C36;
  --dusty-blue:  #A3B4BE;
  --ice-blue:    #CEDCFF;

  --col-max:     600px;
  --col-pad:     24px;

  --font-display: 'Lovers in New York Bold', Georgia, serif;
  --font-body:    'EB Garamond', Georgia, serif;

  --section-gap-desktop: 120px;
  --section-gap-mobile:  80px;
}

/* ── Display font (self-hosted) ────────────────────────────────── */
@font-face {
  font-family: 'Lovers in New York Bold';
  src:
    url('fonts/Lovers_in_New_York_Bold.otf') format('opentype'),
    url('fonts/Lovers_in_New_York_Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--cream);
  color: var(--wine);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

p + p {
  margin-top: 1.1em;
}

strong {
  font-weight: 600;
}

/* ── Column utility ────────────────────────────────────────────── */
.col {
  max-width: var(--col-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--col-pad);
  padding-right: var(--col-pad);
}

/* ── Skip link ─────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--col-pad);
  background: var(--wine);
  color: var(--cream);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.1em;
  z-index: 9000;
  transition: top 0.15s ease;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

/* ── Screen reader only ────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════
   Password gate
   ═══════════════════════════════════════════════════════════════════ */

/* Outer shell — cream background creates the padding/frame */
.password-gate {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: var(--cream);
  padding: 32px;
}

.password-gate.is-hidden {
  display: none;
}

/* The framed photo — fills the padded area, clip overflow */
.password-gate__frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.password-gate__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Cream card — floats over the image, inset from the right */
.password-gate__card {
  position: absolute;
  top: 50%;
  right: 10%;
  transform: translateY(-50%);
  background: var(--cream);
  width: 420px;
  padding: 44px 44px 44px 44px;
  text-align: center;
}

@media (max-width: 900px) {
  .password-gate__card {
    right: 4%;
    width: 360px;
  }
}

@media (max-width: 640px) {
  .password-gate {
    padding: 20px;
  }
  .password-gate__card {
    width: calc(100% - 0px);
    top: auto;
    bottom: 0;
    right: 0;
    transform: none;
    padding: 36px 28px 44px;
  }
}

.password-gate__heading {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--aubergine);
  line-height: 1.15;
  margin-bottom: 24px;
}

.password-gate__names {
  font-family: var(--font-body);
  font-variant: small-caps;
  letter-spacing: 0.18em;
  font-size: 14px;
  margin-bottom: 4px;
}

.password-gate__date {
  font-family: var(--font-body);
  font-variant: small-caps;
  letter-spacing: 0.15em;
  font-size: 11px;
  margin-bottom: 40px;
}

.password-gate__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.password-gate__field-label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wine);
  width: 100%;
  text-align: center;
}

.password-gate__form input[type="password"] {
  width: 100%;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--wine);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--wine);
  padding: 8px 0;
  outline: none;
  text-align: center;
  transition: border-color 0.2s ease;
}

.password-gate__form input[type="password"]:focus {
  border-bottom-color: var(--aubergine);
}

.password-gate__error {
  font-size: 13px;
  color: var(--wine);
  font-style: italic;
  min-height: 1.3em;
  text-align: center;
}

.password-gate__form .btn {
  align-self: center;
}

/* ═══════════════════════════════════════════════════════════════════
   Corner navigation
   ═══════════════════════════════════════════════════════════════════ */
.corner-nav {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
}

.corner-nav span,
.corner-nav a {
  position: absolute;
  font-family: var(--font-body);
  font-variant: small-caps;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--wine);
  text-decoration: none;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}

.corner-nav__tl { top: 20px; left: 24px; }
.corner-nav__tr { top: 20px; right: 24px; }
.corner-nav__bl { bottom: 20px; left: 24px; }
.corner-nav__br {
  bottom: 20px;
  right: 24px;
  cursor: pointer;
}
.corner-nav__br:not(:empty):hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Hide top-left/top-right corner labels when hero spread is visible */
.corner-nav__tl,
.corner-nav__tr {
  opacity: 1;
}
.corner-nav__tl.is-hidden,
.corner-nav__tr.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Hero spread — replaces top corner labels while hero is in view */
.hero-spread {
  position: fixed;
  top: 20px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 201;
  font-family: var(--font-body);
  font-variant: small-caps;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--wine);
  transition: opacity 0.3s ease;
}

.hero-spread.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Hide bottom-right corner label on mobile */
@media (max-width: 520px) {
  .corner-nav__br {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   Sections — common
   ═══════════════════════════════════════════════════════════════════ */
.section {
  padding-top: var(--section-gap-desktop);
}

@media (max-width: 600px) {
  .section {
    padding-top: var(--section-gap-mobile);
  }
}

/* Section header — display font, fixed 32px across all h2 headings */
.section-header {
  font-family: var(--font-display);
  font-weight: normal;
  font-variant: normal;
  font-size: 32px;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--aubergine);
  text-align: center;
  margin-bottom: 36px;
}

/* --display no longer overrides size — only adjusts bottom margin for sections
   where a subheader immediately follows */
.section-header--display {
  margin-bottom: 16px;
}

/* Section subheader — italic */
.section-sub {
  text-align: center;
  font-size: 17px;
  margin-bottom: 36px;
}

/* Subsection header — small caps, smaller than section header */
.subsection-header {
  font-family: var(--font-body);
  font-weight: 400;
  font-variant: small-caps;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--wine);
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════════════════════════════ */
.section--hero {
  padding-top: 80px;  /* pushes bracket clear of the top edge */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 80px;
  gap: 40px;
}

.hero-bracket {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: var(--col-max);
  padding-left: var(--col-pad);
  padding-right: var(--col-pad);
}

/* Lovers in New York — hero names */
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 72px);
  color: var(--aubergine);
  text-align: center;
  line-height: 0.9;
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-name--top {
  margin-bottom: -16px; /* overlap into image */
}

.hero-name--bottom {
  margin-top: -16px; /* overlap up from image */
}

.hero-meta {
  text-align: center;
  font-family: var(--font-body);
  font-variant: small-caps;
  font-size: 11px;
  letter-spacing: 0.15em;
  line-height: 2;
  color: var(--wine);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.hero-cta .btn {
  align-self: auto;
  padding: 13px 48px;
  font-size: 12px;
  letter-spacing: 0.22em;
}

.hero-cta__note {
  font-family: var(--font-body);
  font-size: 13px;
  font-style: italic;
  color: var(--wine);
  opacity: 0.75;
}

/* ═══════════════════════════════════════════════════════════════════
   Image placeholders
   ═══════════════════════════════════════════════════════════════════ */
.img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid rgba(129, 36, 55, 0.3);
}

/* Hero photo */
.hero-image {
  display: block;
  width: 75%;         /* slightly narrower than the names */
  aspect-ratio: 3 / 4;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

/* Landscape — map */
.img-placeholder--landscape {
  width: 100%;
  aspect-ratio: 2 / 1;
  margin-top: 40px;
  margin-bottom: 32px;
}

.img-placeholder__icon {
  color: rgba(129, 36, 55, 0.4);
  flex-shrink: 0;
}

.venue-img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 40px;
}

.img-placeholder__caption {
  font-family: var(--font-body);
  font-variant: small-caps;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(129, 36, 55, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════
   Order of the Day
   ═══════════════════════════════════════════════════════════════════ */
.order-table {
  display: flex;
  flex-direction: column;
}

.order-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(129, 36, 55, 0.12);
}

.order-row:first-child {
  border-top: 1px solid rgba(129, 36, 55, 0.12);
}

.order-time {
  color: rgba(129, 36, 55, 0.65);
  padding-top: 1px;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════
   Afterparty
   ═══════════════════════════════════════════════════════════════════ */
.section--afterparty {
  padding-bottom: var(--section-gap-desktop);
}

@media (max-width: 600px) {
  .section--afterparty {
    padding-bottom: var(--section-gap-mobile);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   Location
   ═══════════════════════════════════════════════════════════════════ */
.location-addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 8px;
}

@media (max-width: 440px) {
  .location-addresses {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.address-name {
  font-variant: small-caps;
  letter-spacing: 0.1em;
  font-size: 15px;
  margin-bottom: 6px;
}

.address-tag {
  font-size: 14px;
  opacity: 0.6;
  margin-top: 8px;
  font-style: italic;
}

.location-note {
  font-size: 14px;
  opacity: 0.8;
  margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   Travel & Stay
   ═══════════════════════════════════════════════════════════════════ */
.travel-block {
  margin-bottom: 48px;
}

.travel-block:last-child {
  margin-bottom: 0;
}

.travel-block p + p {
  margin-top: 0.7em;
}

.placeholder-text {
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════════════
   RSVP card + form
   ═══════════════════════════════════════════════════════════════════ */

/* White card behind the whole RSVP section */
.rsvp-card {
  background: rgba(255, 255, 255, 0.32);
  padding: 48px 40px 52px;
}

@media (max-width: 600px) {
  .rsvp-card {
    padding: 36px 24px 40px;
  }
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  font-size: 14px;
  letter-spacing: 0.06em;
}

.required-mark {
  color: var(--wine);
  opacity: 0.6;
}

.field-note {
  font-style: italic;
  opacity: 0.65;
  letter-spacing: 0;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--wine);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(129, 36, 55, 0.35);
  padding: 8px 0;
  outline: none;
  width: 100%;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: var(--wine);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(129, 36, 55, 0.4);
  font-style: italic;
}

.form-fieldset {
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-fieldset legend {
  font-size: 14px;
  letter-spacing: 0.06em;
  flex: 1;
}

.radio-group {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(129, 36, 55, 0.45);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.15s ease;
}

.radio-label input[type="radio"]:checked {
  border-color: var(--wine);
}

.radio-label input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--wine);
  border-radius: 50%;
}

.radio-label input[type="radio"]:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}

.form-error {
  font-size: 14px;
  font-style: italic;
  min-height: 1.3em;
}

.rsvp-confirmation {
  font-style: italic;
  text-align: center;
  padding-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   Gifts
   ═══════════════════════════════════════════════════════════════════ */
.registry-link {
  display: inline-block;
  margin-top: 20px;
  font-variant: small-caps;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--wine);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ═══════════════════════════════════════════════════════════════════
   FAQ
   ═══════════════════════════════════════════════════════════════════ */
.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid rgba(129, 36, 55, 0.15);
}

.faq-item:first-child {
  border-top: 1px solid rgba(129, 36, 55, 0.15);
}

.faq-q {
  width: 100%;
}

.faq-q button {
  all: unset;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--wine);
  cursor: pointer;
  padding: 18px 28px 18px 0;
  display: block;
  width: 100%;
  position: relative;
  line-height: 1.4;
}

.faq-q button::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.2s ease;
}

.faq-q button[aria-expanded="true"]::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-q button:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}

.faq-a {
  font-size: 17px;
  padding-bottom: 18px;
  margin: 0;
  line-height: 1.6;
  opacity: 0.85;
}

.faq-a[hidden] {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════
   Button
   ═══════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-variant: small-caps;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--cream);
  background: var(--wine);
  border: none;
  padding: 12px 36px;
  cursor: pointer;
  transition: background 0.2s ease;
  align-self: flex-start;
  text-decoration: none;
}

.btn:hover {
  background: var(--aubergine);
}

.btn:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════════════ */
.site-footer {
  padding-top: var(--section-gap-desktop);
  padding-bottom: 64px;
  text-align: center;
}

.footer-names {
  font-variant: small-caps;
  letter-spacing: 0.18em;
  font-size: 14px;
  margin-bottom: 10px;
}

.footer-date {
  font-variant: small-caps;
  letter-spacing: 0.15em;
  font-size: 11px;
  opacity: 0.75;
}

/* ═══════════════════════════════════════════════════════════════════
   Focus ring (global fallback)
   ═══════════════════════════════════════════════════════════════════ */
:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}
