/* ============================================================
   Alica & Alex — Wedding Website
   Spring-inspired palette (Slovak flora & fauna in May):
   soft greens, floral pastels, light neutrals.
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Spring palette */
  --color-sage: #8b9f7e;
  --color-sage-light: #a8b89a;
  --color-sage-pale: #e8ede4;
  --color-blush: #e8c4c4;
  --color-blush-soft: #f5e6e6;
  --color-cream: #faf8f5;
  --color-ivory: #f5f2ed;
  --color-wheat: #e8e2d8;
  --color-lavender-soft: #d4c8dc;
  --color-text: #3d3935;
  --color-text-muted: #6b6560;
  --color-white: #ffffff;

  /* Typography: 2 fonts, 3 sizes for consistency */
  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --text-base: 1rem;
  --text-sm: 0.9375rem;
  --heading-section: clamp(1.5rem, 4vw, 2rem);
  --heading-sub: 1.25rem;

  /* Spacing (mobile-first, scale up on larger screens) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Layout */
  --container-max: 72rem;
  --container-narrow: 42rem;
  --radius: 0.5rem;
  --shadow-soft: 0 4px 20px rgba(61, 57, 53, 0.08);
  --transition: 0.25s ease;

  /* Section rhythm: same padding and internal gaps for a uniform look */
  --section-padding-block: var(--space-3xl);
  --section-inner-gap: var(--space-md);
  --section-inner-gap-desktop: var(--space-2xl);

  /* Scroll offset so anchor links sit just below the fixed header (mobile + desktop) */
  --scroll-margin-top: 4.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-cream);
}

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

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

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-sage);
  outline-offset: 2px;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header.is-scrolled {
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}

.site-header:not(.is-scrolled) .nav-logo,
.site-header:not(.is-scrolled) .nav-menu a,
.site-header:not(.is-scrolled) .lang-toggle {
  color: var(--color-white);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.site-header:not(.is-scrolled) .nav-logo:hover,
.site-header:not(.is-scrolled) .nav-menu a:hover {
  color: var(--color-sage-pale);
}

.site-header.is-scrolled .nav-logo,
.site-header.is-scrolled .nav-menu a {
  color: var(--color-text);
  text-shadow: none;
}

.site-header.is-scrolled .nav-logo:hover,
.site-header.is-scrolled .nav-menu a:hover {
  color: var(--color-sage);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Mobile: hamburger button (visible only on small screens) — compact, matches site typography */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition);
}

.nav-toggle:hover {
  opacity: 0.85;
}

.nav-toggle-bar {
  display: block;
  width: 1.125rem;
  height: 1.5px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.site-header:not(.is-scrolled) .nav-toggle {
  color: var(--color-white);
}

.site-header.is-scrolled .nav-toggle {
  color: var(--color-text);
}

/* Hamburger → X when open (proportional to smaller icon) */
.site-header.has-menu-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.site-header.has-menu-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.has-menu-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--heading-sub);
  letter-spacing: 0.02em;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition), text-shadow var(--transition);
}

.nav-logo-amp {
  font-style: italic;
  font-weight: 400;
}

.nav-logo:hover .nav-logo-amp {
  color: inherit;
}

.nav-menu {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-sm);
  align-items: center;
  justify-content: flex-end;
}

@media (min-width: 768px) {
  .nav-menu {
    gap: var(--space-md);
  }
}

.nav-menu a {
  font-family: var(--font-heading);
  font-size: var(--heading-sub);
  font-weight: 500;
  color: var(--color-text);
  padding: var(--space-xs) 0;
  transition: color var(--transition), text-shadow var(--transition);
}

.nav-menu a:hover {
  color: var(--color-sage);
}

.lang-toggle {
  font-family: var(--font-heading);
  font-size: var(--heading-sub);
  font-weight: 500;
  line-height: 1;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  cursor: pointer;
  padding: 4px 6px;
  margin-left: var(--space-sm);
  transition: opacity var(--transition), transform var(--transition), background var(--transition), border-color var(--transition);
}

.lang-toggle:hover {
  opacity: 0.9;
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.25);
}

.site-header.is-scrolled .lang-toggle {
  background: rgba(61, 57, 53, 0.06);
  border-color: rgba(61, 57, 53, 0.2);
}

.site-header.is-scrolled .lang-toggle:hover {
  background: rgba(61, 57, 53, 0.12);
  border-color: rgba(61, 57, 53, 0.35);
}

@media (min-width: 768px) {
  .lang-toggle {
    margin-left: var(--space-md);
  }
}

