/* ========================================
   Ines & Luka — Wedding Website
   style.css
   ======================================== */

/* ----------------------------------------
   1. CSS Custom Properties
   ---------------------------------------- */
:root {
  /* Backgrounds */
  --color-bg: #FDFBF7;
  --color-bg-alt: #F5F0E8;
  --color-bg-card: #FFFFFF;

  /* Text */
  --color-text: #2C2C2C;
  --color-text-muted: #6B6B6B;
  --color-text-light: #9A9A9A;

  /* Accents */
  --color-accent: #C9A96E;
  --color-accent-light: #E8D5A8;
  --color-accent-dark: #A8883E;

  /* Utility */
  --color-border: #E8E3D9;
  --color-overlay: rgba(44, 44, 44, 0.4);

  /* Typography */
  --font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.5rem;
  --text-4xl: 3.5rem;
  --text-hero: 4.5rem;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

/* ----------------------------------------
   3. Layout Utilities
   ---------------------------------------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

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

.section__title {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: var(--text-2xl);
  color: var(--color-text);
  text-align: center;
  margin-bottom: var(--space-xs);
  letter-spacing: 0.05em;
}

.section__subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-base);
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-lg);
}

/* ----------------------------------------
   4. Navigation
   ---------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav__list {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
}

.nav__link {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color 0.3s ease;
}

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

/* ----------------------------------------
   5. Hero Section
   ---------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero__shader {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  border: 0;
  opacity: 0.92;
  filter: saturate(0.42) contrast(1.38) brightness(1.04);
  mix-blend-mode: normal;
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(253, 251, 247, 0.72) 0%, rgba(253, 251, 247, 0.5) 32%, rgba(253, 251, 247, 0.18) 56%, rgba(253, 251, 247, 0.34) 100%),
    linear-gradient(180deg, rgba(253, 251, 247, 0.34) 0%, rgba(253, 251, 247, 0.16) 58%, rgba(253, 251, 247, 0.42) 100%);
  opacity: 1;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 0 var(--space-sm);
}

.hero__ornament {
  display: block;
  margin: 0 auto var(--space-md);
  opacity: 0.6;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-sm);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.hero__names {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: var(--text-3xl);
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-md);
}

.hero__name {
  display: inline-block;
}

.hero__ampersand {
  display: inline-block;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 300;
  color: var(--color-accent);
  margin: 0 0.3em;
}

.hero__details {
  margin-bottom: var(--space-lg);
}

.hero__date {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: var(--text-xl);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.hero__location {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ----------------------------------------
   6. Countdown
   ---------------------------------------- */
.countdown {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.countdown__number {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: var(--text-2xl);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.countdown__label {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

.countdown__separator {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: var(--text-2xl);
  line-height: 1;
  color: var(--color-accent-light);
  padding-top: 2px;
}

/* ----------------------------------------
   7. Scroll Indicator
   ---------------------------------------- */
.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-text-muted);
  animation: bounce 2s ease-in-out infinite;
  transition: color 0.3s ease;
}

.hero__scroll-indicator:hover {
  color: var(--color-accent-dark);
}

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

/* ----------------------------------------
   8. Timeline (Hodogram)
   ---------------------------------------- */
.hodogram {
  background-color: var(--color-bg);
}

.timeline {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  padding-left: 0;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-accent-light);
}

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: var(--space-sm);
  padding-bottom: var(--space-md);
}

.timeline__marker {
  position: relative;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  background: var(--color-bg);
  border: 1px solid var(--color-accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.timeline__icon {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
}

.timeline__connector {
  display: none;
}

.timeline__content {
  padding-top: 0;
}

.timeline__title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: var(--text-xl);
  line-height: 30px;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.timeline__venue {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: var(--space-xs);
}

.timeline__time {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-xs);
  color: var(--color-text-light);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.08em;
}

.timeline__time::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent-light);
}

.timeline__description {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Walk indicators */
.timeline__walk {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) 0;
  padding-left: calc(30px + var(--space-sm));
  color: var(--color-text-light);
  font-size: var(--text-sm);
  font-style: italic;
}

.timeline__walk-icon {
  flex-shrink: 0;
  color: var(--color-text-light);
}

/* ----------------------------------------
   9. Lokacije (Locations)
   ---------------------------------------- */
.lokacije {
  background-color: #FAF6EF;
}

/* Map */
.locations__map-container {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
  background: var(--color-bg-card);
}

.locations__map-canvas {
  width: 100%;
  height: 420px;
  z-index: 1;
}

.locations__map-canvas.leaflet-container {
  position: relative;
  overflow: hidden;
  font-family: var(--font-body);
}

.locations__map-canvas .leaflet-pane,
.locations__map-canvas .leaflet-tile,
.locations__map-canvas .leaflet-marker-icon,
.locations__map-canvas .leaflet-marker-shadow,
.locations__map-canvas .leaflet-tile-container,
.locations__map-canvas .leaflet-pane > svg,
.locations__map-canvas .leaflet-pane > canvas,
.locations__map-canvas .leaflet-zoom-box,
.locations__map-canvas .leaflet-image-layer,
.locations__map-canvas .leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.locations__map-canvas .leaflet-tile,
.locations__map-canvas .leaflet-marker-icon,
.locations__map-canvas .leaflet-marker-shadow {
  user-select: none;
  -webkit-user-drag: none;
}

.locations__map-canvas .leaflet-tile {
  max-width: none;
}

.locations__map-canvas .leaflet-pane {
  z-index: 400;
}

.locations__map-canvas .leaflet-tile-pane {
  z-index: 200;
}

.locations__map-canvas .leaflet-overlay-pane {
  z-index: 400;
}

