@import url("/assets/tokens.css");

/* Shared brand theme — landing + diagnosis + result */

body.landing-active,
body.flow-active,
body.result-active {
  background: var(--brand-bg) !important;
  color: var(--brand-text);
}

body.landing-active::before,
body.flow-active::before,
body.result-active::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 12% 6%, var(--color-ambient-a), transparent 42%),
    radial-gradient(circle at 88% 14%, var(--color-ambient-b), transparent 38%);
}

body.landing-active .wrap,
body.flow-active .wrap,
body.result-active .wrap {
  position: relative;
  z-index: 1;
}

/* ——— Landing Hero ——— */
#landing .landing-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-height: 0;
  padding: 0 0 clamp(32px, 6vw, 56px);
  isolation: isolate;
  --landing-content-max: 640px;
  --landing-content-width: min(var(--landing-content-max), 100%);
}

.landing-hero-visual {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: clamp(200px, 36vw, 420px);
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 52%, rgba(15, 118, 110, 0.22), transparent 42%),
    linear-gradient(135deg, #041318 0%, #062028 48%, #0a2f36 100%);
}

.landing-hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(6, 32, 40, 0.72) 0%,
    rgba(6, 32, 40, 0.18) 42%,
    rgba(15, 118, 110, 0.08) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.landing-hero-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(180deg, transparent 0%, var(--color-background, #f9fbfc) 100%);
  pointer-events: none;
  z-index: 2;
}

.landing-hero-visual__img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(200px, 36vw, 420px);
  object-fit: cover;
  object-position: center center;
  filter: saturate(0.92) hue-rotate(8deg) brightness(0.94);
}

.landing-hero-stack {
  position: relative;
  z-index: 3;
  width: var(--landing-content-width);
  max-width: var(--landing-content-max);
  margin-top: clamp(-36px, -4vw, -20px);
  border-radius: var(--brand-radius);
  overflow: hidden;
  border: 1px solid var(--color-primary-border);
  box-shadow: var(--color-shadow-lg);
}

.landing-hero-shell {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--color-card) 0%, var(--color-secondary-bg) 100%);
  padding: clamp(28px, 5vw, 44px) clamp(24px, 5vw, 48px) clamp(32px, 6vw, 48px);
  text-align: center;
}

#landing .hero {
  position: relative;
  z-index: 1;
  max-width: min(640px, 100%);
  margin: 0 auto;
  text-align: center;
}

.hero-headline__line {
  display: block;
}

.hero-headline__line--gap {
  margin-top: 0.55em;
}

#landing .hero h1,
#landing .hero .hero-headline {
  margin: 20px 0 18px;
  color: var(--color-hero-indigo, #152547);
  font-size: clamp(24px, 4.4vw, 36px);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: -0.03em;
  text-shadow: none;
  text-align: center;
  word-break: keep-all;
}

#landing .hero .hero-eyebrow {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-muted);
  font-weight: 700;
  word-break: keep-all;
}

#landing .hero .hero-emphasis {
  color: var(--color-primary, #0f766e);
  font-weight: 900;
}

#landing .hero .hero-subhead {
  margin: 0 auto 20px;
  max-width: 560px;
  color: var(--brand-muted);
  font-size: clamp(16px, 2.8vw, 18px);
  line-height: 1.7;
  font-weight: 600;
  word-break: keep-all;
}

#landing .hero .hero-subhead--strong {
  margin-bottom: 28px;
  color: var(--color-hero-indigo, #152547);
  font-weight: 700;
}

#landing .hero .hero-cta-btn {
  margin: 0 auto 20px;
  min-width: min(100%, 280px);
  font-size: 1rem;
  padding: 14px 24px;
}

#landing .hero .hero-closing {
  margin: 0 auto;
  max-width: 480px;
  color: var(--brand-muted);
  font-size: clamp(14px, 2.4vw, 16px);
  line-height: 1.65;
  font-weight: 600;
}

#landing .hero .lead.hero-platform {
  color: var(--brand-muted);
  font-size: clamp(16px, 2.8vw, 19px);
  line-height: 1.65;
  font-weight: 600;
  margin: 0 auto 20px;
  max-width: 620px;
}

#landing .hero-checklist {
  list-style: none;
  margin: 0 auto 22px;
  padding: 0;
  max-width: 420px;
  text-align: left;
  display: inline-block;
  -webkit-padding-start: 0;
  padding-inline-start: 0;
}

#landing .hero-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--brand-muted);
  font-size: clamp(15px, 2.6vw, 17px);
  line-height: 1.75;
  font-weight: 600;
  letter-spacing: -0.02em;
  list-style: none;
  list-style-type: none;
  padding: 0;
  margin: 0;
}

