:root {
  --smoke-blue: #7f99a8;
  --muted-plum: #7b5a72;
  --deep-fig: #211521;
  --soft-clay: #b77b67;
  --dusk-lavender: #a798bd;
  --weathered-copper: #b2674c;
  --warm-charcoal: #201f22;
  --shadowed-sage: #68786f;
  --paper: #ded4cc;
  --mist: rgba(229, 217, 214, 0.78);
  --dim: rgba(229, 217, 214, 0.58);
  --line: rgba(224, 202, 190, 0.18);
  --max: 980px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--paper);
  background:
    radial-gradient(circle at 12% 8%, rgba(127, 153, 168, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 20%, rgba(178, 103, 76, 0.16), transparent 30rem),
    linear-gradient(145deg, #171719 0%, #241827 46%, #182221 100%);
  font-family: "DM Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient span {
  position: absolute;
  width: 1px;
  height: 55vh;
  top: -8vh;
  opacity: 0.32;
  background: linear-gradient(to bottom, transparent, rgba(217, 178, 164, 0.5), transparent);
  animation: drift 12s ease-in-out infinite alternate;
}

.ambient span:nth-child(1) { left: 19%; }
.ambient span:nth-child(2) { left: 52%; height: 72vh; animation-duration: 16s; }
.ambient span:nth-child(3) { left: 78%; height: 50vh; animation-duration: 14s; }

.flow-page {
  min-height: 100svh;
}

.flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 32px, 1180px);
  margin: 0 auto;
  padding: 22px 0;
  color: rgba(239, 225, 219, 0.82);
}

.flow-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(229, 217, 214, 0.48);
  border-radius: 50%;
  background:
    linear-gradient(110deg, transparent 42%, rgba(178, 103, 76, 0.62) 43% 49%, transparent 50%),
    radial-gradient(circle at 38% 42%, rgba(167, 152, 189, 0.86), transparent 44%),
    rgba(32, 31, 34, 0.5);
  box-shadow: 0 0 34px rgba(178, 103, 76, 0.28);
  flex: 0 0 auto;
}

.flow-meta,
.quiet-link {
  color: rgba(229, 217, 214, 0.58);
  font-size: 0.84rem;
  text-decoration: none;
}

.quiet-link {
  border-bottom: 1px solid rgba(224, 202, 190, 0.28);
}

.assessment-shell,
.results-shell {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: clamp(24px, 6vw, 72px) 0 clamp(48px, 8vw, 100px);
}

.assessment-card,
.result-hero,
.dimension-panel,
.report-offer {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(224, 202, 190, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(44, 32, 39, 0.88), rgba(25, 35, 34, 0.9)),
    rgba(32, 31, 34, 0.92);
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.28);
}

.assessment-card {
  min-height: min(620px, calc(100svh - 126px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.2rem, 4vw, 3.6rem);
  transition: opacity 170ms ease, transform 170ms ease;
}

.assessment-card.is-leaving {
  opacity: 0;
  transform: translateY(8px);
}

.kicker {
  margin: 0 0 1rem;
  color: rgba(217, 178, 164, 0.78);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: #f0ded8;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 0.98;
  text-wrap: balance;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.35rem, 6vw, 4.8rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.progress-row {
  margin-bottom: clamp(1.2rem, 3vw, 2.25rem);
}

.progress-track {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(224, 202, 190, 0.13);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--soft-clay), var(--dusk-lavender));
  transition: width 240ms ease;
}

.scale-instructions,
.email-card p,
.diagnosis,
.report-offer p {
  max-width: 680px;
  color: var(--mist);
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
}

.scale-instructions {
  margin: 1rem 0 0;
  color: rgba(217, 178, 164, 0.78);
  font-size: 0.95rem;
}

.scale {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: clamp(1.5rem, 4vw, 2.4rem);
}

.scale button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.8rem 0.7rem;
  border: 1px solid rgba(224, 202, 190, 0.2);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.045);
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.scale-word {
  color: rgba(239, 225, 219, 0.78);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.15;
}

.scale button:hover,
.scale button[aria-checked="true"] {
  transform: translateY(-1px) scale(1.02);
  border-color: rgba(239, 225, 219, 0.52);
  background: rgba(183, 123, 103, 0.2);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 54px;
  margin-top: 2rem;
  padding: 0.95rem 1.75rem;
  border: 1px solid rgba(239, 225, 219, 0.26);
  border-radius: 999px;
  color: #211521;
  background: linear-gradient(135deg, #ead4ca, #b77b67 58%, #a798bd);
  box-shadow: 0 18px 50px rgba(45, 22, 24, 0.36);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-2px);
}

.form-error {
  margin: 1rem 0 0;
  color: #e8b3a6;
}

.hidden-field {
  display: none;
}

.email-label {
  display: block;
  margin: 2rem 0 0.5rem;
  color: rgba(229, 217, 214, 0.7);
  font-size: 0.9rem;
}

input[type="email"] {
  width: min(100%, 520px);
  min-height: 56px;
  padding: 0 1rem;
  border: 1px solid rgba(224, 202, 190, 0.22);
  border-radius: 8px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
}

.result-hero,
.dimension-panel,
.report-offer {
  padding: clamp(1.5rem, 5vw, 4.5rem);
  margin-bottom: 1.5rem;
}

.profile-subtitle {
  max-width: 740px;
  margin: 1.25rem 0 0;
  color: rgba(217, 178, 164, 0.82);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  font-style: italic;
  line-height: 1.25;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.dimension {
  min-height: 132px;
  padding: 1.1rem;
  border: 1px solid rgba(224, 202, 190, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.dimension-name {
  margin: 0;
  color: rgba(229, 217, 214, 0.62);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dimension-level {
  margin: 1.1rem 0 0;
  color: #f0ded8;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.1rem;
  line-height: 1;
}

.dimension-line {
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 1.25rem;
  border-radius: 999px;
  background: rgba(224, 202, 190, 0.12);
}

.dimension-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--shadowed-sage), var(--soft-clay), var(--dusk-lavender));
}

.report-offer {
  background:
    linear-gradient(145deg, rgba(35, 24, 33, 0.92), rgba(29, 39, 36, 0.9)),
    rgba(32, 31, 34, 0.92);
}

.thank-you {
  margin-top: clamp(48px, 8vw, 90px);
}

@keyframes drift {
  from { transform: translateY(-5vh) rotate(-4deg); }
  to { transform: translateY(18vh) rotate(5deg); }
}

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

@media (max-width: 760px) {
  .flow-header {
    align-items: flex-start;
  }

  .assessment-page .flow-header {
    padding: 14px 0;
  }

  .flow-meta,
  .quiet-link {
    display: none;
  }

  .assessment-page .assessment-shell {
    padding: 0 0 10px;
  }

  .assessment-card {
    min-height: calc(100svh - 92px);
  }

  .assessment-page h1 {
    font-size: clamp(2rem, 10vw, 3.15rem);
  }

  .progress-row {
    margin-bottom: 1.1rem;
  }

  .scale {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1.3rem;
  }

  .dimension-grid {
    grid-template-columns: 1fr;
  }

  .scale button {
    min-height: 48px;
    padding-inline: 0.45rem;
  }

  .scale-word {
    font-size: 0.78rem;
  }

  .button {
    width: 100%;
  }
}