/* Mobile nav: show hamburger, hide menu until open */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: var(--space-sm);
    background: rgba(250, 248, 245, 0.98);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-soft);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease, visibility 0.25s ease;
  }

  .site-header.has-menu-open .nav-menu {
    max-height: 80vh;
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
  }

  .nav-menu li {
    border-bottom: 1px solid rgba(61, 57, 53, 0.08);
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }

  .nav-menu a,
  .nav-menu .lang-toggle {
    display: block;
    padding: var(--space-sm) var(--space-md);
    font-size: 1.125rem;
    color: var(--color-text);
    text-shadow: none;
    background: transparent;
    border: none;
    border-radius: 0;
    text-align: left;
    width: 100%;
    margin-left: 0;
  }

  .nav-menu .lang-toggle {
    margin-top: var(--space-xs);
  }

  /* When menu is open, force dark text on light dropdown (overrides hero white) */
  .site-header.has-menu-open .nav-menu a,
  .site-header.has-menu-open .nav-menu .lang-toggle {
    color: var(--color-text);
    text-shadow: none;
  }

  .nav-menu a:hover,
  .site-header.has-menu-open .nav-menu a:hover {
    color: var(--color-sage);
  }
}

@media (min-width: 768px) {
  .nav-menu {
    position: static;
    max-height: none;
    opacity: 1;
    visibility: visible;
    overflow: visible;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  scroll-margin-top: var(--scroll-margin-top);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--color-text);
  background-image: url('../images/snowhero.JPG');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.5) 60%,
    rgba(0, 0, 0, 0.65) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-xl) var(--space-md);
  max-width: 36rem;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 767px) {
  .hero-content {
    transform: translateY(-5vh);
  }
}

/* Mobile landscape: keep button below text so it doesn't overlap */
@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    justify-content: flex-start;
    padding-top: 5rem;
    padding-bottom: var(--space-md);
  }

  .hero-content {
    transform: none;
  }

  .hero-bottom {
    position: static;
    left: auto;
    transform: none;
    margin-top: var(--space-md);
  }
}

.hero-subtitle,
.hero-location {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-white);
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
  margin: 0 0 var(--space-sm);
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  line-height: 1.15;
  color: #fff;
  margin: 0 0 var(--space-sm);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85), 0 2px 16px rgba(0, 0, 0, 0.6);
}

.hero-title .amp {
  font-style: italic;
  font-weight: 400;
}

.hero-date {
  font-family: var(--font-heading);
  font-size: 2.35rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin: 0 0 var(--space-xs);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8), 0 2px 12px rgba(0, 0, 0, 0.6);
}

.hero-location {
  margin: 0 0 var(--space-xs);
}

.hero-content .hero-location:last-of-type {
  margin-bottom: 0;
}

.hero-cta {
  display: inline-block;
  margin-top: var(--space-xl);
  padding: 0;
  font-family: var(--font-heading);
  font-size: var(--heading-sub);
  font-weight: 700;
  color: var(--color-text);
  background: none;
  border-radius: 0;
  transition: color var(--transition);
}

.hero-cta:hover {
  color: var(--color-sage);
}

.hero-bottom {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.hero-cta--button {
  margin-top: 0;
  padding: var(--space-xs) var(--space-md);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition), border-color var(--transition), opacity var(--transition);
}

.hero-cta--button:hover {
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.6);
  background: transparent;
}

.cta-block {
  padding: var(--section-padding-block) var(--space-md);
  text-align: center;
  background: var(--color-ivory);
}

.cta-block .hero-cta {
  margin-top: 0;
}

.cta-block-img {
  display: block;
  width: 65%;
  max-width: 65%;
  margin: var(--space-xl) auto 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  object-fit: cover;
}

.hero-scroll-hint {
  position: relative;
}

.scroll-hint-line {
  display: block;
  width: 1px;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.6);
  animation: scroll-hint 2s ease-in-out infinite;
}

@keyframes scroll-hint {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ---------- Section Layout ---------- */
.section {
  padding: var(--space-3xl) var(--space-md);
  scroll-margin-top: var(--scroll-margin-top);
}

/* Subtle fade-in when section enters viewport (see js/main.js) */
.section.animate-on-scroll {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section:nth-child(even) {
  background: var(--color-ivory);
}

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

.container--narrow {
  max-width: var(--container-narrow);
  text-align: center;
}

.section-grid {
  display: grid;
  gap: var(--section-inner-gap-desktop);
  align-items: center;
}

/* Mobile: title above image above content — single gap for uniform spacing */
@media (max-width: 767px) {
  .section-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--section-inner-gap);
  }

  .section-grid .section-title {
    margin-bottom: 0;
  }

  .section-grid .section-media {
    margin-bottom: 0;
  }
}

@media (min-width: 768px) {
  .section-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    row-gap: var(--space-md);
    column-gap: var(--section-inner-gap-desktop);
    align-items: start;
  }

  /* Uniform tight spacing between title and content in all sections (Ceremony, Reception, Travel, Accommodation, Gifts) */
  .section-grid .section-title,
  .section-grid--image-left .section-title,
  .section-grid--image-right .section-title {
    margin-bottom: 0;
  }

  .section-grid--image-left .section-title {
    grid-column: 2;
    grid-row: 1;
  }

  .section-grid--image-left .section-media {
    grid-column: 1;
    grid-row: 1 / -1;
  }

  .section-grid--image-left .section-content {
    grid-column: 2;
    grid-row: 2;
  }

  .section-grid--image-right .section-title {
    grid-column: 1;
    grid-row: 1;
  }

  .section-grid--image-right .section-media {
    grid-column: 2;
    grid-row: 1 / -1;
  }

  .section-grid--image-right .section-content {
    grid-column: 1;
    grid-row: 2;
  }
}

