/* ------------------------------------------------------------------
   FONTS
   Telegraf font family from assets/fonts/Telegraf/
   Font files: PPTelegraf-*.otf
------------------------------------------------------------------ */
@font-face {
  font-family: 'Telegraf';
  src: url('../assets/fonts/Telegraf/PPTelegraf-Ultralight.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Telegraf';
  src: url('../assets/fonts/Telegraf/PPTelegraf-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Telegraf';
  src: url('../assets/fonts/Telegraf/PPTelegraf-Ultrabold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------
   DESIGN TOKENS
------------------------------------------------------------------ */
:root {
  --blue:       #345284;
  --beige:      #faf4d6;
  --terra:      #CC4E00;
  --blue-mid:   rgba(52, 82, 132, 0.18);
  --blue-dark:  #243a62;
}

/* ------------------------------------------------------------------
   RESET & BASE
------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Telegraf', Georgia, 'Times New Roman', serif;
  background: var(--beige);
  color: var(--blue);
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------
   HERO — blue/beige split with wavy SVG divider
------------------------------------------------------------------ */
.hero {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--beige);

  /* Flex centers .hero-stage horizontally; top-aligning keeps the
     invitation anchored to the top (blue zone) on off-ratio viewports. */
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ── Hero stage ──────────────────────────────────────────────────
   Single reference frame for all invitation elements. Locked to a
   fixed aspect ratio (--hero-aspect). The whole stage scales up/down
   to fit the viewport; all children are positioned in % of the stage,
   so their relative positions/sizes never drift when the window is
   resized. Change --hero-aspect to re-proportion the desktop layout.
------------------------------------------------------------------ */
.hero-stage {
  --hero-aspect: 16 / 9;

  position: relative;
  width: min(100%, calc(100dvh * (16 / 9)));
  aspect-ratio: var(--hero-aspect);
  z-index: 1;
}

/* SVG that fills the viewport and draws the blue zone + wave.
   Two wave paths live inside — show desktop wave by default, the
   mobile one is toggled on in the phone media query further down. */
.hero-split {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-split__wave-mobile  { display: none; }
.hero-split__wave-desktop { display: inline; }

/* ── Individually positioned invitation elements ──────────────────
   All values are % of the .hero-stage (NOT the viewport). Because the
   stage has a fixed aspect ratio, these proportions stay locked:
   resizing the window scales the whole composition uniformly instead
   of drifting apart. Tune left, top, width to reposition.
   Columns (in stage %): left 0–33 | centre 33–67 | right 67–100
------------------------------------------------------------------ */
.hero-el {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.hero-el--barca {
  width: 20%;
  left: 7%;
  top:  6%;
}

.hero-el--a {
  width: 3%;
  left: 19%;
  top:  20%;
}

.hero-el--vojta {
  width: 19%;
  left: 20%;
  top:  32%;
}

.hero-el--rucicky {
  width: 15%;
  left: 47%;
  top:  5%;
}

.hero-el--datum {
  width: 22%;
  left: 70%;
  top:  25%;
}

/* ── Welcome text in the beige zone ── */
.hero-welcome-wrap {
  position: absolute;
  top: 60dvh;
  left: 0;
  right: 0;
  bottom: 4rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
}

.hero-welcome {
  font-size: clamp(1.5rem, 4vw, 4rem);
  font-weight: 300;
  color: var(--blue);
  letter-spacing: 0.1em;
  text-align: center;
}

/* Animated scroll hint — anchor that jumps to #info on click */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--blue);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  animation: scrollBounce 2.2s ease-in-out infinite;
  transition: opacity 0.2s;
}
.scroll-hint:hover { opacity: 0.65; }
.scroll-hint:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 6px;
  border-radius: 2px;
}
.scroll-hint svg {
  width: 22px;
  height: 22px;
  stroke: var(--blue);
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ------------------------------------------------------------------
   SHARED SECTION STYLES
------------------------------------------------------------------ */
.section-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
  color: var(--terra);
}
.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.ornament-diamond {
  width: 8px;
  height: 8px;
  background: var(--terra);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ------------------------------------------------------------------
   INFO SECTION
------------------------------------------------------------------ */
.info-section {
  background: var(--beige);
}

.info-section .section-inner {
  max-width: 1400px;
}

.info-section .section-title {
  color: var(--blue);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.25rem;
}

.info-card {
  background: #fff;
  border: 1px solid var(--blue-mid);
  border-top: 3px solid var(--blue);
  border-radius: 2px;
  padding: 3.25rem 2.5rem;
  text-align: center;
}

.info-card-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 1.4rem;
  color: var(--blue);
}

.info-card h3 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--terra);
  margin-bottom: 1rem;
}

.info-card p {
  font-size: 1.08rem;
  line-height: 1.9;
  color: var(--blue);
}

.info-card a {
  display: inline-block;
  margin-top: 1.1rem;
  color: var(--terra);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--terra);
  padding-bottom: 1px;
  transition: opacity 0.2s;
}
.info-card a:hover { opacity: 0.7; }

