/* ===========================================================
   Слави & Радост — wedding site
   Palette:
     --ink     #2E332B  deep olive ink
     --paper   #FBFAF6  warm paper white
     --olive   #6B7355  sage olive
     --gold    #B0893E  antique gold
     --blush   #C99A8E  dusty blush
   Type: Cormorant (display) / Manrope (body)
   =========================================================== */
:root {
  --ink:   #2E332B;
  --paper: #FBFAF6;
  --olive: #6B7355;
  --gold:  #B0893E;
  --blush: #C99A8E;
  --line:  #E4E0D4;
  --danger:#A4493D;
  --radius: 6px;
  --font-display: "Cormorant", "Georgia", serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--olive); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 5vw, 48px);
  border-bottom: 1px solid var(--line);
}
.monogram {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
}
.monogram .amp { color: var(--gold); font-style: italic; padding: 0 2px; }

.site-nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); }
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-nav a:hover { color: var(--gold); }
.lang-switch { font-size: 13px; letter-spacing: 0.08em; }
.lang-switch i { color: var(--line); font-style: normal; padding: 0 4px; }
.lang-switch a.active { color: var(--gold); font-weight: 600; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(60px, 12vh, 120px) 24px 80px;
  text-align: center;
}
.hero-ring {
  position: absolute;
  top: 40px; left: 50%;
  transform: translateX(-50%);
  width: min(420px, 86vw);
  height: min(420px, 86vw);
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0.35;
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}
.hero-names {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 9vw, 84px);
  line-height: 1.05;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-amp {
  font-style: italic;
  font-size: 0.42em;
  color: var(--blush);
  font-weight: 400;
}
.hero-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--olive);
  margin: 18px 0 26px;
}
.hero-welcome { max-width: 460px; margin: 0 auto 32px; color: #555a50; }
.hero-venue {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 36px;
  font-family: var(--font-display);
  font-size: 19px;
}
.venue-label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
}
.hero-rsvp-hint { font-size: 13.5px; color: #777c70; margin-top: 28px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 13px 30px;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--olive); border-color: var(--olive); }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-small { padding: 6px 12px; font-size: 11px; }

/* ---------- generic section ---------- */
.page-section {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 70px) 24px 80px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 44px);
  text-align: center;
  margin: 0 0 6px;
}
.section-date {
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12.5px;
  margin-bottom: 48px;
}

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0 0 64px; padding: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 64px 24px 1fr;
  gap: 0 14px;
  position: relative;
  padding-bottom: 34px;
}
.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(64px + 14px + 11px);
  top: 22px;
  bottom: -2px;
  width: 1px;
  background: var(--line);
}
.timeline-time {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  text-align: right;
  color: var(--olive);
  padding-top: 1px;
}
.timeline-dot {
  width: 9px; height: 9px;
  margin: 9px auto 0;
  border-radius: 50%;
  background: var(--gold);
}
.timeline-body h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 4px;
}
.timeline-body p { margin: 0; color: #555a50; font-size: 15px; }

/* ---------- venue / map ---------- */
.venue-block { text-align: center; }
.venue-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 4px;
}
.map-frame {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.map-frame iframe { display: block; width: 100%; height: 340px; border: 0; }

/* ---------- RSVP ---------- */
.rsvp-section { max-width: 560px; }
.rsvp-question {
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 21px;
  color: var(--olive);
  margin-bottom: 32px;
}
.flash-ok, .flash-closed, .current-answer {
  border-radius: var(--radius);
  padding: 13px 18px;
  font-size: 14.5px;
  margin-bottom: 22px;
  text-align: center;
}
.flash-ok { background: #EEF2E4; border: 1px solid #C9D4AE; }
.flash-closed { background: #F7ECE9; border: 1px solid #E0BFB7; color: var(--danger); }
.current-answer { background: #F3F1E9; border: 1px solid var(--line); }
.current-answer.is-yes strong { color: var(--olive); }
.current-answer.is-no strong { color: var(--danger); }

.choice-row { display: flex; gap: 14px; margin-bottom: 28px; }
.choice {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  font-size: 15px;
  transition: border-color .15s, background .15s;
}
.choice input { position: absolute; opacity: 0; }
.choice:hover { border-color: var(--gold); }
.choice.selected { border-color: var(--olive); background: #F0F2E8; font-weight: 600; }

.menu-fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 0 0 24px;
}
.menu-fieldset legend {
  font-family: var(--font-display);
  font-size: 19px;
  padding: 0 8px;
}
.menu-option {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
}
.menu-option input { position: absolute; opacity: 0; }
.menu-option:hover { background: #F5F3EC; }
.menu-option.selected { border-color: var(--olive); background: #F0F2E8; }
.menu-name { font-weight: 600; font-size: 15px; }
.menu-desc { font-size: 13.5px; color: #6a6f63; }

.note-label { display: block; font-size: 14px; margin-bottom: 24px; }
.note-label textarea,
.login-form input,
.admin-form input,
.admin-form textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 14.5px;
  background: #fff;
}
.note-label textarea:focus,
.login-form input:focus,
.admin-form input:focus,
.admin-form textarea:focus { border-color: var(--gold); outline: none; }

.rsvp-form { text-align: center; }
.rsvp-form .choice-row, .rsvp-form .menu-fieldset, .rsvp-form .note-label { text-align: left; }
.deadline-note { font-size: 13px; color: #777c70; margin-top: 16px; }

/* ---------- login ---------- */
.login-section { max-width: 380px; }
.login-form label { display: block; font-size: 14px; margin-bottom: 16px; }
.login-form .btn { width: 100%; margin-top: 6px; }

/* ---------- admin ---------- */
.admin-section { max-width: 1080px; }
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  background: #fff;
}
.stat b { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1.1; }
.stat span { font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #777c70; }
.stat-yes b { color: var(--olive); }
.stat-no b { color: var(--danger); }

.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.admin-tabs a {
  padding: 10px 18px;
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
}
.admin-tabs a.active { border-bottom-color: var(--gold); color: var(--gold); font-weight: 600; }

.admin-subtitle { font-family: var(--font-display); font-size: 22px; font-weight: 500; margin: 0 0 10px; }
.menu-count-list { list-style: none; padding: 0; margin: 0 0 28px; display: flex; gap: 22px; flex-wrap: wrap; }
.menu-count-list b { color: var(--olive); }

.table-wrap { overflow-x: auto; margin-bottom: 30px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.admin-table th, .admin-table td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}
.admin-table th {
  background: #F3F1E9;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.note-cell { max-width: 220px; font-size: 13px; color: #555a50; }
.actions-cell { white-space: nowrap; }
.actions-cell form { display: inline-block; margin-right: 4px; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  background: #F3F1E9;
  border: 1px solid var(--line);
}
.badge-yes { background: #EEF2E4; border-color: #C9D4AE; color: var(--olive); }
.badge-no { background: #F7ECE9; border-color: #E0BFB7; color: var(--danger); }

.admin-form { margin-bottom: 36px; }
.admin-form label { display: block; font-size: 13.5px; margin-bottom: 12px; }
.grid-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 18px;
  align-items: end;
}
.grid-form .span-2 { grid-column: span 2; }
.grid-form .btn { grid-column: span 2; justify-self: start; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 32px 16px 40px;
  font-family: var(--font-display);
  font-size: 16px;
  color: #6a6f63;
}
.footer-flourish { color: var(--gold); font-size: 20px; display: block; margin-bottom: 4px; }

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .site-header { flex-direction: column; gap: 10px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .choice-row { flex-direction: column; }
  .grid-form { grid-template-columns: 1fr; }
  .grid-form .span-2, .grid-form .btn { grid-column: span 1; }
  .timeline-item { grid-template-columns: 52px 18px 1fr; }
  .timeline-item:not(:last-child)::after { left: calc(52px + 14px + 8px); }
  .hero-ring {
   width: 160vw;   
   height: 160vw;
   top: -30vw;
   opacity: 0.22;
  }
}
