/* Wedding invitation — mobile-first template */

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #666666;
  --color-accent: #c4b5a0;
  --color-accent-dark: #9a8b72;
  --color-accent-hover: #b8a88a;
  --color-date-bg: #f0e6d8;
  --color-beige-light: #faf6f1;
  --color-beige-mid: #e8ddd0;
  --color-beige-deep: #c9b9a3;
  --color-btn-submit: #4a4a4a;
  --color-input-line: #d0d0d0;
  --font-serif: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: "Montserrat", system-ui, sans-serif;
  --page-max: 28rem;
  --section-gap: 3.5rem;
  --side-padding: 1.5rem;
}

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

html {
  scroll-behavior: smooth;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 2rem var(--side-padding) 4rem;
}

.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;
}

/* ——— Typography ——— */

.heading-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 8vw, 2.75rem);
  line-height: 1.15;
  text-align: center;
  margin: 0 0 1.25rem;
}

.section-lead {
  text-align: center;
  margin: 0 0 2rem;
  color: var(--color-text);
  font-size: 0.875rem;
  line-height: 1.7;
}

.section-note {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0 0 2rem;
}

/* ——— Sections ——— */

.section {
  margin-bottom: var(--section-gap);
}

.section-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.section-icon svg {
  display: block;
}

/* ——— Hero: две фотографии ——— */

.hero-gallery {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
  column-gap: 0.75rem;
  margin-bottom: 1rem;
}

.polaroid--hero {
  width: min(40vw, 9.5rem);
  max-width: none;
  margin: 0;
  padding: 0.5rem;
}

.polaroid--hero img {
  width: 100%;
  aspect-ratio: 7 / 9;
  object-fit: cover;
  object-position: top center;
  background: #f0f0f0;
  display: block;
}

.polaroid--left {
  transform: rotate(-3deg);
}

.polaroid--right {
  transform: rotate(3deg);
  margin-top: 2rem;
}

.hero-photo__caption {
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 400;
}

.hero-initials {
  flex: 0 0 auto;
  align-self: center;
  margin: 1.5rem 0 0;
  font-size: 1.125rem;
  font-weight: 400;
  white-space: nowrap;
}

/* ——— Intro ——— */

.section--intro {
  text-align: center;
}

.intro-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.intro-text p {
  margin: 0 0 1rem;
}

.intro-date-label {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.intro-date {
  margin: 0 0 2rem;
}

.intro-date span {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  padding: 0.35rem 1.25rem;
  background: var(--color-date-bg);
  border-radius: 2rem;
}

.intro-sign {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  margin: 0 0 2rem;
}

.stick-figures {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.25rem;
  color: var(--color-text);
}

.wedding-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.wedding-pair__name {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
}

.ui-icon {
  display: block;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ui-icon--section {
  width: 2.75rem;
  height: 2.75rem;
}

.ui-icon--timeline {
  width: 1.75rem;
  height: 1.75rem;
}

.ui-icon--couple {
  width: 3rem;
  height: 3rem;
}

.ui-icon--heart {
  width: 1.25rem;
  height: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* ——— Polaroid ——— */

.polaroid {
  margin: 0 auto;
  max-width: 18rem;
  padding: 0.75rem 0.75rem 2.5rem;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.polaroid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #eee;
}

.polaroid--couple {
  transform: rotate(-1deg);
}

.polaroid--closing {
  max-width: 16rem;
  transform: rotate(1.5deg);
}

.polaroid--closing img {
  filter: grayscale(100%);
  aspect-ratio: 2 / 3;
}

/* ——— Timeline ——— */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline__item {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 1.25rem;
}

.timeline__item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.timeline__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.timeline__time {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  margin: 0 0 0.25rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #e0e0e0;
}

.timeline__place {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ——— Locations ——— */

.location {
  text-align: center;
  margin-bottom: 2.5rem;
}

.location:last-child {
  margin-bottom: 0;
}

.location__name,
.location__address {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.location__address {
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 400;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn:hover {
  opacity: 0.9;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent-dark);
  outline-offset: 3px;
}

.section--wishes {
  padding: 2rem 1.25rem;
  margin-left: calc(-1 * var(--side-padding));
  margin-right: calc(-1 * var(--side-padding));
  background: var(--color-beige-light);
  border-radius: 0;
}

.btn--map {
  background: var(--color-accent);
  color: #fff;
}

.btn--map:not(.btn--disabled):hover {
  background: var(--color-accent-hover);
}

.btn--disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

.btn--submit {
  width: 100%;
  margin-top: 1.5rem;
  background: var(--color-btn-submit);
  color: #fff;
  font-size: 0.9375rem;
}

/* ——— Wishes ——— */

.wishes-text {
  text-align: center;
  margin-bottom: 2rem;
}

.wishes-text p {
  margin: 0 0 1.25rem;
}

.section-icon--gift {
  margin-top: 1rem;
}

/* ——— RSVP ——— */

.section--rsvp .heading-serif {
  margin-bottom: 1rem;
}

.rsvp-form {
  text-align: left;
}

.rsvp-fieldset {
  border: none;
  margin: 0 0 2rem;
  padding: 0;
}

.rsvp-legend {
  font-weight: 500;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  padding: 0;
}

.radio-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  cursor: pointer;
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.4;
}

.radio-label input {
  margin-top: 0.2rem;
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--color-text);
  flex-shrink: 0;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 500;
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.form-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--color-input-line);
  padding: 0.5rem 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  background: transparent;
  color: var(--color-text);
}

.form-input::placeholder {
  color: #b0b0b0;
}

.form-input:focus {
  outline: none;
  border-bottom-color: var(--color-text);
}

.rsvp-message {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.rsvp-message--success {
  color: #2d6a4f;
}

.rsvp-message--error {
  color: #9b2226;
}

.btn--submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ——— Closing ——— */

.closing-caption {
  margin-top: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9375rem;
  text-align: center;
}

/* ——— Desktop ——— */

@media (min-width: 48rem) {
  .page {
    padding-top: 3rem;
  }

  .hero-photo img {
    width: 11rem;
  }
}
