:root {
  --mocha: #4f3428;
  --mocha-deep: #3b241b;
  --mocha-soft: #705043;
  --latte: #caa98d;
  --line: rgba(97, 63, 47, 0.18);
  --shadow: 0 22px 50px rgba(76, 46, 32, 0.12);
  --heart-image-left: url("assets/heart-left.webp");
  --heart-image-right: url("assets/heart-right.webp");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--mocha);
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 247, 236, 0.92), transparent 28%),
    radial-gradient(circle at 85% 14%, rgba(210, 185, 158, 0.24), transparent 26%),
    linear-gradient(180deg, #f6ecdf 0%, #efe3d3 54%, #e6d6c3 100%);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
}

.ambient-1 {
  width: 320px;
  height: 320px;
  top: -100px;
  right: -70px;
  background: rgba(231, 213, 190, 0.85);
}

.ambient-2 {
  width: 280px;
  height: 280px;
  bottom: 8%;
  left: -80px;
  background: rgba(177, 133, 101, 0.22);
}

.container {
  width: min(1100px, calc(100% - 48px));
  margin: 0 auto;
}

main {
  padding-bottom: 40px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(3.4rem, 9vw, 7rem);
}

h2 {
  font-size: clamp(2.7rem, 5vw, 4.5rem);
}

h3 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.eyebrow,
.section-kicker,
.timer small {
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.hero {
  padding: 42px 0 28px;
}

.hero-shell {
  min-height: min(92vh, 900px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 90px 0 110px;
  border-radius: 40px;
  background:
    linear-gradient(180deg, rgba(251, 245, 238, 0.94), rgba(244, 232, 218, 0.8)),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.8), transparent 40%);
  border: 1px solid rgba(124, 88, 67, 0.12);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-shell.marble {
  background:
    radial-gradient(ellipse at 12% 15%, rgba(255, 255, 255, 0.5), transparent 40%),
    radial-gradient(ellipse at 88% 12%, rgba(120, 100, 80, 0.1), transparent 42%),
    radial-gradient(ellipse at 75% 85%, rgba(120, 100, 80, 0.09), transparent 48%),
    radial-gradient(ellipse at 8% 82%, rgba(255, 255, 255, 0.4), transparent 40%),
    repeating-linear-gradient(118deg, rgba(80, 62, 46, 0.06) 0px, rgba(80, 62, 46, 0.06) 1px, transparent 1px, transparent 96px),
    repeating-linear-gradient(28deg, rgba(80, 62, 46, 0.05) 0px, rgba(80, 62, 46, 0.05) 1px, transparent 1px, transparent 140px),
    linear-gradient(160deg, #efe8dc 0%, #e2d7c6 45%, #ebe1d2 100%);
}

.hero-shell::before,
.hero-shell::after {
  content: "";
  position: absolute;
  inset: auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(205, 169, 143, 0.22), transparent 70%);
}

.hero-shell::before {
  top: -100px;
  left: -40px;
}

.hero-shell::after {
  right: -60px;
  bottom: -120px;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.72rem;
  color: rgba(95, 61, 45, 0.72);
}

.names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.names .name {
  font-size: clamp(2.6rem, 9vw, 5rem);
  font-weight: 700;
  text-transform: uppercase;
}

.names .and {
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  letter-spacing: 0;
  color: var(--mocha-soft);
}

.lead {
  max-width: 640px;
  margin: 24px auto 0;
  font-size: 1.08rem;
  color: rgba(79, 52, 40, 0.78);
}

.date-line {
  margin: 30px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.03em;
  color: var(--mocha-soft);
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-top: 34px;
  min-width: 246px;
  padding: 16px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, #cfa67f 0%, #b98663 100%);
  box-shadow: 0 18px 40px rgba(122, 82, 58, 0.2);
  color: #fff8f0;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 45px rgba(122, 82, 58, 0.26);
  }
}

section {
  position: relative;
  padding: 80px 0;
}

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

.section-kicker {
  margin: 0 0 18px;
  font-size: 0.72rem;
  color: rgba(95, 61, 45, 0.58);
}

.section-kicker::before,
.section-kicker::after {
  content: "";
  display: inline-block;
  width: 44px;
  height: 1px;
  margin: 0 14px 4px;
  background: currentColor;
  opacity: 0.55;
}

.timer {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: min(620px, 100%);
  margin: 34px auto 0;
}

