:root {
  --ink: #252724;
  --ink-soft: #666961;
  --paper: #f2f0e9;
  --paper-deep: #e7e3d9;
  --line: rgba(37, 39, 36, 0.22);
  --sage: #727a6c;
  --white: #fbfaf6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

button,
input {
  font: inherit;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.1fr);
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

.hero__photo-wrap {
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #161815;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
  filter: grayscale(72%) sepia(8%) contrast(0.92) brightness(0.78);
  transform: scale(1.015);
}

.hero__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 8vw, 128px);
}

.eyebrow,
.language,
.detail__label {
  margin: 0 0 22px;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow {
  color: #afb4a8;
}

h1,
h2,
blockquote {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.9rem, 6vw, 6.7rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero__rule {
  width: 72px;
  height: 1px;
  margin: clamp(38px, 7vh, 72px) 0 24px;
  background: #8d9289;
}

.hero__subtitle {
  margin: 0;
  color: #c7cbc2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

main {
  overflow: hidden;
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(88px, 12vw, 170px) clamp(24px, 7vw, 80px);
}

.invitation {
  display: grid;
  grid-template-columns: 90px minmax(0, 740px);
  gap: clamp(24px, 6vw, 80px);
}

.invitation > *,
.details > *,
.memory > *,
.rsvp > *,
.rsvp form {
  min-width: 0;
}

.section__number {
  margin: 13px 0 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.language {
  color: var(--sage);
}

h2 {
  margin: 0 0 46px;
  font-size: clamp(2.5rem, 5vw, 5.3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

#russian-heading.single-line-title {
  white-space: nowrap;
  text-transform: uppercase;
}

.prose {
  max-width: 720px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.75;
}

.prose p {
  margin: 0 0 1.4em;
}

.prose strong {
  font-weight: 700;
}

.details {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  background: var(--paper-deep);
  border-block: 1px solid var(--line);
}

.detail {
  min-height: 300px;
  padding: clamp(36px, 5vw, 72px);
  border-right: 1px solid var(--line);
}

.detail:last-child {
  border-right: 0;
}

.detail__label {
  color: var(--ink-soft);
}

.detail__value {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.05;
}

.detail__value span,
figcaption span {
  color: var(--ink-soft);
}

.detail__value span {
  display: block;
  margin-top: 8px;
  font-size: 0.52em;
  line-height: 1.25;
}

.detail__value--address {
  font-size: clamp(1.7rem, 3.1vw, 3.4rem);
}

.detail__note {
  margin: 26px 0 0;
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  padding-bottom: 4px;
  color: var(--ink);
  border-bottom: 1px solid currentColor;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--sage);
}

.venue {
  position: relative;
  margin: 0;
  background: var(--ink);
  overflow: hidden;
}

.venue img {
  width: 100%;
  height: min(72vw, 780px);
  object-fit: cover;
  object-position: center 35%;
  filter: grayscale(78%) sepia(5%) contrast(0.9) brightness(0.63);
}

.venue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(20, 22, 19, 0.76));
  pointer-events: none;
}

.venue figcaption {
  position: absolute;
  z-index: 1;
  right: clamp(24px, 7vw, 100px);
  bottom: clamp(24px, 6vw, 72px);
  left: clamp(24px, 7vw, 100px);
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 2vw, 1.35rem);
  text-align: right;
}

.venue figcaption span {
  color: #c8cbc4;
}

.memory {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(400px, 1.15fr);
  min-height: 760px;
  background: var(--ink);
  color: var(--white);
}

.memory__image {
  overflow: hidden;
}

.memory__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: grayscale(82%) sepia(6%) contrast(0.9) brightness(0.75);
}

.memory .memory__quote {
  padding: clamp(50px, 9vw, 130px);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.92rem, 2.6vw, 1.08rem);
  line-height: 1.55;
  letter-spacing: 0;
  color: #adb2a8;
}

.memory .memory__quote span {
  display: block;
  font-family: inherit;
  font-size: 1em;
  line-height: inherit;
  letter-spacing: inherit;
}

