/* Wedding site: minimal, calm, mobile-first. Serif headings, sans body. */

:root {
  --color-bg: #fafaf8;
  --color-bg-alt: #f5f3ef;
  --color-sand: #e8e4de;
  --color-text: #2c2a28;
  --color-text-muted: #6b6560;
  --color-accent: #3d3a36;
  --color-border: #e2dfda;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --radius: 6px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}

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

/* ----- Header ----- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  background: rgba(250, 250, 248, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.site-header.scrolled {
  border-color: var(--color-border);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.nav-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-cta {
  color: var(--color-accent);
  font-weight: 500;
}

.nav-cta:hover {
  color: var(--color-text);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: var(--space-xs);
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--color-text);
  transition: var(--transition);
}

/* ----- Sticky RSVP button ----- */
.sticky-rsvp {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 99;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--color-accent);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
}

.sticky-rsvp.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sticky-rsvp:hover {
  color: #fff;
  background: var(--color-text);
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-md);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--color-bg-alt);
  background-image: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 252, 248, 0.8) 0%, transparent 65%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 520px;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-sm);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 7vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-text);
  margin: 0 0 var(--space-sm);
}

.hero-title .name {
  display: block;
  font-style: italic;
  font-weight: 400;
}

.hero-date {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-lg);
  letter-spacing: 0.02em;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.countdown-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-text);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

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

.btn-primary:hover {
  background: var(--color-text);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.btn-download {
  margin-bottom: var(--space-sm);
}

.scroll-hint {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  animation: bounce 2s ease-in-out infinite;
}

.scroll-hint svg {
  opacity: 0.8;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(4px); }
}

/* ----- Sections (mobile-first) ----- */
.section {
  padding: var(--space-2xl) var(--space-md);
}

.section:nth-of-type(even) {
  background: var(--color-bg-alt);
}

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

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

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  text-align: center;
  color: var(--color-text);
  margin: 0 0 var(--space-sm);
  letter-spacing: 0.02em;
}

.section-lead {
  text-align: center;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-xl);
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
}

/* ----- Page anchor links ----- */
.page-anchors {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.page-anchors a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.page-anchors a:hover {
  color: var(--color-accent);
  background: var(--color-sand);
}

/* ----- Timeline (story + program) ----- */
.timeline-story,
.timeline-program {
  position: relative;
  padding-left: var(--space-lg);
  border-left: 2px solid var(--color-border);
  margin-left: 0.5rem;
}

.timeline-item,
.timeline-block {
  position: relative;
  padding-bottom: var(--space-xl);
}

/* Story timeline: scroll-reveal animation */
.timeline-story .timeline-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-story .timeline-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-story .timeline-item:nth-child(1) { transition-delay: 0s; }
.timeline-story .timeline-item:nth-child(2) { transition-delay: 0.08s; }
.timeline-story .timeline-item:nth-child(3) { transition-delay: 0.16s; }
.timeline-story .timeline-item:nth-child(4) { transition-delay: 0.24s; }
.timeline-story .timeline-item:nth-child(5) { transition-delay: 0.32s; }
.timeline-story .timeline-item:nth-child(6) { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .timeline-story .timeline-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.timeline-item:last-child,
.timeline-block:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--space-lg) - 5px);
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Story timeline: content left, photo right; all photos same size */
.timeline-story .timeline-item-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: flex-start;
}

.timeline-story .timeline-content {
  max-width: 32em;
}

.timeline-story .timeline-photo {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.timeline-story .timeline-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@media (min-width: 540px) {
  .timeline-story .timeline-item-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-lg);
  }

  /* Content first, photo right (order in HTML) */
  .timeline-story .timeline-content {
    flex: 1;
    min-width: 0;
  }
}

.timeline-date,
.timeline-time {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
  font-variant-numeric: tabular-nums;
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 var(--space-xs);
  color: var(--color-text);
}

