/* ==========================================================================
   Vanessa & Alex – Seitenstile für index.html
   Baut auf base.css (Tokens + Komponenten) auf. Mobile-first.
   ========================================================================== */

[hidden] {
  display: none !important;
}

:root {
  /* Dunkleres Akzentblau für kleine Texte (≥ 4.5:1 auf Creme/Papier); --blue-dark bleibt für grosse Schrift & Icons */
  --blue-deep: #4f6a80;
}

/* ---------- Allgemein ---------- */
/* Kontrast: kleine Hinweistexte in --ink-soft statt --ink-muted (base.css-Komponenten hier überschrieben) */
.field .hint,
.choice .choice-sub {
  color: var(--ink-soft);
}
.eyebrow,
.alert-info,
.hero-place a {
  color: var(--blue-deep);
}
/* Touch: kein grauer Tap-Blitz, keine "klebenden" Hover-Zustände nach dem Antippen */
.btn,
.choice,
.faq-item summary,
.link-btn,
a {
  -webkit-tap-highlight-color: transparent;
}
@media (hover: none) {
  .btn-primary:hover:not(:active),
  .btn-secondary:hover:not(:active) {
    transform: none;
  }
  .btn-primary:hover {
    background: var(--peach);
  }
  .btn-secondary:hover {
    background: var(--blue);
  }
  .btn-ghost:hover {
    background: transparent;
  }
  .choice:hover {
    border-color: var(--line);
  }
  .admin-link:hover {
    opacity: 0.6;
  }
}
/* Fallback für Browser ohne :has(): site.js setzt .is-checked auf dem gewählten Chip */
.choice.is-checked {
  border-color: var(--blue-dark);
  background: var(--blue-10);
  box-shadow: 0 0 0 4px var(--blue-25);
  transform: scale(1.01);
}
.choice.choice-peach.is-checked {
  border-color: var(--peach);
  background: var(--peach-10);
  box-shadow: 0 0 0 4px var(--peach-25);
}
/* Platzhalter im Code-Feld normal lesbar (nicht gesperrt/uppercase in Display-Serif) */
.input-code::placeholder {
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink-soft);
  opacity: 0.75;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  z-index: 2000;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: 700;
}
.skip-link:focus {
  left: 1rem;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
}
svg.icon {
  display: inline-block;
  vertical-align: -0.2em;
}

.section {
  position: relative;
  padding-block: var(--space-7);
  scroll-margin-top: 1rem;
  overflow-x: clip;
}
@supports not (overflow-x: clip) {
  .section {
    overflow-x: hidden;
  }
}
.section-head {
  text-align: center;
  margin-bottom: var(--space-6);
  max-width: 40rem;
  margin-inline: auto;
}
.section-head h2 {
  margin-bottom: var(--space-1);
}
.section-head .hand {
  display: block;
  margin-top: var(--space-1);
}
.section-head .intro-hand {
  font-size: 1.35rem;
  margin: var(--space-3) auto 0;
  max-width: 28rem;
}

