:root {
  --ink: #352f2a;
  --muted: #766c61;
  --paper: #fffaf3;
  --cream: #f7efe3;
  --sage: #a9b99a;
  --sage-dark: #667b5c;
  --terracotta: #bd755d;
  --terracotta-soft: #e2aa92;
  --gold: #d9aa61;
  --line: rgba(53, 47, 42, 0.14);
  --shadow: 0 24px 70px rgba(79, 55, 44, 0.16);
  --font-title: "Fraunces", Georgia, serif;
  --font-body: "Nunito", "Segoe UI", sans-serif;
  --mai-shift: 0vw;
  --die-shift: 0vw;
  --sky-warmth: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--cream);
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 18% 18%, rgba(169, 185, 154, 0.28), transparent 32%),
    radial-gradient(circle at 82% 12%, rgba(226, 170, 146, 0.26), transparent 30%),
    linear-gradient(180deg, #fffaf3 0%, #f8f0e6 46%, #eff0df 100%);
}

body::after {
  z-index: -1;
  opacity: var(--sky-warmth);
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 245, 220, 0.58), transparent 26%),
    linear-gradient(180deg, rgba(255, 242, 221, 0.2), rgba(189, 117, 93, 0.66));
  transition: opacity 180ms linear;
}

.float-layer {
  position: fixed;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.66;
}

main {
  position: relative;
  z-index: 2;
}

.section {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 96px clamp(22px, 7vw, 116px);
}

.hero-section {
  align-content: center;
  justify-items: center;
  text-align: center;
}

.hero-card,
.final-card {
  width: min(760px, 100%);
  padding: clamp(30px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(255, 250, 243, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.story-section,
.waiting-section {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(34px, 7vw, 90px);
}

.waiting-section {
  grid-template-columns: minmax(320px, 1fr) minmax(0, 0.9fr);
}

.section-copy {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--terracotta);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 5.8rem;
  line-height: 0.92;
}

h2 {
  font-size: 4.25rem;
  line-height: 0.98;
}

h3 {
  font-size: 1.28rem;
}

.lead,
.section-copy p,
.memory-card p {
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.68;
}

.lead,
.section-copy p {
  margin: 20px 0 0;
}

.countdown-message {
  margin: 34px auto 18px;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 800;
}

.countdown-message strong {
  min-width: 88px;
  color: var(--sage-dark);
  font-family: var(--font-title);
  font-size: 4.4rem;
  line-height: 0.9;
}

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

.countdown-grid div {
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.54);
}

.countdown-grid strong,
.countdown-grid span {
  display: block;
}

.countdown-grid strong {
  color: var(--terracotta);
  font-family: var(--font-title);
  font-size: 2rem;
  line-height: 1;
}

.countdown-grid span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-pill {
  width: fit-content;
  margin: 28px auto 0;
  padding: 11px 16px;
  border: 1px solid rgba(102, 123, 92, 0.24);
  border-radius: 999px;
  color: var(--sage-dark);
  background: rgba(169, 185, 154, 0.14);
  font-weight: 800;
}

.memory-grid {
  display: grid;
  gap: 18px;
}

.memory-card,
.waiting-wall {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 250, 243, 0.78);
  box-shadow: 0 16px 44px rgba(79, 55, 44, 0.1);
}

.memory-card:nth-child(2) {
  transform: translateX(34px);
}

.memory-card:nth-child(3) {
  transform: translateX(68px);
}

.memory-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 50%;
  color: #fff;
  background: var(--terracotta);
  font-weight: 900;
}

.memory-card:nth-child(2) .memory-icon {
  background: var(--sage-dark);
}

.memory-card:nth-child(3) .memory-icon {
  background: var(--gold);
}

.memory-card p {
  margin: 10px 0 0;
}

.waiting-wall {
  width: min(520px, 100%);
  min-height: 330px;
  align-self: center;
  background:
    linear-gradient(135deg, rgba(255, 250, 243, 0.92), rgba(247, 239, 227, 0.8)),
    repeating-linear-gradient(0deg, transparent 0 37px, rgba(53, 47, 42, 0.06) 38px 39px);
  transform: rotate(-2deg);
}

.wall-title {
  margin: 0 0 28px;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tally-grid {
  display: grid;
  grid-template-columns: repeat(5, 48px);
  gap: 12px;
  color: var(--terracotta);
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
}

.tally-grid span,
.tally-grid strong {
  display: grid;
  place-items: center;
  height: 58px;
  border: 2px solid currentColor;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.46);
}

.tally-grid strong {
  color: var(--sage-dark);
  transform: rotate(7deg);
}

.quote {
  max-width: 480px;
  padding: 18px 20px;
  border-left: 4px solid var(--terracotta);
  border-radius: 0 18px 18px 0;
  background: rgba(189, 117, 93, 0.09);
  color: var(--ink) !important;
  font-weight: 800;
}

.final-section {
  justify-items: center;
  text-align: center;
}

