/* Q-Πρόσκληση: κοινή βάση για όλες τις προτάσεις (γάμος + βάπτιση).
   Κάθε πρόταση ορίζει τα δικά της χρώματα/γραμματοσειρές με τις μεταβλητές του :root. */

:root {
  --paper: #fbf8f2;
  --ink: #2a2622;
  --muted: #7a7168;
  --accent: #8c6d3f;
  --accent-ink: #fff;
  --line: rgba(42, 38, 34, .14);
  --field: rgba(255, 255, 255, .75);
  --backdrop: #e9e3d8;
  --font-display: "Noto Serif Display", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--backdrop);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

/* Η πρόσκληση είναι μια «στήλη κινητού»· στον υπολογιστή κάθεται στη μέση σαν κάρτα. */
.inv {
  position: relative;
  max-width: 460px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  background: var(--paper);
  overflow: hidden;
}
@media (min-width: 620px) {
  body { padding: 32px 0; }
  .inv { border-radius: 22px; box-shadow: 0 30px 80px rgba(20, 16, 10, .18), 0 2px 6px rgba(20, 16, 10, .08); min-height: calc(100vh - 64px); }
}

/* Η εισαγωγή πιάνει την ΟΘΟΝΗ (όχι όλο το ύψος της σελίδας), στο πλάτος της στήλης. */
.intro-layer {
  position: fixed; z-index: 20; top: 0; bottom: 0; left: 50%;
  width: 100%; max-width: 460px; transform: translateX(-50%); overflow: hidden;
}
@media (min-width: 620px) { .intro-layer { top: 32px; bottom: 32px; border-radius: 22px; } }

/* Όσο φαίνεται η εισαγωγή, η σελίδα δεν κυλάει. */
html:not(.is-open) body { overflow: hidden; }
html.is-open [data-intro] { pointer-events: none; }
html.skip-intro [data-intro] { display: none !important; }

/* Εμφάνιση στοιχείων με την κύλιση (μόνο μετά το άνοιγμα). */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: .12s; } .rv.d2 { transition-delay: .24s; } .rv.d3 { transition-delay: .36s; }

/* Το [hidden] κρύβει πάντα (αλλιώς π.χ. το .rsvp {display:grid} κρατούσε τη φόρμα ορατή μετά την αποστολή) */
[hidden] { display: none !important; }

/* Προσωπική προσφώνηση (?g=...) */
[data-guest-wrap][hidden] { display: none; }

/* Κουμπιά */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 15px; letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; }

/* Αντίστροφη μέτρηση */
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cd > div { text-align: center; padding: 12px 4px 10px; border-radius: var(--radius); background: var(--field); box-shadow: inset 0 0 0 1px var(--line); }
.cd b { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1.1; font-weight: 500; font-variant-numeric: tabular-nums; }
.cd span { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

/* Φόρμα απάντησης (RSVP) */
.rsvp { display: grid; gap: 14px; text-align: left; }
.rsvp .f { display: grid; gap: 6px; }
.rsvp .f > span, .rsvp .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.rsvp input[type=text], .rsvp input:not([type]), .rsvp textarea, .rsvp select {
  width: 100%; padding: 13px 14px; border: 0; border-radius: 12px;
  background: var(--field); box-shadow: inset 0 0 0 1px var(--line);
  font: inherit; color: var(--ink); outline: none; transition: box-shadow .15s;
}
.rsvp input:focus, .rsvp textarea:focus, .rsvp select:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.rsvp textarea { resize: vertical; min-height: 84px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 10px; border-radius: 12px;
  background: var(--field); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px; cursor: pointer; transition: .15s;
}
.seg input:checked + span { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.counts { display: grid; gap: 8px; }
.cnt { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 12px; background: var(--field); box-shadow: inset 0 0 0 1px var(--line); }
.cnt > span { flex: 1; font-weight: 600; font-size: 14px; }
.cnt button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 20px; line-height: 1; cursor: pointer; }
.cnt output { min-width: 22px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.rsvp .btn { width: 100%; margin-top: 4px; }
.rsvp-done { text-align: center; padding: 22px 18px; border-radius: var(--radius); background: var(--field); box-shadow: inset 0 0 0 1px var(--line); }
.rsvp-done b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 500; margin-bottom: 4px; }
.rsvp-done p { margin: 0; color: var(--muted); }

/* Μικρό «toast» για μηνύματα */
.q-toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 99; transform: translate(-50%, 20px); opacity: 0;
  max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 999px; background: #1d1b19; color: #fff;
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transition: .3s ease; pointer-events: none;
}
.q-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Υπογραφή Q στο τέλος */
.q-foot { padding: 28px 20px 34px; text-align: center; font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.q-foot a { color: inherit; font-weight: 700; text-decoration: none; }
.q-foot .dots { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 6px; }
.q-foot .dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }

/* Κουμπί «ξανά από την αρχή» (για να ξαναδεί κανείς την εισαγωγή) */
.replay { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.replay:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .rv { transform: none; transition: opacity .4s ease; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
