/* ==========================================================================
   WEDDING INVITATION STYLES
   Edit the color and font variables below to customize your look.
   ========================================================================== */
:root {
  --bg-page: #fdfaf3;
  --bg-alt: #f5ebd6;
  --bg-card: #ffffff;
  --text-primary: #3b2a14;
  --text-muted: #6e583b;
  --accent: #9a6b1f;
  --accent-hover: #7a5314;
  --gold: #c4922c;
  --border: #e5d4b0;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;

  --radius: 12px;
  --shadow: 0 8px 28px rgba(27, 42, 34, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* Accessibility: Skip Link & Focus */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  border-radius: 6px;
}

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

/* Layout Containers */
.container {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.section {
  padding: 3.5rem 0;
}

.section-alt {
  background-color: var(--bg-alt);
}

/* Typography */
.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.section-title {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--accent);
}

.section-subtitle {
  margin: -0.75rem 0 1.75rem;
  color: var(--text-muted);
}

/* Hero Section */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}

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

.couple-names {
  margin: 0.25rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 9vw, 4.75rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--accent);
}

.couple-names .ampersand {
  display: block;
  font-style: italic;
  font-size: 0.65em;
  color: var(--gold);
  margin: 0.15em 0;
}

.tagline {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--text-muted);
}

.family-line {
  margin: 0 0 2rem;
  max-width: 520px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.date-banner {
  width: 100%;
  max-width: 440px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.main-date {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
}

.main-city {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.countdown {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold);
}

.quick-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-small {
  min-height: 40px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
}

/* Story */
.story-body p {
  margin: 0 0 1.1rem;
  font-size: 1.02rem;
}

.story-body p:last-child {
  margin-bottom: 0;
}

/* Photo Grid */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.photo-card {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-card figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Schedule / Function Cards */
.functions-list {
  display: grid;
  gap: 1.25rem;
}

.function-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.function-card.is-main {
  border-left: 4px solid var(--gold);
}

.function-badge {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.function-name {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--accent);
}

.function-meta {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.function-meta-row {
  margin: 0;
}

.function-meta-label {
  font-weight: 600;
  color: var(--text-primary);
}

.function-instructions {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--bg-page);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.function-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* RSVP Form */
.rsvp-form {
  display: grid;
  gap: 1rem;
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

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

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

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: #ffffff;
}

.rsvp-status {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 1.4em;
}

.rsvp-status.is-success {
  color: var(--accent);
}

.rsvp-status.is-error {
  color: #9b2c2c;
}

.contact-note {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* Footer */
.footer {
  padding: 2.5rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-names {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
}

.footer-note {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Responsive Enhancements */
@media (min-width: 640px) {
  .section {
    padding: 4.5rem 0;
  }

  .couple-names .ampersand {
    display: inline;
    margin: 0 0.25em;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
