:root {
  --color-bg: #F4F8FC;
  --color-bg-alt: #E6EFF7;
  --color-text: #1F2933;
  --color-muted: #55677A;
  --color-primary: #2C5D82;
  --color-primary-dark: #163A5C;
  --color-accent: #1A69A0;
  --color-line: #D6E3EE;
  --color-white: #FFFFFF;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Jost', 'Segoe UI', Helvetica, Arial, sans-serif;
  --max-width: 880px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0 0 .4em; color: var(--color-primary-dark); }

p { margin: 0 0 1em; }

a { color: var(--color-primary-dark); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.muted { color: var(--color-muted); font-size: .9em; }
.link-muted { color: var(--color-muted); text-decoration: none; border-bottom: 1px solid var(--color-line); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  padding: .85em 1.8em;
  border-radius: 999px;
  border: 1px solid var(--color-primary-dark);
  background: var(--color-primary-dark);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: .95rem;
  letter-spacing: .03em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.98); }
.btn-ghost {
  background: transparent;
  color: var(--color-primary-dark);
}
.btn-sm { padding: .5em 1.2em; font-size: .85rem; }

/* ---------------- Gate ---------------- */
.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at top, var(--color-bg-alt), var(--color-bg) 65%);
}
.gate-card {
  max-width: 420px;
  width: 100%;
  text-align: center;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 18px;
  padding: 3rem 2.2rem;
  box-shadow: 0 20px 50px -25px rgba(31,41,51,.35);
}
.gate-eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  color: var(--color-accent);
  margin-bottom: .6em;
}
.gate-title { font-size: 2.4rem; margin-bottom: .3em; }
.gate-sub { color: var(--color-muted); font-size: .92rem; }
.gate-form {
  display: flex;
  gap: .6rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}
.gate-form input {
  flex: 1 1 180px;
  padding: .8em 1em;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  font-family: var(--font-body);
  font-size: .95rem;
  background: var(--color-bg);
}
.gate-form input:focus { outline: 2px solid var(--color-accent); }
.gate-form button {
  flex: 0 0 auto;
  padding: .8em 1.6em;
  border-radius: 999px;
  border: 1px solid var(--color-primary-dark);
  background: var(--color-primary-dark);
  color: var(--color-white);
  cursor: pointer;
}
.gate-error { color: #A13B3B; margin-top: 1em; font-size: .88rem; }

/* ---------------- Nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244,248,252,.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-line);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: .9rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--color-primary-dark);
}
.nav-left { display: flex; align-items: center; gap: .8rem; }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-links { display: flex; gap: 1.6rem; }
.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-size: .88rem;
  letter-spacing: .02em;
}
.nav-links a:hover { color: var(--color-primary-dark); }

/* ---------------- Language switch (CS/EN pill toggle) ----------------
   Same visual/UX shape as WalDrop's locale-switcher.tsx / OptiGate's
   language-toggle.tsx (role="group" pill, aria-pressed active state) —
   rewired to this site's own custom properties since there's no shadcn
   token layer here. */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  border: 1px solid var(--color-line);
  background: var(--color-white);
  border-radius: 999px;
  padding: 2px;
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.lang-btn {
  height: 28px;
  min-width: 34px;
  padding: 0 .65em;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-muted);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease-out, color .15s ease-out, transform .15s ease-out;
}
.lang-btn:hover { color: var(--color-primary-dark); }
.lang-btn:active { transform: scale(.95); }
.lang-btn[aria-pressed="true"] {
  background: var(--color-primary-dark);
  color: var(--color-white);
}
.lang-btn[aria-pressed="true"]:hover { color: var(--color-white); }

/* login.html has no nav bar (guest isn't authenticated yet) — the toggle
   floats top-right instead of sitting inline in a nav row. */
.lang-bar {
  position: fixed;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 30;
}

@media (prefers-reduced-motion: reduce) {
  .lang-btn { transition: none; }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--color-text); }

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-line);
    flex-direction: column;
    gap: 0;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .9rem 1.4rem; border-top: 1px solid var(--color-line); }
}

/* ---------------- Hero ---------------- */
.hero {
  text-align: center;
  padding: 6rem 1.4rem 4rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero-illustration {
  display: block;
  width: clamp(72px, 12vw, 110px);
  height: auto;
  margin: 0 auto 1.6rem;
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
  color: var(--color-accent);
  margin-bottom: 1em;
}
.hero-names {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  margin-bottom: .2em;
}
.hero-names .amp { color: var(--color-accent); font-style: italic; padding: 0 .15em; }
.hero-surname {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--color-accent);
  margin-bottom: .6em;
}
.hero-date { font-size: 1.05rem; color: var(--color-muted); margin-bottom: 2rem; }