.timer div {
  min-width: 0;
  padding: 0 4px;
}

.timer span {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 5vw, 2.9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--mocha-deep);
}

.timer small {
  display: block;
  margin-top: 8px;
  font-size: 0.6rem;
  color: rgba(95, 61, 45, 0.58);
}

.love-story {
  background:
    linear-gradient(180deg, rgba(79, 52, 40, 0.96), rgba(55, 35, 27, 0.98));
  color: #f8ecde;
  padding-bottom: 136px;
  z-index: 3;
}

.love-story .section-kicker {
  color: rgba(248, 236, 222, 0.72);
}

.love-story .section-kicker::before,
.love-story .section-kicker::after {
  background: rgba(248, 236, 222, 0.42);
}

.story-shell {
  display: grid;
  gap: 30px;
  text-align: center;
}

.story-copy {
  max-width: 620px;
  margin: 0 auto;
}

.heart-stage {
  position: relative;
  margin: 56px auto 0;
  width: min(480px, 94vw);
  contain: layout;
}

.polaroids {
  position: relative;
}

.polaroid-row {
  display: flex;
  align-items: center;
  gap: 4%;
}

.row-sofia {
  justify-content: flex-end;
  transform: rotate(-2deg);
}

.row-maxim {
  justify-content: flex-start;
  margin-top: -24%;
  transform: rotate(2deg);
  position: relative;
  z-index: 1;
}

.polaroid {
  flex-shrink: 0;
  margin: 0;
  width: 56%;
  padding: 14px 14px 32px;
  background: #fbf6ee;
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(15, 8, 5, 0.32);
  position: relative;
}

.polaroid-photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(145deg, #d8c0a9, #f0e3d4);
}

.polaroid-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.polaroid-heart {
  position: absolute;
  right: 16px;
  bottom: 10px;
  width: 18px;
  height: 18px;
  background-image: url("assets/heart_ic.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.85;
}

.polaroid-caption {
  max-width: 34%;
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(0.72rem, 3.8vw, 1.1rem);
  line-height: 1.35;
  color: rgba(248, 236, 222, 0.82);
}

.row-sofia .polaroid-caption {
  text-align: right;
}

.row-maxim .polaroid-caption {
  text-align: left;
}

.heart-overlay {
  position: absolute;
  left: var(--heart-left, 0);
  top: var(--heart-top, 0);
  width: var(--heart-width, 100%);
  height: var(--heart-height, 100%);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  pointer-events: none;
  z-index: 3;
  overflow: visible;
}

.heart-door {
  position: relative;
  overflow: hidden;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.heart-door::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.heart-door.left::before {
  background-image: var(--heart-image-left);
  left: 0;
}

.heart-door.right::before {
  background-image: var(--heart-image-right);
  left: 0;
}

.program {
  background:
    linear-gradient(180deg, rgba(248, 238, 226, 0.92), rgba(244, 231, 217, 0.9));
  z-index: 1;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 40px;
  padding-left: 38px;
  text-align: left;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
}

.timeline-item {
  position: relative;
  text-align: left;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -42px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  background-image: url("assets/heart_ic.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.timeline-item .time {
  margin: 0 0 6px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.35rem;
  color: var(--mocha-deep);
}

.timeline-item h3,
.details-grid h3 {
  margin-top: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--mocha-deep);
}

.timeline-item p:not(.time),
.details-grid p {
  margin: 8px 0 0;
  max-width: 440px;
  font-size: 0.95rem;
  color: rgba(79, 52, 40, 0.76);
}

.details {
  background:
    linear-gradient(180deg, rgba(252, 246, 239, 0.92), rgba(248, 239, 230, 0.94));
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.details-grid article {
  padding: 28px 24px;
  border-radius: 28px;
  background: rgba(255, 251, 246, 0.96);
  border: 1px solid rgba(124, 88, 67, 0.1);
  box-shadow: 0 16px 32px rgba(91, 61, 45, 0.07);
  text-align: left;
}

.details a {
  display: inline-block;
  margin-top: 18px;
  color: var(--mocha-soft);
  font-weight: 600;
  text-decoration: none;
}

.palette {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.palette span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--swatch);
  border: 1px solid rgba(79, 52, 40, 0.08);
}

.rsvp {
  background:
    linear-gradient(180deg, rgba(79, 52, 40, 0.98), rgba(58, 36, 28, 1));
  color: #f8ecde;
}

.rsvp .section-kicker,
.rsvp p,
.hint {
  color: rgba(248, 236, 222, 0.76);
}

.rsvp .section-kicker::before,
.rsvp .section-kicker::after {
  background: rgba(248, 236, 222, 0.42);
}

.rsvp-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: start;
}

.rsvp-copy p {
  max-width: 430px;
}

.rsvp form {
  display: grid;
  gap: 14px;
  padding: 30px;
  border-radius: 30px;
  background: rgba(251, 241, 229, 0.08);
  border: 1px solid rgba(255, 236, 219, 0.12);
  text-align: left;
}

label,
.field {
  display: grid;
  gap: 8px;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 236, 219, 0.18);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 249, 243, 0.92);
  color: var(--mocha);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(207, 166, 127, 0.42);
  border-color: rgba(207, 166, 127, 0.54);
}

