/* ---------- Theme ---------- */
:root {
  /* Given palette */
  --pale-sky: #a9c1cb;
  --pale-sky-2: #c3d7e2;
  --taupe: #a6948a;
  --dark-slate-grey: #295553;
  --slate-grey: #688080;

  /* Semantic roles, built from the palette above */
  --surface-0: var(--pale-sky-2);
  --surface-1: #ffffff;
  --surface-2: color-mix(in srgb, var(--text-secondary) 10%, white);
  --text-primary: var(--dark-slate-grey);
  --text-secondary: var(--taupe);
  --border: rgba(41, 85, 83, 0.14);
  --border-strong: rgba(41, 85, 83, 0.3);
  --radius: 10px;
  --radius-lg: 18px;
  --accent: var(--slate-grey);
  --accent-contrast: #ffffff;
  --accent-secondary: var(--dark-slate-grey);
  --accent-secondary-contrast: #ffffff;
  --danger: #b3452f;
  --shadow-card: 0 30px 70px -30px rgba(41, 85, 83, 0.35);
  --font-voice: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --hero-bg-image: url('../img/hero-bg.jpg');
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--surface-2);
}

button {
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 15px;
}

a {
  color: inherit;
}

/* ---------- Shared card shell (gate + app both float on the hero bg) ---------- */
/* Fluid width: scales continuously with the viewport instead of jumping
   between fixed breakpoints, and stays roughly full-bleed (minus a small
   gutter) on narrow screens without capping out early on wide ones. */
.gate,
.app {
  margin: clamp(1.5rem, 5vh, 4rem) auto;
}

.gate {
  /* A password form doesn't need to sprawl on a wide screen. */
  width: clamp(288px, 90vw, 480px);
}

.app {
  width: clamp(288px, 94vw, 960px);
}

