:root {
  --green-dark: #232f28;
  --green-darker: #1a231e;
  --cream: #f4f1ea;
  --cream-soft: #ece7dc;
  --ink: #20241f;
  --ink-soft: rgba(32, 36, 31, 0.62);
  --paper: #f3f2f1;
  --paper-soft: rgba(243, 242, 241, 0.62);
  --line: rgba(243, 242, 241, 0.25);
  --line-dark: rgba(32, 36, 31, 0.15);

  --serif: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 28px;
}

/* ---------- persistent corner frame ---------- */
.frame {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  font-family: var(--serif);
  color: var(--paper);
  mix-blend-mode: difference;
}
.frame > div, .frame > nav { position: absolute; pointer-events: auto; }
.frame.over-hero {
  mix-blend-mode: normal;
}
.frame.over-hero .frame-tl,
.frame.over-hero .frame-tr,
.frame.over-hero .frame-bl {
  text-shadow: 0 1px 14px rgba(20, 28, 22, 0.5);
}
.frame.over-hero .frame-rsvp {
  text-shadow: 0 1px 10px rgba(20, 28, 22, 0.5);
}

.frame-tl {
  top: 32px; left: 32px;
  font-size: 15px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: opacity 0.12s ease;
}
.frame-tl.is-dimmed { opacity: 0; }
.frame-tl span {
  font-size: 20px;
  font-style: italic;
  font-weight: 450;
  font-variation-settings: 'opsz' 40;
  padding: 0 1px;
}

.frame-tr { top: 32px; right: 32px; }

.frame-bl {
  bottom: 32px; left: -22px;
  transform: rotate(-90deg);
  transform-origin: left bottom;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  white-space: nowrap;
}

.frame-rsvp {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  border: 1px solid var(--paper);
  border-radius: 2px;
  padding: 10px 20px;
  display: inline-block;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.25s ease;
}
.frame-rsvp:hover { opacity: 0.6; }

.frame-nav {
  top: 40.5px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 28px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.12s ease;
}
.frame-nav.is-dimmed { opacity: 0; pointer-events: none; }
.frame-nav a {
  opacity: 0.55;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: opacity 0.25s ease, border-color 0.25s ease;
}
.frame-nav a:hover { opacity: 0.85; }
.frame-nav a.active { opacity: 1; border-bottom-color: currentColor; }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 68%;
  opacity: 0.85;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--green-dark);
  opacity: 0.1;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; padding: 0 24px; }
.hero-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 1px 16px rgba(20, 28, 22, 0.45);
  margin: 24px auto;
  line-height: 1.8;
}
.eyebrow-part { white-space: nowrap; }
.hero-title {
  font-family: var(--serif);
  font-weight: 450;
  font-style: italic;
  color: var(--paper);
  text-shadow: 0 4px 30px rgba(16, 22, 18, 0.5);
  font-size: clamp(28px, 5.2vw, 58px);
  line-height: 1.25;
  letter-spacing: -0.005em;
  max-width: 24ch;
  margin: 0 auto;
}
.hero-title-wide { max-width: 44ch; }
.btn.hero-rsvp-mobile {
  display: none;
  margin-top: 40px;
  background: rgba(20, 28, 22, 0.35);
  color: var(--paper);
  border: 1px solid var(--paper);
  text-shadow: 0 1px 16px rgba(20, 28, 22, 0.45);
}
.btn.hero-rsvp-mobile:hover { background: var(--paper); color: var(--ink); }
.hero-scroll {
  margin-top: 48px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 1px 16px rgba(20, 28, 22, 0.45);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.35; } 50% { opacity: 0.9; } }

/* ---------- generic panel ---------- */
.panel {
  min-height: 100vh;
  padding: 160px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.panel.in-view { opacity: 1; transform: translateY(0); }

.panel-date {
  background: var(--green-dark);
  color: var(--paper);
}
.skyline {
  width: 72%;
  max-width: 461px;
  margin: 0 auto -12px;
  mix-blend-mode: lighten;
}

.plane-illustration {
  width: 80%;
  max-width: 512px;
  margin: 0 auto 12px;
}
.panel-split .plane-illustration { width: 96%; max-width: 614px; }

.poland-map {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}

.big-date {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.3;
}
.big-date-oneline {
  font-size: clamp(22px, 4.2vw, 48px);
  white-space: nowrap;
}

.date-location {
  margin-top: 24px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-soft);
}

