/* ============================================================
   VARIABLES
   ============================================================ */
:root {
  --cream:        #faf7f2;
  --white:        #ffffff;
  --burgundy:     #5c1a2e;
  --burgundy-dk:  #3d0f1e;
  --rose:         #c47a8a;
  --rose-light:   #f5e8ec;
  --sage:         #7a9e7e;
  --sage-light:   #e6f0e7;
  --gold:         #b8960c;
  --gold-light:   #f5edcc;
  --text:         #2e1a1a;
  --text-muted:   #7a5a5a;
  --border:       #e8d4d8;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Lato', 'Helvetica Neue', Arial, sans-serif;

  --shadow-sm: 0 2px 8px  rgba(92, 26, 46, 0.08);
  --shadow-md: 0 4px 24px rgba(92, 26, 46, 0.12);
  --shadow-lg: 0 8px 48px rgba(92, 26, 46, 0.18);

  --radius:    12px;
  --radius-lg: 20px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden { display: none !important; }

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   PASSWORD GATE
   ============================================================ */
.gate-overlay {
  position: fixed;
  inset: 0;
  background: var(--burgundy-dk);
  background-image:
    radial-gradient(ellipse at 20% 60%, rgba(196, 122, 138, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(122, 158, 126, 0.12) 0%, transparent 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.gate-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 52px 44px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.gate-flourish {
  color: var(--rose);
  font-size: 1rem;
  letter-spacing: 10px;
  margin-bottom: 20px;
}

.gate-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.gate-name {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--burgundy);
  margin-bottom: 28px;
  line-height: 1.2;
}

.gate-prompt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.gate-input-wrap {
  display: flex;
  gap: 10px;
}

.gate-input-wrap input {
  flex: 1;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.gate-input-wrap input:focus { border-color: var(--rose); }

.gate-input-wrap input.shake {
  animation: shake 0.35s ease;
}

.gate-input-wrap button {
  padding: 13px 22px;
  background: var(--burgundy);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.gate-input-wrap button:hover { background: var(--burgundy-dk); }

.gate-error {
  color: #c0392b;
  font-size: 0.85rem;
  margin-top: 14px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60%  { transform: translateX(-6px); }
  40%, 80%  { transform: translateX(6px); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 580px;
  max-height: 860px;
  overflow: hidden;
}

/* Slideshow */
.slideshow {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: crossfade 24s infinite;
}

.slide-1 { background-image: url('photos/GRA12133_0797.JPG');         animation-delay:  0s; }
.slide-2 { background-image: url('photos/IMG_20161101_124905.jpg');   animation-delay:  6s; }
.slide-3 { background-image: url('photos/20220417_145341.jpg');       animation-delay: 12s; }
.slide-4 { background-image: url('photos/IMG_4230.JPG');              animation-delay: 18s; }

@keyframes crossfade {
  0%, 20%  { opacity: 1; }
  25%, 95% { opacity: 0; }
  100%     { opacity: 0; }
}

/* Overlay — dark gradient from top, heavier at bottom */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(30, 8, 14, 0.40) 0%,
    rgba(30, 8, 14, 0.55) 50%,
    rgba(30, 8, 14, 0.78) 100%
  );
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  color: #fff;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 16px;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero-divider {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.divider-line {
  display: block;
  width: 72px;
  height: 1px;
  background: rgba(255, 255, 255, 0.45);
}

.divider-bloom {
  color: var(--rose);
  font-size: 1.3rem;
}

.hero-date {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.88);
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.section { padding: 72px 0; }

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--burgundy);
  margin-bottom: 10px;
}

.section-title::after {
  content: '';
  display: block;
  width: 44px;
  height: 2px;
  background: var(--rose);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 460px;
  margin: 16px auto 0;
  line-height: 1.7;
}

/* ============================================================
   EVENT DETAILS
   ============================================================ */
.event-section {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.event-card {
  display: flex;
  align-items: stretch;
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 44px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.event-item {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.event-icon { font-size: 2rem; flex-shrink: 0; line-height: 1; margin-top: 2px; }

.event-divider {
  width: 1px;
  background: var(--border);
  margin: 0 36px;
}

.event-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--rose);
  margin-bottom: 7px;
}

.event-value {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
}

.event-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.event-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
}

.event-map-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.event-map-link:hover .event-value {
  color: var(--burgundy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.event-map-link:hover .event-sub {
  color: var(--rose);
}

/* ============================================================
   RSVP FORM
   ============================================================ */
.rsvp-section { background: var(--cream); }

.rsvp-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 44px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 22px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.required { color: var(--rose); }
.optional { font-weight: 300; text-transform: none; letter-spacing: 0; font-size: 0.85rem; }

.form-group input,
.form-group select,
.form-group textarea {
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(196, 122, 138, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 88px;
}

.form-group select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a5a5a' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.form-actions { margin-top: 6px; }

.btn-primary {
  width: 100%;
  padding: 17px;
  background: var(--burgundy);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background: var(--burgundy-dk);
  box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) { transform: scale(0.99); }

.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }

.form-message {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-message.success {
  background: var(--sage-light);
  color: #2a5c2e;
  border: 1px solid #a8d4ab;
}

.form-message.info {
  background: var(--gold-light);
  color: #7a5800;
  border: 1px solid #d4b84a;
}

.form-message.error {
  background: #fdecea;
  color: #b82b2b;
  border: 1px solid #f5a9a0;
}

/* ============================================================
   PHOTO UPLOAD
   ============================================================ */
.upload-section {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.drop-zone {
  border: 2px dashed var(--rose);
  border-radius: var(--radius);
  padding: 56px 40px;
  text-align: center;
  background: var(--rose-light);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.drop-zone:hover,
.drop-zone:focus-visible {
  background: #f0d6dc;
  border-color: var(--burgundy);
  outline: none;
  box-shadow: 0 0 0 3px rgba(196, 122, 138, 0.2);
}

.drop-zone.drag-over {
  background: #edd0d8;
  border-color: var(--burgundy);
  border-style: solid;
}

.drop-icon { font-size: 2.8rem; margin-bottom: 14px; line-height: 1; }

.drop-primary {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--burgundy);
  margin-bottom: 8px;
}

.drop-secondary {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.file-label {
  color: var(--burgundy);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.drop-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.file-input-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.upload-queue {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
}

.upload-item-icon { font-size: 1.2rem; flex-shrink: 0; }

.upload-item-name {
  flex: 1;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item-status {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.upload-item-status.uploading { color: var(--gold); }
.upload-item-status.done      { color: var(--sage); }
.upload-item-status.error     { color: #b82b2b; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: 52px 24px;
  background: var(--burgundy-dk);
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-bloom {
  font-style: normal;
  font-family: var(--font-sans);
  color: var(--rose);
  letter-spacing: 10px;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 620px) {
  .event-card {
    flex-direction: column;
    padding: 28px 24px;
    gap: 28px;
  }

  .event-divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }

  .form-row { grid-template-columns: 1fr; gap: 0; }

  .rsvp-form { padding: 28px 20px; }

  .gate-box { padding: 36px 24px; margin: 16px; }

  .drop-zone { padding: 40px 20px; }

  .section { padding: 52px 0; }

  .hero-name { font-size: clamp(2.2rem, 10vw, 3.2rem); }
}
