* {
  box-sizing: border-box;
}

:root {
  --bg: #fff8f8;
  --card: #ffffff;
  --text: #231f20;
  --muted: #746a6d;
  --pink: #ff4f7b;
  --pink-dark: #dc2f5c;
  --soft: #ffe8ef;
  --border: #eadde1;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

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

.celebration-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}

.confetti {
  position: absolute;
  top: -30px;
  width: 10px;
  height: 18px;
  border-radius: 3px;
  opacity: 0;
  animation: confettiFall var(--duration, 2.8s) ease-in forwards;
}

.firework {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0;
  animation: fireworkBurst 1.2s ease-out forwards;
}

.firework::before,
.firework::after {
  content: "";
  position: absolute;
  inset: -18px;
  border: 2px dotted currentColor;
  border-radius: 50%;
}

.firework::after {
  inset: -32px;
  opacity: .55;
}

@keyframes confettiFall {
  0% {
    transform: translate3d(0, -20px, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--drift, 0px), 760px, 0) rotate(var(--spin, 720deg));
    opacity: .95;
  }
}

@keyframes fireworkBurst {
  0% {
    transform: scale(.15);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 18px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--pink);
  color: white;
  font-size: 18px;
}

.nav-pill {
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
  padding: 90px max(32px, 7vw);
  min-height: 650px;
}

.hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -160px;
  top: -120px;
  border-radius: 50%;
  background: #ffd9e4;
  opacity: 0.65;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--pink-dark);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  margin: 20px 0 16px;
  max-width: 750px;
  font-size: clamp(52px, 7vw, 92px);
  line-height: 0.94;
  letter-spacing: -0.065em;
  font-weight: 900;
}

.lead {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.microcopy {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.microcopy span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
}

.rating-card {
  position: relative;
  z-index: 2;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 28px;
  box-shadow: 0 20px 70px rgba(83, 45, 57, 0.1);
  transition: transform .25s ease, box-shadow .25s ease;
}

.rating-card.celebrate {
  animation: cardPop .7s cubic-bezier(.2,.9,.2,1);
  box-shadow: 0 24px 90px rgba(255, 79, 123, .2);
}

@keyframes cardPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.04) rotate(-.6deg); }
  70% { transform: scale(.99) rotate(.3deg); }
  100% { transform: scale(1); }
}

.rating-card h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.rating-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.scale {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin: 22px 0 16px;
}

.score {
  min-height: 50px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.1s ease;
}

.score:focus-visible,
.cta:focus-visible,
.again:focus-visible,
.nav-pill:focus-visible {
  outline: 3px solid rgba(255, 79, 123, 0.28);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .score:hover {
    transform: translateY(-2px);
    border-color: #d8bac4;
    color: transparent;
  }
}

.status {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 15px;
  padding: 12px 14px;
  background: #faf6f7;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.cta {
  width: 100%;
  margin-top: 12px;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  background: var(--pink);
  color: white;
  font-weight: 850;
  cursor: pointer;
}

.cta:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.success {
  display: none;
  text-align: center;
  padding: 30px 8px 12px;
}

.success.active {
  display: block;
  animation: successIn .55s ease both;
}

@keyframes successIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.form-area.hidden {
  display: none;
}

.success-icon {
  font-size: 54px;
  margin-bottom: 10px;
  animation: heartBounce 1s ease;
}

@keyframes heartBounce {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.28) rotate(-8deg); }
  65% { transform: scale(.94) rotate(5deg); }
}

.success h3 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.045em;
}

.success-copy {
  margin: 10px auto 0 !important;
  max-width: 360px;
  font-size: 15px !important;
}

.happy-line {
  margin-top: 18px;
  font-size: 24px;
  letter-spacing: 4px;
  animation: happyFloat 1.5s ease-in-out infinite alternate;
}

@keyframes happyFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

.again {
  margin-top: 22px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  font-weight: 750;
  padding: 0 16px;
  cursor: pointer;
}

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 32px;
  border-top: 1px solid var(--border);
  background: #fffdfd;
  color: var(--muted);
  font-size: 12px;
}

.shake {
  animation: shake 0.28s linear;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (prefers-reduced-motion: reduce) {
  .shake,
  .rating-card.celebrate,
  .success.active,
  .success-icon,
  .happy-line,
  .confetti,
  .firework {
    animation: none !important;
  }

  .score {
    transition: none;
  }
}

@media (max-width: 760px) {
  .nav {
    padding: 16px 18px;
  }

  .nav-pill {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 52px 18px;
    gap: 34px;
    min-height: auto;
  }

  h1 {
    font-size: clamp(46px, 14vw, 68px);
  }

  .lead {
    font-size: 16px;
  }

  .rating-card {
    padding: 20px;
    border-radius: 22px;
  }

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

  .footer {
    padding: 18px;
  }
}


.initiative-note {
  display: block;
  margin-top: 7px;
  color: var(--pink-dark);
  font-weight: 700;
}
