:root {
  --bg: #ffffff;
  --text: #000000;
  --surface: #ffffff;
  --surface-dark: #000000;
  --muted: rgba(0, 0, 0, 0.72);
  --border: #111111;
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.16);
  --frame-max: 1128px;
  --assessment-max: 1055px;
  --result-max: 1127px;
  --header-height: 84px;
  --card-radius: 12px;
  --hero-radius: 24px;
  --btn-radius: 4px;
  --nav-btn-height: 40px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Playfair Display", serif;
}

button {
  font: inherit;
}

.decor {
  position: fixed;
  z-index: 0;
  width: 18vw;
  max-width: 270px;
  min-width: 110px;
  opacity: 0.95;
  pointer-events: none;
  filter: grayscale(1);
}

.decor-top-center {
  top: -17rem;
  left: 50%;
  transform: translateX(-50%);
}

.decor-top-left {
  top: 15rem;
  left: 1.5rem;
}

.decor-top-right {
  top: 11rem;
  right: 1.5rem;
}

.topbar,
.landing-page,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  width: min(var(--frame-max), calc(100vw - 32px));
  margin: 0 auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.logo-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.login-btn,
.cta-btn {
  border: 1px solid #000;
  border-radius: var(--btn-radius);
  background: #000;
  color: #fff;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.landing-page {
  width: min(var(--frame-max), calc(100vw - 32px));
  margin: 0 auto;
}

.hero {
  padding-top: 8.5rem;
  display: grid;
  justify-items: center;
  gap: 1rem;
}

.hero-title {
  margin: 0;
  width: min(100%, 1020px);
  font-size: clamp(2rem, 5vw, 3.45rem);
  line-height: 1.5;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.hero-title .highlight {
  color: #ffffff;
}

.showcase {
  position: relative;
  margin-top: 8rem;
  background: #000;
  border: 4px solid #fff;
  border-radius: var(--hero-radius);
  min-height: 650px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.showcase-art {
  position: absolute;
  width: 313px;
  height: 313px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
}

.showcase-art::before,
.showcase-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
}

.showcase-art::before {
  transform: translateX(26px);
}

.showcase-art::after {
  transform: translateX(52px);
}

.art-left {
  left: -12rem;
  top: -3rem;
}

.art-right {
  right: -12rem;
  bottom: 8rem;
}

.showcase-screen {
  position: relative;
  z-index: 1;
  display: block;
  width: min(652px, calc(100% - 60px));
  margin: 6.1rem auto 0;
  border-radius: 12px;
  border-radius: var(--card-radius);
  border: 1px solid #000;
}

.showcase-copy {
  position: relative;
  z-index: 1;
  margin: 2.2rem auto 0;
  width: min(100%, 900px);
  color: #fff;
  text-align: center;
  font-size: clamp(1.05rem, 1.8vw, 1.56rem);
  font-weight: 700;
  line-height: 1.5;
}

.statement,
.reasons h2,
.quiz-preview h2,
.final-cta h2 {
  text-align: center;
}

.statement {
  margin-top: 7rem;
}

.statement p,
.reasons h2,
.quiz-preview h2 {
  margin: 0 auto;
  width: min(100%, 1075px);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.5;
}

.trait-section {
  margin-top: 3rem;
}

.trait-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.1rem;
}

.trait-tile {
  position: relative;
  min-height: 327px;
  border-radius: 12px;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 1px 3px 6px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem 0.6rem 1.25rem;
}

.trait-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.2)),
    var(--tile-image) center / cover no-repeat;
}

.trait-tile p {
  position: relative;
  margin: 0;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.quiz-preview {
  margin-top: 6rem;
}

.preview-card-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.preview-question,
.preview-result {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
}

.preview-question {
  padding: 1rem 1.05rem 1rem;
}

.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.preview-number,
.preview-counter {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 2.25rem);
  font-weight: 500;
  line-height: 1;
}

.preview-text {
  margin: 0.2rem 0 0;
  font-size: clamp(1rem, 1.55vw, 1.75rem);
  line-height: 1.2;
}

.preview-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}

.preview-option {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid #111;
  border-radius: 8px;
  background: #fff;
  padding: 0.45rem 0.5rem;
  font-size: 0.67rem;
  line-height: 1;
}

.preview-option.is-selected {
  background: #e1e1e1;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.preview-option-mark {
  width: 12px;
  height: 12px;
  border: 1px solid #111;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
}

.preview-result {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.15rem;
}

.sparkle-mark {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  font-size: 4rem;
  line-height: 1;
}

.preview-result p {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 2.25rem);
  font-weight: 500;
}

.reasons {
  margin-top: 7rem;
}

.reason-grid {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 1rem;
}

.reason-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border-radius: var(--card-radius);
  min-height: 160px;
  padding: 1.15rem 1.3rem;
  display: flex;
  box-shadow: 1px 3px 6px rgba(0, 0, 0, 0.25);
}

