:root {
  --ink: #161513;
  --paper: #eeeae2;
  --paper-solid: #f2eee6;
  --cream: #e6e0d6;
  --muted: #716d66;
  --white: #ffffff;
  --line: rgba(22, 21, 19, 0.25);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", Arial, Helvetica, sans-serif;

  --page-duration: 760ms;
  --page-ease: cubic-bezier(0.76, 0, 0.24, 1);
}


/* ---------------------------------
   RESET
---------------------------------- */

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

html,
body {
  width: 100%;
  min-width: 100%;
  min-height: 100%;
  margin: 0;
}

html {
  background: #1c1b19;
}

body {
  overflow: hidden;

  color: var(--ink);
  background: #1c1b19;

  font-family: var(--sans);

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
label,
input,
textarea,
[role="slider"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[role="slider"]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.noscript {
  position: fixed;
  z-index: 9999;

  top: 0;
  right: 0;
  left: 0;

  padding: 14px 20px;

  color: #fff;
  background: #161513;

  text-align: center;
  font-size: 14px;
}


/* ---------------------------------
   MAGAZINE
---------------------------------- */

.magazine {
  position: relative;

  width: 100vw;
  height: 100vh;
  height: 100dvh;

  overflow: hidden;

  background: #d9d4cb;

  isolation: isolate;
  perspective: 1800px;
}


/* ---------------------------------
   PAGE BASE STATE
---------------------------------- */

.page {
  position: absolute;
  inset: 0;
  z-index: 1;

  display: flex;

  visibility: hidden;
  overflow: hidden;

  opacity: 0;

  pointer-events: none;

  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;

  transform: translateZ(0);
  transform-style: preserve-3d;

  will-change: transform, opacity;
}

.page.is-active {
  z-index: 3;

  visibility: visible;

  opacity: 1;

  pointer-events: auto;
}


/* ---------------------------------
   PAGE TRANSITIONS
---------------------------------- */

.page.is-entering-from-right,
.page.is-entering-from-left,
.page.is-leaving-to-left,
.page.is-leaving-to-right {
  visibility: visible;

  pointer-events: none;
}

.page.is-entering-from-right,
.page.is-entering-from-left {
  z-index: 4;
}

.page.is-leaving-to-left,
.page.is-leaving-to-right {
  z-index: 5;
}

.page.is-entering-from-right {
  animation:
    pageEnterFromRight
    var(--page-duration)
    var(--page-ease)
    both;
}

.page.is-entering-from-left {
  animation:
    pageEnterFromLeft
    var(--page-duration)
    var(--page-ease)
    both;
}

.page.is-leaving-to-left {
  animation:
    pageLeaveToLeft
    var(--page-duration)
    var(--page-ease)
    both;
}

.page.is-leaving-to-right {
  animation:
    pageLeaveToRight
    var(--page-duration)
    var(--page-ease)
    both;
}

@keyframes pageEnterFromRight {
  0% {
    opacity: 0.45;

    transform:
      translate3d(18%, 0, 0)
      rotateY(-2deg)
      scale(0.985);
  }

  100% {
    opacity: 1;

    transform:
      translate3d(0, 0, 0)
      rotateY(0)
      scale(1);
  }
}

@keyframes pageEnterFromLeft {
  0% {
    opacity: 0.45;

    transform:
      translate3d(-18%, 0, 0)
      rotateY(2deg)
      scale(0.985);
  }

  100% {
    opacity: 1;

    transform:
      translate3d(0, 0, 0)
      rotateY(0)
      scale(1);
  }
}

@keyframes pageLeaveToLeft {
  0% {
    opacity: 1;

    transform:
      translate3d(0, 0, 0)
      rotateY(0)
      scale(1);
  }

  100% {
    opacity: 0;

    transform:
      translate3d(-100%, 0, 0)
      rotateY(5deg)
      scale(0.985);
  }
}

@keyframes pageLeaveToRight {
  0% {
    opacity: 1;

    transform:
      translate3d(0, 0, 0)
      rotateY(0)
      scale(1);
  }

  100% {
    opacity: 0;

    transform:
      translate3d(100%, 0, 0)
      rotateY(-5deg)
      scale(0.985);
  }
}


/* ---------------------------------
   COVER
---------------------------------- */

.page--cover {
  color: #fff;
  background: #222;
}

.cover-photo {
  position: absolute;
  inset: 0;

  background-image:
    url("img/1.webp");

  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 45%;

  /*
    ВАЖНО:
    grayscale полностью убран.

    Фото показывается в исходных цветах.
  */

  filter: none;

  transform: scale(1.035);

  animation:
    coverReveal
    1800ms
    ease
    both;
}

.cover-shade {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.28) 0%,
      rgba(0, 0, 0, 0.03) 32%,
      rgba(0, 0, 0, 0.06) 58%,
      rgba(0, 0, 0, 0.52) 100%
    );
}

