/* ===================================
   WEDDING INVITATION — STYLE.CSS
   Палитра: тёплые нейтральные тона
   =================================== */

/* ---- RESET & BASE ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg:       #FAF7F2;
  --color-surface:  #F3EDE3;
  --color-border:   #DDD0BF;
  --color-text:     #3D2B1F;
  --color-muted:    #7A6555;
  --color-accent:   #A07855;
  --color-accent2:  #C8A882;
  --color-blush:    #D8AFA0;
  --color-white:    #FFFFFF;

  --font-serif: 'EB Garamond', 'Times New Roman', serif;
  --font-sans:  'Libre Baskerville', Georgia, serif;
  --font-numbers: 'Libre Baskerville', Georgia, serif;

  --max-width: 1100px;
  --max-narrow: 720px;
  --section-gap: 96px;
  --radius: 4px;
  --transition: 0.35s ease;
}

/* Унифицированный стиль для всех числовых значений */
:root {
  --numbers-weight: 500;
  --numbers-spacing: 0.01em;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background:
    linear-gradient(
      180deg,
      #f0e7db 0%,
      #f3ebe1 18%,
      #f6efe6 36%,
      #f8f2ea 55%,
      #f7f1e9 74%,
      #f5efe7 100%
    );
  color: var(--color-text);
  line-height: 1.7;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

/* ---- UTILITIES ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: var(--max-narrow);
}

.section {
  padding: var(--section-gap) 0;
}

.hero + .section {
  padding-top: 48px;
}

.section__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 400;
  text-align: center;
  color: var(--color-text);
  margin-bottom: 48px;
  position: relative;
}
.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--color-accent2);
  margin: 14px auto 0;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 36px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
  width: 100%;
}
.btn--primary:hover {
  background: var(--color-text);
  border-color: var(--color-text);
}
.btn--outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
  margin-top: 24px;
}
.btn--outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

/* ===================================
   HERO
   =================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #b9a18c;
  color: var(--color-white);
  overflow: hidden;
  margin-bottom: 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -10px;
  z-index: 0;
  background-image: url('images/back_3.JPG');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: blur(2px) saturate(1.04) contrast(1.02);
  transform: scale(1.005);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 238, 214, 0.18), rgba(18, 10, 6, 0.08)),
    linear-gradient(180deg, rgba(40, 24, 14, 0.12), rgba(40, 24, 14, 0.18));
  backdrop-filter: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 40px 24px;
  max-width: 900px;
  background: rgba(28, 18, 12, 0.34);
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.26);
  backdrop-filter: blur(1px);
}

.hero__pre {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.95;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

.hero__names {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 12vw, 7.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.hero__amp {
  color: var(--color-accent2);
  font-style: italic;
}

.hero__date {
  font-family: var(--font-serif);
  display: inline-grid;
  grid-template-columns: auto;
  align-items: center;
  gap: 12px;
  font-size: clamp(1rem, 2.7vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 32px;
  opacity: 0.97;
  text-shadow: 0 2px 14px rgba(0,0,0,0.4);
  padding: 12px 20px;
  border: 1px solid rgba(249, 231, 206, 0.54);
  border-radius: 14px;
  background: rgba(255,255,255,0.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06), 0 10px 30px rgba(0,0,0,0.18);
}

.hero__countdown {
  margin-top: 10px;
  padding: 14px 8px 0;
}

.hero .countdown__num {
  color: #F9E7CE;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

.hero .countdown__label,
.hero .countdown__sep {
  color: rgba(255,255,255,0.86);
}

.hero__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0.7;
}
.hero__divider span {
  display: block;
  width: 60px;
  height: 1px;
  background: var(--color-white);
}
.hero__divider svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent2);
}

/* Fade-in animation on hero */
.fade-in {
  animation: fadeIn 1.4s ease both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===================================
   COUNTDOWN
   =================================== */

.countdown__grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
}

.countdown__num {
  font-family: var(--font-numbers);
  font-size: clamp(2.3rem, 7.5vw, 4.1rem);
  font-weight: var(--numbers-weight);
  line-height: 1;
  color: var(--color-accent);
  letter-spacing: var(--numbers-spacing);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

.hero__date,
.timeline__time,
.location__address,
.rsvp__desc,
.footer {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

.hero__date,
.timeline__time,
.location__address {
  letter-spacing: var(--numbers-spacing);
}

.countdown__label {
  font-size: 0.92rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 8px;
}

.countdown__sep {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 300;
  color: var(--color-border);
  align-self: flex-start;
  padding-top: 8px;
  line-height: 1;
}

/* ===================================
   WELCOME
   =================================== */
.welcome {
  text-align: left;
  position: relative;
  background: transparent;
  margin-top: -2px;
}

.timeline {
  background: transparent;
}

.location {
  background: transparent;
}

.details {
  background: transparent;
}

.rsvp {
  background: transparent;
}

.rsvp .container--narrow {
  max-width: 1080px;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 76px;
}

.chat__msg {
  max-width: 82%;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 6px 20px rgba(58, 34, 16, 0.08);
}

.chat__msg p {
  margin: 0;
  color: var(--color-text);
  line-height: 1.65;
  font-size: 1rem;
}

.chat__msg span {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.chat__msg--left {
  align-self: flex-start;
  border-top-left-radius: 6px;
}

.chat__msg--right {
  align-self: flex-end;
  background: #f8efe4;
  border-color: #e6d4be;
  border-top-right-radius: 6px;
}

.memory {
  position: relative;
  margin: 64px auto 0;
  padding: 44px 34px 38px;
  text-align: center;
  background:
    radial-gradient(circle at 10% 20%, rgba(216, 175, 160, 0.18), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(200, 168, 130, 0.2), transparent 26%),
    rgba(255, 252, 247, 0.78);
  border: 1px solid rgba(221, 208, 191, 0.9);
  border-radius: 28px;
  box-shadow: 0 22px 70px rgba(87, 54, 31, 0.11);
  overflow: hidden;
}

.memory::before,
.memory::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.memory::before {
  inset: 14px;
  border: 1px dashed rgba(160, 120, 85, 0.28);
  border-radius: 22px;
}

.memory::after {
  width: 130px;
  height: 130px;
  right: -42px;
  bottom: -48px;
  background: radial-gradient(circle, rgba(216, 175, 160, 0.26), transparent 68%);
}

.memory__decor {
  position: absolute;
  z-index: 1;
  color: rgba(160, 120, 85, 0.3);
  font-family: var(--font-serif);
  pointer-events: none;
}

.memory__decor--heart {
  top: 20px;
  right: 34px;
  font-size: 2.1rem;
  transform: rotate(12deg);
}

.memory__decor--spark {
  left: 34px;
  bottom: 28px;
  font-size: 1.5rem;
  transform: rotate(-10deg);
}

.memory__eyebrow,
.memory__title,
.memory__text,
.memory__sign,
.memory__photos {
  position: relative;
  z-index: 2;
}

.memory__eyebrow {
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.memory__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 3.1rem);
  font-weight: 500;
  line-height: 1.08;
  color: var(--color-text);
  margin-bottom: 14px;
}

.memory__text {
  max-width: 600px;
  margin: 0 auto 34px;
  color: var(--color-muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.memory__text--after {
  margin: 34px auto 10px;
}

.memory__sign {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-style: italic;
  color: #6d4d37;
}

.memory__photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 4vw, 34px);
  align-items: center;
}

.polaroid {
  position: relative;
  margin: 0;
  padding: 14px 14px 24px;
  background: #fffaf2;
  border: 1px solid rgba(221, 208, 191, 0.82);
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(61, 43, 31, 0.16);
  transition: transform var(--transition), box-shadow var(--transition);
}

.polaroid:hover {
  transform: translateY(-6px) rotate(0deg);
  box-shadow: 0 22px 48px rgba(61, 43, 31, 0.2);
}

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

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

.polaroid img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  border-radius: 5px;
  filter: sepia(0.08) saturate(0.96) contrast(0.98);
}

.polaroid figcaption {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.6vw, 1.22rem);
  font-style: italic;
  color: #6d4d37;
}

.polaroid__tape {
  position: absolute;
  top: -14px;
  z-index: 3;
  width: 86px;
  height: 28px;
  background: rgba(238, 219, 190, 0.72);
  border: 1px solid rgba(200, 168, 130, 0.38);
  box-shadow: 0 3px 10px rgba(61, 43, 31, 0.08);
  backdrop-filter: blur(1px);
}

.polaroid__tape--left {
  left: 50%;
  transform: translateX(-50%) rotate(4deg);
}

.polaroid__tape--right {
  right: 18px;
  transform: rotate(-8deg);
}

/* ===================================
   TIMELINE
   =================================== */
.timeline {
  background:
    linear-gradient(rgba(243,237,227,0.95), rgba(243,237,227,0.95)),
    url('https://images.unsplash.com/photo-1490351267196-b7a67e26e41b?auto=format&fit=crop&w=1200&q=50') center/cover no-repeat;
}

.timeline__list {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

/* Vertical line */
.timeline__list::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border);
  transform: translateX(-50%);
}

