/* ——— «Свадебный билет»: крем, оливка, рукописные имена (как макет-посадка) ——— */
:root {
  /* Палитра с приглашения-«билета» */
  --bg: #f5f1e9;
  --olive: #5e674f;
  --olive-dark: #4a5140;
  --text: #3c3633;
  --text-heading: #2f2a28;
  --text-muted: #5e5855;
  --text-subtle: #7a726e;
  --text-on-olive: #fffef8;
  --white: #ffffff;
  --paper: #fffcf6;
  --radius: 28px;
  --radius-pill: 999px;
  --radius-input: 999px;
  --max: 420px;
  --font-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --shadow: 0 6px 28px rgba(60, 54, 51, 0.1);
  --pad-x: 1.3rem;
  --pad-y: 1.45rem;
  --perforation: rgba(94, 103, 79, 0.2);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.55;
  font-weight: 400;
  /* едва тёкстура «бумаги» */
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='0.035'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

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

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1rem 2.5rem;
}

/* Боковые оливковые направляющие, как у посадочного / билета */
.page--ticket {
  max-width: calc(var(--max) + 0.4rem);
  border-left: 2px solid var(--olive);
  border-right: 2px solid var(--olive);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  border-radius: 0;
  padding: 0.9rem 0.85rem 2.2rem;
}

/* Линия перфорации между крупными блоками */
.page--ticket > * + * {
  border-top: 1px dashed var(--perforation);
  margin-top: 0.65rem;
  padding-top: 0.65rem;
}

/* Футер: без padding-top от правила выше — иначе «зазор» с фоном .card-media над картинкой */
.page--ticket > footer.footer {
  padding-top: 0;
}

/* ——— Типографика: serif «как в билете», ноты/данные — sans ——— */
.section-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.28rem;
  line-height: 1.32;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--text-heading);
  margin: 0 0 0.9rem;
}

.section-title--on-olive {
  color: var(--text-on-olive);
}

/* ——— Герой: заголовок внизу, белый элегантный serif, градиент ——— */
.hero {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Ленточка «свадебный билет» */
.hero__ticket-ribbon {
  margin: 0 0 0.1rem;
  text-align: center;
}

.hero__ticket-ribbon__inner {
  display: inline-block;
  padding: 0.35rem 0.5rem 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--olive);
  background: color-mix(in srgb, var(--paper) 60%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--olive) 22%, transparent);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hero__photo {
  position: relative;
  isolation: isolate;
}

/* Лёгкая виньетка и рамка */
.hero__photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: var(--radius);
  background: radial-gradient(
    ellipse 100% 70% at 50% 50%,
    rgba(0, 0, 0, 0) 0%,
    rgba(20, 18, 16, 0.12) 100%
  );
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--olive) 12%, transparent);
}

/* Низ кадра — плотнее, чтобы читалась белая надпись */
.hero__photo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(55%, 13.5rem);
  z-index: 1;
  pointer-events: none;
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(
    to top,
    rgba(20, 18, 16, 0.78) 0%,
    rgba(20, 18, 16, 0.38) 42%,
    rgba(20, 18, 16, 0) 100%
  );
}

.hero__plane {
  position: absolute;
  top: 0.6rem;
  right: 0.55rem;
  z-index: 3;
  color: #fff9f0;
  opacity: 0.92;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.hero__plane svg {
  display: block;
}

/* Заглавная строка: низ снимка, Playfair, белая */
.hero__title {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: auto;
  bottom: 0;
  margin: 0;
  padding: 1.4rem 1.15rem 1.35rem;
  max-width: none;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 4.2vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-align: center;
  color: #f8f6f2;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 4px 24px rgba(0, 0, 0, 0.3);
}

@media (min-width: 380px) {
  .hero__title {
    font-size: 1.7rem;
    padding-bottom: 1.5rem;
  }
}

/* ——— Карточки и фото ——— */
.card-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #ddd8cf;
  border: 1px solid color-mix(in srgb, var(--olive) 8%, transparent);
}

.card-media img,
.hero__image {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.hero__image {
  position: relative;
  z-index: 0;
  display: block;
}

.block {
  border-radius: var(--radius);
  margin-bottom: 0.9rem;
  padding: var(--pad-y) var(--pad-x);
}

.block--light,
.date-section {
  background: var(--paper);
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--olive) 7%, transparent);
}

.block--olive {
  background: var(--olive);
  color: var(--text-on-olive);
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--olive) 20%, #0000);
}

/* ——— Приглашение (текст по левому краю) ——— */
.greeting {
  text-align: left;
}

