/* =========================================
   David & Lorena — Wedding Website
   Aesthetic: Refined Mediterranean elegance
   ========================================= */

:root {
  --color-bg: #f6f3ef;
  --color-bg-alt: #eee9e2;
  --color-text: #2c2825;
  --color-text-muted: #6b6460;
  --color-accent: #8b7355;
  --color-accent-light: #c4a97d;
  --color-border: #d8d0c6;
  --color-white: #fefdfb;
  --color-card: #faf8f5;

  --font-serif: 'Cormorant Garamond', 'Georgia', serif;
  --font-script: 'Pinyon Script', cursive;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 10rem;

  --max-width: 860px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-text);
}

/* --------- Navigation --------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.nav.scrolled {
  background: rgba(246, 243, 239, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
  padding: 0.75rem 2rem;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: var(--color-white);
  transition: color var(--transition);
  letter-spacing: 0.05em;
}

.nav.scrolled .nav-logo {
  color: var(--color-text);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--transition);
  position: relative;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav.scrolled .nav-links a {
  color: var(--color-text-muted);
}

.nav.scrolled .nav-links a:hover {
  color: var(--color-text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}

.nav-toggle span {
  width: 24px;
  height: 1.5px;
  background: var(--color-white);
  transition: all var(--transition);
}

.nav.scrolled .nav-toggle span {
  background: var(--color-text);
}

/* --------- Hero --------- */

.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-images {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-track {
  display: flex;
  height: 100%;
  animation: hero-scroll 40s linear infinite;
}

.hero-img {
  width: 33.333vw;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  filter: grayscale(100%);
}

@keyframes hero-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-33.333vw * 4)); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.25) 0%,
      rgba(0, 0, 0, 0.1) 40%,
      rgba(0, 0, 0, 0.4) 100%
    ),
    rgba(0, 0, 0, 0.2);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-white);
  padding: var(--space-md);
}

.hero-prelude {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s 0.3s ease forwards;
}

.hero-title {
  margin: var(--space-sm) 0;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s 0.6s ease forwards;
}

.hero-name {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(3rem, 10vw, 6.5rem);
  display: block;
  line-height: 1.1;
}

.hero-ampersand {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  display: block;
  opacity: 0.7;
  margin: 0.15em 0;
}

.hero-details {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-weight: 300;
  font-size: 1.05rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s 0.9s ease forwards;
}

.hero-divider {
  font-size: 1.25rem;
  opacity: 0.5;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: var(--space-md);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s 1.2s ease forwards;
}

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

.countdown-number {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 2rem;
  display: block;
  letter-spacing: 0.05em;
}

.countdown-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}

.hero-scroll-cta {
  display: inline-block;
  margin-top: var(--space-lg);
  color: var(--color-white);
  opacity: 0;
  animation: fadeUp 1s 1.5s ease forwards, float 3s 2.5s ease-in-out infinite;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* --------- Sections --------- */

.section {
  padding: var(--space-xl) var(--space-md);
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  text-align: center;
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-weight: 300;
  margin-top: calc(var(--space-lg) * -0.6);
  margin-bottom: var(--space-lg);
}

/* --------- Timeline (Schedule) --------- */

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--color-border);
}

.timeline-event {
  position: relative;
  margin-bottom: var(--space-lg);
}

.timeline-event:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  background: var(--color-bg);
  z-index: 1;
}

.timeline-date {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: var(--space-sm);
}

.timeline-day {
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.timeline-full-date {
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.timeline-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-md);
}

.timeline-card h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.35rem;
  margin-bottom: var(--space-sm);
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.event-meta-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.event-meta-item svg {
  flex-shrink: 0;
  color: var(--color-accent);
}

.event-meta-item a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-border);
}

.event-meta-item a:hover {
  text-decoration-color: var(--color-accent);
}

.event-note {
  margin-top: var(--space-sm);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* --------- Photo Strip --------- */

.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  overflow: hidden;
}

.photo-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: grayscale(60%);
  transition: filter 0.5s ease;
}

.photo-strip img:hover {
  filter: grayscale(0%);
}

/* --------- Shuttle --------- */

.shuttle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.shuttle-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--space-md);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.shuttle-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.shuttle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.shuttle-card h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.shuttle-time {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.shuttle-detail {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.shuttle-note {
  text-align: center;
  margin-top: var(--space-md);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* --------- Gifts --------- */

.gifts-content {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.gifts-content p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-white);
  background: var(--color-text);
  border: none;
  border-radius: 4px;
  transition: all var(--transition);
}

.btn:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* --------- FAQs --------- */

.faq-list {
  max-width: 680px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-item summary {
  padding: 1.25rem 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.1rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color var(--transition);
}

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

.faq-item summary::after {
  content: '+';
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item summary:hover {
  color: var(--color-accent);
}

.faq-item p {
  padding: 0 0 1.25rem;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

/* --------- Footer --------- */

.footer {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
}

.footer-tagline {
  font-family: var(--font-serif);
  font-weight: 300;
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.footer-names {
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: var(--color-white);
  margin-bottom: var(--space-xs);
}

.footer-date {
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

/* --------- Scroll Animations --------- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------- Mobile Responsive --------- */

@media (max-width: 768px) {
  .nav {
    padding: 1rem 1.25rem;
  }

  .nav.scrolled {
    padding: 0.75rem 1.25rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: rgba(44, 40, 37, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    letter-spacing: 0.2em;
  }

  .nav-links a:hover {
    color: var(--color-white);
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
    background: var(--color-white);
  }
  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    background: var(--color-white);
  }

  .hero-name {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .countdown {
    gap: 1.25rem;
  }

  .countdown-number {
    font-size: 1.5rem;
  }

  .section {
    padding: var(--space-lg) var(--space-sm);
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-marker {
    left: -1.5rem;
  }

  .timeline-card {
    padding: 1.25rem;
  }

  .shuttle-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

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

@media (max-width: 480px) {
  .hero-details {
    flex-direction: column;
    gap: 0.25rem;
  }

  .hero-divider {
    display: none;
  }

  .countdown {
    gap: 0.75rem;
  }

  .countdown-number {
    font-size: 1.3rem;
  }

  .countdown-label {
    font-size: 0.6rem;
  }

  .timeline-date {
    flex-direction: column;
    gap: 0.2rem;
  }

  .section-title {
    margin-bottom: var(--space-md);
  }

  .section-subtitle {
    margin-top: calc(var(--space-md) * -0.5);
    margin-bottom: var(--space-md);
  }
}