@keyframes coverReveal {
  from {
    opacity: 0;

    transform: scale(1.09);
  }

  to {
    opacity: 1;

    transform: scale(1.035);
  }
}

.cover-top {
  position: absolute;
  z-index: 2;

  top: 0;
  right: 0;
  left: 0;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  padding:
    max(28px, env(safe-area-inset-top))
    34px
    28px;

  text-transform: uppercase;
}

.cover-kicker,
.cover-number {
  margin: 0;

  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
}

.cover-title-wrap {
  position: absolute;
  z-index: 2;

  top: 49%;
  left: 50%;

  width: min(94vw, 1400px);

  text-align: center;

  transform: translate(-50%, -50%);
}

.cover-pretitle {
  margin: 0 0 8px;

  font-family: var(--serif);
  font-size: clamp(16px, 1.8vw, 26px);
  font-style: italic;
  letter-spacing: 0.04em;

  opacity: 0.92;
}

.cover-title {
  display: flex;
  justify-content: center;
  align-items: baseline;

  gap: clamp(10px, 2vw, 34px);

  margin: 0;

  font-family: var(--serif);
  font-size: clamp(72px, 13.2vw, 220px);
  font-weight: 500;
  line-height: 0.72;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.cover-title > span:not(.cover-amp) {
  animation:
    titleRise
    1200ms
    var(--page-ease)
    both;
}

.cover-title > span:nth-child(3) {
  animation-delay: 100ms;
}

.cover-amp {
  font-size: 0.36em;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;

  opacity: 0.92;
}

@keyframes titleRise {
  from {
    opacity: 0;

    transform: translateY(35px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

.cover-date {
  margin: 28px 0 0;

  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5em;
}

.cover-lines {
  position: absolute;
  z-index: 2;

  left: 34px;
  bottom: 36px;

  display: flex;
  flex-direction: column;

  gap: 3px;

  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 28px);
  line-height: 0.95;
  text-transform: uppercase;
}

.cover-open {
  position: absolute;
  z-index: 6;

  right: 34px;
  bottom: max(32px, env(safe-area-inset-bottom));

  width: min(360px, calc(100vw - 68px));
}

.cover-open-label,
.cover-swipe-hint {
  margin: 0;

  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.cover-open-label {
  margin-bottom: 10px;
}

.cover-swipe-hint {
  margin-top: 8px;

  text-align: right;

  opacity: 0.65;
}


/* ---------------------------------
   COVER SLIDER
---------------------------------- */

.open-slider {
  position: relative;

  width: 100%;
  height: 54px;

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.6);

  background: rgba(255, 255, 255, 0.08);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  cursor: grab;

  user-select: none;

  touch-action: none;
}

.open-slider:active {
  cursor: grabbing;
}

.open-slider__progress {
  position: absolute;

  top: 0;
  bottom: 0;
  left: 0;

  width: 0;

  background: rgba(255, 255, 255, 0.17);

  pointer-events: none;
}

.open-slider__hint {
  position: absolute;

  top: 0;
  right: 15px;
  bottom: 0;
  left: 66px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  pointer-events: none;

  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.open-slider__arrow {
  font-size: 17px;
}

.open-slider__thumb {
  position: absolute;

  top: 5px;
  left: 5px;

  display: grid;
  place-items: center;

  width: 42px;
  height: 42px;

  color: #161513;
  background: #f2eee6;

  font-size: 18px;

  transform: translate3d(0, 0, 0);

  pointer-events: none;

  will-change: transform;
}


/* ---------------------------------
   PHOTO PAGES
---------------------------------- */

.page--photo {
  align-items: flex-end;
  justify-content: flex-start;

  padding:
    clamp(70px, 8vw, 110px)
    clamp(20px, 6vw, 92px)
    clamp(80px, 9vw, 110px);
}

.page-photo,
.page-photo-shade {
  position: absolute;

  inset: 0;
}

.page-photo {
  z-index: -3;

  /*
    Чёрно-белый эффект полностью отключён.
  */

  filter: none;

  /*
    Не увеличиваем фон дополнительно.
    Из-за scale раньше фотография обрезалась сильнее.
  */

  transform: none;

  background-repeat: no-repeat;
  background-size: cover;
}

.page-photo-shade {
  z-index: -2;

  /*
    Здесь нет цветного фильтра.
    Фотография остаётся в исходных цветах.
  */

  background: transparent;
}


/* ---------------------------------
   PHOTO 1
---------------------------------- */

.page--invitation .page-photo {
  background-image:
    url("img/111.webp");

  background-position: center 42%;
}


/* ---------------------------------
   PHOTO 2
---------------------------------- */

.page--about .page-photo {
  background-image:
    url("img/333.webp");

  background-position: center 40%;
}


/* ---------------------------------
   PHOTO 3
---------------------------------- */

.page--date .page-photo {
  background-image:
    url("img/477.webp");

  background-position: center 46%;
}


/* ---------------------------------
   PHOTO 4
---------------------------------- */

.page--details .page-photo {
  background-image:
    url("img/744.webp");

  background-position: center 42%;
}


/* ---------------------------------
   RSVP PHOTO
---------------------------------- */

.page--rsvp .page-photo {
  background-image:
    url("img/68888.webp");

  background-position: center 50%;
}

.editorial-label {
  position: absolute;
  z-index: 2;

  top: max(28px, env(safe-area-inset-top));
  right: clamp(20px, 3vw, 42px);
  left: clamp(20px, 3vw, 42px);

  display: flex;
  justify-content: space-between;

  color: #fff;

  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;

  text-shadow:
    0 1px 8px rgba(0, 0, 0, 0.25);
}


/* ---------------------------------
   PAPER PANEL
---------------------------------- */

.paper-panel {
  position: relative;
  z-index: 2;

  max-height: calc(100dvh - 130px);

  overflow-x: hidden;
  overflow-y: auto;

  overscroll-behavior: contain;

  -webkit-overflow-scrolling: touch;

  padding: clamp(26px, 4vw, 58px);

  background: rgba(242, 238, 230, 0.88);

  box-shadow:
    0 20px 80px
    rgba(0, 0, 0, 0.12);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  scrollbar-width: thin;
}

.paper-panel--large {
  width: min(750px, 76vw);
}

.eyebrow {
  margin: 0 0 22px;

  font-size: 9px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.display-heading {
  max-width: 850px;

  margin: 0 0 30px;

  font-family: var(--serif);
  font-size: clamp(48px, 6.5vw, 108px);
  font-weight: 400;
  line-height: 0.84;
  letter-spacing: -0.045em;
}

.display-heading--compact {
  font-size: clamp(45px, 5.6vw, 88px);
}

.paper-panel p:not(.eyebrow):not(.countdown-title):not(.countdown-note) {
  max-width: 660px;

  font-family: var(--serif);
  font-size: clamp(18px, 1.65vw, 25px);
  line-height: 1.35;
}

.lead {
  font-size: clamp(23px, 2.2vw, 34px) !important;
  line-height: 1.2 !important;
}

.signature {
  display: flex;
  flex-direction: column;

  margin-top: 35px;

  font-family: var(--serif);
}

.signature span {
  font-size: 16px;
  font-style: italic;
}

.signature strong {
  margin-top: 4px;

  font-size: clamp(27px, 3vw, 42px);
  font-weight: 400;
}


/* ---------------------------------
   ABOUT
---------------------------------- */

.page--about {
  justify-content: flex-end;
}

.paper-panel--split {
  display: grid;

  grid-template-columns:
    minmax(260px, 0.8fr)
    minmax(320px, 1fr);

  gap: clamp(35px, 7vw, 100px);

  width: min(1100px, 86vw);
}

.about-copy {
  align-self: end;
}

.drop-cap::first-letter {
  float: left;

  margin: -10px 8px -5px 0;

  font-family: var(--serif);
  font-size: 5em;
  line-height: 0.85;
}


/* ---------------------------------
   DATE
---------------------------------- */

.paper-panel--date {
  width: min(1000px, 86vw);
}

.big-date {
  display: grid;

  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;

  align-items: end;

  width: fit-content;

  margin: -10px 0 30px;

  font-family: var(--serif);
}

.big-date__day {
  grid-row: 1 / 3;

  margin-right: 20px;

  font-size: clamp(105px, 15vw, 220px);
  font-weight: 400;
  line-height: 0.65;
  letter-spacing: -0.07em;
}

.big-date__month {
  align-self: end;

  font-size: clamp(35px, 5vw, 70px);
  line-height: 0.8;
  letter-spacing: -0.04em;
}

.big-date__year {
  margin-top: 10px;

  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.38em;
}

.event-facts {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(180px, 1fr));

  gap: 20px;

  margin-top: 38px;

  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.event-fact {
  padding: 20px 0;
}

.event-fact + .event-fact {
  padding-left: 20px;

  border-left: 1px solid var(--line);
}

.event-fact__label {
  display: block;

  margin-bottom: 7px;

  color: var(--muted);

  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.event-fact strong {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 25px);
  font-weight: 500;
}

.countdown-wrap {
  margin-top: 30px;
}

.countdown-title {
  margin: 0 0 13px;

  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.countdown {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(75px, 1fr));

  max-width: 650px;

  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.countdown-item {
  padding: 16px 12px 13px 0;
}

.countdown-item + .countdown-item {
  padding-left: 15px;

  border-left: 1px solid var(--line);
}

.countdown-item strong {
  display: block;

  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 70px);
  font-weight: 400;
  line-height: 0.9;
}

.countdown-item span {
  display: block;

  margin-top: 7px;

  color: var(--muted);

  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.countdown-note {
  max-width: 650px;

  margin: 12px 0 0;

  color: var(--muted);

  font-size: 10px;
  line-height: 1.55;
}


/* ---------------------------------
   DETAILS
---------------------------------- */

.paper-panel--details {
  width: min(1180px, 88vw);
}

.details-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  margin-top: 35px;

  border-top: 1px solid var(--ink);
}

.detail-item {
  position: relative;

  padding: 25px 30px 0 0;
}

.detail-item + .detail-item {
  padding-left: 30px;

  border-left: 1px solid var(--line);
}

.detail-number {
  display: block;

  margin-bottom: 30px;

  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
}

.detail-item h3 {
  margin: 0 0 14px;

  font-family: var(--serif);
  font-size: clamp(27px, 2.6vw, 40px);
  font-weight: 400;
}

.detail-item p {
  margin: 0;

  font-size: clamp(16px, 1.35vw, 20px) !important;
}


/* ---------------------------------
   FORM PAGE
---------------------------------- */

.page--rsvp {
  align-items: center;
  justify-content: center;

  padding-top: 72px;
  padding-bottom: 76px;
}

.paper-panel--form {
  display: grid;

  grid-template-columns:
    minmax(240px, 0.7fr)
    minmax(340px, 1fr);

  gap: clamp(35px, 6vw, 90px);

  width: min(1120px, 88vw);
  max-height: calc(100dvh - 150px);
}

.form-intro p:last-child {
  font-size: clamp(17px, 1.5vw, 22px) !important;
}

.rsvp-form {
  min-width: 0;
}

.form-field {
  margin: 0 0 22px;
  padding: 0;

  border: 0;
}

.form-field > label,
.form-field > legend {
  display: block;

  margin-bottom: 9px;
  padding: 0;

  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.form-field input[type="text"],
.form-field input[type="number"],
.form-field textarea {
  width: 100%;

  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;

  padding: 11px 0;

  color: var(--ink);
  background: transparent;

  font-family: var(--serif);
  font-size: 20px;

  outline: none;

  resize: vertical;

  appearance: none;
  -webkit-appearance: none;
}

.form-field textarea {
  min-height: 70px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #8b867e;

  opacity: 1;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-width: 2px;
}

.radio-group {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 7px;
}

.radio-card {
  position: relative;

  cursor: pointer;
}

.radio-card input {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;
}

.radio-card span {
  display: flex;

  min-height: 52px;

  justify-content: center;
  align-items: center;

  padding: 9px;

  border: 1px solid rgba(22, 21, 19, 0.5);

  text-align: center;

  font-size: 10px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.08em;

  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.radio-card:hover span {
  border-color: var(--ink);
}

.radio-card input:checked + span {
  color: #f2eee6;
  background: var(--ink);
  border-color: var(--ink);
}

.radio-card input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

#attendanceDetails {
  display: block;
}

#attendanceDetails.is-hidden {
  display: none;
}

.honeypot {
  position: absolute !important;

  left: -10000px !important;

  width: 1px !important;
  height: 1px !important;

  overflow: hidden !important;
}

.submit-button {
  display: flex;

  width: 100%;
  min-height: 56px;

  justify-content: space-between;
  align-items: center;

  margin-top: 6px;
  padding: 0 18px;

  border: 1px solid var(--ink);
  border-radius: 0;

  color: #f4f0e8;
  background: var(--ink);

  cursor: pointer;

  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;

  transition:
    color 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.submit-button:hover:not(:disabled) {
  color: var(--ink);
  background: transparent;
}

.submit-button:disabled {
  cursor: wait;

  opacity: 0.55;
}

.submit-button__arrow {
  font-size: 20px;
}

.form-status {
  min-height: 22px;

  margin-top: 13px;

  font-size: 11px;
  line-height: 1.45;
}

.form-status.is-success {
  font-weight: 600;
}

.form-status.is-error {
  font-weight: 600;

  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}


/* ---------------------------------
   NAVIGATION
---------------------------------- */

.magazine-nav {
  position: fixed;
  z-index: 20;

  right: max(25px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));

  display: flex;
  align-items: center;

  gap: 14px;

  color: #fff;

  mix-blend-mode: difference;

  opacity: 0;

  pointer-events: none;

  transform: translateY(8px);

  transition:
    opacity 300ms ease,
    transform 300ms ease;
}

.magazine.is-open .magazine-nav {
  opacity: 1;

  pointer-events: auto;

  transform: translateY(0);
}

.nav-button {
  display: grid;
  place-items: center;

  width: 38px;
  height: 38px;

  padding: 0;

  border: 1px solid currentColor;
  border-radius: 50%;

  color: inherit;
  background: transparent;

  cursor: pointer;

  font-size: 16px;

  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.nav-button:hover:not(:disabled) {
  transform: scale(1.08);
}

.nav-button:disabled {
  cursor: default;

  opacity: 0.25;
}

.page-counter {
  display: flex;
  align-items: center;

  gap: 8px;

  min-width: 82px;

  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.page-counter__line {
  width: 30px;
  height: 1px;

  background: currentColor;

  opacity: 0.6;
}

.keyboard-hint {
  position: fixed;
  z-index: 20;

  left: max(25px, env(safe-area-inset-left));
  bottom: max(28px, env(safe-area-inset-bottom));

  margin: 0;

  color: #fff;

  font-size: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;

  mix-blend-mode: difference;

  opacity: 0;

  pointer-events: none;

  transition:
    opacity 300ms ease;
}

.magazine.is-open .keyboard-hint {
  opacity: 0.7;
}


/* ---------------------------------
   TABLET
---------------------------------- */

@media (max-width: 900px) {
  .cover-title {
    flex-direction: column;
    align-items: center;

    gap: 5px;

    font-size: clamp(76px, 16vw, 135px);
    line-height: 0.63;
  }

  .cover-amp {
    margin: 3px 0 0;

    font-size: 0.28em;
  }

  .paper-panel--split,
  .paper-panel--form {
    grid-template-columns: 1fr;
  }

  .paper-panel--split {
    gap: 18px;
  }

  .paper-panel--form {
    gap: 28px;
  }

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

  .detail-item,
  .detail-item + .detail-item {
    padding: 20px 0;

    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-item:last-child {
    border-bottom: 0;
  }

  .detail-number {
    margin-bottom: 10px;
  }

  .paper-panel--details .display-heading {
    margin-bottom: 15px;
  }

  /*
    Более мягкое кадрирование на планшетах.
  */

  .page--invitation .page-photo {
    background-position: 52% center;
  }

  .page--about .page-photo {
    background-position: 50% center;
  }

  .page--date .page-photo {
    background-position: 50% center;
  }

  .page--details .page-photo {
    background-position: 48% center;
  }
}


/* ---------------------------------
   MOBILE
---------------------------------- */

@media (max-width: 640px) {
  .cover-photo {
    background-position: center center;
  }

  .cover-top {
    padding:
      max(20px, env(safe-area-inset-top))
      20px
      20px;
  }

  .cover-number {
    display: none;
  }

  .cover-title-wrap {
    top: 42%;

    width: calc(100vw - 24px);
  }

  .cover-pretitle {
    margin-bottom: 14px;

    font-size: 16px;
  }

  .cover-title {
    font-size: clamp(62px, 21vw, 102px);
  }

  .cover-date {
    margin-top: 25px;

    font-size: 10px;
  }

  .cover-lines {
    display: none;
  }

  .cover-open {
    right: 20px;
    bottom: max(26px, env(safe-area-inset-bottom));

    width: calc(100vw - 40px);
  }

  .page--photo {
    align-items: flex-end;

    padding:
      max(62px, calc(env(safe-area-inset-top) + 45px))
      14px
      max(74px, calc(env(safe-area-inset-bottom) + 58px));
  }

  /*
    Отдельное кадрирование фото для вертикального экрана.

    Здесь можно двигать фотографию по горизонтали
    изменяя первое значение в процентах.
  */

  .page--invitation .page-photo {
    background-position: 58% center;
  }

  .page--about .page-photo {
    background-position: 52% center;
  }

  .page--date .page-photo {
    background-position: 56% center;
  }

  .page--details .page-photo {
    background-position: 52% center;
  }

  .page--rsvp .page-photo {
    background-position: center center;
  }

  .editorial-label {
    top: max(19px, env(safe-area-inset-top));
    right: 17px;
    left: 17px;
  }

  .paper-panel,
  .paper-panel--large,
  .paper-panel--split,
  .paper-panel--date,
  .paper-panel--details,
  .paper-panel--form {
    width: 100%;
    max-height: calc(100dvh - 135px);

    padding: 24px 20px;
  }

  .display-heading,
  .display-heading--compact {
    margin-bottom: 22px;

    font-size: clamp(43px, 13vw, 68px);
    line-height: 0.88;
  }

  .paper-panel p:not(.eyebrow):not(.countdown-title):not(.countdown-note) {
    font-size: 18px;
  }

  .lead {
    font-size: 22px !important;
  }

  .page--about {
    justify-content: flex-start;
  }

  .paper-panel--split {
    display: block;
  }

  .about-copy {
    margin-top: 25px;
  }

  .big-date {
    margin-top: 4px;
  }

  .big-date__day {
    margin-right: 12px;

    font-size: 105px;
  }

  .big-date__month {
    font-size: 38px;
  }

  .event-facts {
    grid-template-columns: 1fr;

    margin-top: 28px;
  }

  .event-fact + .event-fact {
    padding-left: 0;

    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .countdown-item {
    padding: 12px 5px;

    text-align: center;
  }

  .countdown-item + .countdown-item {
    padding-left: 5px;
  }

  .countdown-item strong {
    font-size: clamp(30px, 10vw, 46px);
  }

  .countdown-item span {
    font-size: 6px;
    letter-spacing: 0.08em;
  }

  .page--details .paper-panel {
    max-height: calc(100dvh - 130px);
  }

  .details-grid {
    margin-top: 20px;
  }

  .detail-item h3 {
    font-size: 28px;
  }

  .detail-item p {
    font-size: 16px !important;
  }

  .page--rsvp {
    padding:
      max(62px, calc(env(safe-area-inset-top) + 45px))
      14px
      max(74px, calc(env(safe-area-inset-bottom) + 58px));
  }

  .paper-panel--form {
    display: block;
  }

  .form-intro {
    margin-bottom: 30px;
  }

  .radio-group {
    grid-template-columns: 1fr;
  }

  .radio-card span {
    min-height: 44px;
  }

  .magazine-nav {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(15px, env(safe-area-inset-bottom));

    gap: 8px;
  }

  .nav-button {
    width: 34px;
    height: 34px;
  }

  .page-counter {
    min-width: 70px;
  }

  .page-counter__line {
    width: 20px;
  }

  .keyboard-hint {
    display: none;
  }
}


/* ---------------------------------
   VERY NARROW MOBILE
---------------------------------- */

@media (max-width: 430px) {
  .page--invitation .page-photo {
    background-position: 60% center;
  }

  .page--about .page-photo {
    background-position: 54% center;
  }

  .page--date .page-photo {
    background-position: 58% center;
  }

  .page--details .page-photo {
    background-position: 53% center;
  }
}


/* ---------------------------------
   SHORT SCREENS
---------------------------------- */

@media (max-height: 700px) and (min-width: 641px) {
  .cover-title {
    font-size: clamp(65px, 11vw, 150px);
  }

  .cover-title-wrap {
    top: 43%;
  }

  .paper-panel {
    max-height: calc(100dvh - 115px);

    padding-top: 30px;
    padding-bottom: 30px;
  }

  .display-heading {
    margin-bottom: 18px;

    font-size: clamp(43px, 5.4vw, 75px);
  }

  .big-date__day {
    font-size: 120px;
  }

  .details-grid {
    margin-top: 20px;
  }

  .detail-number {
    margin-bottom: 12px;
  }
}


/* ---------------------------------
   REDUCED MOTION
---------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;

    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }

  .cover-photo {
    transform: none;
  }

  .page.is-entering-from-right,
  .page.is-entering-from-left,
  .page.is-leaving-to-left,
  .page.is-leaving-to-right {
    animation: none !important;

    transform: none !important;
  }
}