.reason-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.2)),
    var(--reason-image) center / cover no-repeat;
}

.reason-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1.35;
  font-weight: 700;
}

.reason-card.wide {
  grid-column: span 1;
}

.reason-card.tall {
  min-height: 387px;
}

.reason-card.big {
  min-height: 387px;
}

.reason-card.big p,
.reason-card.tall p {
  text-align: center;
}

.reason-card.big {
  grid-column: 1 / 2;
  align-items: end;
  justify-content: center;
}

.reason-card.wide:first-child {
  align-items: center;
}

.reason-card.wide:last-child {
  grid-column: 2 / 4;
  align-items: center;
}

.final-cta {
  position: relative;
  margin-top: 7rem;
  min-height: 290px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1rem;
}

.final-cta h2 {
  margin: 0;
  width: min(100%, 1129px);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.35;
  font-weight: 700;
}

.bottom-figure {
  position: absolute;
  bottom: -1.5rem;
  width: clamp(74px, 11vw, 210px);
  filter: grayscale(1);
  pointer-events: none;
}

.figure-left {
  left: -1.5rem;
}

.figure-left-mid {
  left: 18%;
}

.figure-right-mid {
  right: 18%;
}

.figure-right {
  right: -1.5rem;
}

.footer {
  margin-top: 3rem;
  background: #000;
  min-height: 500px;
  display: grid;
  place-items: center;
}

.footer p {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.5;
}

.is-hidden {
  display: none !important;
}

.app-view {
  position: relative;
  z-index: 2;
  background: #fff;
  min-height: 100vh;
  padding: 6rem 0 3rem;
}

.app-shell,
.result-shell {
  width: min(var(--frame-max), calc(100vw - 32px));
  margin: 0 auto;
}

.assessment-header-card,
.assessment-question-card,
.result-title-card,
.result-panel {
  border: 1px solid #111;
  border-radius: var(--card-radius);
  background: #fff;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.assessment-header-card {
  margin-top: 7.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  width: min(var(--assessment-max), 100%);
  margin-left: auto;
  margin-right: auto;
}

.assessment-header-card h2,
.result-title-card h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1.1;
  font-weight: 700;
}

.assessment-header-card p {
  margin: 0.35rem 0 0;
  font-size: 1rem;
}

.assessment-badge-image {
  width: 84px;
  height: 84px;
  object-fit: contain;
  flex-shrink: 0;
}

.assessment-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.95rem;
  width: min(var(--assessment-max), 100%);
  margin-left: auto;
  margin-right: auto;
}

.assessment-question-card {
  padding: 1.15rem 1.2rem 1.2rem;
}

.assessment-question-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.assessment-question-index {
  margin: 0;
  font-size: clamp(1.6rem, 2.4vw, 2.25rem);
  line-height: 1;
  font-weight: 500;
}

.assessment-question-text {
  margin: 0.25rem 0 0;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.2;
}

.assessment-question-progress {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2.25rem);
  line-height: 1;
  font-weight: 500;
  flex-shrink: 0;
}

.assessment-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.assessment-option {
  min-height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 0.8rem;
  border: 1px solid #111;
  border-radius: var(--card-radius);
  background: #fff;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
}

.assessment-option.is-selected {
  background: #e1e1e1;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.assessment-option-mark {
  width: 16px;
  height: 16px;
  border: 1px solid #111;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.assessment-nav {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8.5rem;
  width: min(var(--assessment-max), 100%);
  margin-left: auto;
  margin-right: auto;
}

.ghost-nav-btn,
.solid-nav-btn {
  border-radius: var(--btn-radius);
  height: var(--nav-btn-height);
  border: 1px solid #111;
  cursor: pointer;
}

.ghost-nav-btn {
  background: #fff;
  width: 40px;
}