/* ------------------------------------------------------------------
   RSVP SECTION
------------------------------------------------------------------ */
.rsvp-section {
  background: var(--blue);
}

.rsvp-section .section-title {
  color: var(--beige);
}

.rsvp-section .ornament {
  color: var(--terra);
}

/* ── RSVP card ──
   White card on the blue section — visual sibling of .info-card. */
.rsvp-card {
  max-width: 620px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--blue-mid);
  border-radius: 2px;
  padding: 3rem 2.5rem 3.25rem;
  text-align: center;
}

.rsvp-card__eyebrow {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--terra);
  margin-bottom: 0.35rem;
}

.rsvp-card__subtitle {
  font-size: 0.85rem;
  color: var(--blue);
  opacity: 0.6;
  letter-spacing: 0.06em;
  margin-bottom: 2.5rem;
}

/* ── RSVP form — lives inside the white card ── */
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
  color: var(--blue);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border: 0;
  padding: 0;
  min-width: 0;
}

.form-field > label,
.form-field > legend {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--terra);
}

.rsvp-form input[type="text"],
.rsvp-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--blue-mid);
  border-radius: 2px;
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rsvp-form input[type="text"]:focus,
.rsvp-form textarea:focus {
  outline: none;
  border-color: var(--terra);
  box-shadow: 0 0 0 2px rgba(204, 78, 0, 0.2);
}
.rsvp-form textarea {
  resize: vertical;
  min-height: 88px;
  font-family: inherit;
}

/* Radio pills for the three yes/no-style questions. */
.form-field--choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
}
.form-field--choice legend { width: 100%; margin-bottom: 0.15rem; }

.form-field--choice label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.15rem;
  background: rgba(52, 82, 132, 0.06);
  border: 1px solid var(--blue-mid);
  border-radius: 999px;
  color: var(--blue);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.form-field--choice label:hover {
  background: rgba(52, 82, 132, 0.12);
}
.form-field--choice input[type="radio"] {
  accent-color: var(--terra);
}
.form-field--choice label:has(input[type="radio"]:checked) {
  background: var(--terra);
  border-color: var(--terra);
  color: var(--beige);
}

.form-submit {
  align-self: center;
  margin-top: 0.75rem;
  padding: 0.95rem 2.6rem;
  background: var(--terra);
  color: var(--beige);
  border: 0;
  border-radius: 2px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}
.form-submit:hover { opacity: 0.88; }
.form-submit:active { transform: translateY(1px); }
.form-submit:disabled { opacity: 0.5; cursor: progress; }

.form-status {
  text-align: center;
  min-height: 1.4em;
  font-size: 0.92rem;
  color: var(--blue);
}
.form-status--success { color: #1b7f4e; }
.form-status--error   { color: #a8340e; }

/* ------------------------------------------------------------------
   FOOTER
------------------------------------------------------------------ */
footer {
  background: var(--blue-dark);
  padding: 2rem 1.5rem;
  text-align: center;
  color: rgba(249, 240, 208, 0.45);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

/* ------------------------------------------------------------------
   RESPONSIVE TWEAKS — MOBILE HERO
   On phones the <picture> tags in HTML swap each image to the
   *uncropped* PNG (the full 1748×2481 invitation canvas with one
   element opaque). Stacking all five at the same size/position
   reconstructs the original invitation — so we only need ONE shared
   rule for all .hero-el.
   Tune the single `width` / `top` below to resize or reposition
   the whole invitation block on mobile.
------------------------------------------------------------------ */
@media (max-width: 700px) {
  /* Swap to the 2/3-blue / 1/3-beige wave on phones. */
  .hero-split__wave-desktop { display: none; }
  .hero-split__wave-mobile  { display: inline; }

  /* Drop the fixed-aspect stage on phones — let it cover the whole
     hero so the existing viewport-based mobile positioning keeps working. */
  .hero-stage {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  .hero-el {
    left: 50%;
    top: -5dvh;
    width: 105vw;
    transform: translateX(-50%);
  }

  /* Welcome text moves into the smaller beige strip at the bottom third. */
  .hero-welcome-wrap {
    top: 72dvh;
    padding: 0 1.25rem;
  }

  .hero-welcome {
    font-size: clamp(1.1rem, 5.5vw, 2rem);
    letter-spacing: 0.08em;
  }

  .scroll-hint {
    bottom: 1.5rem;
    font-size: 0.65rem;
  }
  .scroll-hint svg { width: 18px; height: 18px; }
}

/* ------------------------------------------------------------------
   RESPONSIVE TWEAKS — OTHER SECTIONS
------------------------------------------------------------------ */
@media (max-width: 480px) {
  .section-inner { padding: 4rem 1.25rem; }
}