.final-card h2 {
  font-size: 4.8rem;
}

.journey-stage {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.journey-line {
  position: absolute;
  left: 50%;
  bottom: 25vh;
  width: min(720px, 58vw);
  height: 2px;
  transform: translateX(-50%);
  opacity: 0.55;
  background: linear-gradient(90deg, transparent, rgba(189, 117, 93, 0.7), transparent);
}

.doodle-person {
  position: absolute;
  bottom: clamp(24px, 7vh, 76px);
  width: clamp(120px, 16vw, 205px);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 18px 18px rgba(53, 47, 42, 0.16));
  pointer-events: auto;
}

.doodle-person--mai {
  left: 5vw;
  transform: translateX(var(--mai-shift));
  animation: calm-float 4.7s ease-in-out infinite;
}

.doodle-person--die {
  right: 5vw;
  transform: translateX(var(--die-shift));
  animation: impatient-float 2.5s ease-in-out infinite;
}

.doodle-person:hover .reaction-bubble,
.doodle-person.is-reacting .reaction-bubble {
  opacity: 1;
  transform: translate(-50%, -14px) scale(1);
}

.reaction-bubble {
  position: absolute;
  left: 50%;
  bottom: 96%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 250, 243, 0.92);
  box-shadow: 0 12px 30px rgba(53, 47, 42, 0.12);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 0) scale(0.92);
  transition: opacity 180ms ease, transform 180ms ease;
}

.doodle-person svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.shadow {
  fill: rgba(53, 47, 42, 0.14);
}

.skin {
  fill: #efc3a5;
}

.die-skin {
  fill: #d9a27f;
}

.skin-stroke {
  fill: none;
  stroke: #efc3a5;
  stroke-linecap: round;
  stroke-width: 13;
}

.doodle-person--die .skin-stroke {
  stroke: #d9a27f;
}

.hair {
  fill: #2f2927;
}

.mai-hair {
  fill: #b76842;
}

.die-hair,
.beard {
  fill: #2f2927;
}

.dress-base {
  fill: #fff6e9;
  stroke: #d9aa61;
  stroke-width: 2;
}

.dress-line,
.smile,
.flower-stem,
.watch-hand {
  fill: none;
  stroke: #8a5d51;
  stroke-linecap: round;
  stroke-width: 3;
}

.suit {
  fill: #f4ede1;
  stroke: #8a7f72;
  stroke-width: 2;
}

.shirt {
  fill: #fffaf3;
}

.tie,
.flower {
  fill: var(--sage);
}

.eyes {
  fill: #2f2927;
  transform-origin: center;
  animation: blink 5.4s infinite;
}

.watch {
  fill: var(--ink);
}

.watch-check {
  transform-origin: 140px 130px;
  animation: check-watch 1.75s ease-in-out infinite;
}

.doodle-person.is-reacting {
  animation: reaction-hop 520ms ease;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

@keyframes calm-float {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

@keyframes impatient-float {
  0%, 100% {
    translate: 0 0;
  }
  35% {
    translate: 7px -5px;
  }
  70% {
    translate: -5px 1px;
  }
}

@keyframes reaction-hop {
  0%, 100% {
    scale: 1;
  }
  45% {
    scale: 1.08;
  }
}

@keyframes check-watch {
  0%, 65%, 100% {
    transform: rotate(0deg);
  }
  35% {
    transform: rotate(-14deg);
  }
}

@keyframes blink {
  0%, 93%, 100% {
    transform: scaleY(1);
  }
  96% {
    transform: scaleY(0.12);
  }
}

@media (max-width: 920px) {
  .section {
    padding: 86px 22px 240px;
  }

  .story-section,
  .waiting-section {
    grid-template-columns: 1fr;
  }

  .waiting-wall {
    order: 2;
  }

  h1 {
    font-size: 4.1rem;
  }

  h2,
  .final-card h2 {
    font-size: 3.2rem;
  }

  .memory-card:nth-child(2),
  .memory-card:nth-child(3) {
    transform: none;
  }

  .journey-line {
    bottom: 116px;
    width: 82vw;
  }

  .doodle-person {
    bottom: 20px;
    width: 118px;
  }
}

@media (max-width: 620px) {
  .section {
    min-height: 96vh;
    padding: 64px 16px 206px;
  }

  .hero-card,
  .final-card,
  .memory-card,
  .waiting-wall {
    border-radius: 24px;
  }

  h1 {
    font-size: 3.25rem;
  }

  h2,
  .final-card h2 {
    font-size: 2.55rem;
  }

  .lead,
  .section-copy p,
  .memory-card p {
    font-size: 1rem;
  }

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

  .countdown-message strong {
    font-size: 3.2rem;
  }

  .date-pill {
    width: 100%;
  }

  .tally-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    font-size: 1.4rem;
  }

  .tally-grid span,
  .tally-grid strong {
    height: 46px;
  }

  .doodle-person {
    width: 102px;
  }
}
