/* ============================================================
   Wedding Website — Shared Stylesheet
   Palette: ivory #faf7f2 · rose #c9a0a0 · sage #8a9e85 · charcoal #3a3a3a
   Fonts: Cormorant Garamond (serif) · Lato (sans)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Lato:wght@300;400;700&display=swap');

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

:root {
  --ivory:   #faf7f2;
  --ivory-dark: #f0ebe2;
  --rose:    #c9a0a0;
  --rose-light: #e8d0d0;
  --rose-dark:  #a57878;
  --sage:    #8a9e85;
  --sage-light: #b8cbb4;
  --charcoal: #3a3a3a;
  --charcoal-light: #6b6b6b;
  --white:   #ffffff;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Lato', system-ui, sans-serif;

  --radius: 4px;
  --shadow: 0 4px 24px rgba(58, 58, 58, 0.08);
  --shadow-hover: 0 8px 40px rgba(58, 58, 58, 0.14);
  --transition: 0.3s ease;
  --max-width: 1100px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--ivory);
  color: var(--charcoal);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--charcoal);
}

h1 { font-size: clamp(2.8rem, 7vw, 5.5rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: 0.04em; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.1rem; font-weight: 500; }

p { font-size: 1rem; color: var(--charcoal-light); }

.section-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rose-dark);
  display: block;
  margin-bottom: 0.75rem;
}

.divider {
  width: 60px;
  height: 1px;
  background: var(--rose);
  margin: 1.25rem auto;
}

/* ── Layout Helpers ──────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

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

/* ── Scroll Reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Navigation ──────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

#nav.scrolled {
  background: rgba(250, 247, 242, 0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 20px rgba(58, 58, 58, 0.08);
  padding: 0.9rem 2rem;
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--charcoal);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--charcoal-light);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--rose);
  transition: width var(--transition);
}

.nav-links a:hover { color: var(--charcoal); }
.nav-links a:hover::after { width: 100%; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--charcoal);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Hero ────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--ivory-dark);
  padding: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,160,160,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 100%, rgba(138,158,133,0.12) 0%, transparent 60%);
  pointer-events: none;
}

/* Decorative corner florals (pure CSS) */
.hero-corner {
  position: absolute;
  width: 220px;
  height: 220px;
  opacity: 0.18;
  background-image: radial-gradient(circle at 30% 70%, var(--rose) 0%, transparent 50%),
                    radial-gradient(circle at 70% 30%, var(--sage) 0%, transparent 50%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-corner.tl { top: -60px; left: -60px; }
.hero-corner.br { bottom: -60px; right: -60px; }

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.hero-names {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--charcoal);
  line-height: 1.05;
}

.hero-ampersand {
  display: block;
  font-size: 0.45em;
  font-style: italic;
  color: var(--rose);
  margin: -0.1em 0;
}

.hero-date {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--charcoal-light);
  margin: 1.5rem 0 0.5rem;
}

.hero-location {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--charcoal-light);
  margin-bottom: 2.5rem;
}

.hero-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem 0;
}
.hero-divider::before,
.hero-divider::after {
  content: '';
  width: 80px;
  height: 1px;
  background: var(--rose-light);
}
.hero-divider-diamond {
  width: 7px;
  height: 7px;
  background: var(--rose);
  transform: rotate(45deg);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.9rem 2.4rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              box-shadow var(--transition), transform var(--transition);
  border: none;
}

.btn-primary {
  background: var(--rose-dark);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--charcoal);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--charcoal);
  border: 1px solid var(--charcoal-light);
}
.btn-outline:hover {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: var(--white);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Our Story ───────────────────────────────────────────── */
#story {
  background: var(--white);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.story-image-wrap {
  position: relative;
}

.story-image-placeholder {
  width: 100%;
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--rose-light) 0%, var(--ivory-dark) 50%, var(--sage-light) 100%);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--charcoal-light);
}

.story-image-accent {
  position: absolute;
  width: 60%;
  aspect-ratio: 1;
  border: 1px solid var(--rose-light);
  border-radius: 2px;
  bottom: -20px;
  right: -20px;
  z-index: -1;
}

.story-text h2 { margin-bottom: 0.5rem; }
.story-text p { margin: 1rem 0; font-size: 1.05rem; line-height: 1.85; }

.timeline {
  margin-top: 2.5rem;
  border-left: 1px solid var(--rose-light);
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.4rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  transform: translateX(-50%);
  border: 2px solid var(--ivory-dark);
}

.timeline-year {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose-dark);
}

.timeline-item h4 { margin: 0.2rem 0 0.3rem; font-family: var(--font-serif); font-size: 1.1rem; }
.timeline-item p { font-size: 0.9rem; margin: 0; }