.section-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.section-img {
  width: 100%;
  object-fit: cover;
  min-height: 220px;
}

@media (min-width: 768px) {
  .section-img {
    min-height: 320px;
  }
}

/* Shared section content: same fonts, spacing, hierarchy everywhere */
.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--heading-section);
  color: var(--color-text);
  margin: 0 0 var(--space-sm);
}

.section-lead {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin: 0 0 var(--section-inner-gap);
}

.section-text {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  margin: 0 0 var(--section-inner-gap);
  color: var(--color-text);
}

.section-text:last-child {
  margin-bottom: 0;
}

.section-text--heading {
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.section-list {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  margin: 0 0 var(--section-inner-gap);
  padding-left: 1.25rem;
}

.section-list li {
  margin-bottom: var(--space-xs);
}

.section-list li:last-child {
  margin-bottom: 0;
}

.section-note {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
}

/* ---------- Ceremony card ---------- */
.ceremony-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ceremony-card .section-title {
  margin-bottom: var(--space-sm);
}

.ceremony-venue {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--heading-sub);
  color: var(--color-text);
  margin: 0 0 var(--space-xs);
}

.ceremony-alias {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-md);
  font-style: italic;
}

.ceremony-time {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--heading-sub);
  color: var(--color-text);
  margin: 0 0 var(--space-md);
}

.ceremony-bus {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-style: italic;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-sm);
}

.reception-venue {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--heading-sub);
  color: var(--color-text);
  margin: 0 0 var(--space-xs);
}

/* Travel section: consistent spacing between lead and body */
.section--travel .reception-venue {
  margin-bottom: var(--section-inner-gap);
}

/* Travel labels "By plane:" / "By car:" – same font as "Getting to Slovakia." */
.travel-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--heading-sub);
  color: var(--color-text);
}

/* Gifts section: same spacing after lead line as other sections */
.section--gifts .reception-venue {
  margin-bottom: var(--space-md);
}

/* Accommodation "How to book?" – same font as "Hotel Liptovský Dvor", keep spacing before list */
.accommodation-booking-head {
  margin-bottom: var(--space-sm);
}

.reception-location {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin: 0 0 var(--section-inner-gap);
  font-style: italic;
}

.reception-bus {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-style: italic;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-sm);
}

.reception-time {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--heading-sub);
  color: var(--color-text);
  margin: 0 0 var(--space-sm);
}

.section-content .reception-time:first-of-type {
  margin-top: var(--section-inner-gap);
}

.link-pin {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-style: normal;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition), gap var(--transition);
}

.link-pin:hover {
  color: var(--color-sage);
}

.link-pin-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.link-pin:hover .link-pin-icon {
  color: var(--color-sage);
}

.section-title--center,
.section-lead--center,
.section-text--center {
  text-align: center;
}

.section-lead--center {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- RSVP ---------- */
.section--rsvp {
  background: linear-gradient(180deg, var(--color-sage-pale) 0%, var(--color-blush-soft) 100%);
}

.rsvp-actions {
  margin-top: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  text-align: center;
  border-radius: var(--radius);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn-primary {
  color: var(--color-white);
  background: var(--color-sage);
  border: none;
}

.btn-primary:hover {
  background: var(--color-sage-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  color: var(--color-white);
}

.rsvp-contact-intro {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.rsvp-contact {
  margin-top: 0;
  font-size: var(--text-base);
  line-height: 1.8;
}

.rsvp-contact-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--heading-sub);
}

.rsvp-wa {
  display: inline-flex;
  align-items: center;
  color: var(--color-sage);
  margin: 0 0.15em;
  transition: color var(--transition);
}

.rsvp-wa:hover {
  color: var(--color-sage-light);
}

.rsvp-wa-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.rsvp-contact a:not(.rsvp-wa) {
  color: var(--color-sage);
}

.rsvp-contact a:not(.rsvp-wa):hover {
  color: var(--color-text);
}

.rsvp-note {
  margin-top: var(--space-lg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.rsvp-note code {
  padding: 0.15em 0.4em;
  background: var(--color-wheat);
  border-radius: 0.25rem;
  font-size: 0.9em;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--section-padding-block) var(--space-md);
  text-align: center;
  background: var(--color-text);
  color: var(--color-cream);
}

.footer-names {
  font-family: var(--font-heading);
  font-size: var(--heading-sub);
  font-weight: 700;
  margin: 0 0 var(--space-xs);
}

.footer-date {
  font-family: var(--font-body);
  font-size: var(--text-base);
  margin: 0 0 var(--space-sm);
  opacity: 0.9;
}

.footer-credit {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  margin: 0;
  opacity: 0.75;
}

.site-footer a {
  color: var(--color-sage-light);
}

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

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