/* ============================================================
   The Inner Edge — styles
   Palette + type pulled from CLAUDE.md (christensencoaching.com).
   ============================================================ */

:root {
  --cream:       #FAF7F1;
  --navy:        #16243D;
  --gold:        #B8852A;
  --gold-light:  #C79A3A;
  --warm-grey:   #6B6B6B;
  --soft-border: rgba(22, 36, 61, 0.14);
  --soft-bg:     rgba(22, 36, 61, 0.04);

  --radius: 6px;
  --radius-lg: 10px;
  --max-w: 640px;
  --tap: 44px;

  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body { min-height: 100dvh; }

/* ============================================================
   Layout
   ============================================================ */

.app { display: block; min-height: 100dvh; }

.screen {
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  padding: 32px 20px 48px;
}

.screen[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.container--narrow { max-width: 560px; }

.center { text-align: center; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ============================================================
   Typography
   ============================================================ */

.display {
  font-weight: 500;
  font-size: clamp(34px, 8vw, 52px);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 8px 0 6px;
}

.display--md { font-size: clamp(28px, 6vw, 40px); }
.display--sm { font-size: clamp(22px, 5vw, 28px); }

.subhead {
  font-size: clamp(17px, 4vw, 20px);
  color: var(--navy);
  opacity: 0.78;
  margin: 0 0 28px;
  line-height: 1.4;
}

.intro-body {
  font-size: 17px;
  max-width: 60ch;
  margin: 0 0 28px;
}

/* ============================================================
   Intro screen — visual identity
   ============================================================ */

.screen--intro { align-items: center; }

.intro { text-align: center; }

.intro .display { margin: 6px 0 8px; }
.intro .subhead { margin: 0 0 24px; }
.intro .intro-body {
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
  font-weight: 500;
}

.hero-venn {
  margin: 4px auto 22px;
  max-width: 460px;
  padding: 0;
}

.hero-venn svg {
  width: 100%;
  height: auto;
  display: block;
}

.venn-marker {
  font-family: "Permanent Marker", "Caveat", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 22px;
}

.venn-marker--sm { font-size: 14px; }

.meta {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 0;
  margin: 4px 0 28px;
}

.meta li {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.meta__num {
  font-size: 26px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.meta__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm-grey);
  margin-top: 4px;
}

.btn--lg {
  padding: 16px 28px;
  font-size: 18px;
  min-height: 52px;
}

.intro .signoff--intro {
  margin-top: 56px;
  color: var(--navy);
  font-weight: 500;
  font-size: 17px;
  opacity: 0.85;
}

.caps {
  font-weight: 500;
  letter-spacing: 0.02em;
}

.caps--gold {
  color: var(--gold);
}

@media (min-width: 768px) {
  .hero-venn { max-width: 540px; margin-bottom: 28px; }
  .venn-marker { font-size: 24px; }
  .venn-marker--sm { font-size: 15px; }
  .meta__num { font-size: 30px; }
  .meta { gap: 48px; }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 12px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--soft-bg);
  color: var(--navy);
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.05s ease, border-color 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

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

.btn--primary {
  background: var(--gold-light);
  color: var(--navy);
  border-color: var(--gold);
}

.btn--primary:hover:not(:disabled) {
  background: var(--gold);
  color: var(--cream);
}

.btn--primary:active:not(:disabled) { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  border-color: var(--soft-border);
}

.btn--ghost:hover { background: var(--soft-bg); }

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.nav-row .btn { min-width: 120px; }
.nav-row .btn:only-child { margin-left: auto; }

/* ============================================================
   Progress bar
   ============================================================ */

.progress {
  height: 4px;
  background: var(--soft-border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}

.progress__bar {
  height: 100%;
  width: 0;
  background: var(--gold-light);
  transition: width 0.25s ease;
}

/* ============================================================
   Quiz
   ============================================================ */

.quiz-page {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 24px;
}

.q {
  background: var(--soft-bg);
  border: 1px solid var(--soft-border);
  border-radius: var(--radius-lg);
  padding: 18px 18px 14px;
}

.q__stem {
  margin: 0 0 14px;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--navy);
}

.likert {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.likert__opt {
  position: relative;
}

.likert__opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.likert__pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  border-radius: var(--radius);
  border: 1px solid var(--soft-border);
  background: var(--cream);
  font-weight: 500;
  font-size: 16px;
  color: var(--navy);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  user-select: none;
}

.likert__opt input:hover + .likert__pill {
  border-color: var(--gold-light);
}

.likert__opt input:focus-visible + .likert__pill {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.likert__opt input:checked + .likert__pill {
  background: var(--gold-light);
  border-color: var(--gold);
  color: var(--navy);
}

.likert__legend {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
  color: var(--warm-grey);
}

/* ============================================================
   Email capture
   ============================================================ */

.field {
  display: block;
  margin: 20px 0 8px;
}

.field__label {
  display: block;
  font-size: 13px;
  color: var(--warm-grey);
  margin-bottom: 6px;
}

input[type="email"],
input[type="text"] {
  width: 100%;
  padding: 14px 14px;
  font-family: inherit;
  font-size: 17px;
  color: var(--navy);
  background: var(--cream);
  border: 1px solid var(--soft-border);
  border-radius: var(--radius);
  -webkit-appearance: none;
  appearance: none;
}

input[type="email"]:focus,
input[type="text"]:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}

.email-hint {
  font-size: 13px;
  color: var(--warm-grey);
  margin: 4px 0 18px;
}

#btn-submit { width: 100%; }

.error {
  color: #8a2a2a;
  font-size: 14px;
  margin: 10px 0 0;
}

/* honeypot — visually hidden, still in the DOM for bots */
.hp {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============================================================
   Loading
   ============================================================ */

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--soft-border);
  border-top-color: var(--gold-light);
  margin: 80px auto 16px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  text-align: center;
  color: var(--warm-grey);
  font-size: 15px;
}

/* ============================================================
   Result
   ============================================================ */

.chart-wrap {
  display: flex;
  justify-content: center;
  margin: 18px 0 24px;
}

#chart {
  width: 100%;
  max-width: 460px;
  height: auto;
}

/* Quadrant background rects — JS toggles .is-active on the reader's. */
.quadrant {
  fill: var(--navy);
  fill-opacity: 0.04;
  stroke: var(--soft-border);
  stroke-width: 1;
  transition: fill-opacity 0.2s ease, stroke 0.2s ease, stroke-width 0.2s ease;
}
.quadrant.is-active {
  fill: #C79A3A;
  fill-opacity: 0.18;
  stroke: var(--gold);
  stroke-width: 2.5;
}

/* Axes + cut crosshair lines. */
.axis-line {
  stroke: var(--navy);
  stroke-width: 2;
  fill: none;
}
.axis-mid {
  stroke: var(--navy);
  stroke-opacity: 0.18;
  stroke-width: 1;
}
.axis-arrow { fill: var(--navy); }

/* Archetype labels inside each quadrant. */
.archetype-label {
  font-family: var(--font);
  font-weight: 500;
  font-size: 13px;
  fill: var(--navy);
  fill-opacity: 0.4;
  letter-spacing: 0.06em;
  transition: fill 0.2s ease, fill-opacity 0.2s ease;
}
.archetype-label.is-active {
  fill: var(--gold);
  fill-opacity: 1;
}

/* Axis labels in Permanent Marker (brand vocabulary). */
.axis-label {
  font-family: "Permanent Marker", "Caveat", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 16px;
  fill: var(--navy);
  fill-opacity: 0.78;
}
.axis-label .gold { fill: var(--gold); }

/* Reader dot on the chart. */
#chart-dot {
  fill: var(--gold-light);
  stroke: var(--navy);
  stroke-width: 2.5;
}

