:root {
  --ink: #2e2a25;
  --muted: #6e665d;
  --paper: #f4ead8;
  --card: #fff8e7;
  --line: #c9bfb3;
  --sage: #8aa387;
  --citrus: #f4e9bf;
  --plum: #6f3143;
  --clay: #626a50;
  --gold: #aea196;
  --taupe: #aea196;
  --oat: #c9bfb3;
  --tapioca: #dccbb8;
  --pear: #f4e9bf;
  --basil: #8aa387;
  --olivine: #626a50;
  --mist: #b7bab6;
  --moonlight: #455f7d;
  --ice: #bdd7ea;
}

@font-face {
  font-family: "Miama Nueva Local";
  src:
    url("assets/fonts/ofont.ru_Miama Nueva.ttf") format("truetype"),
    local("Miama Nueva"),
    local("Miama Nueva Medium");
  font-display: swap;
}

@font-face {
  font-family: "Bodoni Nova Nr Local";
  src:
    url("assets/fonts/ofont.ru_a_BodoniNovaNr.ttf") format("truetype"),
    local("a_BodoniNovaNr"),
    local("a_BodoniNovaNr Regular");
  font-weight: 400;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #e7dccb;
  font-family: "Bodoni Nova Nr Local", Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.invite {
  width: min(500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 36px rgba(28, 25, 20, .28);
  overflow: hidden;
}

.label,
.micro,
.section-number {
  font-size: 11px;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 760px;
  color: #fff;
  background: var(--plum);
}

.image-slot {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .08)),
    repeating-linear-gradient(135deg, #e6dac8 0 14px, #d5c4aa 14px 28px);
  background-position: center;
  background-size: cover;
}

.image-slot::after {
  content: attr(data-empty);
  padding: 9px 13px;
  border: 1px solid rgba(36, 31, 27, .22);
  border-radius: 0;
  background: rgba(255, 250, 241, .82);
  color: #6b645b;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.image-slot[data-empty=""]::after {
  display: none;
}

.image-slot.has-image::after {
  display: none;
}

.hero-image {
  position: absolute;
  inset: 0;
  min-height: 0;
  border-radius: 0;
  background-position: center;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  display: block;
  background:
    linear-gradient(180deg, rgba(46, 42, 37, .24), rgba(46, 42, 37, .08) 34%, rgba(46, 42, 37, .78)),
    radial-gradient(circle at 80% 10%, rgba(244, 233, 191, .18), transparent 36%);
}

.hero-content {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  padding: 44px 26px 0;
}

.hero-bottom {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: 0 26px 36px;
}

.micro {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .72);
}

h1,
h2 {
  margin: 0;
  font-family: "Miama Nueva Local", Georgia, "Times New Roman", serif;
  font-weight: 400;
  color: inherit;
}

h1 {
  max-width: 430px;
  font-size: 56px;
  line-height: 1.04;
  letter-spacing: 0;
  text-transform: none;
}

h2 {
  font-size: 38px;
  line-height: 1.14;
  letter-spacing: 0;
}

.hero-title {
  margin: 18px 0 0;
  max-width: 330px;
  font-family: "Miama Nueva Local", Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.08;
  color: #f7efe3;
}

.hero-copy,
.prose,
.small-copy {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.hero-copy {
  max-width: 360px;
  color: rgba(255, 255, 255, .86);
}

.hero-date {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 8px;
  align-items: center;
  padding-top: 8px;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: center;
}

.hero-date-month,
.hero-date-year,
.hero-date-day {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 10px 12px;
  background: rgba(220, 203, 184, .46);
  color: var(--ink);
  font-family: "Bodoni Nova Nr Local", Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1;
}

.hero-date-label {
  display: none;
}

.hero-date-month {
  grid-column: 2;
  grid-row: 2;
}

.hero-date strong {
  grid-column: 1;
  grid-row: 2;
  font-weight: 400;
  color: var(--plum);
}

.hero-date-year {
  grid-column: 3;
  grid-row: 2;
}

.hero-date-side {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 14px;
  background: rgba(220, 203, 184, .46);
  color: var(--ink);
  font-family: "Bodoni Nova Nr Local", Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1;
}

.hero-date-side::before,
.hero-date-side::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: rgba(46, 42, 37, .35);
}

.hero-date-side {
  text-align: center;
}

.hero-date-weekday {
  grid-column: 2 / 4;
  grid-row: 1;
}

.hero-date-time {
  grid-column: 2 / 4;
  grid-row: 3;
  text-align: center;
  text-transform: none;
  letter-spacing: 0;
}

.section {
  position: relative;
  padding: 54px 26px;
  border-bottom: 1px solid rgba(34, 36, 33, .08);
}

.section.reveal-block {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity .85s ease,
    transform .85s ease;
}