/* Gerissene Papierkante / Trenner zwischen Sektionen */
.section-rsvp,
.section-faq {
  background: var(--cream-2);
}
.section-rsvp::before,
.section-faq::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 18px;
  background: var(--cream);
  -webkit-mask: radial-gradient(14px at 50% 0, transparent 97%, #000) 0 0 / 36px 100% repeat-x;
  mask: radial-gradient(14px at 50% 0, transparent 97%, #000) 0 0 / 36px 100% repeat-x;
  transform: scaleY(-1);
  pointer-events: none;
}

.link-btn {
  color: var(--blue-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  font-size: var(--fs-sm);
  min-height: var(--tap);
  padding: 0.5rem 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: calc(var(--space-6) + env(safe-area-inset-top, 0px)) var(--space-6);
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.55;
}
.blob-1 {
  width: 70vw;
  height: 70vw;
  max-width: 560px;
  max-height: 560px;
  background: var(--blue);
  top: -25vw;
  left: -25vw;
}
.blob-2 {
  width: 60vw;
  height: 60vw;
  max-width: 480px;
  max-height: 480px;
  background: var(--apricot);
  right: -20vw;
  top: 28%;
}
.blob-3 {
  width: 50vw;
  height: 50vw;
  max-width: 420px;
  max-height: 420px;
  background: var(--peach);
  bottom: -20vw;
  left: 15%;
  opacity: 0.3;
}
.dots {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(var(--blue-25) 1.6px, transparent 1.7px),
    radial-gradient(var(--peach-25) 1.6px, transparent 1.7px);
  background-size:
    44px 44px,
    62px 62px;
  background-position:
    0 0,
    22px 31px;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-6);
  align-items: center;
}
.hero-text {
  text-align: center;
}
.hero-title {
  font-weight: 500;
  margin-bottom: var(--space-3);
  line-height: 1;
}
.hero-title .amp {
  font-style: italic;
  font-weight: 400;
  color: var(--peach);
  margin-inline: 0.05em;
}
.hero-date,
.hero-place {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: var(--space-2);
  font-weight: 600;
  text-wrap: balance;
}
.hero-date {
  font-size: var(--fs-lg);
}
.hero-place {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: var(--fs-sm);
}
.hero-place .icon {
  color: var(--blue-dark);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-5);
}
.hero-actions .btn {
  flex: 1 1 11rem;
}
/* Scroll-Hinweis nur auf grossen Screens – auf dem Handy läge er einen ganzen Screen unter dem Fold */
.hero-scroll {
  display: none;
  position: relative;
  z-index: 1;
  text-align: center;
  margin: var(--space-6) 0 0;
  color: var(--ink-muted);
  font-size: 1.3rem;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* Countdown */
.countdown {
  margin-top: var(--space-5);
}
.countdown-label {
  margin: 0 0 var(--space-2);
  font-size: 1.5rem;
}
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  max-width: 24rem;
  margin-inline: auto;
}
.count-unit {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.25rem 0.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--line);
}
.count-unit:nth-child(odd) {
  transform: rotate(-1.2deg);
}
.count-unit:nth-child(even) {
  transform: rotate(1.2deg);
}
.count-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.count-num.tick {
  animation: tick 0.35s var(--ease-out);
}
@keyframes tick {
  from {
    transform: translateY(-12px);
    opacity: 0;
  }
}
.count-lbl {
  display: block;
  margin-top: 0.3rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.countdown-today {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-xl);
  color: var(--blue-dark);
  margin: 0;
}

/* Collage */
.collage {
  position: relative;
  width: 100%;
  max-width: 30rem;
  height: clamp(300px, 88vw, 420px);
  margin-inline: auto;
}
.collage-item {
  position: absolute;
  will-change: transform;
}
.collage-item .cutout {
  width: 100%;
}
.collage-item-1 {
  left: 0;
  top: 0;
  width: 47%;
  z-index: 2;
}
.collage-item-2 {
  right: 0;
  top: 7%;
  width: 44%;
  z-index: 1;
}
.collage-item-3 {
  left: 27%;
  bottom: 0;
  width: 42%;
  z-index: 3;
}
.cutout .tape {
  top: -12px;
  left: 50%;
  margin-left: -46px;
}
.collage-item-2 .tape {
  transform: rotate(5deg);
}

.sticker {
  position: absolute;
  display: inline-grid;
  place-items: center;
  padding: 0.4em 0.9em;
  border-radius: var(--radius-pill);
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  z-index: 4;
  white-space: nowrap;
}
.sticker-1 {
  background: var(--peach);
  top: 2%;
  right: 4%;
  transform: rotate(8deg);
}
.sticker-2 {
  background: var(--blue);
  left: 2%;
  bottom: 12%;
  transform: rotate(-7deg);
}
.sticker-3 {
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border-radius: 50%;
  background: var(--apricot);
  font-size: 1.4rem;
  right: 8%;
  bottom: 5%;
  transform: rotate(12deg);
}