.timeline__item {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  align-items: start;
  gap: 0 20px;
  margin-bottom: 48px;
  position: relative;
}
.timeline__item:last-child { margin-bottom: 0; }

/* Alternating sides */
.timeline__item:nth-child(odd) .timeline__time {
  text-align: right;
  order: 1;
}
.timeline__item:nth-child(odd) .timeline__dot {
  order: 2;
}
.timeline__item:nth-child(odd) .timeline__content {
  text-align: left;
  order: 3;
}

.timeline__item:nth-child(even) .timeline__content {
  text-align: left;
  order: 1;
}
.timeline__item:nth-child(even) .timeline__dot {
  order: 2;
}
.timeline__item:nth-child(even) .timeline__time {
  text-align: left;
  order: 3;
}

.timeline__time {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: #7f5636;
  padding-top: 2px;
}

.timeline__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent2);
  border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 1px var(--color-accent2);
  margin-top: 4px;
  justify-self: center;
  flex-shrink: 0;
}

.timeline__content h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-text);
}
.timeline__content p {
  font-size: 1.08rem;
  color: #5b4738;
  line-height: 1.6;
}

.timeline__content {
  background: rgba(255,255,255,0.76);
  border: 1px solid #e2d5c6;
  border-radius: 10px;
  padding: 14px 16px;
}

