/* =====================================================================
   Dr. Elisa Janson Jones | AI Strategy & Training: AI Revenue Opportunity Assessment
   Editorial, restrained, mobile-first.
   ===================================================================== */

:root {
  /* Dr. Elisa Janson Jones brand palette */
  --plum: #5E0A3E;       /* primary: buttons, headings, selections */
  --text: #523D34;       /* body text (dark brown) */
  --rose: #D7AFB0;       /* decorative accents only (too light for text) */
  --taupe: #AF9E8D;      /* decorative only */

  --ink: var(--plum);
  --graphite: #6B5A51;   /* secondary text, derived from brand brown */
  --teal: #523D34;       /* labels, links, focus ring, secondary bars */
  --orange: var(--rose); /* accent rules */
  --paper: #FFFFFF;
  --mist: #F6F6F6;       /* quiet panel background */
  --rule: #E5DBD5;       /* decorative borders */
  --rule-strong: #8C7B72;/* input borders, >= 3:1 on white */
  --teal-wash: #F8EEEF;  /* selected option background */
  --error: #A3262A;

  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --measure: 38rem;
  --radius: 6px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.25rem;
  --space-5: 3.5rem;

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

main { flex: 1 0 auto; }

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * 1.25rem);
  margin: 0 auto;
  padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
}

[hidden] { display: none !important; }

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

a { color: var(--teal); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 10;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header / footer ---------- */

.site-header {
  padding-top: calc(1.25rem + env(safe-area-inset-top, 0px));
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-4);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--plum);
  min-height: 44px;
}
.wordmark__mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}
.wordmark__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.wordmark__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--plum);
}
.wordmark__rest {
  font-size: 0.875rem;
  color: var(--graphite);
}

.site-footer {
  margin-top: var(--space-5);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--graphite);
}
.site-footer p { margin: 0; }

/* ---------- Type ---------- */

.display {
  color: var(--plum);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
  max-width: 18ch;
}
.display:focus { outline: none; }
.display:focus-visible { outline: 3px solid var(--teal); }

.display--results { max-width: 20ch; }

.lede {
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--graphite);
  margin: 0 0 var(--space-3);
}

.kicker {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--teal);
  margin: 0 0 var(--space-1);
}

.section-title {
  color: var(--plum);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: var(--space-5) 0 var(--space-1);
}

.fineprint {
  font-size: 0.9rem;
  color: var(--graphite);
  margin: var(--space-2) 0 0;
}

.meta-line {
  font-size: 0.95rem;
  color: var(--graphite);
  margin: 0 0 var(--space-3);
}

/* ---------- Intro ---------- */

.deliverables {
  border-left: 4px solid var(--orange);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 0 0 var(--space-3);
}
.deliverables__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.deliverables__list {
  margin: 0;
  padding-left: 1.1rem;
}
.deliverables__list li { margin: 0.35rem 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.btn--primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.btn--primary:hover { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn--primary[disabled] {
  background: var(--graphite);
  border-color: var(--graphite);
  cursor: progress;
}
.btn--quiet {
  background: transparent;
  color: var(--plum);
  border-color: var(--rule-strong);
}
.btn--quiet:hover { border-color: var(--plum); color: var(--plum); }
.btn--wide { width: 100%; }

/* ---------- Progress ---------- */

.progress { margin-bottom: var(--space-4); }
.progress__text {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--graphite);
}
.progress__track {
  height: 6px;
  background: var(--mist);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 0;
  background: var(--ink);
  transition: width 0.25s ease;
}

/* ---------- Question ---------- */

.question {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.question__legend {
  padding: 0;
  margin-bottom: var(--space-2);
  display: block;
  width: 100%;
}
.question__legend:focus { outline: none; }
.question__context {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.question__text {
  display: block;
  color: var(--plum);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.55rem, 5.5vw, 2.15rem);
  line-height: 1.18;
  letter-spacing: -0.005em;
}
.question__prompt {
  margin: 0 0 var(--space-3);
  color: var(--graphite);
}
.question__prompt:empty { display: none; }

.options {
  display: grid;
  gap: 0.6rem;
}

.option { position: relative; }
.option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.option label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 56px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.option label:hover { border-color: var(--ink); }
.option__key {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--graphite);
}
.option__label { flex: 1 1 auto; }
.option__check {
  flex: 0 0 auto;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  visibility: hidden;
}

.option input:checked + label {
  border: 2px solid var(--plum);
  padding: calc(0.75rem - 1px) calc(1rem - 1px);
  background: var(--teal-wash);
  box-shadow: inset 5px 0 0 var(--plum);
}
.option input:checked + label .option__key {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.option input:checked + label .option__check { visibility: visible; }
.option input:focus-visible + label {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.keyhint { display: none; }
@media (hover: hover) and (pointer: fine) {
  .keyhint { display: block; }
}

/* ---------- Results ---------- */

.example {
  background: var(--mist);
  border-left: 4px solid var(--orange);
  padding: 1rem 1.25rem;
  margin: 0 0 var(--space-2);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
}

.levers {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
}
.lever__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.lever__name {
  font-weight: 600;
  font-size: 1.0625rem;
}
.lever__rank {
  display: inline-block;
  min-width: 1.4rem;
  color: var(--graphite);
  font-weight: 500;
}
.lever__score {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
}
.lever__tagline {
  margin: 0.1rem 0 0.5rem;
  font-size: 0.925rem;
  color: var(--graphite);
}
.lever__flag {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--teal);
}
.lever__track {
  height: 12px;
  background: var(--mist);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.lever__bar {
  height: 100%;
  background: var(--teal);
}
.lever--top .lever__bar { background: var(--ink); }
.lever--top .lever__track { border-color: var(--ink); }

.teaser {
  margin-top: var(--space-5);
  padding: var(--space-3);
  background: var(--mist);
  border-top: 4px solid var(--orange);
}
.teaser__title {
  color: var(--plum);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
}
.teaser p { margin: 0; }

/* ---------- Email form ---------- */

.email-form { margin-top: var(--space-2); }
.section-title--form { margin-top: var(--space-4); }

.field { margin: var(--space-3) 0 0; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.req, .opt {
  font-weight: 400;
  color: var(--graphite);
  font-size: 0.9rem;
}
.field input {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1.0625rem; /* >=16px prevents iOS zoom */
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
}
.field input:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; border-color: var(--ink); }
.field input[aria-invalid="true"] { border: 2px solid var(--error); }
.field__error {
  margin: 0.4rem 0 0;
  color: var(--error);
  font-size: 0.925rem;
  font-weight: 500;
}

.check {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin: var(--space-3) 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.check input {
  flex: 0 0 auto;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.1rem 0 0;
  accent-color: var(--ink);
  cursor: pointer;
}
.check label { cursor: pointer; }

.privacy {
  font-size: 0.875rem;
  color: var(--graphite);
  margin: var(--space-2) 0 var(--space-3);
}

.form-error {
  margin: var(--space-2) 0 0;
  padding: 0.9rem 1rem;
  border: 2px solid var(--error);
  border-radius: var(--radius);
  color: var(--error);
  font-weight: 500;
}

.hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---------- Success ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* ---------- Larger screens ---------- */

@media (min-width: 40rem) {
  .site-header { margin-bottom: var(--space-5); }
  .options { gap: 0.7rem; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