.locations__map-canvas .leaflet-marker-pane {
  z-index: 600;
}

.locations__map-canvas .leaflet-popup-pane {
  z-index: 700;
}

.locations__map-canvas .leaflet-control {
  position: relative;
  z-index: 800;
  pointer-events: auto;
}

.locations__map-canvas .leaflet-top,
.locations__map-canvas .leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.locations__map-canvas .leaflet-top {
  top: 10px;
}

.locations__map-canvas .leaflet-bottom {
  bottom: 10px;
}

.locations__map-canvas .leaflet-left {
  left: 10px;
}

.locations__map-canvas .leaflet-right {
  right: 10px;
}

.locations__map-canvas .leaflet-control-zoom {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(44, 44, 44, 0.12);
}

.locations__map-canvas .leaflet-control-zoom a {
  width: 32px;
  height: 32px;
  line-height: 30px;
  display: block;
  text-align: center;
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: var(--text-lg);
  font-weight: 500;
}

.locations__map-canvas .leaflet-control-zoom a:last-child {
  border-bottom: 0;
}

.locations__map-canvas .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.86);
  padding: 2px 6px;
  font-size: 11px;
}

.locations__map-canvas .leaflet-control-attribution,
.locations__map-canvas .leaflet-control-zoom a {
  font-family: var(--font-body);
}

.locations__map-canvas .leaflet-popup {
  position: absolute;
  text-align: center;
  margin-bottom: 20px;
}

.locations__map-canvas .leaflet-popup-content-wrapper {
  background: var(--color-bg-card);
  border-radius: 8px;
  box-shadow: 0 3px 18px rgba(44, 44, 44, 0.18);
  padding: 1px;
}

.locations__map-canvas .leaflet-popup-content {
  margin: 12px 14px;
  min-width: 180px;
  max-width: 220px;
}

.locations__map-canvas .leaflet-popup-tip-container {
  width: 30px;
  height: 15px;
  position: absolute;
  left: 50%;
  margin-left: -15px;
  overflow: hidden;
  pointer-events: none;
}

.locations__map-canvas .leaflet-popup-tip {
  width: 14px;
  height: 14px;
  padding: 1px;
  margin: -8px auto 0;
  transform: rotate(45deg);
  background: var(--color-bg-card);
  box-shadow: 0 3px 18px rgba(44, 44, 44, 0.14);
}

.locations__map-canvas .leaflet-popup-close-button {
  position: absolute;
  top: 4px;
  right: 8px;
  color: var(--color-text-light);
  font-size: 18px;
}

.locations__pin {
  width: 32px;
  height: 32px;
  border: 2px solid var(--color-bg-card);
  border-radius: 50% 50% 50% 0;
  background: var(--color-accent-dark);
  color: var(--color-bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(44, 44, 44, 0.24);
  transform: rotate(-45deg);
}

.locations__pin span {
  transform: rotate(45deg);
}

.locations__popup-title {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}

.locations__popup-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: var(--space-xs);
}

.locations__popup-role {
  display: block;
  color: var(--color-accent-dark);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.locations__popup-link {
  color: var(--color-accent-dark);
  font-size: var(--text-sm);
  font-weight: 500;
}

.locations__map-note {
  text-align: center;
  padding: var(--space-sm);
  color: var(--color-text-light);
  background: var(--color-bg-card);
}

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

.rsvp__title {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: var(--text-4xl);
  line-height: 1;
  text-align: center;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
}

.rsvp__embed {
  width: 100%;
  min-height: 560px;
}

.rsvp__embed [data-tf-live] {
  width: 100%;
  min-height: 560px;
}

/* ----------------------------------------
   11. Footer
   ---------------------------------------- */
.footer {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
  background: var(--color-bg-alt);
}

.footer__ornament {
  display: block;
  margin: 0 auto var(--space-md);
  opacity: 0.6;
}

.footer__names {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: var(--text-xl);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.05em;
}

.footer__date {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
}

/* ----------------------------------------
   12. Animations
   ---------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in[data-delay="100"] { transition-delay: 0.1s; }
.fade-in[data-delay="200"] { transition-delay: 0.2s; }
.fade-in[data-delay="300"] { transition-delay: 0.3s; }

/* ----------------------------------------
   13. Responsive
   ---------------------------------------- */
@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }

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

  .section__title {
    font-size: var(--text-3xl);
  }

  .hero__names {
    font-size: var(--text-4xl);
  }

  .hero__date {
    font-size: var(--text-2xl);
  }

  .countdown__number {
    font-size: var(--text-3xl);
  }

  .countdown__unit {
    min-width: 80px;
  }

  .timeline {
    max-width: 650px;
    padding-left: 0;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline__item {
    grid-template-columns: 40px 1fr;
    column-gap: var(--space-md);
  }

  .timeline__marker {
    width: 40px;
    height: 40px;
  }

  .timeline__icon {
    width: 20px;
    height: 20px;
  }

  .timeline__title {
    font-size: var(--text-2xl);
    line-height: 40px;
  }

  .timeline__walk {
    padding-left: calc(40px + var(--space-md));
  }

  .locations__map-canvas {
    height: 460px;
  }

  .rsvp__title {
    font-size: var(--text-hero);
  }
}

@media (min-width: 1024px) {
  .hero__names {
    font-size: var(--text-hero);
  }

  .hero__date {
    font-size: var(--text-2xl);
  }

  .countdown__number {
    font-size: var(--text-4xl);
  }

  .countdown__unit {
    min-width: 100px;
  }
}

/* ----------------------------------------
   14. Accessibility
   ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__scroll-indicator {
    animation: none;
  }
}
