:root {
  --bg: #f9f2ee;
  --text: #1d1c1a;
  --muted: #5f5a55;
  --card: #ffffff;
  --primary: #7f5a3b;
  --primary-dark: #69492f;
  --secondary: #2f4b4f;
  --secondary-dark: #233b3f;
  --ring: rgba(127, 90, 59, 0.35);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background: linear-gradient(180deg, #fdf8f6 0%, var(--bg) 45%, #f7efe9 100%);
  color: var(--text);
  scroll-behavior: smooth;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
}

p {
  margin: 0;
}

.hero {
  position: relative;
  height: 100vh;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__slides,
.hero__slide,
.hero__overlay,
.hero__hearts {
  position: absolute;
  inset: 0;
}

.hero__hearts {
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.hero__heart {
  position: absolute;
  top: -8%;
  color: rgba(255, 241, 246, 0.84);
  text-shadow: 0 3px 8px rgba(84, 32, 43, 0.14);
  opacity: 0;
  animation-name: hero-heart-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes hero-heart-fall {
  0% {
    transform: translate3d(0, -6%, 0) rotate(0deg) scale(0.9);
    opacity: 0;
  }

  10% {
    opacity: 0.8;
  }

  100% {
    transform: translate3d(var(--heart-drift, 0px), 118vh, 0) rotate(var(--heart-rotate, 180deg)) scale(1.08);
    opacity: 0;
  }
}

.hero__slide {
  overflow: hidden;
  isolation: isolate;
  background-color: #243238;
  opacity: 0;
  transition: opacity 1.15s ease;
}

.hero__slide::before,
.hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__slide::before {
  inset: -4%;
  background-image: var(--slide-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  filter: blur(24px) saturate(0.9) brightness(0.7);
  transform: scale(1.12);
  transition: transform 6.8s ease-out;
  opacity: 0.9;
  z-index: 0;
}

.hero__slide.is-active::before {
  transform: scale(1.06);
}

.hero__slide::after {
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 26%, rgba(36, 50, 56, 0) 56%),
    var(--slide-image);
  background-size: cover, var(--slide-size, cover);
  background-repeat: no-repeat, no-repeat;
  background-position: center, var(--slide-position, center);
  z-index: 1;
}

.hero__slide.is-active {
  opacity: 1;
}

.hero__overlay {
  background: linear-gradient(180deg, rgba(36, 24, 18, 0.28), rgba(28, 18, 14, 0.52));
}

.hero__content {
  position: relative;
  text-align: center;
  color: #fff;
  padding: 1rem 1.1rem;
  width: min(760px, calc(100% - 1.4rem));
  z-index: 2;
}

.eyebrow {
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  margin-bottom: 0.7rem;
}

.hero__couple-name {
  font-family: 'Great Vibes', cursive;
  font-size: 1.25em;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.hero__date {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
  line-height: 1.36;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 1.05rem;
  padding: 0.22rem 0.72rem;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
}

.hero__invite {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.98rem, 1.8vw, 1.2rem);
  font-weight: 500;
  font-style: italic;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.76;
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.admin-entry {
  margin-top: 0.25rem;
  min-width: 164px;
}

main {
  width: min(1000px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 3.6rem 0;
}

.section--alt {
  padding-top: 3.6rem;
  padding-bottom: 3.6rem;
}

.section__header {
  margin-bottom: 1.3rem;
}

.section__header h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 0.5rem;
}

.section__header p {
  color: var(--muted);
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(127, 90, 59, 0.08);
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  will-change: opacity, transform;
}

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

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

.form {
  display: grid;
  gap: 0.9rem;
}

.form label,
.wish-box label {
  display: grid;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid #dcd8d3;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  background: #fff;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
  font-size: 16px;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%235f5a55' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  padding-right: 2.2rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--ring);
  border-color: var(--primary);
}

textarea {
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  padding: 0.75rem 1.3rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

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

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--primary);
}

.btn--primary:hover {
  background: var(--primary-dark);
}

.btn--secondary {
  background: var(--secondary);
}

.btn--secondary:hover {
  background: var(--secondary-dark);
}

.summary {
  margin-top: 1rem;
}

.summary h3 {
  margin-bottom: 0.6rem;
}

.summary p {
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.wish-box {
  display: grid;
  gap: 0.9rem;
}

.invitation-card {
  display: grid;
  gap: 0.9rem;
  border: 2px solid var(--primary);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 237, 230, 0.5) 100%);
  box-shadow: 0 8px 32px rgba(127, 90, 59, 0.1);
  position: relative;
  overflow: hidden;
}

.invitation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
  opacity: 0.6;
}

.invitation-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
  opacity: 0.6;
}

.invitation-guest-title {
  color: var(--primary-dark);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  text-align: center;
  margin-bottom: 0.2rem;
  position: relative;
  padding-top: 0.5rem;
}

.invitation-guest-title::before,
.invitation-guest-title::after {
  content: '✦';
  color: var(--primary);
  margin: 0 0.5rem;
  opacity: 0.7;
  font-size: 0.8em;
}

.invitation-message {
  color: var(--text);
  line-height: 1.6;
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  text-align: center;
  font-style: normal;
  letter-spacing: 0.04em;
}

.invitation-couple-names {
  display: inline-block;
  font-family: inherit;
  font-size: 1.18em;
  font-style: normal;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 0.05em;
  line-height: 1.15;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.14);
}