/* ---------- Ablauf / Timeline ---------- */
.timeline-wrap {
  position: relative;
  max-width: 40rem;
  margin-inline: auto;
}
.timeline {
  position: relative;
  padding-left: 64px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 12px;
  bottom: 12px;
  border-left: 3px dashed var(--blue);
}
.stop {
  position: relative;
  padding-bottom: var(--space-5);
}
.stop:last-child {
  padding-bottom: 0;
}
.stop-marker {
  position: absolute;
  left: -64px;
  top: 6px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 3px solid var(--blue);
  color: var(--blue-dark);
  box-shadow: var(--shadow-sm);
  z-index: 1;
}
.stop-marker .icon {
  width: 1.4rem;
  height: 1.4rem;
}
.stop-bus .stop-marker {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
}
.stop-card {
  background: var(--paper);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
}
.stop-bus .stop-card {
  background: var(--blue-10);
  border-color: var(--blue-25);
}
.stop-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-1);
}
.stop-time {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--blue-dark);
  font-variant-numeric: tabular-nums;
}
.stop-bus .stop-time {
  color: var(--ink);
}
.stop-title {
  font-size: var(--fs-lg);
  margin: 0;
}
.stop-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}
.stop-bus .badge {
  margin-left: auto;
}

.bus-rider {
  position: absolute;
  left: 0;
  top: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--peach);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(247, 170, 142, 0.55);
  z-index: 2;
  pointer-events: none;
}
.bus-rider .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.timeline-note {
  text-align: center;
  margin-top: var(--space-6);
}
.timeline-note .hand {
  font-size: 1.6rem;
  margin-bottom: var(--space-4);
}

/* ---------- RSVP ---------- */
.rsvp-card {
  position: relative;
  max-width: 34rem;
  margin-inline: auto;
  border-radius: 10px;
  background: var(--paper);
  padding-top: clamp(1.75rem, 5vw, 2.5rem);
}
.rsvp-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px dashed var(--line);
  border-radius: 6px;
  pointer-events: none;
}
.rsvp-tape-top {
  top: -13px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
}
.rsvp-tape-bottom {
  bottom: -12px;
  right: 8%;
  transform: rotate(6deg);
}
/* Stempel sitzt bewusst auf der Kartenecke (über den Schritten), damit er das Code-Feld nicht überlappt */
.stamp {
  position: absolute;
  top: -8px;
  right: -4px;
  z-index: 2;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px dashed var(--peach);
  display: grid;
  place-items: center;
  font-family: var(--font-hand);
  font-weight: 700;
  color: var(--peach);
  font-size: 1.1rem;
  transform: rotate(14deg);
  opacity: 0.9;
  pointer-events: none;
}
.rsvp-step {
  position: relative;
}
.rsvp-loading {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  padding: var(--space-5) 0;
  color: var(--ink-soft);
}
.rsvp-loading .spinner {
  width: 2rem;
  height: 2rem;
  color: var(--blue-dark);
}
.rsvp-greeting {
  margin-bottom: var(--space-1);
  padding-right: 3.5rem;
}
#already-alert {
  margin-bottom: var(--space-4);
}
.fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 var(--space-4);
  min-inline-size: 0;
}
.fieldset legend {
  padding: 0;
  margin-bottom: var(--space-2);
}
/* Menü-Block: auf-/zuklappen per grid-template-rows (unterbrechbar, misst sich selbst) */
.menu-block {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 0.35s var(--ease-out),
    opacity 0.25s ease;
}
.menu-block.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}
.menu-block-inner {
  min-height: 0;
  overflow: hidden;
}
.menu-inner {
  padding: 6px; /* Platz für Fokusring/Schatten der Chips innerhalb von overflow:hidden */
}
.choice-text {
  display: grid;
  gap: 0.1rem;
}
.choice-row .choice {
  min-height: 56px;
}
.field-error {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--danger);
}
.field-error:empty {
  display: none;
}
#code-error,
#form-error {
  margin-bottom: var(--space-4);
}
.rsvp-switch {
  text-align: center;
  margin: var(--space-3) 0 0;
}

.rsvp-done {
  text-align: center;
}
.done-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: var(--space-3);
}
.summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  text-align: left;
  background: var(--cream-2);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin: var(--space-4) 0 var(--space-5);
}
.summary dt {
  font-weight: 700;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}
.summary dd {
  margin: 0;
  font-size: var(--fs-sm);
}
.share-hint {
  margin: var(--space-4) 0 0;
  font-size: 1.3rem;
}