.section.reveal-block.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-number {
  margin-bottom: 22px;
  color: var(--clay);
}

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

.intro-grid {
  background: var(--card);
}

.countdown-section {
  background:
    linear-gradient(180deg, rgba(244, 234, 216, .94), rgba(220, 203, 184, .68)),
    repeating-linear-gradient(135deg, rgba(174, 161, 150, .18) 0 16px, rgba(255, 248, 231, .28) 16px 32px);
}

.countdown {
  display: grid;
  gap: 34px;
  text-align: center;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.countdown-grid div {
  min-width: 0;
  padding: 18px 8px 14px;
  border: 1px solid rgba(111, 49, 67, .18);
  background: rgba(255, 250, 241, .62);
}

.countdown-grid strong {
  display: block;
  color: var(--plum);
  font-family: "Miama Nueva Local", Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 8vw, 44px);
  line-height: .95;
  font-weight: 400;
}

.countdown-grid span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mini-calendar {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}

.mini-calendar span {
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.mini-calendar .head {
  color: #999186;
  font-size: 10px;
  text-transform: uppercase;
}

.mini-calendar .selected {
  position: relative;
  background: transparent;
  color: var(--ink);
  z-index: 1;
  --marker-width: 62px;
  --marker-x: 50%;
  --marker-y: 49%;
  --marker-rotate: -8deg;
  --marker-opacity: 1;
}

.mini-calendar .selected::before {
  content: "♡";
  position: absolute;
  left: var(--marker-x);
  top: var(--marker-y);
  color: var(--plum);
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--marker-width);
  line-height: 1;
  opacity: var(--marker-opacity);
  transform: translate(-50%, -54%) rotate(var(--marker-rotate));
  z-index: -1;
}

.mini-calendar .selected.has-marker-image::before {
  content: "";
  width: var(--marker-width);
  height: var(--marker-width);
  background-image: var(--marker-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  transform: translate(-50%, -50%) rotate(var(--marker-rotate));
}

.story {
  display: grid;
  gap: 24px;
  background: linear-gradient(180deg, var(--paper), var(--tapioca));
}

.story-gallery {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 31%;
  gap: 10px;
  min-height: 410px;
}

.gallery-main,
.gallery-thumb {
  width: 100%;
  border: 1px solid rgba(46, 42, 37, .16);
  border-radius: 0;
  cursor: pointer;
  background-position: center;
  background-size: cover;
}

.gallery-main {
  min-height: 410px;
}

.gallery-thumbs {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 410px;
}

.gallery-thumb {
  min-height: 0;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 50%;
  background: rgba(46, 42, 37, .28);
  color: rgba(255, 255, 255, .86);
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 34px;
  line-height: 0;
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
}

.gallery-arrow-prev {
  left: 12px;
}

.gallery-arrow-next {
  right: calc(31% + 22px);
}

.prose {
  display: grid;
  gap: 13px;
  margin-top: 22px;
}

.prose p {
  margin: 0;
}

.single {
  margin-top: 18px;
}

.portrait {
  min-height: 410px;
  border: 1px solid var(--line);
  border-radius: 0;
}

.location-card {
  background: var(--plum);
  color: #fff;
}

.location-card .label,
.location-card .small-copy,
.location-card .prose {
  color: rgba(255, 255, 255, .72);
}

.venue {
  margin: 18px 0 8px;
  color: var(--pear);
  font-family: "Miama Nueva Local", Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.address-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
  line-height: 1.45;
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 233, 191, .75);
}

.address-link::after {
  content: "↗";
  color: var(--pear);
  font-size: 15px;
}

.address-link:hover {
  color: var(--pear);
}

.wide {
  min-height: 300px;
  margin: 28px -26px 0;
  border-top: 1px solid rgba(255,255,255,.16);
  border-bottom: 1px solid rgba(255,255,255,.16);
}

.venue-photo {
  min-height: 260px;
  margin: 30px -26px 0;
  border-top: 1px solid rgba(255,255,255,.16);
  border-bottom: 1px solid rgba(255,255,255,.16);
}

.map-frame {
  min-height: 330px;
  margin: 0 -26px;
  border-top: 1px solid rgba(255,255,255,.16);
  border-bottom: 1px solid rgba(255,255,255,.16);
  background: #efe7d9;
  overflow: hidden;
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 330px;
  border: 0;
  filter: grayscale(.18) sepia(.1) contrast(.96);
}