.gate {
  min-height: calc(100vh - 3rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* .gate sets display:flex with the same specificity as the UA stylesheet's
   [hidden] { display: none }, and — since author styles load after the UA
   sheet — would otherwise win and show the gate even while hidden. */
.gate[hidden],
.app[hidden] {
  display: none;
}

.gate__card,
.app {
  background: var(--surface-1);
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* ---------- Password gate ---------- */
.gate__card {
  width: 100%;
  padding: 2.75rem 1.75rem 2.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gate__eyebrow {
  font-family: var(--font-voice);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.gate__title {
  font-family: var(--font-voice);
  font-weight: 400;
  font-size: clamp(28px, 6vw, 34px);
  margin: 0 0 12px;
}

.gate__subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 24px;
  line-height: 1.5;
}

.gate__label {
  text-align: left;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.gate__input {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  margin-bottom: 18px;
}

.gate__input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.gate__submit {
  position: relative;
  padding: 13px 18px;
  border-radius: var(--radius);
  border: none;
  background: var(--text-primary);
  color: var(--accent-contrast);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
}

.gate__submit:disabled {
  opacity: 0.7;
  cursor: default;
}

.gate__spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.gate__error {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--danger);
}

/* ---------- App shell ---------- */
.app {
  display: block;
}

.hero {
  text-align: center;
  padding: 10rem 1.5rem 1.5rem;
  background-color: var(--surface-2);
  background-image: var(--hero-bg-image);
  background-size: cover;
  background-position: center;
  border-bottom: 0.5px solid var(--border);
}

.hero__panel {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 1.5rem;
}

.hero__eyebrow {
  font-family: var(--font-voice);
  font-size: 13px;
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 2px 14px rgba(0, 0, 0, 0.25);
  margin: 0 0 12px;
}

.hero__title {
  font-family: var(--font-voice);
  font-weight: 400;
  font-size: clamp(30px, 7vw, 38px);
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45), 0 4px 18px rgba(0, 0, 0, 0.3);
  margin: 0 0 10px;
}

.hero__meta {
  font-size: 15px;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 2px 14px rgba(0, 0, 0, 0.25);
  margin: 0;
}

.countdown {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.countdown__unit {
  background: var(--surface-1);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-width: 56px;
}

.countdown__value {
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  font-family: var(--font-voice);
}

.countdown__label {
  font-size: 11px;
  color: var(--text-secondary);
  margin: 2px 0 0;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 12px 1.5rem;
  background: var(--accent);
  border-bottom: 0.5px solid var(--border);
}

.nav__link {
  font-size: 13px;
  color: var(--accent-secondary-contrast);
  text-decoration: none;
  padding: 6px 2px;
  opacity: 0.85;
}

.nav__link:hover,
.nav__link:focus-visible {
  opacity: 1;
  color: var(--pale-sky-2);
}

/* ---------- Generic section ---------- */
.section {
  padding: 2.25rem 1.5rem;
  border-top: 0.5px solid var(--border);
}

.section--tinted {
  background: var(--surface-2);
}

.section__title {
  font-family: var(--font-voice);
  font-weight: 400;
  font-size: 18px;
  text-align: center;
  margin: 0 0 1.25rem;
}

.section__intro {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 420px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

/* ---------- Ort & Zeitplan ---------- */
.schedule-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.schedule-card {
  background: var(--surface-1);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  flex: 1 1 140px;
  max-width: 220px;
}

.schedule-card__icon {
  color: var(--accent-secondary);
  display: inline-block;
}

/* Width/height on the wrapping element above only take effect if it isn't
   a plain inline box (e.g. blockified as a flex item) — an inline <span>
   ignores them, so the child <svg> falls back to its default intrinsic
   size (100s of px). Sizing the replaced <svg> element directly always
   works regardless of the wrapper's display type. */
.schedule-card__icon svg {
  width: 17px;
  height: 17px;
}

.schedule-card__label {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0 2px;
}

.schedule-card__value {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

.map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 0.5px solid var(--border);
  background: var(--surface-1);
}

.map__canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
}

.map__loading {
  margin: 0;
  padding: 1.5rem;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.map__marker-label {
  position: absolute;
  transform: translateY(-50%);
  background: #ffffff;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(41, 85, 83, 0.25);
  white-space: nowrap;
  font-family: var(--font-voice);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  pointer-events: none;
}

.map__links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 12px;
  border-top: 0.5px solid var(--border);
}

.map__link {
  font-size: 13px;
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.map__link:hover,
.map__link:focus-visible {
  background: var(--surface-2);
}

/* ---------- Anreise & Unterkunft ---------- */
.travel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
}

.travel-card {
  background: var(--surface-1);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  border: 0.5px solid var(--border);
}

.travel-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 6px;
}

.travel-card__title svg {
  width: 14px;
  height: 14px;
  color: var(--accent-secondary);
  flex-shrink: 0;
}

.travel-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 6px;
}

.travel-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- RSVP ---------- */
.rsvp-form {
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  color: var(--text-primary);
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.rsvp-form textarea {
  resize: vertical;
  min-height: 64px;
}

.rsvp-form__submit {
  margin-top: 4px;
  padding: 13px 18px;
  border-radius: var(--radius);
  border: none;
  background: var(--text-primary);
  color: var(--accent-contrast);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  min-height: 48px;
}

.rsvp-form__submit:disabled {
  opacity: 0.7;
  cursor: default;
}

.rsvp-form__status {
  font-size: 13px;
  margin: 4px 0 0;
  text-align: center;
}

.rsvp-form__status--error {
  color: var(--danger);
}

.rsvp-success {
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.rsvp-success__title {
  font-family: var(--font-voice);
  font-size: 20px;
  margin: 0 0 8px;
}

.rsvp-success p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--surface-1);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: none;
  border: none;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.faq-item__chevron {
  flex-shrink: 0;
  color: var(--accent-secondary);
  transition: transform 0.2s ease;
}

.faq-item__chevron svg {
  width: 13px;
  height: 13px;
  display: block;
}

.faq-item[data-open='true'] .faq-item__chevron {
  transform: rotate(180deg);
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-item[data-open='true'] .faq-item__answer {
  max-height: 240px;
}

.faq-item__answer p {
  margin: 0;
  padding: 0 16px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.contact-card {
  max-width: 360px;
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.contact-card strong {
  color: var(--text-primary);
}

.contact-card svg {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
  color: var(--accent-secondary);
}

/* ---------- Footer ---------- */
.footer {
  padding: 1.75rem 1.5rem 2rem;
  text-align: center;
  border-top: 0.5px solid var(--border);
  background: var(--surface-2);
}

.footer__monogram {
  font-family: var(--font-voice);
  font-size: 18px;
  margin: 0 0 4px;
}

.footer__date {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 480px) {
  .gate__card,
  .section {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }

  .nav {
    gap: 16px;
  }
}
