:root {
  --navy: #102b3b;
  --navy-deep: #091e2c;
  --navy-light: #1d4052;
  --green: #43b02a;
  --green-dark: #348c20;
  --green-soft: #eef8eb;
  --gold: #f7b32b;
  --ink: #183240;
  --muted: #667984;
  --line: #dfe7e9;
  --panel: #f6f9fa;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--navy-deep);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 48px 24px;
  background:
    radial-gradient(circle at 13% 17%, rgba(67, 176, 42, 0.24), transparent 26rem),
    radial-gradient(circle at 88% 82%, rgba(54, 127, 157, 0.23), transparent 30rem),
    linear-gradient(145deg, var(--navy-deep), var(--navy) 50%, #12374a);
}

.page::before,
.page::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
}

.page::before {
  top: -20rem;
  right: -14rem;
  width: 44rem;
  height: 44rem;
}

.page::after {
  bottom: -24rem;
  left: -15rem;
  width: 50rem;
  height: 50rem;
}

.roof-lines {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    linear-gradient(135deg, transparent 48%, #fff 49%, #fff 51%, transparent 52%),
    linear-gradient(45deg, transparent 48%, #fff 49%, #fff 51%, transparent 52%);
  background-position: 0 0, 48px 0;
  background-size: 96px 96px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
}

.review-card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  justify-content: center;
  padding: 30px 36px 18px;
}

.brand a {
  display: inline-flex;
}

.brand img {
  width: auto;
  height: 66px;
  object-fit: contain;
}

.step {
  padding: 18px 56px 42px;
  animation: step-in 260ms ease both;
}

.step[hidden] {
  display: none;
}

.eyebrow {
  margin-bottom: 9px;
  color: var(--green-dark);
  font-family: "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--navy);
  font-family: "Montserrat", sans-serif;
}

h1 {
  max-width: 670px;
  margin-inline: auto;
  font-size: clamp(27px, 4vw, 40px);
  line-height: 1.16;
  text-align: center;
}

#rating-step > .eyebrow {
  text-align: center;
}

.intro {
  max-width: 590px;
  margin: 14px auto 31px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  text-align: center;
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.rating-option {
  display: flex;
  min-width: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: none;
}

.emoji-wrap {
  display: grid;
  width: 100%;
  aspect-ratio: 1.1;
  place-items: center;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--panel);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.emoji {
  display: block;
  font-size: clamp(48px, 7vw, 70px);
  filter: drop-shadow(0 5px 5px rgba(16, 43, 59, 0.12));
  line-height: 1;
  transition: transform 160ms ease;
}

.rating-label {
  margin-top: 11px;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.rating-option:hover .emoji-wrap,
.rating-option:focus-visible .emoji-wrap {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 9px 24px rgba(45, 107, 30, 0.13);
  transform: translateY(-3px);
}

.rating-option:hover .emoji,
.rating-option:focus-visible .emoji {
  transform: scale(1.07);
}

.rating-option:focus-visible {
  outline: none;
}

.rating-option.is-selected .emoji-wrap {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 9px 24px rgba(45, 107, 30, 0.13);
  transform: translateY(-3px);
}

.rating-option:disabled {
  cursor: wait;
}

.privacy-note {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin: 27px 0 0;
  color: #7b8b93;
  font-size: 12px;
  text-align: center;
}

.privacy-note svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.redirect-status {
  min-height: 17px;
  margin: 9px 0 0;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 15px 30px;
  border-top: 1px solid var(--line);
  color: #829199;
  background: #f8fafb;
  font-size: 11px;
  text-align: center;
}

footer a {
  color: #56707d;
  font-weight: 600;
  text-decoration: none;
}

footer a:hover {
  color: var(--green-dark);
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .page {
    align-items: start;
    padding: 20px 14px;
  }

  .review-card {
    border-radius: 19px;
  }

  .brand {
    padding: 24px 24px 13px;
  }

  .brand img {
    height: 55px;
  }

  .step {
    padding: 16px 24px 32px;
  }

  .rating-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 12px;
  }

  .emoji-wrap {
    aspect-ratio: 1.45;
  }

}

@media (max-width: 470px) {
  .intro {
    margin-bottom: 23px;
    font-size: 14px;
  }

  .emoji {
    font-size: 48px;
  }

  .rating-label {
    margin-top: 8px;
    font-size: 13px;
  }

  .privacy-note {
    align-items: flex-start;
    margin-top: 23px;
    line-height: 1.45;
  }

  .privacy-note svg {
    flex: none;
    margin-top: 1px;
  }

  footer {
    flex-wrap: wrap;
    padding-inline: 18px;
  }

  footer > span:first-child {
    width: 100%;
  }

  footer > .footer-separator:first-of-type {
    display: none;
  }
}

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