:root {
  --green: #143d2b;
  --green-2: #20543d;
  --green-dark: #09291c;
  --gold: #a7793d;
  --gold-2: #c79c57;
  --gold-soft: #dcc49d;
  --cream: #fbf4e7;
  --cream-2: #fffaf0;
  --text: #213126;
  --muted: #6d675f;
  --line: rgba(167, 121, 61, 0.28);
  --shadow: 0 18px 45px rgba(51, 31, 16, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.92), rgba(251,244,231,.45) 36%, rgba(237,222,195,.74) 100%),
    var(--cream);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

/* =========================================
   Детализированный PNG-орнамент по бокам
   Файл: /public/assets/ornament.png
   URL:  /wedding/assets/ornament.png
   ========================================= */

html::before,
html::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: 190px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.98;
  background-image: url('/wedding/assets/ornament.png');
  background-repeat: repeat-y;
  background-size: 150px auto;
  background-position: center top;
  filter: drop-shadow(0 8px 14px rgba(20, 61, 43, 0.14));
}

html::before {
  left: 0;
}

html::after {
  right: 0;
  transform: scaleX(-1);
}

/* Тонкая верхняя и нижняя декоративная линия */
body::before,
body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  height: 18px;
  z-index: 20;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--green), #174932, var(--green)),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(199,156,87,.6) 26px 28px);
  border-block: 1px solid rgba(167,121,61,.65);
}

body::before {
  top: 0;
}

body::after {
  bottom: 0;
}

.page-shell {
  position: relative;
  z-index: 5;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px 118px 42px;
}

.hero {
  position: relative;
  min-height: clamp(540px, 70vw, 760px);
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(167,121,61,.35);
  background: var(--green);
}

.hero__image {
  position: absolute;
  inset: 0;
  background-image:
    url('/wedding/assets/our-photo.jpg'),
    url('/wedding/assets/invite-reference.png');
  background-size: cover;
  background-position: center 25%;
  transform: scale(1.01);
}

.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 29, 20, 0.08) 0%,
    rgba(14, 29, 20, 0.10) 45%,
    rgba(14, 29, 20, 0.76) 100%
  );
}

.hero__content {
  position: absolute;
  left: 50%;
  bottom: clamp(28px, 6vw, 72px);
  width: min(900px, calc(100% - 32px));
  transform: translateX(-50%);
  text-align: center;
  color: #fff9eb;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: .18em;
  text-align: center;
}

.hero .eyebrow {
  color: #f0d6a5;
}

h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(58px, 10vw, 126px);
  font-weight: 600;
  line-height: .92;
}

h1 span {
  color: #f2ca83;
  font-weight: 400;
}

.hero__lead {
  margin: 18px auto 0;
  max-width: 680px;
  font-size: clamp(17px, 2.1vw, 24px);
}

.card {
  margin: 18px auto 0;
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,250,240,.92), rgba(255,250,240,.84)),
    var(--cream-2);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.event-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: stretch;
}

.event-item {
  display: flex;
  gap: 16px;
  align-items: center;
  min-height: 108px;
  padding: 18px;
  color: var(--green);
  text-decoration: none;
  border: 1px solid rgba(167,121,61,.24);
  border-radius: 20px;
  background: rgba(255,255,255,.38);
}

.event-link:hover {
  border-color: rgba(167,121,61,.65);
}

.event-icon {
  font-size: 42px;
  color: var(--green-2);
  line-height: 1;
}

.event-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
}

.event-value {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
}

.event-note {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.countdown-card {
  text-align: center;
}

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

.countdown div {
  padding: 18px 8px;
  border-inline: 1px solid var(--line);
}

.countdown strong {
  display: block;
  color: var(--green);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(48px, 8vw, 76px);
  font-weight: 500;
  line-height: .9;
}

.countdown span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 18px;
}

.invitation-text {
  text-align: center;
}

h2 {
  margin: 0 0 12px;
  color: var(--green);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
}

.invitation-text p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.7;
}

.form-card h2 {
  text-align: center;
}

form {
  display: grid;
  gap: 20px;
}

label,
legend {
  color: #312b25;
  font-size: 17px;
  font-weight: 600;
}

input[type="text"],
select,
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 16px 17px;
  border: 1px solid rgba(167,121,61,.32);
  border-radius: 14px;
  background: rgba(255,255,255,.54);
  color: var(--text);
  font: inherit;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(32,84,61,.12);
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented,
.chips {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.segmented {
  grid-template-columns: repeat(2, 1fr);
}

.chips {
  grid-template-columns: repeat(4, 1fr);
}

.segmented input,
.chips input {
  position: absolute;
  opacity: 0;
}

.segmented span,
.chips span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 12px;
  border: 1px solid rgba(167,121,61,.35);
  border-radius: 12px;
  background: rgba(255,255,255,.42);
  text-align: center;
  cursor: pointer;
  transition: .18s ease;
}

.segmented input:checked + span,
.chips input:checked + span {
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  border-color: var(--green);
  box-shadow: 0 10px 24px rgba(20,61,43,.18);
}

button {
  justify-self: center;
  min-width: min(360px, 100%);
  padding: 18px 28px;
  border: 0;
  border-radius: 18px;
  color: #fff8e8;
  background: linear-gradient(135deg, var(--green), #062819);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(20,61,43,.25);
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: .7;
  cursor: wait;
}

.form-status {
  min-height: 24px;
  margin: 0;
  text-align: center;
  color: var(--green);
  font-weight: 700;
}

.form-status.error {
  color: #8a2727;
}

/* =========================================
   Адаптивность
   ========================================= */

@media (max-width: 1220px) {
  html::before,
  html::after {
    width: 150px;
    background-size: 118px auto;
    opacity: 0.9;
  }

  .page-shell {
    padding-left: 86px;
    padding-right: 86px;
  }
}

@media (max-width: 980px) {
  html::before,
  html::after {
    width: 104px;
    background-size: 78px auto;
    opacity: 0.72;
  }

  .page-shell {
    padding-left: 54px;
    padding-right: 54px;
  }

  .event-card,
  .segmented {
    grid-template-columns: 1fr;
  }

  .chips {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 560px;
  }

  .hero__image {
    background-position: top center;
  }
}

@media (max-width: 700px) {
  html::before,
  html::after {
    width: 64px;
    background-size: 46px auto;
    opacity: 0.45;
  }

  .page-shell {
    padding-left: 24px;
    padding-right: 24px;
  }

  .countdown {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 560px) {
  html::before,
  html::after {
    display: none;
  }

  .page-shell {
    padding-inline: 10px;
  }

  .hero {
    min-height: 510px;
    border-radius: 0 0 24px 24px;
  }

  .card {
    border-radius: 22px;
  }

  h1 {
    font-size: 54px;
  }
}