.countdown {
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  margin-bottom: 2.4rem;
}
.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.countdown-item span {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-primary-dark);
}
.countdown-item small {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .68rem;
  color: var(--color-muted);
}
.hero-cta { margin-top: .5rem; }

/* ---------------- Photo moment (couple photo — quiet beat between hero and content) ---------------- */
.photo-moment {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.4rem 3.5rem;
  text-align: center;
}
.couple-photo-frame {
  margin: 0 auto;
  max-width: 340px;
}
.couple-photo-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--color-line);
  box-shadow: 0 20px 50px -25px rgba(31,41,51,.35);
}
.couple-photo-frame figcaption {
  margin-top: .9rem;
  font-family: var(--font-body);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* ---------------- Sections ---------------- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.5rem 1.4rem;
}
.section-alt {
  max-width: none;
  background: var(--color-bg-alt);
}
.section-alt > * { max-width: var(--max-width); margin-left: auto; margin-right: auto; }
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  color: var(--color-accent);
  margin-bottom: .5em;
}
.section-title { font-size: 2rem; margin-bottom: .6em; }
.section-lead { color: var(--color-muted); max-width: 640px; }

/* Timeline */
.timeline { margin: 2rem 0; display: flex; flex-direction: column; gap: 1.6rem; }
.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--color-line);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-time {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--color-accent);
}
.timeline-item h3 { font-size: 1.15rem; margin-bottom: .2em; }
.timeline-item p { color: var(--color-muted); margin-bottom: 0; font-size: .92rem; }

/* Info grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
  margin-top: 2rem;
}
.info-card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 14px;
  padding: 1.6rem;
}
.info-card h3 { font-size: 1.15rem; }
.info-card p { color: var(--color-muted); font-size: .92rem; margin-bottom: .4em; }
.lodging-list {
  list-style: none;
  margin: .6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: .92rem;
}

/* Gift card */
.gift-card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 14px;
  padding: 1.8rem;
  margin-top: 1.6rem;
  max-width: 420px;
}
.gift-card h3 { font-size: 1.1rem; }

/* ---------------- RSVP form ---------------- */
.rsvp-form { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.6rem; max-width: 620px; }
.field { display: flex; flex-direction: column; gap: .5rem; }
.field label, .field legend { font-size: .92rem; font-weight: 500; padding: 0; }
.field-hint { color: var(--color-muted); font-size: .82rem; margin: -.2rem 0 0; }
fieldset.field { border: none; padding: 0; margin: 0; }

input[type="text"], textarea {
  padding: .8em 1em;
  border-radius: 10px;
  border: 1px solid var(--color-line);
  background: var(--color-white);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--color-text);
}
input[type="text"]:focus, textarea:focus { outline: 2px solid var(--color-accent); }

.radio-row { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.radio { display: flex; align-items: center; gap: .5em; font-size: .92rem; font-weight: 400; cursor: pointer; }

.guest-list { display: flex; flex-direction: column; gap: .8rem; margin: .6rem 0; }
.guest-row {
  display: grid;
  grid-template-columns: 1.4fr auto 1.4fr auto;
  gap: .6rem;
  align-items: center;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  padding: .7rem;
}
.guest-name, .guest-allergy {
  padding: .6em .8em;
  border-radius: 8px;
  border: 1px solid var(--color-line);
  font-family: var(--font-body);
  font-size: .9rem;
}
.guest-child {
  display: flex;
  align-items: center;
  gap: .4em;
  font-size: .82rem;
  color: var(--color-muted);
  white-space: nowrap;
}
.guest-remove {
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: .2em .5em;
}
.guest-remove:hover { color: #A13B3B; }

@media (max-width: 640px) {
  .guest-row { grid-template-columns: 1fr; }
  .guest-remove { justify-self: end; }
}

.rsvp-success {
  margin-top: 2rem;
  padding: 2rem;
  border-radius: 14px;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  max-width: 620px;
}

/* ---------------- Footer ---------------- */
.footer {
  text-align: center;
  padding: 3rem 1.4rem 4rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.whatsapp-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: .8rem;
}
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .7em 1.5em;
  border-radius: 999px;
  background: var(--color-primary-dark);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: .9rem;
  letter-spacing: .02em;
  text-decoration: none;
  transition: opacity .15s ease, transform .15s ease;
}
.whatsapp-btn:hover { opacity: .88; }
.whatsapp-btn:active { transform: scale(.98); }
.whatsapp-icon { width: 18px; height: 18px; flex: 0 0 auto; }
