:root {
  --bg: #f3ebe0;
  --card: #fffdf9;
  --ink: #2c261f;
  --muted: #6a5f52;
  --gold: #9a641c;
  --gold-soft: #c48a3a;
  --line: rgba(42, 36, 28, 0.14);
  --font: "Literata", "Times New Roman", serif;
}

@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/cyrillic-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/cyrillic-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-04FF, U+2116;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/cyrillic-400-italic.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-04FF, U+2116;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-04FF, U+2116;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/cyrillic-600-italic.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-04FF, U+2116;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-04FF, U+2116;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/cyrillic-700-italic.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-04FF, U+2116;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.7;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(196, 138, 58, 0.14), transparent 45%),
    radial-gradient(ellipse at 90% 20%, rgba(90, 120, 70, 0.1), transparent 40%),
    radial-gradient(rgba(154, 100, 28, 0.07) 1px, transparent 1px);
  background-size: auto, auto, 16px 16px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--gold);
}

button,
input {
  font: inherit;
}

.container {
  width: min(640px, calc(100% - 2rem));
  margin-inline: auto;
}

.stack {
  display: grid;
  gap: 1rem;
}

.block {
  padding: 1.6rem 0;
}

/* Cover */
.cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: #1a1510;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.cover.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cover__bg {
  position: absolute;
  inset: 0;
  background: url("/static/photos/hero.jpg") center / cover;
  filter: brightness(0.7) saturate(1.05);
}

.cover__btn {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  justify-items: center;
  width: min(320px, calc(100% - 2rem));
  padding: 1.8rem 1.3rem;
  border: 1px solid rgba(255, 230, 180, 0.55);
  background: rgba(20, 16, 12, 0.55);
  color: #f7efe3;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.cover__seal {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #e2c58a;
  color: #e2c58a;
}

.cover__hint {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  line-height: 1.5;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: end center;
  text-align: center;
  color: #fff8ee;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: slowZoom 18s ease-out forwards;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 16, 12, 0.12) 0%,
    rgba(20, 16, 12, 0.08) 45%,
    rgba(20, 16, 12, 0.78) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(480px, calc(100% - 1.5rem));
  padding: 0 0 4.5rem;
  animation: fadeUp 0.9s ease both;
}

.hero__frame {
  padding: 1.25rem 1.1rem 1.35rem;
  border: 1px solid rgba(240, 213, 154, 0.55);
  background: rgba(18, 14, 10, 0.45);
  backdrop-filter: blur(4px);
  box-shadow: inset 0 0 0 5px rgba(255, 248, 238, 0.05);
}

.hero__eyebrow,
.hero__sub {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0d59a;
}

.hero__title {
  margin: 0.55rem 0 0.7rem;
  font-size: clamp(2.8rem, 11vw, 4.6rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff8ee;
}

.hero__sub {
  color: rgba(255, 248, 238, 0.92);
  font-weight: 500;
}

.hero__wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 52px;
  background: var(--bg);
  background-image: radial-gradient(rgba(154, 100, 28, 0.07) 1px, transparent 1px);
  background-size: 16px 16px;
  clip-path: ellipse(70% 100% at 50% 100%);
}

/* Text cards — единый шрифт, отдельные рамки */
.card {
  background: var(--card);
  border: 1px solid rgba(154, 100, 28, 0.28);
  padding: 1.35rem 1.2rem;
  box-shadow: 0 10px 28px rgba(42, 36, 28, 0.05);
}