blockquote {
  align-self: center;
  margin: 0;
  padding: clamp(50px, 9vw, 130px);
  font-size: clamp(2rem, 4.2vw, 4.6rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

blockquote p {
  margin: 0 0 36px;
}

blockquote span {
  display: block;
  color: #adb2a8;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(0.9rem, 1.3vw, 1.1rem);
  line-height: 1.6;
  letter-spacing: normal;
}

.rsvp {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(60px, 10vw, 150px);
  max-width: 1260px;
  margin: 0 auto;
  padding: clamp(90px, 13vw, 180px) clamp(24px, 6vw, 72px);
}

.rsvp__intro h2 {
  text-transform: none;
}

.rsvp__intro > p:last-child {
  color: var(--ink-soft);
}

.field {
  margin-bottom: 34px;
}

.field label,
.attendance legend {
  display: block;
  margin-bottom: 11px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.field label span {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.4;
}

.field input {
  min-width: 0;
  width: 100%;
  padding: 15px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
}

.field input:focus {
  border-color: var(--ink);
}

.field input::placeholder {
  color: #969990;
}

.attendance {
  margin: 42px 0 0;
  padding: 0;
  border: 0;
}

.attendance__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 18px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.choice:hover {
  border-color: var(--ink-soft);
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice__mark {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 1px solid var(--ink-soft);
}

.choice input:checked + .choice__mark {
  border: 6px solid var(--ink);
}

.choice:has(input:checked) {
  background: var(--white);
  border-color: var(--ink);
}

.choice:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.choice strong {
  display: block;
}

.form-status {
  min-height: 27px;
  margin: 22px 0 10px;
  color: #8c3028;
}

.form-status[data-state="success"] {
  color: #40543d;
}

.submit-button {
  width: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

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

.submit-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

footer {
  padding: 64px 24px;
  color: #c7cbc2;
  background: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  text-align: center;
}

footer p {
  margin: 4px 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__photo {
    animation: hero-photo-in 1.1s ease-out both;
  }

  .hero__content > * {
    animation: hero-copy-in 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero__content > :nth-child(2) {
    animation-delay: 100ms;
  }

  .hero__content > :nth-child(3) {
    animation-delay: 180ms;
  }

  .hero__content > :nth-child(4) {
    animation-delay: 240ms;
  }

  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
      opacity 700ms ease,
      transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal--image {
    transform: scale(1.025);
    transition-duration: 900ms;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-photo-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes hero-copy-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: 58vh auto;
    grid-template-rows: 58svh auto;
    min-height: auto;
  }

  .hero__photo-wrap {
    min-height: 0;
  }

  .hero__content {
    min-height: 42svh;
    padding: 42px 24px 54px;
  }

  h1 {
    font-size: clamp(2.8rem, 12.5vw, 5.4rem);
  }

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

  .detail {
    min-height: 230px;
  }

  .detail:nth-child(2) {
    border-right: 0;
  }

  .detail--wide {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .memory {
    grid-template-columns: 1fr;
    grid-template-rows: 68vh auto;
    grid-template-rows: 68svh auto;
  }

  blockquote {
    padding: 70px 24px;
  }

  .memory .memory__quote {
    font-size: clamp(0.9rem, 4vw, 1.02rem);
  }

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

@media (max-width: 580px) {
  .hero {
    grid-template-rows: 54vh auto;
    grid-template-rows: 54svh auto;
  }

  .hero__photo {
    object-position: center 30%;
  }

  .hero__content {
    padding-right: max(20px, env(safe-area-inset-right));
    padding-left: max(20px, env(safe-area-inset-left));
  }

  h1 {
    max-width: 100%;
    font-size: clamp(1.9rem, 11vw, 4.8rem);
  }

  .eyebrow {
    margin-bottom: 16px;
  }

  .hero__rule {
    margin: 32px 0 20px;
  }

  .section {
    padding-block: 86px;
    padding-right: max(20px, env(safe-area-inset-right));
    padding-left: max(20px, env(safe-area-inset-left));
  }

  .invitation {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .section__number {
    margin: 0;
  }

  h2 {
    margin-bottom: 36px;
    max-width: 100%;
    font-size: clamp(1.75rem, 10.8vw, 3.2rem);
    overflow-wrap: anywhere;
  }

  #russian-heading.single-line-title {
    font-size: clamp(1.35rem, 7.4vw, 2.1rem);
  }

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

  .detail,
  .detail:nth-child(2) {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail--wide {
    grid-column: auto;
    border-top: 0;
    border-bottom: 0;
  }

  .venue img {
    height: 72vh;
    height: 72svh;
  }

  .venue figcaption {
    text-align: left;
  }

  .memory {
    grid-template-rows: 66vh auto;
    grid-template-rows: 66svh auto;
  }

  .memory .memory__quote {
    font-size: 0.96rem;
  }

  .rsvp {
    gap: 42px;
    padding-right: max(20px, env(safe-area-inset-right));
    padding-left: max(20px, env(safe-area-inset-left));
  }

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

  .submit-button {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  footer {
    padding-right: max(20px, env(safe-area-inset-right));
    padding-left: max(20px, env(safe-area-inset-left));
    font-size: 0.92rem;
  }
}

@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    min-height: 100svh;
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
    grid-template-rows: 1fr;
  }

  .hero__photo-wrap,
  .hero__content {
    min-height: 100vh;
    min-height: 100svh;
  }

  .hero__content {
    padding: 24px clamp(24px, 5vw, 48px);
  }

  .hero__content h1 {
    font-size: clamp(2rem, 5vw, 4rem);
  }

  .hero__rule {
    margin: 22px 0 16px;
  }
}

@media (max-width: 340px) {
  .eyebrow,
  .language,
  .detail__label {
    letter-spacing: 0.14em;
  }

  .prose {
    font-size: 1.08rem;
  }

  blockquote {
    font-size: 1.8rem;
  }

  .memory .memory__quote {
    font-size: 0.94rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