.solid-nav-btn {
  background: #000;
  color: #fff;
  padding: 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.result-shell {
  padding-top: 6.1rem;
}

.result-title-card {
  padding: 1.2rem 1rem;
  width: min(var(--result-max), 100%);
  margin-left: auto;
  margin-right: auto;
}

.result-panel-grid {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  width: min(var(--result-max), 100%);
  margin-left: auto;
  margin-right: auto;
}

.result-panel {
  min-height: 250px;
  padding: 1rem 0.95rem;
}

.result-panel h3 {
  margin: 0;
  font-size: clamp(1.95rem, 2.2vw, 2.6rem);
  line-height: 1;
  font-weight: 700;
}

.result-archetype {
  margin: 1.35rem 0 0.35rem;
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 600;
}

.result-subcopy,
.result-panel-copy {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.result-panel-copy {
  opacity: 0.6;
}

.result-chart {
  margin-top: 3rem;
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.65rem;
}

.result-chart-col {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.result-chart-value {
  margin: 0;
  font-size: 0.55rem;
  line-height: 1.2;
}

.result-chart-bar {
  width: 40px;
  height: 0;
  background: #d9d9d9;
  border-radius: 10px 10px 0 0;
  transition: height 240ms ease;
}

.result-chart-line {
  width: 100%;
  height: 1px;
  background: #111;
}

.result-chart-label {
  margin: 0;
  font-size: 0.5rem;
  text-align: center;
  line-height: 1.5;
}

.auth-view {
  background:
    radial-gradient(circle at top left, rgba(0, 0, 0, 0.05), transparent 30%),
    linear-gradient(180deg, #ffffff, #f4f4f4);
}

.auth-shell {
  width: min(980px, calc(100vw - 32px));
  margin: 0 auto;
}

.auth-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  min-height: 560px;
  border: 1px solid #111;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.auth-copy {
  background: #000;
  color: #fff;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-eyebrow {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-copy h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.1;
}

.auth-copy p:last-child {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
}

.auth-form {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
}

.auth-field span {
  font-size: 0.95rem;
  font-weight: 600;
}

.auth-field input {
  height: 52px;
  border: 1px solid #111;
  border-radius: 12px;
  padding: 0 1rem;
  font: inherit;
  font-size: 1rem;
}

.auth-submit {
  height: 52px;
  border: 1px solid #111;
  border-radius: 12px;
  background: #000;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
}

.auth-switch {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}

.auth-link-btn {
  border: 0;
  background: transparent;
  padding: 0 0 0 0.35rem;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.confirm-card {
  width: min(460px, 100%);
  border-radius: 20px;
  border: 1px solid #111;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.confirm-card h2 {
  margin: 0 0 0.65rem;
  font-size: 2rem;
  line-height: 1.05;
}

.confirm-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.confirm-actions {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

@media (max-width: 1100px) {
  .trait-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .reason-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reason-card.wide:last-child,
  .reason-card.big {
    grid-column: auto;
  }

  .assessment-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .auth-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .decor {
    opacity: 0.35;
  }

  .showcase {
    min-height: 470px;
  }

  .showcase-art {
    width: 200px;
    height: 200px;
  }

  .preview-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trait-grid,
  .reason-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .preview-result {
    flex-direction: column;
    text-align: center;
  }

  .sparkle-mark {
    width: auto;
    height: auto;
  }

  .assessment-question-head {
    flex-direction: column;
    gap: 0.5rem;
  }

  .assessment-nav {
    gap: 2rem;
  }

  .result-panel-grid {
    grid-template-columns: 1fr;
  }

  .result-chart {
    gap: 0.35rem;
  }

  .result-chart-col {
    width: 18%;
  }

  .auth-copy,
  .auth-form {
    padding: 2rem;
  }
}

@media (max-width: 560px) {
  .topbar,
  .landing-page {
    width: calc(100vw - 24px);
  }

  .topbar {
    height: 72px;
  }

  .logo {
    font-size: 22px;
  }

  .login-btn,
  .cta-btn {
    font-size: 13px;
    padding: 7px 12px;
  }

  .hero {
    padding-top: 5rem;
  }

  .showcase {
    margin-top: 4rem;
    min-height: 360px;
  }

  .showcase-screen {
    width: calc(100% - 28px);
    margin-top: 2.2rem;
  }

  .showcase-copy {
    width: calc(100% - 30px);
    margin-top: 1rem;
    font-size: 0.95rem;
  }

  .trait-grid,
  .reason-grid,
  .preview-options {
    grid-template-columns: 1fr;
  }

  .assessment-options {
    grid-template-columns: 1fr;
  }

  .trait-tile,
  .reason-card.tall,
  .reason-card.big {
    min-height: 240px;
  }

  .preview-head {
    flex-direction: column;
    gap: 0.35rem;
  }

  .preview-counter {
    opacity: 0.5;
  }

  .final-cta {
    min-height: 220px;
  }

  .bottom-figure {
    opacity: 0.7;
    width: 72px;
    bottom: -0.7rem;
  }

  .figure-left-mid {
    left: 24%;
  }

  .figure-right-mid {
    right: 24%;
  }

  .footer {
    min-height: 220px;
  }

  .assessment-nav {
    gap: 1.25rem;
  }

  .result-shell,
  .app-shell {
    width: calc(100vw - 24px);
  }

  .auth-shell {
    width: calc(100vw - 24px);
  }

  .assessment-badge-image {
    width: 58px;
    height: 58px;
  }

  .result-chart {
    justify-content: space-between;
  }

  .result-chart-col {
    width: 19%;
  }

  .result-chart-bar {
    width: 28px;
  }

  .confirm-card {
    padding: 1.2rem;
  }

  .confirm-card h2 {
    font-size: 1.6rem;
  }

  .confirm-actions {
    flex-direction: column-reverse;
  }
}