.custom-select {
  position: relative;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(255, 236, 219, 0.18);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 249, 243, 0.92);
  color: var(--mocha);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.custom-select-trigger:focus-visible {
  outline: 2px solid rgba(207, 166, 127, 0.42);
  border-color: rgba(207, 166, 127, 0.54);
}

.custom-select-value.is-placeholder {
  color: rgba(79, 52, 40, 0.5);
}

.custom-select-caret {
  flex-shrink: 0;
  color: var(--mocha-soft);
  transition: transform 0.2s ease;
}

.custom-select.is-open .custom-select-caret {
  transform: rotate(180deg);
}

.custom-select-options {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 8px;
  max-height: 240px;
  overflow-y: auto;
  list-style: none;
  background: #fbf6ee;
  border: 1px solid rgba(124, 88, 67, 0.14);
  border-radius: 16px;
  box-shadow: 0 20px 44px rgba(15, 8, 5, 0.3);
}

.custom-select-options[hidden] {
  display: none;
}

.custom-select-options li {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--mocha);
  font-size: 0.95rem;
  cursor: pointer;
}

.custom-select-options li:hover,
.custom-select-options li:focus-visible {
  background: rgba(207, 166, 127, 0.22);
  outline: none;
}

.custom-select-options li[aria-selected="true"] {
  background: rgba(207, 166, 127, 0.32);
  font-weight: 600;
}

.custom-select.has-error .custom-select-trigger {
  border-color: rgba(214, 90, 70, 0.72);
}

.hint {
  margin: 0;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.hint.is-error {
  color: #e6a394;
}

.hint.is-success {
  color: #cfe3b8;
}

footer {
  text-align: center;
  padding: 34px 0 48px;
  color: rgba(79, 52, 40, 0.68);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.75s ease forwards;
}

.reveal:nth-of-type(2) { animation-delay: 0.08s; }
.reveal:nth-of-type(3) { animation-delay: 0.16s; }
.reveal:nth-of-type(4) { animation-delay: 0.24s; }
.reveal:nth-of-type(5) { animation-delay: 0.32s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  section {
    padding: 64px 0;
  }

  .hero-shell {
    min-height: auto;
    padding: 78px 0 86px;
  }

  .love-story {
    padding-bottom: 108px;
  }

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

}

@media (max-width: 640px) {
  .container {
    width: min(100%, calc(100% - 28px));
  }

  .hero {
    padding-top: 18px;
  }

  .hero-shell {
    border-radius: 28px;
    padding: 64px 18px 72px;
  }

  section {
    padding: 56px 0;
  }

  .love-story {
    padding-bottom: 84px;
  }

  .section-kicker::before,
  .section-kicker::after {
    width: 26px;
    margin: 0 10px 4px;
  }

  .timer {
    gap: 2px;
    width: min(100%, 420px);
  }

  .timer div {
    padding: 0 2px;
  }

  .timer span {
    font-size: clamp(1.3rem, 7vw, 1.9rem);
  }

  .timer small {
    margin-top: 6px;
    font-size: 0.48rem;
    letter-spacing: 0.1em;
  }

  .heart-stage {
    margin-top: 40px;
  }

  .details-grid article,
  .rsvp form {
    border-radius: 22px;
    padding: 22px 18px;
  }

  .timeline {
    padding-left: 30px;
    gap: 32px;
  }

  .timeline::before {
    left: 7px;
  }

  .timeline-item::before {
    left: -34px;
    width: 22px;
    height: 22px;
  }

  .rsvp .button {
    width: 100%;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }
}