#landing .hero-checklist li::marker {
  content: none;
  display: none;
}

#landing .hero-checklist li::before {
  content: none;
  display: none;
}

#landing .hero-checklist__mark {
  flex: 0 0 1em;
  width: 1em;
  color: var(--color-primary, var(--brand-primary));
  text-align: left;
  line-height: 1.75;
}

#landing .hero-checklist__text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

#landing .hero-checklist li + li {
  margin-top: 4px;
}

#landing .hero-philosophy {
  margin: 0;
  padding-bottom: 0;
  color: var(--brand-text);
  font-size: clamp(18px, 3.2vw, 22px);
  line-height: 1.55;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
}

#landing .hero-closing {
  margin: 0;
  color: var(--color-primary, var(--brand-primary));
  font-size: clamp(17px, 3vw, 20px);
  line-height: 1.55;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
}

#landing .pill {
  display: inline-flex;
  border-radius: 999px;
  background: var(--brand-secondary);
  color: var(--brand-primary);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 900;
  border: 1px solid var(--color-primary-border);
  letter-spacing: -0.01em;
}

@media (min-width: 861px) {
  body.landing-active .wrap,
  #landing.landing-page,
  #landing .landing-hero {
    overflow: visible;
  }

  #landing .landing-hero {
    --landing-content-max: 920px;
    align-items: stretch;
  }

  .landing-hero-visual {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background:
      radial-gradient(circle at 50% 50%, rgba(15, 118, 110, 0.22), transparent 42%),
      linear-gradient(135deg, #041318 0%, #062028 48%, #0a2f36 100%);
  }

  .landing-hero-visual::before {
    background: linear-gradient(
      90deg,
      rgba(6, 32, 40, 0.32) 0%,
      rgba(6, 32, 40, 0.08) 50%,
      rgba(6, 32, 40, 0.32) 100%
    );
  }

  .landing-hero-visual__img {
    object-position: center center;
  }

  .landing-hero-stack {
    align-self: center;
    margin-top: -80px;
    width: var(--landing-content-width);
    max-width: var(--landing-content-max);
  }

  #landing .hero {
    max-width: 100%;
  }

  .landing-hero-shell {
    padding: clamp(32px, 4vw, 48px) clamp(40px, 5vw, 64px) clamp(36px, 5vw, 52px);
  }
}

@media (max-width: 860px) {
  body.landing-active {
    height: auto;
    overflow: auto;
  }

  body.landing-active .site-header {
    flex-shrink: 0;
  }

  body.landing-active .wrap {
    display: block;
    height: auto;
    min-height: 0;
    padding: 8px 0 32px;
    box-sizing: border-box;
    overflow: visible;
  }

  #landing .landing-hero {
    flex: none;
    width: 100%;
    align-items: center;
    padding: 0 16px 24px;
    box-sizing: border-box;
  }

  .landing-hero-visual {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: 0;
    left: auto;
    transform: none;
    min-height: clamp(168px, 46vw, 260px);
  }

  .landing-hero-visual::before {
    background: linear-gradient(
      90deg,
      rgba(6, 32, 40, 0.72) 0%,
      rgba(6, 32, 40, 0.18) 42%,
      rgba(15, 118, 110, 0.08) 100%
    );
  }

  .landing-hero-visual__img {
    min-height: clamp(168px, 46vw, 260px);
    object-position: center center;
  }

  .landing-hero-stack {
    flex: none;
    display: flex;
    flex-direction: column;
    align-self: center;
    width: min(var(--landing-content-max), 100%);
    max-width: var(--landing-content-max);
    margin-top: -28px;
    margin-left: auto;
    margin-right: auto;
  }

  .landing-hero-shell {
    flex: none;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 6vw, 32px) clamp(20px, 5vw, 28px) clamp(32px, 8vw, 44px);
    text-align: center;
    overflow: visible;
  }

  #landing .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  #landing .pill {
    padding: 6px 12px;
    font-size: 12px;
  }

  #landing .hero h1,
  #landing .hero .hero-headline {
    align-self: center;
    margin: 0 0 14px;
    font-size: clamp(26px, 6.2vw, 36px);
    line-height: 1.32;
    letter-spacing: -0.04em;
    text-align: center;
    width: 100%;
  }

  #landing .hero-checklist {
    align-self: stretch;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    list-style-type: none;
    list-style-image: none;
    text-align: left;
    -webkit-padding-start: 0;
    padding-inline-start: 0;
    margin-inline-start: 0;
  }

  #landing .hero-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: clamp(13px, 3.4vw, 15px);
    line-height: 1.65;
    padding: 0;
    padding-inline-start: 0;
    margin: 0;
    margin-inline-start: 0;
    list-style: none;
    list-style-type: none;
    list-style-image: none;
  }

  #landing .hero-checklist li::marker {
    content: "" !important;
    display: none !important;
    font-size: 0 !important;
    width: 0 !important;
  }

  #landing .hero-checklist li::before,
  #landing .hero-checklist li::after {
    content: none !important;
    display: none !important;
  }

  #landing .hero-checklist__mark {
    flex: 0 0 1em;
    width: 1em;
    text-align: left;
  }

  #landing .hero-checklist__text {
    flex: 1;
    text-align: left;
  }

  #landing .hero .lead.hero-platform {
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 16px;
  }

  #landing .hero-philosophy {
    align-self: center;
    font-size: clamp(15px, 4vw, 18px);
    line-height: 1.55;
    padding-bottom: 0;
    text-align: center;
    width: 100%;
  }

  #landing .hero-closing {
    align-self: center;
    margin-top: 0;
    font-size: clamp(15px, 3.8vw, 17px);
    text-align: center;
    width: 100%;
  }
}