.greeting__headline {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.04em;
  margin: 0 0 0.75rem;
  line-height: 1.35;
  color: var(--text-on-olive);
  text-align: left;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.greeting__text {
  margin: 0;
  max-width: 32em;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.7;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  text-align: left;
}

/* ——— Дата и календарь ——— */
.date-section .section-title {
  margin-bottom: 1.1rem;
  font-size: 1.2rem;
  color: var(--text-heading);
}

.calendar {
  --cell: minmax(0, 1fr);
}

.calendar__weekdays,
.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, var(--cell));
  gap: 0.35rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-subtle);
  font-family: var(--font-sans);
}

.calendar__grid {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: none;
  color: var(--text);
  gap: 0.4rem 0.35rem;
  row-gap: 0.5rem;
}

.calendar__day-name {
  padding: 0.2rem 0;
}

.calendar__day {
  aspect-ratio: 1;
  min-height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.82rem;
  position: relative;
  font-family: var(--font-sans);
  font-weight: 500;
}

.calendar__day--empty {
  visibility: hidden;
  pointer-events: none;
}

/* день свадьбы: сердце коричневое, в тон «билету» */
.calendar__day--wedding {
  background: transparent;
  color: #6b4a3a;
  font-weight: 500;
}

.calendar__heart {
  color: #6b4a3a;
  font-size: 1.35rem;
  line-height: 1;
  display: block;
  transform: scale(1.05);
  filter: drop-shadow(0 0 0.5px color-mix(in srgb, #6b4a3a 45%, transparent));
}

/* ——— Программа ——— */
.program {
  text-align: left;
}

.program .section-title {
  text-align: center;
}

.program__list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.65;
  font-weight: 400;
  color: var(--text-on-olive);
}

.program__list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.4rem;
  margin-bottom: 0.5rem;
  border-left: 0;
  padding-left: 0;
}

.program__list li:last-child {
  margin-bottom: 0;
}

.program__list time {
  font-weight: 600;
  min-width: 2.6rem;
  font-variant-numeric: tabular-nums;
}

.program__note {
  margin: 0.9rem 0 0;
  max-width: 32em;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  line-height: 1.55;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.program__list li span[aria-hidden="true"],
.program__list li > span {
  color: rgba(255, 255, 255, 0.85);
}

/* ——— Локация ——— */
.location .section-title {
  margin-bottom: 0.85rem;
  color: var(--text-heading);
}

.location__venue-photo {
  margin: 0 0 0.9rem;
}

.location__venue-photo.card-media img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 433 / 596;
  max-height: 22rem;
}

.location__venue {
  margin: 0 0 0.35rem;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-heading);
}

.location__address {
  margin: 0 0 1rem;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-muted);
  padding: 0 0.2rem;
}

.location__map {
  padding: 0;
  overflow: hidden;
}

.map-embed {
  width: 100%;
  height: 400px;
  min-height: 240px;
  border: 0;
  display: block;
}

.location__map-note {
  margin: 0.9rem 0 0;
  text-align: center;
}

.location__map-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--olive);
  text-decoration: none;
  border-bottom: 1px solid rgba(94, 103, 79, 0.4);
}

.location__map-link:hover {
  border-bottom-color: var(--olive);
}

/* Подарки, цветы, дресс-код, детали — многостраничные блоки */
.content-text {
  text-align: left;
  max-width: 32em;
  margin: 0;
  line-height: 1.65;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-muted);
}

.content-text p {
  margin: 0 0 0.85em;
}

.content-text p:last-child {
  margin-bottom: 0;
}

.links-external__btn {
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.gifts .section-title,
.flowers .section-title,
.details .section-title,
.dress-code .section-title,
.links-tg .section-title,
.links-cloud .section-title {
  text-align: center;
  color: var(--text-heading);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.85rem;
}

.dress-code .content-text {
  margin-bottom: 1.05rem;
}

.dress-code__swatches {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 0;
  padding: 0;
}

.swatch {
  --c: #999;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--c);
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.swatch--border {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ——— Форма ——— */
.rsvp__request {
  margin: 0.15rem 0 1.05rem;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #fff6eb;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

/* Скрываем после начала работы с формой или после успешной отправки */
.rsvp.is-filling .rsvp__request,
.rsvp.is-sent .rsvp__request {
  display: none;
}

.form {
  text-align: left;
}

.form__error {
  margin: 0 0 0.85rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #2a2220;
  background: #ffd9d4;
  border-radius: 10px;
  border: 1px solid rgba(180, 60, 50, 0.35);
}

.form__row {
  margin-bottom: 1rem;
}

.form__row--check {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 1.05rem;
}

.form__overnight-info {
  margin: 0.5rem 0 0 0.05rem;
  max-width: 32em;
  width: 100%;
  font-size: 0.76rem;
  line-height: 1.5;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
}

.form__overnight-info strong {
  color: #fff1df;
  font-weight: 600;
}

.form__overnight-info-link {
  color: #fff1df;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 241, 223, 0.45);
  text-underline-offset: 0.15em;
}

.form__overnight-info-link:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.55);
}

.form__row label,
.form__legend,
.form__fieldset {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: rgba(255, 255, 255, 0.95);
}

.form__row input {
  width: 100%;
  border: 0;
  border-radius: var(--radius-input);
  padding: 0.72rem 1.1rem;
  min-height: 2.7rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.form__textarea {
  width: 100%;
  min-height: 4.5rem;
  border: 0;
  border-radius: 16px;
  padding: 0.7rem 1.05rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--white);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  resize: vertical;
  line-height: 1.5;
}

.form__textarea--compact {
  min-height: 3.15rem;
}

.form__alcohol-other-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0.2rem 0 0.15rem;
  box-sizing: border-box;
}

.form__alcohol-other-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin: 0 0 0.4rem 0.05rem;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
}