.timeline-content p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.timeline-content p + p {
  margin-top: var(--space-sm);
}

/* ----- Story photos ----- */
.story-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}

.photo-placeholder {
  aspect-ratio: 1;
  background: var(--color-sand);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

/* ----- Accordion ----- */
.accordion-block,
.accordion-item {
  border-bottom: 1px solid var(--color-border);
}

.accordion-block:last-child,
.accordion-item:last-child {
  border-bottom: none;
}

.accordion-head {
  width: 100%;
  margin: 0;
  padding: var(--space-md) 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  transition: color var(--transition);
}

.accordion-head:hover {
  color: var(--color-accent);
}

.accordion-head::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(45deg);
  margin-left: auto;
  transition: transform var(--transition), border-color var(--transition);
}

.accordion-head[aria-expanded="true"]::after {
  transform: rotate(-135deg);
  border-color: var(--color-accent);
}

.accordion-panel {
  overflow: hidden;
  transition: height 0.25s ease;
}

.accordion-panel[hidden] {
  display: none;
}

.accordion-panel p {
  margin: 0 0 var(--space-sm);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.accordion-panel p:last-child {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
}

.list-simple {
  margin: 0 0 var(--space-md);
  padding-left: 1.25rem;
}

.list-simple li {
  margin-bottom: var(--space-xs);
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.link-external {
  color: var(--color-accent);
  font-size: 0.9375rem;
  text-decoration: none;
  font-weight: 500;
}

.link-external:hover {
  text-decoration: underline;
}

/* Outfit-inspiratie: link + lightbox */
.outfit-inspiration {
  margin: var(--space-sm) 0 0;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--color-accent);
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-button:hover {
  color: var(--color-accent-dark);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.2s, opacity 0.2s ease;
}

.lightbox[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  padding: var(--space-xl);
}

.lightbox-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.lightbox-close:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.lightbox-title {
  margin: 0 0 var(--space-lg);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.lightbox-gallery {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

.lightbox-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

@media (min-width: 640px) {
  .lightbox-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ----- RSVP ----- */
.section-rsvp {
  background: var(--color-bg);
}

.rsvp-intro {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin: 0 0 var(--space-lg);
  max-width: 32em;
  margin-left: auto;
  margin-right: auto;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-row label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-text);
  transition: border-color var(--transition);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-row textarea {
  resize: vertical;
  min-height: 72px;
}

.form-hint {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.radio-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  font-weight: 400;
}

.radio-label input {
  width: auto;
}

.btn-submit {
  margin-top: var(--space-sm);
  width: 100%;
}

.rsvp-note {
  margin-top: var(--space-md);
  text-align: center;
  font-size: 0.9375rem;
  min-height: 1.5em;
}

.rsvp-note.success {
  color: #4a7c59;
}

.rsvp-note.error {
  color: #b85450;
}

/* ----- Footer ----- */
.site-footer {
  padding: var(--space-xl) var(--space-md);
  text-align: center;
  background: var(--color-accent);
  color: rgba(255, 255, 255, 0.85);
}

.footer-text {
  margin: 0;
  font-size: 0.9375rem;
}

/* ----- Mobile ----- */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 260px;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 3.5rem;
    background: var(--color-bg);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.06);
    transform: translateX(100%);
    transition: transform var(--transition);
  }

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

  .menu-toggle {
    display: flex;
    position: fixed;
    top: var(--space-sm);
    right: var(--space-md);
    z-index: 101;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .countdown-item strong {
    font-size: 1.25rem;
  }

  .story-photos {
    grid-template-columns: 1fr;
  }

  .page-anchors {
    gap: var(--space-xs);
  }
}

/* ----- Larger screens ----- */
@media (min-width: 640px) {
  .section {
    padding: var(--space-3xl) var(--space-lg);
  }

  .sticky-rsvp {
    bottom: var(--space-xl);
    right: var(--space-xl);
  }
}