.schedule {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.schedule-time {
  color: var(--plum);
  font-family: "Miama Nueva Local", Georgia, "Times New Roman", serif;
  font-size: 25px;
}

.schedule-title {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.schedule-text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.split-mood {
  display: grid;
  gap: 18px;
  background: #fbf3de;
}

.detail {
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 0;
}

.color-dots {
  position: relative;
  margin: 30px auto 0;
  min-height: 248px;
  width: 100%;
  max-width: 440px;
}

.color-dots span {
  width: var(--dot-size, 44px);
  height: var(--dot-size, 44px);
  position: absolute;
  left: var(--dot-x, 50%);
  top: var(--dot-y, 50%);
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  transform: translate(-50%, -50%);
  transition:
    left .7s ease,
    top .7s ease,
    width .7s ease,
    height .7s ease;
}

.notes-list {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.note {
  padding: 18px;
  background: rgba(255, 250, 241, .58);
  border: 1px solid var(--line);
  color: #56514b;
  line-height: 1.55;
}

.rsvp {
  background: var(--tapioca);
  overflow: visible;
}

.rsvp h2 {
  text-align: center;
  text-transform: uppercase;
}

form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

label {
  display: grid;
  gap: 7px;
  color: #5f594f;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #bcae95;
  border-radius: 0;
  padding: 14px 13px;
  background: #fffaf1;
  color: var(--ink);
  font: 15px "Bodoni Nova Nr Local", Georgia, "Times New Roman", serif;
  text-transform: none;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

form button {
  border: 0;
  padding: 15px;
  background: var(--plum);
  color: #fff;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

footer {
  padding: 64px 26px 82px;
  background: var(--plum);
  color: #fff;
  text-align: center;
}

footer p {
  margin: 0;
  font-family: "Miama Nueva Local", Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.08;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, .86);
}

.lightbox.is-open {
  display: grid;
}

.lightbox img {
  display: block;
  max-width: min(100%, 900px);
  max-height: 86vh;
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 28px;
}

@media (max-width: 500px) {
  .invite {
    box-shadow: none;
  }

  h1 {
    font-size: 49px;
  }

  h2 {
    font-size: 34px;
  }

  .hero {
    min-height: 720px;
  }
}

@media (max-width: 360px) {
  .section,
  .hero-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-date {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 7px;
  }

  .hero-date strong {
    font-size: 16px;
  }

  .hero-date-month,
  .hero-date-day,
  .hero-date-year {
    font-size: 16px;
    padding: 10px 8px;
  }

  .hero-date-side {
    min-height: 50px;
    padding: 9px;
    font-size: 16px;
  }

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

  .story-gallery {
    grid-template-columns: 1fr;
  }

  .gallery-thumbs {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    min-height: 0;
  }

  .gallery-thumb {
    min-height: 132px;
  }

  .gallery-arrow-next {
    right: 12px;
  }

  .color-dots {
    min-height: 214px;
  }

  .color-dots span {
    width: var(--dot-size-mobile, var(--dot-size, 34px));
    height: var(--dot-size-mobile, var(--dot-size, 34px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .section.reveal-block {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.guest-form {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 24px;
  margin-top: 30px;
}

.field-label {
  display: grid;
  gap: 10px;
  color: #4d514e;
  font-size: 18px;
  line-height: 1.3;
  text-transform: none;
  letter-spacing: 0;
}

.field-label b,
.choice-group b {
  color: var(--plum);
  font-weight: 400;
}

.guest-form input,
.guest-form textarea {
  width: 100%;
  border: 1px solid var(--taupe);
  border-radius: 10px;
  padding: 18px 16px;
  background: #fffaf1;
  color: var(--ink);
  font: 18px "Bodoni Nova Nr Local", Georgia, "Times New Roman", serif;
  text-transform: none;
  letter-spacing: 0;
}

.guest-form input::placeholder,
.guest-form textarea::placeholder {
  color: #aaa9ad;
}

.choice-group {
  display: grid;
  gap: 12px;
  margin: 8px 0 4px;
  padding: 0;
  border: 0;
}

.choice-group legend {
  margin-bottom: 4px;
  color: #4d514e;
  font-size: 18px;
}

.choice-line {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4d514e;
  font-size: 18px;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.choice-line input {
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0;
  accent-color: var(--plum);
  flex: 0 0 auto;
}

.choice-line input[type="checkbox"] {
  border-radius: 0;
  accent-color: var(--plum);
}

.guest-form button {
  border: 0;
  border-radius: 999px;
  padding: 18px;
  background: var(--plum);
  color: var(--pear);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.form-status {
  min-height: 22px;
  margin: -8px 0 0;
  color: #5f594f;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.rsvp-mascot {
  position: absolute;
  z-index: 1;
  display: none;
  pointer-events: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 8px 14px rgba(36, 31, 27, .16));
}

.rsvp-mascot.is-visible {
  display: block;
}

.rsvp-mascot-left {
  left: -34px;
}

.rsvp-mascot-right {
  right: -34px;
}
