:root {
  --ink: #292d36;
  --muted: #777b84;
  --paper: #ffffff;
  --soft: #f7f5f2;
  --warm: #f0cfaa;
  --line: #e9e2dc;
  --rose: #ef5f61;
  --rose-deep: #d94862;
  --green: #26b568;
  --green-deep: #159b54;
  --sage: #789982;
  --shadow: 0 26px 70px rgba(41, 45, 54, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

body::selection {
  background: rgba(239, 95, 97, 0.24);
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

.order-site {
  position: fixed;
  z-index: 80;
  top: 50%;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 238px;
  padding: 22px 14px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(145deg, var(--rose), var(--rose-deep));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  box-shadow: 0 14px 32px rgba(217, 72, 98, 0.34);
  transition: filter 180ms ease, box-shadow 180ms ease;
  animation: desktopCta 3.4s ease-in-out infinite;
}

.order-site:hover {
  filter: brightness(1.04);
  box-shadow: 0 18px 40px rgba(217, 72, 98, 0.44);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.96fr);
  min-height: min(970px, 100svh);
  background: var(--paper);
}

.hero-photo {
  position: relative;
  min-height: 680px;
  background: url("assets/hero-couple.jpg") center / cover no-repeat;
  isolation: isolate;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(240, 207, 170, 0.2);
}

.hero-content {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(32px, 4.2vw, 64px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94)),
    var(--paper);
}

.lang-switcher {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 5;
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(41, 45, 54, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(41, 45, 54, 0.08);
  backdrop-filter: blur(12px);
}

.lang-btn {
  width: 42px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.lang-btn:hover {
  transform: translateY(-1px);
}

.lang-btn.is-active {
  background: var(--ink);
  color: #fff;
}

.invite-card {
  width: min(100%, 570px);
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid rgba(41, 45, 54, 0.06);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  text-align: center;
}

.eyebrow,
.section-head h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow {
  font-size: clamp(21px, 2.1vw, 30px);
}

.soft,
.lead,
.section-head p,
.event-info span,
.hosts span,
.field-label,
.form-status {
  color: var(--muted);
}

.soft {
  margin: 16px 0 0;
  font-size: 16px;
}

h1 {
  margin: 6px 0 12px;
  color: var(--rose);
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: clamp(36px, 3.45vw, 52px);
  font-weight: 800;
  line-height: 1.1;
}

.lead {
  max-width: 470px;
  margin: 0 auto;
  font-size: 16px;
}

.flower-strip {
  width: 190px;
  height: auto;
  margin: 28px auto 22px;
  mix-blend-mode: multiply;
}

.hosts,
.event-info {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.hosts strong,
.event-info strong {
  color: var(--ink);
  font-size: 17px;
}

.divider {
  height: 1px;
  margin: 28px 0;
  background: var(--line);
}

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

.time-box {
  display: grid;
  place-items: center;
  min-height: 76px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(41, 45, 54, 0.04);
}

.time-box strong {
  color: var(--rose);
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1;
}

.time-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.primary-link,
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(38, 181, 104, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.primary-link:hover,
.submit-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
  box-shadow: 0 20px 38px rgba(38, 181, 104, 0.28);
}

.section {
  padding: clamp(64px, 8vw, 126px) clamp(18px, 4vw, 64px);
}

.section-head {
  width: min(100%, 760px);
  margin: 0 auto clamp(34px, 5vw, 64px);
  text-align: center;
}

.section-head.compact {
  margin-bottom: 26px;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--sage);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.22;
}

.program {
  background: #f4f4f3;
}

.timeline {
  width: min(100%, 430px);
  margin: 0 auto;
}

.timeline-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  align-items: start;
  padding: 12px 0;
}

.timeline-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(239, 95, 97, 0.18);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(41, 45, 54, 0.06);
  font-size: 22px;
}

.timeline-copy time {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.timeline-copy strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  line-height: 1.35;
}

.album {
  background: #f7f7f6;
}

.media-carousel {
  width: min(100%, 1400px);
  margin: 0 auto;
}

.media-track {
  display: grid;
  grid-template-columns: minmax(180px, 0.78fr) minmax(360px, 1.9fr) minmax(180px, 0.78fr);
  gap: clamp(16px, 2vw, 28px);
  align-items: center;
}

.media-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #ddd;
  box-shadow: 0 22px 46px rgba(41, 45, 54, 0.12);
  transform: translateZ(0);
}

.media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms ease;
}

.media-card:hover img {
  transform: scale(1.035);
}

.media-card.side {
  aspect-ratio: 4 / 3.25;
  opacity: 0.76;
}

.media-card.active {
  aspect-ratio: 16 / 7.6;
}

.play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.play-badge::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 28px solid transparent;
  border-bottom: 28px solid transparent;
  border-left: 44px solid var(--rose);
  filter: drop-shadow(0 12px 20px rgba(41, 45, 54, 0.16));
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.circle-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 32px;
  line-height: 1;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.circle-btn:hover {
  transform: translateY(-2px);
}

.circle-btn.accent {
  border-color: transparent;
  background: var(--rose);
  color: #fff;
  box-shadow: 0 14px 28px rgba(239, 95, 97, 0.22);
}

.rsvp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 540px) minmax(0, 1fr);
  align-items: stretch;
  background: #fff;
}