.panel-date .btn {
  margin-top: 32px;
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.panel-date .btn:hover { background: transparent; color: var(--paper); }
.panel-date .btn.btn-outline {
  background: transparent;
  color: var(--paper);
  border-color: var(--paper);
}
.panel-date .btn.btn-outline:hover { background: var(--paper); color: var(--ink); }

/* ---------- RSVP form ---------- */
/* ---------- RSVP modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--green-dark);
  overflow-y: auto;
}
.modal-box {
  position: relative;
  min-height: 100%;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px;
}
.modal-close {
  position: fixed;
  top: 32px;
  right: 32px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--paper);
  font-size: 9.5px;
  cursor: pointer;
  transition: opacity 0.25s ease;
  z-index: 1;
}
.modal-close:hover { opacity: 0.6; }
.modal-box .btn.btn-outline {
  background: transparent;
  color: var(--paper);
  border-color: var(--paper);
}
.modal-box .btn.btn-outline:hover { background: var(--paper); color: var(--ink); }
.btn.rsvp-cancel { display: none; }
.modal-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 450;
  font-size: 30px;
  text-align: center;
  margin-bottom: 32px;
}

.rsvp-form {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: left;
}
.field label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-soft);
  margin-bottom: 10px;
}
.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 8px 2px;
  font-family: var(--serif);
  font-size: 19px;
  color: var(--paper);
  outline: none;
  transition: border-color 0.25s ease;
}
.field input[type="text"]:focus,
.field input[type="email"]:focus { border-bottom-color: var(--paper); }
.field input[type="text"]::placeholder,
.field input[type="email"]::placeholder { color: var(--paper-soft); }

.toggle-group { display: flex; flex-wrap: wrap; gap: 10px; }
.toggle-btn {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: all 0.25s ease;
}
.toggle-btn:hover { background: rgba(243, 242, 241, 0.12); border-color: var(--paper); }
.toggle-btn.is-selected { background: var(--paper); border-color: var(--paper); color: var(--ink); }

.rsvp-form .btn { align-self: stretch; width: 100%; margin-top: 8px; }
.rsvp-actions { display: flex; flex-direction: column; gap: 16px; }
.rsvp-actions .btn { margin-top: 0; }

.form-error {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--paper);
  text-align: center;
  margin-top: -4px;
}

.rsvp-success { margin-top: 40px; text-align: center; }
.btn.rsvp-done-mobile { display: none; }

.panel-activities {
  background: var(--green-dark);
  color: var(--paper);
}
.panel-activities .label { color: var(--paper-soft); }
.panel-activities .split-title { color: var(--paper); }
.panel-activities .split-copy { color: var(--paper-soft); }
.panel-activities .split-copy strong { color: var(--paper); }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 18px 44px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.btn:hover { background: transparent; color: var(--ink); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-dark);
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.panel-story {
  opacity: 1;
  transform: none;
}

/* ---------- timeline ---------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 672px;
  width: 100%;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.timeline.in-view { opacity: 1; transform: translateY(0); }
.timeline li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-dark);
  text-align: left;
}
.t-date {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
.t-text {
  font-family: var(--serif);
  font-size: clamp(18px, 2.4vw, 24px);
  text-align: right;
}

/* ---------- gallery grid (within Our Story) ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 960px;
  margin-top: 56px;
}
.g-tile {
  aspect-ratio: 3/4;
  background: linear-gradient(155deg, rgba(32,36,31,0.05), rgba(32,36,31,0.02));
  border: 1px solid var(--line-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.g-tile.in-view { opacity: 1; transform: translateY(0); }
.g-tile.in-view:hover { opacity: 0.85; }
.g-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- photo lightbox ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 24px;
  overflow: hidden;
}
.lightbox-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(50px) brightness(0.55) saturate(1.15);
  transform: scale(1.2);
}
.lightbox-img {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.lightbox-close { position: fixed; }
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--paper);
  cursor: pointer;
  transition: opacity 0.25s ease;
}
.lightbox-nav:hover { opacity: 0.6; }
.lightbox-prev { left: 32px; }
.lightbox-next { right: 32px; }

@media (max-width: 640px) {
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
}

/* ---------- split panels (airport / lodging) ---------- */
.panel-split { background: var(--cream); }
.panel-split.alt { background: var(--cream-soft); }
.panel-food { background: #f0e9dd; }
.split-col { max-width: 560px; }
.split-title { font-family: var(--serif); font-size: clamp(24px, 4vw, 46px); line-height: 1.15; margin-bottom: 24px; white-space: nowrap; }
.split-title .code { font-size: 0.5em; font-family: var(--sans); font-weight: 500; letter-spacing: 0.1em; vertical-align: middle; color: var(--ink-soft); }
.split-copy { font-family: var(--sans); font-size: 15px; line-height: 1.7; color: var(--ink-soft); max-width: 500px; width: 100%; margin: 0 auto 15px; }
.split-copy:last-of-type { margin-bottom: 0px; }
.split-copy strong { font-weight: 600; color: var(--ink); }
.split-copy-left { text-align: left; }

@media (max-width: 640px) {
  .frame-tl { font-size: 13px; }
  .frame-tr { display: none; }
  .frame-bl { font-size: 10px; }
  .frame-nav {
    top: 41px;
    left: auto;
    right: 32px;
    transform: none;
    gap: 16px;
  }
  .btn.hero-rsvp-mobile { display: inline-block; }
  .panel { padding: 120px 20px; }
  .gallery-grid { grid-template-columns: repeat(1, 1fr); }
  .g-tile { cursor: default; }
  .timeline li { flex-direction: column; align-items: flex-start; gap: 8px; }
  .t-text { text-align: left; }
  .split-title { white-space: normal; }
  .modal-close { display: none; }
  .lightbox-close { display: flex; }
  .btn.rsvp-cancel { display: inline-block; }
  .rsvp-success { min-height: 100%; width: 100%; display: flex; flex-direction: column; }
  .btn.rsvp-done-mobile { display: inline-block; width: 100%; margin-top: auto; }
  .modal-box .btn.rsvp-submit {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--paper);
  }
  .modal-box { align-items: stretch; padding-top: 70px; padding-bottom: 44px; }
  .rsvp-form { min-height: 100%; }
  .rsvp-actions { margin-top: auto; }

  /* balance the gap above the title with the image above and the subtitle below */
  #the-date .big-date-oneline {
    margin-top: 20px;
  }
  .panel-activities .split-title {
    margin-top: 32px;
  }
  .panel-activities .skyline {
    width: 100%;
    max-width: 100%;
  }
}