/* ---------- Trauzeugen ---------- */
.witness-grid {
  display: grid;
  gap: calc(var(--space-6) + 70px);
  max-width: 46rem;
  margin: 90px auto 0;
}
.witness {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 0;
}
.witness .cutout {
  width: min(190px, 60%);
  margin: -80px auto var(--space-4);
}
.witness .cutout .tape {
  top: -12px;
  left: 50%;
  margin-left: -46px;
}
.witness-name {
  margin-bottom: var(--space-1);
}
.witness .badge {
  margin-bottom: var(--space-4);
}
.witness-note {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-4);
}
/* Kurze Button-Labels ("Anrufen", "E-Mail"); Nummer/Adresse stehen darunter und dürfen beliebig lang sein */
.contact-btns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: var(--space-3);
  width: 100%;
}
.contact-btns .btn {
  min-width: 0;
  padding-inline: 1rem;
}
.contact-lines {
  display: grid;
  gap: 0.15rem;
  margin: var(--space-3) 0 0;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.contact-lines.hand {
  font-size: 1.3rem;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: grid;
  gap: var(--space-3);
  max-width: 44rem;
  margin-inline: auto;
}
.faq-item {
  background: var(--paper);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: border-color 0.25s;
}
.faq-item[open] {
  border-color: var(--blue-25);
}
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.9rem 1.1rem;
  min-height: var(--tap);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lg);
  line-height: 1.25;
  border-radius: var(--radius-md);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::marker {
  content: "";
}
.faq-chevron {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-10);
  display: grid;
  place-items: center;
  color: var(--blue-dark);
  transition: transform 0.4s var(--ease-bounce);
}
.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}
.faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease-out);
}
.faq-item[open] .faq-body {
  grid-template-rows: 1fr;
}
.faq-body > div {
  overflow: hidden;
  min-height: 0;
}
.faq-answer {
  padding: 0 1.1rem 1.1rem;
  margin: 0;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: var(--space-7) var(--gutter) calc(var(--space-8) + env(safe-area-inset-bottom, 0px));
}
.footer-hand {
  font-size: 2.2rem;
  margin-bottom: var(--space-2);
}
.footer-line {
  margin-bottom: var(--space-4);
  font-weight: 600;
}
.admin-link {
  font-size: var(--fs-xs);
  text-decoration: none;
  opacity: 0.6;
  display: inline-block;
  min-height: var(--tap);
  line-height: var(--tap);
  padding-inline: var(--space-3);
}
.admin-link:hover {
  opacity: 1;
}

/* ---------- Sticky-Leiste (Mobile) ---------- */
.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: var(--cream);
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease-out);
}
.sticky-bar.show {
  transform: none;
}
/* Nach der Hochzeit (site.js setzt body.is-past) gibt es nichts mehr zuzusagen */
.is-past .sticky-bar {
  display: none;
}
.sticky-text {
  display: grid;
  line-height: 1.25;
  font-size: var(--fs-sm);
  min-width: 0;
}
.sticky-text strong {
  font-family: var(--font-display);
  font-size: var(--fs-md);
}
.sticky-bar .btn {
  flex: 0 0 auto;
}

/* ---------- Grössere Screens ---------- */
@media (min-width: 480px) {
  .choice-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .choice-row .choice {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    padding: 0.9rem 0.5rem;
    min-height: 92px;
  }
  .choice-row .choice-title {
    font-size: var(--fs-sm);
  }
}

@media (min-width: 720px) {
  .witness-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
  .section {
    padding-block: var(--space-8);
  }
}

@media (min-width: 880px) {
  .hero {
    min-height: 100svh;
    padding-block: var(--space-7);
  }
  .hero-grid {
    grid-template-columns: 1.05fr 1fr;
    gap: var(--space-7);
  }
  .hero-text {
    text-align: left;
  }
  .hero-date,
  .hero-place,
  .hero-actions {
    justify-content: flex-start;
  }
  .hero-actions .btn {
    flex: 0 1 auto;
  }
  .countdown-grid {
    margin-inline: 0;
    max-width: 26rem;
  }
  .collage {
    max-width: 34rem;
    height: 500px;
  }
  .hero-scroll {
    display: block;
  }
  .sticky-bar {
    display: none;
  }
}