/* ── Event Details ───────────────────────────────────────── */
#details {
  background: var(--ivory);
}

.details-intro {
  text-align: center;
  max-width: 540px;
  margin: 0 auto 4rem;
}
.details-intro h2 { margin-bottom: 0.5rem; }

.event-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 860px;
  margin: 0 auto;
}

.event-card {
  background: var(--white);
  border: 1px solid var(--ivory-dark);
  border-radius: 2px;
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

.event-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.event-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ivory-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 1.4rem;
}

.event-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--charcoal);
}

.event-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
  margin: 0.85rem 0;
}

.event-detail-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rose-dark);
  min-width: 52px;
  padding-top: 0.15rem;
}

.event-detail-value {
  font-size: 0.95rem;
  color: var(--charcoal);
  line-height: 1.5;
}

.event-card .btn {
  margin-top: 1.75rem;
  font-size: 0.68rem;
}

/* ── Gallery ─────────────────────────────────────────────── */
#gallery {
  background: var(--white);
}

.gallery-intro {
  text-align: center;
  max-width: 480px;
  margin: 0 auto 3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 0.75rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--ivory-dark);
}

.gallery-item:nth-child(1) { grid-row: span 2; }
.gallery-item:nth-child(4) { grid-row: span 2; }

.gallery-placeholder {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--charcoal-light);
  opacity: 0.7;
}

.gallery-item:nth-child(1) .gallery-placeholder { min-height: 460px; }
.gallery-item:nth-child(4) .gallery-placeholder { min-height: 460px; }

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(201,160,160,0.15), rgba(138,158,133,0.1));
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover::after { opacity: 1; }

.gallery-note {
  text-align: center;
  margin-top: 2rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--charcoal-light);
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--charcoal);
  color: var(--ivory);
  text-align: center;
  padding: 4rem 2rem;
}

.footer-names {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.footer-date {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rose-light);
  margin-bottom: 1rem;
}

.footer-hashtag {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--sage-light);
  margin-bottom: 1.5rem;
}

.footer-divider {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.2);
  margin: 1.5rem auto;
}

footer p {
  font-size: 0.8rem;
  color: rgba(250, 247, 242, 0.45);
  margin: 0;
}

footer a {
  color: var(--rose-light);
  transition: color var(--transition);
}
footer a:hover { color: var(--white); }

/* ── RSVP Page ───────────────────────────────────────────── */
.page-hero {
  padding: 8rem 2rem 5rem;
  text-align: center;
  background: var(--ivory-dark);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(201,160,160,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 0.5rem; }
.page-hero p { font-size: 1.05rem; max-width: 460px; margin: 1rem auto 0; }

/* ── Form Shared ─────────────────────────────────────────── */
.form-section {
  max-width: 620px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--ivory-dark);
  border-radius: 2px;
  padding: 3rem 3.5rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--ivory-dark);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--charcoal);
  background: var(--ivory);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(201, 160, 160, 0.2);
}

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

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6b6b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Radio group */
.radio-group {
  display: flex;
  gap: 1rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--charcoal);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
}

.radio-label input[type="radio"] {
  width: auto;
  accent-color: var(--rose-dark);
  cursor: pointer;
}

.form-submit {
  margin-top: 2rem;
  width: 100%;
  padding: 1rem;
  font-size: 0.75rem;
}

/* Form feedback */
.form-message {
  display: none;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-top: 1.25rem;
  text-align: center;
}

.form-message.success {
  display: block;
  background: #eef5ec;
  border: 1px solid #b6d4b0;
  color: #3a6b34;
}

.form-message.error {
  display: block;
  background: #fdf0f0;
  border: 1px solid #e8b4b4;
  color: #8b3a3a;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Unlisted / Internal Page ────────────────────────────── */
.internal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(138, 158, 133, 0.15);
  border: 1px solid var(--sage-light);
  color: var(--sage);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.internal-page .page-hero {
  background: linear-gradient(160deg, #f0ebe2 0%, #e8e5ee 100%);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .story-image-wrap { max-width: 480px; margin: 0 auto; }

  .event-cards {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4) { grid-row: span 1; }
  .gallery-item:nth-child(1) .gallery-placeholder,
  .gallery-item:nth-child(4) .gallery-placeholder { min-height: 220px; }
}

@media (max-width: 768px) {
  section { padding: 4rem 0; }

  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(280px, 80vw);
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 2.5rem;
    gap: 2rem;
    box-shadow: -4px 0 30px rgba(0,0,0,0.08);
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 99;
  }

  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 0.9rem; }
  .nav-toggle { display: flex; z-index: 101; }

  .form-card {
    padding: 2rem 1.75rem;
  }

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

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .radio-group { flex-direction: column; gap: 0.75rem; }
}
