:root {
  --page: #fffcf9;
  --paper: #ffffff;
  --paper-warm: #fbf3e8;
  --text: #000000;
  --soft-text: #5d5d5d;
  --muted: #8f8f8f;
  --line: #e7d7c4;
  --gold: #e1c59d;
  --sand: #dcb388;
  --coral: #ff8562;
  --green: #20ba9a;
  --shadow: 0 18px 48px rgba(76, 54, 34, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--page);
  background-image: url("./assets/question-bg.png");
  background-position: center;
  background-size: cover;
  color: var(--text);
  font-family: Manrope, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1200px, calc(100% - 72px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 42px 0 58px;
}

.brand {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  margin-bottom: clamp(28px, 5.2vh, 56px);
}

.brand-logo {
  display: block;
  width: 138px;
  height: auto;
}

.screen {
  display: none;
}

.screen.is-active {
  display: grid;
}

.screen-start,
.screen-contact {
  grid-template-columns: minmax(0, 540px) minmax(560px, 1fr);
  gap: clamp(36px, 5.4vw, 76px);
  align-items: center;
  min-height: calc(100vh - 164px);
}

.intro-copy,
.contact-copy {
  max-width: 610px;
}

.eyebrow {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  margin: 0 0 24px;
  border-radius: 50px;
  border: 1px solid rgba(104, 139, 117, 0.18);
  background: rgba(232, 241, 234, 0.88);
  padding: 0 18px;
  color: #49645a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 620px;
  font-size: clamp(38px, 4.4vw, 58px);
  font-weight: 700;
  line-height: 1.06;
}

h2 {
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 700;
  line-height: 1.08;
}

.intro-copy p:not(.eyebrow),
.contact-copy p:not(.eyebrow),
.final-message {
  max-width: 650px;
  margin: 24px 0 0;
  color: #80766f;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
}

.button {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  border: 0 solid transparent;
  border-radius: 30px;
  padding: 0 38px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  line-height: 21.7px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button-primary {
  background: #23b99d;
  color: #fff;
}

.button-primary:hover {
  background: #1fa98f;
  box-shadow: 0 12px 26px rgba(35, 185, 157, 0.2);
}

.button-secondary {
  border-width: 2px;
  border-color: var(--text);
  background: transparent;
  color: var(--text);
}

.button-secondary:hover {
  background: var(--text);
  color: #fff;
}

.button-wide {
  width: 100%;
}

.intro-copy > .button-primary {
  margin-top: 30px;
}

.form-card .button-primary {
  margin-top: 26px;
}

.quiz-card,
.form-card,
.final-card {
  background: var(--paper);
  border: 1px solid rgba(215, 197, 176, 0.72);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-visual {
  position: relative;
  display: flex;
  min-height: 720px;
  align-items: flex-end;
  justify-content: center;
  align-self: start;
  margin-top: -24px;
}

.hero-visual img {
  position: relative;
  z-index: 1;
  width: min(600px, 100%);
  max-height: 760px;
  object-fit: contain;
  filter: drop-shadow(0 20px 34px rgba(73, 53, 35, 0.16));
}

.hero-note {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 244px;
  max-width: 296px;
  gap: 10px;
  border: 1px solid rgba(226, 211, 192, 0.9);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
  padding: 22px 24px;
  color: #2c2b2a;
  box-shadow: 0 16px 34px rgba(82, 63, 45, 0.1);
}

.hero-note strong {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.03;
}

.hero-note small {
  color: #80766f;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.hero-note em {
  justify-self: start;
  min-height: 26px;
  border-radius: 999px;
  background: rgba(232, 241, 234, 0.95);
  padding: 6px 14px;
  color: #49645a;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
}

.hero-note-top {
  top: 38px;
  left: 1%;
}

.hero-note-right {
  top: 342px;
  right: -18px;
  max-width: 286px;
}

.hero-note-bottom {
  left: -24px;
  bottom: 76px;
  max-width: 300px;
}

/* Legacy summary styles are intentionally unused after the Figma redesign. */
.summary-card,
.summary-number,
.summary-card p,
.summary-line {
  position: relative;
}

.screen-quiz,
.screen-final {
  justify-items: center;
  min-height: calc(100vh - 164px);
  align-items: center;
}

.quiz-card,
.final-card {
  width: min(720px, 100%);
  padding: clamp(34px, 4.2vw, 56px);
}

.quiz-card {
  display: grid;
  min-height: 610px;
  grid-template-rows: auto auto minmax(142px, auto) minmax(210px, auto) 22px auto;
  align-content: start;
}

.quiz-card h2 {
  max-width: 100%;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.12;
}

.quiz-topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.progress {
  height: 7px;
  margin: 16px 0 30px;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(236, 224, 208, 0.72);
}

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

.options-list {
  display: grid;
  min-height: 224px;
  grid-template-rows: repeat(4, minmax(54px, auto));
  gap: 12px;
  margin-top: 20px;
}

.option-button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  height: 100%;
  min-height: 58px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  padding: 13px 20px;
  color: var(--text);
  cursor: pointer;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.option-button:hover {
  border-color: var(--gold);
  box-shadow: 0 10px 28px rgba(225, 197, 157, 0.22);
}

.option-button::before {
  width: 20px;
  height: 20px;
  border: 2px solid #d6c3ae;
  border-radius: 50%;
  content: "";
}

.option-button.is-selected {
  border-color: var(--gold);
  background: #fff8ee;
}

.option-button.is-selected::before {
  border-color: var(--gold);
  background: radial-gradient(circle, var(--gold) 0 42%, transparent 45%);
}

.validation-message {
  min-height: 22px;
  margin: 18px 0 0;
  color: #b2573d;
  font-size: 14px;
  font-weight: 700;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

.form-card {
  width: min(440px, 100%);
  justify-self: end;
  padding: clamp(30px, 3vw, 42px);
}

.form-card h2 {
  margin-bottom: 30px;
  font-size: 30px;
  line-height: 1.15;
  text-align: center;
}

.form-card label {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  color: var(--soft-text);
  font-size: 14px;
  font-weight: 600;
}

.form-card input:not([type="checkbox"]) {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 0 18px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-card input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(225, 197, 157, 0.22);
}

.checkbox-line {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.checkbox-line input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--gold);
}

.final-card {
  width: min(650px, 100%);
  text-align: left;
}

.result-box {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

@media (max-height: 820px) and (min-width: 901px) {
  .app-shell {
    padding-top: 28px;
    padding-bottom: 32px;
  }

  .brand {
    min-height: 44px;
    margin-bottom: 20px;
  }

  .brand-logo {
    width: 118px;
  }

  .screen-start,
  .screen-contact,
  .screen-quiz,
  .screen-final {
    min-height: calc(100vh - 124px);
  }

  h1 {
    max-width: 560px;
    font-size: clamp(34px, 4vw, 50px);
    line-height: 1.06;
  }

  h2 {
    font-size: clamp(32px, 3.6vw, 46px);
  }

  .eyebrow {
    min-height: 30px;
    margin-bottom: 18px;
  }

  .intro-copy p:not(.eyebrow),
  .contact-copy p:not(.eyebrow),
  .final-message {
    margin-top: 20px;
    font-size: 17px;
    line-height: 1.45;
  }

  .button {
    min-height: 54px;
  }

  .intro-copy > .button-primary {
    margin-top: 24px;
  }

  .hero-visual {
    min-height: 560px;
    margin-top: -18px;
  }

  .hero-visual img {
    width: min(470px, 100%);
    max-height: 590px;
  }

  .hero-note {
    padding: 14px 16px;
    min-width: 190px;
    max-width: 240px;
    gap: 6px;
  }

  .hero-note strong {
    font-size: 20px;
  }

  .hero-note small {
    font-size: 10.5px;
  }

  .hero-note em {
    min-height: 20px;
    padding: 4px 10px;
    font-size: 9px;
  }

  .hero-note-top {
    top: 22px;
    left: 2%;
  }

  .hero-note-right {
    top: 266px;
    right: -6px;
    max-width: 220px;
  }

  .hero-note-bottom {
    left: -8px;
    bottom: 54px;
    max-width: 230px;
  }

  .quiz-card,
  .final-card {
    width: min(680px, 100%);
    padding: 34px 46px;
  }

  .quiz-card {
    min-height: 560px;
    grid-template-rows: auto auto minmax(126px, auto) minmax(206px, auto) 22px auto;
  }

  .quiz-card h2 {
    font-size: clamp(28px, 2.65vw, 36px);
    line-height: 1.12;
  }

  .progress {
    margin: 14px 0 28px;
  }

  .options-list {
    min-height: 214px;
    grid-template-rows: repeat(4, minmax(48px, auto));
    gap: 10px;
    margin-top: 18px;
  }

  .option-button {
    min-height: 50px;
    border-radius: 24px;
    padding: 11px 18px;
    font-size: 15.5px;
  }

  .actions-row {
    margin-top: 16px;
  }

  .form-card h2 {
    margin-bottom: 18px;
    font-size: 28px;
  }

  .form-card label {
    margin-top: 13px;
  }

  .form-card input:not([type="checkbox"]) {
    min-height: 50px;
  }

  .form-card .button-primary {
    margin-top: 18px;
  }
}

.result-tag {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 50px;
  border: 1px solid rgba(104, 139, 117, 0.18);
  background: rgba(232, 241, 234, 0.9);
  padding: 0 18px;
  color: #49645a;
  font-size: 13px;
  font-weight: 700;
}

.result-box h3 {
  margin: 28px 0 18px;
  font-size: clamp(38px, 4.3vw, 52px);
  line-height: 1.08;
}

.result-box p {
  margin: 0;
  color: #80766f;
  font-size: 19px;
  line-height: 1.42;
}

@media (max-width: 900px) {
  body {
    background-position: 62% center;
  }

  .app-shell {
    width: min(100% - 28px, 680px);
    padding: 18px 0 46px;
  }

  .brand {
    align-items: flex-start;
    margin-bottom: 42px;
  }

  .screen-start,
  .screen-contact {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
  }

  h1 {
    font-size: clamp(32px, 9.4vw, 44px);
    line-height: 1.05;
  }

  h2 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .intro-copy p:not(.eyebrow),
  .contact-copy p:not(.eyebrow),
  .final-message {
    font-size: 18px;
  }

  .hero-visual {
    min-height: 420px;
  }

  .hero-visual img {
    width: min(340px, 88vw);
  }

  .hero-note {
    display: none;
  }

  .form-card {
    justify-self: stretch;
    width: 100%;
  }

  .quiz-topline {
    display: grid;
  }

  .quiz-card {
    min-height: auto;
    grid-template-rows: auto;
    padding: 28px 22px;
  }

  .quiz-card h2 {
    overflow: visible;
    font-size: clamp(28px, 8vw, 38px);
  }

  .options-list {
    min-height: auto;
    grid-template-rows: none;
  }

  .option-button {
    height: auto;
    border-radius: 22px;
    font-size: 16px;
  }

  .actions-row .button,
  .screen-final .button {
    width: 100%;
  }

  .result-box h3 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .result-box p {
    font-size: 18px;
  }
}

@media (max-width: 520px) {
  .button {
    width: 100%;
  }
}