.form__row input::placeholder,
.form__textarea::placeholder {
  color: #9a9a9a;
  font-weight: 400;
}

.form__row--check .choice--inline {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  line-height: 1.4;
  font-size: 0.86rem;
  max-width: 100%;
  padding-top: 0.1rem;
}

.form__fieldset {
  border: 0;
  margin: 0 0 1.1rem;
  padding: 0;
}

.form__legend {
  margin: 0 0 0.5rem;
}

.form__note {
  font-size: 0.75rem;
  margin: -0.1rem 0 0.55rem;
  color: rgba(255, 255, 255, 0.75);
}

.form__attend-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem 1rem;
  width: 100%;
}

.form__attend-yes {
  flex: 0 1 auto;
}

.form__attend-plus1 {
  flex: 0 0 auto;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.form__overnight-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  width: 100%;
}

.form__overnight-block .choice--inline {
  margin-bottom: 0;
}

/* Второй чекбокс — тот же вид, что и «Планирую ночёвку», до активации приглушён */
.form__overnight-plus1 {
  width: 100%;
  max-width: 100%;
  transition: opacity 0.2s;
}

.form__overnight-plus1.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

.form__attend-plus1.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.form__radios,
.form__checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form__checkboxes {
  display: grid;
  gap: 0.45rem;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: var(--white);
  cursor: pointer;
  user-select: none;
}

.choice input {
  position: absolute;
  left: 0.15rem;
  top: 50%;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  margin-top: -0.52rem;
  padding: 0;
  border: 0;
  cursor: pointer;
  opacity: 0;
  z-index: 2;
}

.choice__ui {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04) inset;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.choice--check .choice__ui {
  border-radius: 4px;
}

.choice:focus-within .choice__ui {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

input:checked + .choice__ui {
  background: var(--olive);
  box-shadow: inset 0 0 0 3px var(--white);
  border-color: var(--white);
}

.choice--check input:checked + .choice__ui {
  background: var(--olive);
}

.btn {
  display: block;
  width: 100%;
  margin-top: 1.1rem;
  padding: 0.85rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.1s, filter 0.15s, opacity 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--light {
  background: var(--white);
  color: var(--olive);
}

.btn--light:hover,
.btn--olive:hover {
  filter: brightness(1.04);
}

.btn--olive {
  background: var(--olive);
  color: var(--white);
  max-width: 20rem;
  margin-left: auto;
  margin-right: auto;
}

.form__thanks {
  margin: 0.9rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
}

.rsvp.is-sent .form {
  display: none;
}

.rsvp.is-sent .form__thanks[hidden] {
  display: block;
}

/* ——— Организатор: на фоне страницы, без отдельной карточки (макет) ——— */
.organizer {
  text-align: center;
  background: transparent;
  box-shadow: none;
  padding: 1.4rem 0.6rem 0.4rem;
  margin: 0;
  max-width: 24rem;
  margin-left: auto;
  margin-right: auto;
}

.organizer__text {
  margin: 0 0 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-muted);
}

.organizer__tel {
  color: var(--olive);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.organizer__tel:hover {
  text-decoration: underline;
}

.footer {
  margin-top: 1.1rem;
}

/* Футер: без принудительного aspect-ratio и cover у .card-media img —
   иначе верх портретного кадра обрезается и кажется, что картинка «уехала» вниз */
.footer.card-media {
  line-height: 0;
}

.footer.card-media img {
  width: 100%;
  height: auto;
  margin: 0;
  aspect-ratio: auto;
  object-fit: unset;
}

/* ——— Служебное ——— */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}