@media (max-width: 860px) and (max-height: 740px) {
  #landing .hero .lead.hero-platform {
    font-size: 12px;
  }

  #landing .hero-philosophy {
    font-size: 14px;
  }
}

body.flow-active .panel,
body.flow-active #analyzing .panel {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  box-shadow: var(--brand-shadow);
  color: var(--brand-text);
  backdrop-filter: none;
}

body.flow-active .panel .eyebrow,
body.flow-active #analyzing .eyebrow {
  color: var(--brand-primary);
}

body.flow-active .panel h1,
body.flow-active .panel h2,
body.flow-active .quiz-head h1,
body.flow-active .quiz-head h2,
body.flow-active #analyzing h1,
body.flow-active #analyzing h2 {
  color: var(--brand-text);
}

body.flow-active .panel .lead,
body.flow-active .phone-help,
body.flow-active .hint,
body.flow-active #analyzing .lead {
  color: var(--brand-muted);
}

body.flow-active .phone-help-example {
  color: var(--brand-muted);
  opacity: 0.85;
}

body.flow-active .scale-guide {
  border-color: var(--brand-border);
  background: var(--brand-card);
  color: var(--brand-text);
}

body.flow-active .scale-guide strong {
  color: var(--brand-text);
}

body.flow-active .scale-box {
  background: var(--brand-secondary);
  color: var(--brand-text);
  box-shadow: none;
  border: 1px solid var(--brand-border);
}

body.flow-active .scale-dual .scale-freq {
  color: var(--brand-text);
}

body.flow-active .scale-dual .scale-agree {
  color: var(--brand-muted);
}

body.flow-active .scale-hint {
  background: var(--brand-secondary);
  border-color: var(--brand-border);
  color: var(--brand-text);
}

body.flow-active .scale-hint em {
  color: var(--brand-primary);
}

body.flow-active .question > p {
  color: var(--brand-muted);
}

body.flow-active .phone-input {
  border-color: var(--brand-border);
  background: var(--brand-card);
  color: var(--brand-text);
}

body.flow-active .phone-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

body.flow-active .info {
  background: var(--brand-secondary);
  color: var(--brand-text);
  border: 1px solid var(--brand-border);
}

body.flow-active .info span {
  color: var(--brand-muted);
}

body.flow-active .scale-guide {
  border-color: var(--brand-border);
  background: var(--brand-card);
}

body.flow-active .question {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  color: var(--brand-text);
  box-shadow: var(--brand-shadow);
}

body.flow-active .question h2 {
  color: var(--brand-text);
}

body.flow-active .answer {
  border-color: var(--brand-border);
  color: var(--brand-text);
}

body.flow-active .answer.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

body.flow-active .progress {
  background: var(--brand-secondary);
}

body.flow-active .progress > span {
  background: var(--color-primary);
}

body.flow-active .percent {
  background: var(--brand-secondary);
  color: var(--brand-primary);
}

body.flow-active .btn {
  background: var(--brand-primary);
  box-shadow: var(--color-shadow-md);
}

body.flow-active .btn:hover {
  background: var(--brand-primary-hover);
}

body.flow-active .btn.secondary {
  background: var(--brand-card);
  color: var(--brand-text);
  border: 1px solid var(--brand-border);
  box-shadow: none;
}

body.flow-active .spinner {
  border-color: var(--brand-secondary);
  border-top-color: var(--brand-primary);
}

body.flow-active .phone-error {
  color: var(--color-danger);
}