.invitation-address {
  color: var(--text);
  line-height: 1.6;
  background: #f5ede6;
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}

.link-generator-card {
  display: grid;
  gap: 0.9rem;
}

.link-generator-grid {
  display: grid;
  gap: 0.8rem;
}

.link-generator-card label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

#generatedLink {
  color: var(--muted);
  background: #f8f3ee;
}

.info-card {
  padding: 1.3rem 1.25rem;
}

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.info-list li {
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  background: #f1ebe3;
  color: var(--text);
  border-left: 3px solid var(--primary);
  font-size: 0.98rem;
  line-height: 1.5;
}

.info-list--timeline li span {
  font-weight: 700;
  color: var(--primary-dark);
}

.drinks-grid {
  display: grid;
  gap: 0.9rem;
}

.drinks-title {
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
  color: var(--primary-dark);
}

.drink-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.drink-logo-slot {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  background: #e9ddd1;
  color: #6a4c33;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.drink-logo-slot::before {
  content: attr(data-fallback);
}

.drink-logo-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

.drink-name {
  display: inline-block;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

.footer {
  text-align: center;
  color: var(--muted);
  padding: 1.6rem 1rem 2.4rem;
}

@media (max-width: 879px) {
  .form .btn,
  .wish-box .btn,
  .invitation-card .btn {
    width: 100%;
    margin-top: 0.3rem;
  }
}

@media (max-width: 768px) {
  .hero {
    height: 88svh;
    min-height: 460px;
  }

  .hero__slide {
    background-image: var(--slide-image);
    background-size: var(--slide-size-mobile, var(--slide-size, cover));
    background-repeat: no-repeat;
    background-position: var(--slide-position-mobile, var(--slide-position, center));
  }

  .hero__slide::before,
  .hero__slide::after {
    content: none;
  }

  .hero__invite {
    font-size: 0.95rem;
    line-height: 1.7;
    padding: 0;
  }

  .eyebrow {
    letter-spacing: 0.12em;
  }

  main {
    width: calc(100% - 1.2rem);
  }

  .section {
    padding: 2.4rem 0;
  }

  .section--alt {
    padding-top: 1.2rem;
    padding-bottom: 2.8rem;
  }

  .section__header {
    margin-bottom: 1rem;
  }

  .card {
    border-radius: 14px;
    padding: 1rem;
  }

  .summary {
    margin-top: 0.8rem;
  }

  input,
  select,
  textarea {
    padding: 0.72rem 0.75rem;
  }

  .info-card {
    padding: 1rem;
  }

  .info-list li {
    padding: 0.62rem 0.66rem;
    line-height: 1.4;
  }
}

@media (max-width: 420px) {
  .hero {
    min-height: 430px;
  }

  .hero__content {
    padding: 0.9rem;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 10vw, 2.8rem);
  }

  .hero__date {
    font-size: 0.96rem;
    margin-bottom: 1.05rem;
    letter-spacing: 0.07em;
    padding: 0.2rem 0.58rem;
  }

  .section__header h2 {
    font-size: clamp(1.6rem, 7vw, 2rem);
  }

  .footer {
    padding: 1.2rem 0.8rem 2rem;
  }
}

@media (max-width: 390px) {
  main {
    width: calc(100% - 1rem);
  }

  .hero {
    min-height: 410px;
  }

  .eyebrow {
    font-size: 0.68rem;
    margin-bottom: 0.75rem;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 11vw, 2.45rem);
    margin-bottom: 0.55rem;
  }

  .hero__date {
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
    padding: 0.16rem 0.46rem;
  }

  .section {
    padding: 2rem 0;
  }

  .section__header h2 {
    font-size: clamp(1.45rem, 7.5vw, 1.8rem);
  }

  .section__header p,
  .summary p,
  .hint,
  .info-list li {
    font-size: 0.92rem;
  }

  .card,
  .info-card {
    padding: 0.9rem;
    border-radius: 12px;
  }

  .btn {
    padding: 0.68rem 1rem;
  }
}

@media (min-width: 880px) {
  .link-generator-grid {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }

  #generatorPartnerWrapper {
    grid-column: 1 / -1;
  }

  .drinks-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}