/* ===================================
   LOCATION
   =================================== */
.location__head {
  text-align: center;
  margin: -12px auto 28px;
}

.location__grid {
  display: block;
}

.location__icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}
.location__name {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 500;
  margin-bottom: 6px;
}
.location__address {
  font-size: 1rem;
  color: var(--color-muted);
  margin-bottom: 0;
  letter-spacing: 0.05em;
}
.location__desc {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.location__map iframe {
  border-radius: 8px;
  border: 1px solid var(--color-border);
  width: min(80vw, 980px);
  margin: 0 auto;
  height: min(62vh, 560px);
}

.location__map {
  max-width: 100%;
  margin: 0 auto;
}

.location-preview {
  display: none;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.9);
  box-shadow: 0 12px 36px rgba(61, 43, 31, 0.12);
  text-align: center;
}

.location-preview__label {
  margin-bottom: 6px;
  color: var(--color-accent);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.location-preview__name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 6px;
}

.location-preview__address {
  color: var(--color-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.location-preview__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.dresscode__palette {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.palette__item {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: transform var(--transition);
  cursor: default;
}
.palette__item:hover { transform: scale(1.1); }

/* ===================================
   DETAILS / WISHES
   =================================== */
.details__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.details__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 40px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.details__card::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(160, 120, 85, 0.14);
  border-radius: 14px;
  pointer-events: none;
}

.details__card:hover {
  box-shadow: 0 8px 32px rgba(60, 30, 10, 0.08);
  transform: translateY(-4px);
}

.details__icon {
  width: 66px;
  height: 66px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,0.9), rgba(243, 230, 214, 0.58)),
    var(--color-white);
  border: 1px solid rgba(200, 168, 130, 0.5);
  box-shadow: 0 10px 24px rgba(87, 54, 31, 0.1);
  position: relative;
}