.label {
  margin: 0 0 0.55rem;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.card__title {
  margin: 0 0 1rem;
  text-align: center;
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.25;
}

.text,
.verse {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 500;
  font-style: italic;
}

.verse p {
  margin: 0.4rem 0;
  color: var(--ink);
  font-style: italic;
  font-weight: 500;
  font-size: 1.14rem;
}

.verse__end {
  margin-top: 0.85rem !important;
  font-style: italic;
  font-weight: 700;
  color: var(--gold);
}

.muted {
  color: var(--muted);
  margin: 0 0 1rem;
  font-style: italic;
}

.center {
  text-align: center;
}

.times {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.3rem;
  text-align: center;
}

.times__clock {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  font-style: italic;
  color: var(--gold);
}

.times__cap {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.times__line {
  width: 1px;
  height: 42px;
  background: var(--line);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 260px;
  margin: 0.4rem auto 0;
  border: 0;
  padding: 0.95rem 1rem;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #fff8ee;
  font-family: var(--font);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

/* Фото вписаны в фон страницы */
.block--photo {
  position: relative;
  padding: 2.2rem 0;
  background:
    linear-gradient(180deg, rgba(243, 235, 224, 0) 0%, rgba(255, 248, 238, 0.72) 18%, rgba(255, 248, 238, 0.72) 82%, rgba(243, 235, 224, 0) 100%),
    radial-gradient(ellipse at 50% 50%, rgba(196, 138, 58, 0.12), transparent 62%),
    radial-gradient(rgba(154, 100, 28, 0.06) 1px, transparent 1px);
  background-size: auto, auto, 16px 16px;
}

.photo-wrap {
  position: relative;
  width: min(420px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.15rem 1rem 1.25rem;
  display: grid;
  justify-items: center;
  gap: 0.65rem;
  background:
    linear-gradient(160deg, rgba(255, 253, 249, 0.92), rgba(243, 235, 224, 0.88));
  border-radius: 28px;
  box-shadow:
    0 0 0 1px rgba(154, 100, 28, 0.1),
    0 22px 48px rgba(42, 36, 28, 0.08);
}

.photo-wrap::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 22px;
  border: 1px dashed rgba(154, 100, 28, 0.18);
  pointer-events: none;
}

.photo-ornament {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  font-style: italic;
  letter-spacing: 0.35em;
  color: var(--gold-soft);
  opacity: 0.9;
}

.photo {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(42, 36, 28, 0.12);
  -webkit-mask-image: radial-gradient(ellipse 97% 97% at 50% 50%, #000 74%, transparent 100%);
  mask-image: radial-gradient(ellipse 97% 97% at 50% 50%, #000 74%, transparent 100%);
}

.photo--video {
  display: block;
  height: auto;
  min-height: 280px;
  background: #efe6d8;
  pointer-events: none;
  object-fit: cover;
}

.block--photo-end {
  padding-bottom: 1.6rem;
}

.date-short {
  margin: -0.35rem 0 1rem;
  font-style: italic;
}

.music-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid rgba(154, 100, 28, 0.35);
  background: rgba(255, 253, 249, 0.92);
  color: var(--ink);
  font-family: var(--font);
  font-style: italic;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(42, 36, 28, 0.12);
  backdrop-filter: blur(6px);
}

.music-toggle__icon {
  color: var(--gold);
  font-size: 1.05rem;
}

.music-toggle.is-muted {
  opacity: 0.72;
}

.music-toggle.is-muted .music-toggle__icon {
  text-decoration: line-through;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.4rem 0 0.2rem;
}

.btn--ghost {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(154, 100, 28, 0.35);
}

.admin-msg {
  margin: 0.7rem 0 0;
  font-style: italic;
}

.admin-msg.is-ok {
  color: #3f6b3c;
}

.admin-msg.is-err {
  color: #a14b2d;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}

.timeline li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.9rem;
  padding: 0 0 1.15rem 1.2rem;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0.4rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-soft);
}

.timeline li span:first-child {
  color: var(--gold);
  font-weight: 700;
  font-style: italic;
}

.timeline li span:last-child {
  color: var(--muted);
  font-style: italic;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.countdown div {
  text-align: center;
  padding: 0.85rem 0.3rem;
  border: 1px solid var(--line);
  background: rgba(243, 235, 224, 0.45);
}

.countdown strong {
  display: block;
  font-size: clamp(1.35rem, 5vw, 1.9rem);
  font-weight: 700;
  font-style: italic;
}

.countdown span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-style: italic;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.form {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field span,
.choice legend {
  font-size: 0.84rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 0.9rem 1rem;
  font-family: var(--font);
  font-style: italic;
}

.choice {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 0.55rem;
}

.choice__opt {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-style: italic;
}

.choice__opt:has(input:checked) {
  border-color: rgba(154, 100, 28, 0.5);
  background: rgba(196, 138, 58, 0.1);
}

.form-error {
  margin: 0;
  text-align: center;
  color: #a14b2d;
}

.thanks {
  text-align: center;
  padding: 1.4rem 1rem;
  border: 1px solid var(--line);
  background: rgba(63, 107, 60, 0.08);
  margin-top: 1rem;
}

.thanks .btn {
  margin-top: 1rem;
}

.thanks__title {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
}

.contact {
  margin-top: 1.6rem;
  text-align: center;
  color: var(--muted);
}

.contact p {
  margin: 0.2rem 0;
}

.foot {
  padding: 1.6rem 1rem 3rem;
  text-align: center;
  font-weight: 600;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--gold);
}

/* Admin */
.admin-body {
  min-height: 100vh;
  background: var(--bg);
}

.admin-header {
  padding: 2rem 0 1rem;
}

.wrap {
  width: min(900px, calc(100% - 2rem));
  margin-inline: auto;
}

.admin-main {
  padding-bottom: 3rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 1.2rem 0 1.5rem;
}

.stat {
  border: 1px solid var(--line);
  background: var(--card);
  text-align: center;
  padding: 0.9rem;
}

.stat__num {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--card);
}

.guest-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 460px;
}

.guest-table th,
.guest-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

@keyframes slowZoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.02);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 520px) {
  .block {
    padding: 1.2rem 0;
  }

  .card {
    padding: 1.15rem 1rem;
  }

  .photo-wrap {
    width: calc(100% - 1.4rem);
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .countdown strong {
    font-size: 1.25rem;
  }
}