.diagnosis {
  max-width: 65ch;
  margin: 0 auto 28px;
  font-size: 17px;
  line-height: 1.65;
}

#btn-download {
  display: inline-flex;
  text-align: center;
  margin: 6px auto 0;
}

.soft {
  color: var(--warm-grey);
  font-size: 14px;
  margin: 0 0 18px;
  line-height: 1.5;
}

/* ============================================================
   Gate widget on the result screen
   ============================================================ */

.gate {
  background: var(--soft-bg);
  border: 1px solid var(--soft-border);
  border-radius: var(--radius-lg);
  padding: 24px 22px 26px;
  margin: 12px 0 28px;
  text-align: center;
}

.gate__h {
  font-family: var(--font);
  font-weight: 500;
  font-size: 22px;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  line-height: 1.25;
}

.gate__sub {
  font-size: 15px;
  color: var(--navy);
  opacity: 0.78;
  line-height: 1.5;
  margin: 0 auto 18px;
  max-width: 48ch;
}

#gate-cta .btn,
#gate-email .btn[type="submit"] {
  width: 100%;
  max-width: 360px;
}

#gate-email .field { margin-top: 4px; text-align: left; }
#gate-email .field__label { text-align: left; }

#gate-email .email-hint {
  text-align: center;
  margin: 12px auto 16px;
  max-width: 48ch;
}

@media (min-width: 768px) {
  .gate { padding: 28px 28px 30px; }
  .gate__h { font-size: 24px; }
}

.signoff {
  margin: 0;
  font-weight: 500;
  color: var(--navy);
}

/* ============================================================
   Larger screens — small adjustments
   ============================================================ */

@media (min-width: 768px) {
  body { font-size: 18px; }
  .screen { padding: 56px 32px 72px; }
  .q { padding: 22px 22px 18px; }
  .likert__pill { font-size: 17px; }
  .venn-quad { font-size: 12px; }
}
