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

:root {
  --purple: #156782;
  --purple-soft: #e1edf0;
  --violet: #ff9a23;
  --coral: #d45b49;
  --coral-soft: #f8ded8;
  --amber: #ff9a23;
  --amber-soft: #ffe8c9;
  --green: #4d8d76;
  --green-soft: #dcebe5;
  --ink: #12313a;
  --ink-soft: #46606a;
  --ink-muted: #6f858d;
  --surface: #f1f0e4;
  --card: #ffffff;
  --line: rgba(21, 103, 130, 0.18);
  --shadow: 0 18px 60px rgba(21, 103, 130, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
}

button,
input {
  font: inherit;
}

.site-header {
  width: min(1180px, calc(100% - 2rem));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--purple);
  color: #fff;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.35rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.nav a {
  color: inherit;
  text-decoration: none;
}

.nav-cta {
  padding: 0.7rem 0.95rem;
  border-radius: 8px;
  background: var(--purple);
  color: #fff;
}

.hero {
  min-height: 360px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 4rem 1.5rem 5rem;
  background: var(--purple);
}

.hero__content {
  width: min(690px, 100%);
  position: relative;
  text-align: center;
}

.eyebrow,
.kicker {
  display: inline-block;
  margin: 0 0 1rem;
  color: var(--violet);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.results-intro h2,
.cta h3,
.intro-panel h2 {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.45rem, 7vw, 4.8rem);
  line-height: 0.98;
}

.hero h1 em {
  color: var(--amber);
}

.hero p {
  width: min(560px, 100%);
  margin: 1.35rem auto 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  line-height: 1.8;
}

.shell {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  position: relative;
  padding: 2.5rem 0 4rem;
}

.panel,
.question,
.cat-card,
.primary-result {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro-panel {
  display: grid;
  grid-template-columns: 1fr 0.86fr;
  gap: 1.5rem;
  align-items: end;
  padding: 1.45rem;
  margin-bottom: 1rem;
}

.intro-panel h2 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.04;
}

.intro-panel p,
.hint,
.results-intro p,
.cta p,
.cat-interp,
.email-sent {
  color: var(--ink-soft);
  line-height: 1.65;
}

.email-block {
  padding: 1.35rem;
  margin-bottom: 1.35rem;
  box-shadow: 0 8px 32px rgba(44, 39, 95, 0.07);
}

.email-block label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.hint {
  margin: 0 0 0.8rem;
  font-size: 0.83rem;
}

input[type="email"] {
  width: 100%;
  padding: 0.78rem 0.92rem;
  border: 1px solid rgba(83, 74, 183, 0.23);
  border-radius: 8px;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="email"]:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(83, 74, 183, 0.12);
}

input[type="email"].error {
  border-color: var(--coral);
}

.email-error {
  display: none;
  margin: 0.45rem 0 0;
  color: #9d2828;
  font-size: 0.78rem;
}

.progress-wrap {
  margin: 1.2rem 0 1.6rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(83, 74, 183, 0.11);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--amber);
  transition: width 0.35s ease;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2.2rem 0 0.75rem;
}

.section-label__num {
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
}

.section-label__text {
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.question {
  padding: 1.08rem 1.15rem;
  margin-bottom: 0.65rem;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(44, 39, 95, 0.05);
  transition: border-color 0.2s, transform 0.2s;
}

.question.answered {
  border-color: rgba(83, 74, 183, 0.38);
}

.q-text {
  margin: 0 0 0.9rem;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.55;
}

.scale {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
}

.scale-label {
  min-width: 42px;
  color: var(--ink-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.scale-label:last-child {
  text-align: right;
}

.scale-btns {
  display: grid;
  grid-template-columns: repeat(5, minmax(2.25rem, 1fr));
  gap: 0.45rem;
}

.scale-btn {
  min-height: 2.45rem;
  border: 1px solid rgba(83, 74, 183, 0.22);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.scale-btn:hover,
.scale-btn:focus-visible {
  border-color: var(--purple);
  background: var(--purple-soft);
  color: var(--purple);
}

.scale-btn.selected {
  border-color: var(--purple);
  background: var(--purple);
  color: #fff;
}

.btn-primary,
.btn-secondary,
.btn-cta {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}

.btn-primary {
  width: 100%;
  margin-top: 1.6rem;
  padding: 1rem 1.5rem;
  background: var(--purple);
  color: #fff;
  font-size: 1rem;
}

.btn-primary:hover:not(:disabled),
.btn-secondary:hover,
.btn-cta:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.results {
  padding-top: 0.4rem;
}

.results-intro {
  text-align: center;
  margin-bottom: 1.35rem;
}

.results-intro h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.04;
}

.primary-result {
  padding: 1.4rem;
  margin-bottom: 1rem;
  background: var(--purple-soft);
}

.primary-result h3 {
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-size: 1rem;
}

.primary-result p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.cat-card {
  padding: 1.25rem;
  margin-bottom: 0.8rem;
  box-shadow: 0 10px 34px rgba(44, 39, 95, 0.06);
}

.cat-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.cat-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.cat-score {
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.55rem;
  white-space: nowrap;
}

.bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(83, 74, 183, 0.08);
  margin-bottom: 0.8rem;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-red {
  background: var(--coral-soft);
  color: #9d2828;
}

.badge-amber {
  background: var(--amber-soft);
  color: #81500c;
}

.badge-green {
  background: var(--green-soft);
  color: #3b6d11;
}

.cat-interp {
  margin: 0;
  font-size: 0.88rem;
}

.cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  margin-top: 1.4rem;
  padding: 1.5rem;
  border-radius: 8px;
  background: var(--purple);
}

.cta h3 {
  color: #fff;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.1;
}

.cta p {
  margin: 0.7rem 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.cta .kicker {
  color: var(--amber);
}

.cta__actions {
  min-width: 210px;
  text-align: right;
}

.btn-cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.9rem;
  padding: 0.8rem 1.05rem;
  background: var(--amber);
  color: var(--ink);
}

.email-sent {
  margin: 0.75rem 0 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.76rem;
}

.sub-status {
  display: none;
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  font-size: 0.78rem;
  text-align: left;
}

.sub-ok {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.sub-err {
  background: rgba(255, 154, 35, 0.18);
  color: #ffe8c9;
}

.btn-secondary {
  display: block;
  margin: 1rem auto 0;
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--purple);
}

.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 1.5rem;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(190px, auto);
  align-items: start;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.footer-brand {
  display: grid;
  gap: 0.8rem;
}

.footer-brand p {
  max-width: 310px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.footer-nav,
.footer-meta {
  display: grid;
  gap: 0.6rem;
}

.footer-nav {
  grid-template-columns: repeat(2, auto);
  column-gap: 1.1rem;
}

.footer-meta {
  justify-items: end;
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem 0;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .hero {
    min-height: 380px;
    padding-top: 4rem;
  }

  .intro-panel,
  .cta {
    grid-template-columns: 1fr;
  }

  .cta__actions {
    min-width: 0;
    text-align: left;
  }

  .btn-cta {
    width: 100%;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-meta {
    justify-items: start;
  }
}

@media (max-width: 480px) {
  .shell {
    width: min(100% - 1rem, 760px);
  }

  .hero {
    padding-inline: 1rem;
  }

  .question,
  .panel,
  .cat-card,
  .primary-result,
  .cta {
    padding: 1rem;
  }

  .scale {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .scale-label:last-child {
    text-align: left;
  }

  .scale-btns {
    grid-template-columns: repeat(5, 1fr);
  }

  .cat-header {
    align-items: flex-start;
  }
}