.details__icon::after {
  content: '♡';
  position: absolute;
  right: -8px;
  top: -10px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-blush);
}

.details__card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 12px;
}

.details__card p {
  font-size: 1.06rem;
  color: var(--color-muted);
  line-height: 1.7;
}

.details__card .dresscode__palette {
  margin-top: 14px;
  margin-bottom: 0;
}

/* ===================================
   RSVP
   =================================== */
.rsvp {
  background:
    linear-gradient(rgba(243,237,227,0.96), rgba(243,237,227,0.96)),
    url('https://images.unsplash.com/photo-1518895949257-7621c3c786d7?auto=format&fit=crop&w=1200&q=50') center/cover no-repeat;
}

.rsvp__desc {
  text-align: center;
  font-size: 1.08rem;
  color: var(--color-muted);
  margin-bottom: 48px;
}

.rsvp__form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.rsvp__embed {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  min-height: 680px;
  margin: 16px auto 0;
  width: min(88vw, 860px);
  padding: 14px;
}

.rsvp__embed iframe {
  width: 100%;
  max-width: 100%;
  min-height: 680px;
  border: 0;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.rsvp__embed-note {
  margin-top: 14px;
  font-size: 0.98rem;
  color: var(--color-muted);
  text-align: center;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form__group label:first-child {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.form__group input[type="text"],
.form__group select,
.form__group textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form__group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A6555' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form__group input:focus,
.form__group select:focus,
.form__group textarea:focus {
  border-color: var(--color-accent2);
  box-shadow: 0 0 0 3px rgba(200, 168, 130, 0.2);
}

.form__group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Radio / Checkbox */
.form__radio-group,
.form__check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.form__radio,
.form__check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
}

.form__radio input,
.form__check input {
  accent-color: var(--color-accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.form__success {
  color: #5A7A55;
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.2em;
  font-family: var(--font-serif);
}

.form__error {
  color: #A03030;
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.2em;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 48px 24px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.08em;
}
.footer__sub {
  font-size: 0.85rem;
  margin-top: 8px;
  opacity: 0.55;
  font-style: italic;
}

/* ===================================
   SCROLL REVEAL ANIMATION
   =================================== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   RESPONSIVE — TABLET (≤ 900px)
   =================================== */
@media (max-width: 900px) {
  :root { --section-gap: 72px; }

  .hero + .section {
    padding-top: 36px;
  }

  .hero {
    background-position: center top;
  }

  .hero::before {
    background-size: cover;
    background-position: center center;
  }

  .memory {
    margin-top: 52px;
    padding: 38px 26px 32px;
  }

  .memory__photos {
    gap: 20px;
  }

  .location__grid {
    grid-template-columns: 1fr;
  }
  .location__info { text-align: center; }
  .btn--outline { display: block; text-align: center; }

  .location__map iframe {
    width: min(90vw, 760px);
    height: min(52vh, 460px);
  }

  .details__grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}

/* ===================================
   RESPONSIVE — MOBILE (≤ 600px)
   =================================== */
@media (max-width: 600px) {
  :root { --section-gap: 56px; }

  .hero + .section {
    padding-top: 28px;
  }

  .container {
    padding: 0 18px;
  }

  .hero {
    background-position: center top;
  }

  .hero__content {
    margin: 0 14px;
  }

  .hero__date {
    grid-template-columns: auto;
    gap: 5px;
    padding: 12px 16px;
    letter-spacing: 0.08em;
  }

  .rsvp .container--narrow {
    max-width: 100%;
  }

  /* Timeline — linear on mobile */
  .timeline__list::before { left: 16px; transform: none; }

  .timeline__item {
    grid-template-columns: 28px 1fr;
    gap: 0 14px;
  }

  .timeline__item:nth-child(odd) .timeline__time,
  .timeline__item:nth-child(even) .timeline__time,
  .timeline__item:nth-child(odd) .timeline__content,
  .timeline__item:nth-child(even) .timeline__content {
    order: unset;
    text-align: left;
  }
  .timeline__item:nth-child(odd) .timeline__dot,
  .timeline__item:nth-child(even) .timeline__dot {
    order: unset;
  }

  .timeline__item {
    display: flex;
    flex-direction: column;
    padding-left: 44px;
    position: relative;
  }

  .timeline__dot {
    position: absolute;
    left: 8px;
    top: 5px;
  }

  .timeline__time {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  /* Countdown */
  .countdown__item { padding: 0 12px; }
  .countdown__sep { display: none; }

  .hero__content {
    padding: 28px 14px;
  }

  .chat__msg {
    max-width: 94%;
  }

  .chat {
    margin-top: 56px;
  }

  .memory {
    margin-top: 44px;
    padding: 34px 16px 28px;
    border-radius: 22px;
  }

  .memory::before {
    inset: 10px;
    border-radius: 17px;
  }

  .memory__decor--heart {
    top: 12px;
    right: 20px;
    font-size: 1.6rem;
  }

  .memory__decor--spark {
    left: 20px;
    bottom: 18px;
  }

  .memory__text {
    margin-bottom: 24px;
    font-size: 0.96rem;
  }

  .memory__photos {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .polaroid {
    max-width: 360px;
    margin: 0 auto;
    padding: 12px 12px 20px;
  }

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

  .polaroid--right {
    transform: rotate(2deg);
  }

  .polaroid__tape {
    width: 72px;
    height: 24px;
  }

  .timeline__content {
    padding: 12px 12px;
  }

  .rsvp__embed,
  .rsvp__embed iframe {
    min-height: 560px;
  }

  .rsvp__embed {
    width: min(94vw, 640px);
    margin-top: 12px;
    padding: 10px;
  }

  .rsvp__embed iframe {
    min-height: 520px;
  }

  .location__map iframe {
    display: none;
  }

  .location__head > .location-copy,
  .location-actions {
    display: none;
  }

  .location-preview {
    display: block;
  }

  .location-preview__actions .btn--map,
  .location-preview__actions .location-copy {
    width: 100%;
    margin-top: 0;
    text-align: center;
  }

  /* Details */
  .details__grid { grid-template-columns: 1fr; gap: 14px; }

  /* Palette */
  .palette__item { width: 44px; height: 44px; }

  /* Hero names */
  .hero__names { letter-spacing: 0.01em; }

  /* Form radio/check */
  .form__radio-group,
  .form__check-group { flex-direction: column; gap: 10px; }

}

/* ===================================
   INTERACTIVE ENHANCEMENTS
   =================================== */
.hero {
  --hero-parallax-y: 0px;
}

.hero::before {
  transform: translate3d(0, var(--hero-parallax-y), 0) scale(1.005);
  will-change: transform;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn--hero {
  padding: 12px 18px;
  border-color: rgba(249, 231, 206, 0.72);
  background: rgba(255, 255, 255, 0.14);
  color: var(--color-white);
  backdrop-filter: blur(4px);
}

.btn--hero:hover,
.btn--hero:focus-visible {
  background: rgba(249, 231, 206, 0.92);
  color: var(--color-text);
}

.btn--hero-secondary {
  background: rgba(18, 12, 8, 0.18);
}

.chat {
  position: relative;
}

.chat__msg--pending {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
}

.chat__msg--shown {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.chat__typing {
  align-self: flex-start;
  margin-left: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(221, 208, 191, 0.8);
  color: var(--color-muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  animation: typingPulse 1s ease-in-out infinite;
}

@keyframes typingPulse {
  0%, 100% { opacity: 0.48; }
  50% { opacity: 1; }
}

.polaroid[data-interactive="true"] {
  cursor: pointer;
  transform: rotate(var(--base-rotate, 0deg)) perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
}

.polaroid--left[data-interactive="true"] { --base-rotate: -3.5deg; }
.polaroid--right[data-interactive="true"] { --base-rotate: 3deg; }

@media (max-width: 600px) {
  .polaroid--left[data-interactive="true"] { --base-rotate: -2deg; }
  .polaroid--right[data-interactive="true"] { --base-rotate: 2deg; }
}

.polaroid[data-interactive="true"]:hover,
.polaroid[data-interactive="true"]:focus-visible {
  box-shadow: 0 24px 54px rgba(61, 43, 31, 0.22);
  outline: none;
}

.polaroid--flipped figcaption {
  color: var(--color-accent);
}

.polaroid--flipped::after {
  content: '♡';
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: var(--color-blush);
  font-family: var(--font-serif);
  font-size: 1.5rem;
}

.polaroid__hint {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.88);
  color: var(--color-accent);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(61, 43, 31, 0.12);
}

.location-copy {
  margin-top: 12px;
  padding: 9px 16px;
  border: 1px solid var(--color-accent2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--color-accent);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.location-copy:hover,
.location-copy:focus-visible {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-1px);
  outline: none;
}

.location-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px auto 0;
}

.btn--map {
  padding: 12px 20px;
  background: var(--color-white);
  border-color: var(--color-border);
  color: var(--color-accent);
}

.btn--map:hover,
.btn--map:focus-visible {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.wedding-day-panel {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 30;
  width: min(calc(100vw - 28px), 720px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(221, 208, 191, 0.9);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.94);
  box-shadow: 0 18px 60px rgba(61, 43, 31, 0.18);
  backdrop-filter: blur(8px);
}

.wedding-day-panel strong {
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

.wedding-day-panel span {
  color: var(--color-muted);
  font-size: 0.86rem;
}

.wedding-day-panel__links {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wedding-day-panel__link {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-accent);
  font-size: 0.78rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(32, 22, 16, 0.76);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox--open {
  opacity: 1;
  pointer-events: auto;
}

.body--lightbox-open {
  overflow: hidden;
}

.lightbox__image {
  max-width: min(92vw, 760px);
  max-height: 78vh;
  border: 12px solid #fffaf2;
  border-radius: 10px;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.38);
  object-fit: contain;
}

.lightbox__caption {
  margin-top: 14px;
  color: #fffaf2;
  font-family: var(--font-serif);
  font-style: italic;
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 250, 242, 0.6);
  border-radius: 50%;
  background: rgba(255, 250, 242, 0.14);
  color: var(--color-white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.interactive-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  transform: translate(-50%, 16px);
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(61, 43, 31, 0.92);
  color: var(--color-white);
  box-shadow: 0 12px 36px rgba(61, 43, 31, 0.24);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  text-align: center;
}

.interactive-toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hero__names {
  position: relative;
}

.hero__names[role="button"] {
  cursor: pointer;
}

.heart-burst {
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  color: var(--color-accent2);
  font-size: 1.4rem;
  animation: heartBurst 1.1s ease forwards;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes heartBurst {
  from { opacity: 0; transform: translate(-50%, 12px) scale(0.84); }
  45% { opacity: 1; }
  to { opacity: 0; transform: translate(-50%, -34px) scale(1.18); }
}

@media (max-width: 600px) {
  .hero__actions,
  .location-actions,
  .wedding-day-panel__links {
    flex-direction: column;
  }

  .btn--hero,
  .btn--map,
  .wedding-day-panel__link {
    width: 100%;
    text-align: center;
  }

  .wedding-day-panel {
    bottom: 10px;
    grid-template-columns: 1fr;
  }

  .lightbox {
    padding: 18px;
  }

  .lightbox__image {
    border-width: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before {
    transform: scale(1.005);
    will-change: auto;
  }

  .chat__msg--pending,
  .chat__msg--shown,
  .interactive-toast,
  .lightbox,
  .polaroid[data-interactive="true"] {
    transition: none;
  }

  .chat__typing,
  .heart-burst {
    animation: none;
    display: none;
  }
}