.rsvp-visual {
  width: 100%;
  height: 100%;
  min-height: 700px;
  object-fit: cover;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 700px;
  padding: clamp(42px, 6vw, 82px) clamp(28px, 4vw, 62px);
  background: #fff;
}

.rsvp-form .section-head h2 {
  font-size: clamp(28px, 3vw, 40px);
}

.choice-group {
  display: grid;
  gap: 14px;
}

.choice-group label {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
}

.choice-group input {
  width: 18px;
  height: 18px;
  accent-color: var(--rose);
}

.field-label {
  display: block;
  margin: 0 0 10px;
  font-weight: 700;
}

.guest-stepper {
  display: grid;
  grid-template-columns: 56px 92px 56px;
  gap: 10px;
  align-items: center;
}

.guest-stepper button,
.guest-stepper input {
  height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: center;
  font-weight: 800;
}

.guest-stepper button {
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
}

.guest-stepper input {
  border-radius: 4px;
}

.rsvp-form > input,
.rsvp-form textarea {
  width: 100%;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  outline: 0;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.rsvp-form > input {
  min-height: 54px;
  padding: 0 18px;
}

.rsvp-form textarea {
  min-height: 138px;
  padding: 16px 18px;
  resize: vertical;
}

.rsvp-form > input:focus,
.rsvp-form textarea:focus {
  border-color: rgba(239, 95, 97, 0.62);
  box-shadow: 0 0 0 4px rgba(239, 95, 97, 0.1);
}

.submit-btn {
  margin-top: 4px;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  box-shadow: 0 16px 30px rgba(239, 95, 97, 0.24);
}

.form-status {
  min-height: 26px;
  margin: 14px 0 0;
  text-align: center;
  font-weight: 800;
}

.wishes {
  padding-bottom: clamp(92px, 12vw, 150px);
  background: #f7f7f6;
}

.wish-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: min(100%, 1340px);
  margin: 0 auto;
}

.wish-card {
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 28px 24px;
  border: 1px solid rgba(239, 95, 97, 0.48);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
  box-shadow: 0 14px 28px rgba(41, 45, 54, 0.04);
}

.wish-card span {
  color: var(--muted);
  font-weight: 800;
}

.wish-card p {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.wish-card time {
  color: var(--muted);
  font-size: 13px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

@keyframes desktopCta {
  0%,
  100% {
    margin-right: 0;
  }
  50% {
    margin-right: 7px;
  }
}

@keyframes mobileCta {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  35% {
    transform: translateX(calc(-50% - 8px)) translateY(-2px);
  }
  70% {
    transform: translateX(calc(-50% + 8px)) translateY(0);
  }
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 0.95fr) minmax(400px, 1.05fr);
  }

  .rsvp {
    grid-template-columns: minmax(300px, 0.8fr) minmax(360px, 1fr);
  }

  .rsvp-visual.right {
    display: none;
  }

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

@media (max-width: 860px) {
  .hero {
    display: block;
    min-height: 0;
    background: linear-gradient(180deg, var(--warm) 0 270px, var(--soft) 270px);
  }

  .hero-photo {
    min-height: 390px;
    background-position: center top;
  }

  .hero-content {
    display: block;
    padding: 0 16px 48px;
    background: transparent;
  }

  .lang-switcher {
    position: fixed;
    top: 12px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .invite-card {
    margin: -86px auto 0;
    border-radius: 26px;
    padding: 30px 20px 28px;
  }

  .media-track {
    grid-template-columns: 1fr;
    width: min(100%, 560px);
    margin: 0 auto;
  }

  .media-card.side {
    display: none;
  }

  .media-card.active {
    aspect-ratio: 16 / 11;
  }

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

  .rsvp-visual.left {
    min-height: 280px;
    max-height: 360px;
  }

  .rsvp-form {
    min-height: 0;
    padding: 46px 20px 58px;
  }
}

@media (max-width: 640px) {
  .order-site {
    top: auto;
    right: auto;
    bottom: calc(14px + env(safe-area-inset-bottom));
    left: 50%;
    width: min(calc(100% - 28px), 360px);
    min-height: 54px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 15px;
    writing-mode: horizontal-tb;
    transform: translateX(-50%);
    animation: mobileCta 2.7s ease-in-out infinite;
  }

  .hero-photo {
    min-height: 350px;
  }

  .invite-card {
    width: min(100%, 430px);
  }

  h1 {
    font-size: clamp(28px, 7.9vw, 34px);
    max-width: 292px;
    margin-inline: auto;
    text-wrap: balance;
  }

  .eyebrow {
    font-size: 21px;
  }

  .countdown {
    gap: 8px;
  }

  .time-box {
    min-height: 66px;
    padding: 8px 4px;
  }

  .time-box strong {
    font-size: 21px;
  }

  .time-box span {
    font-size: 11px;
  }

  .section {
    padding: 62px 16px;
  }

  .section-head {
    margin-bottom: 30px;
  }

  .section-head h2 {
    font-size: 27px;
  }

  .timeline-item {
    grid-template-columns: 48px 1fr;
    gap: 12px;
  }

  .timeline-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .guest-stepper {
    grid-template-columns: 52px 86px 52px;
  }

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

  .wishes {
    padding-bottom: 102px;
  }
}

@media (max-width: 380px) {
  .invite-card {
    padding-inline: 16px;
  }

  .primary-link,
  .submit-btn {
    min-height: 54px;
    border-radius: 12px;
  }

  .time-box {
    min-height: 62px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
