/* Ecomm Decoded — lead-gen quiz styles.
   Colors + type pulled from BRAND.md (production CSS). Do not substitute.
   Per-quiz accent is set via the --accent / --accent-text CSS variables on .ed-quiz. */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

:root {
  --dark: #1e1e1e;
  --yellow: #F2CE3A;
  --teal: #2BB596;
  --blue: #8BA1D3;
  --pink: #E787A0;
  --warm-white: #f9f8f5;
  --white: #ffffff;
  --border: #ebebeb;
  --accent: #F2CE3A;          /* overridden per quiz */
  --accent-text: #1e1e1e;     /* readable text ON the accent */
  --radius: 14px;
  --maxw: 640px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--warm-white);
  color: var(--dark);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ed-quiz {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ed-wordmark {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--dark);
  margin: 0 0 4px;
}
.ed-wordmark span { color: var(--accent); }

/* progress */
.ed-progress {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin: 14px 0 26px;
}
.ed-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 99px;
  transition: width .35s ease;
}

/* shared screen card */
.ed-screen {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  animation: edfade .35s ease;
}
@keyframes edfade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
[hidden] { display: none !important; }

h1, h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
/* The engine moves focus to each screen's heading so screen readers announce
   the new screen. These headings aren't keyboard-reachable (tabindex=-1), so
   the browser's default focus ring just looks like a stray box. Hide it. */
.ed-screen h1:focus,
.ed-screen h2:focus { outline: none; }
.ed-screen h1 { font-size: clamp(26px, 6vw, 34px); }
.ed-q-text   { font-size: clamp(21px, 5vw, 27px); }

.ed-sub {
  font-size: 16px;
  line-height: 1.55;
  color: #444;
  margin: 0 0 8px;
}
.ed-meta {
  font-size: 13px;
  font-weight: 600;
  color: #777;
  margin: 18px 0 0;
  letter-spacing: .01em;
}

/* primary button (accent) */
.ed-btn {
  display: inline-block;
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 17px;
  padding: 16px 22px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-text);
  text-align: center;
  text-decoration: none;
  transition: transform .08s ease, filter .15s ease;
}
.ed-btn:hover { filter: brightness(.96); }
.ed-btn:active { transform: translateY(1px); }
.ed-btn[disabled] { opacity: .5; cursor: not-allowed; }

.ed-btn-dark { background: var(--dark); color: #fff; }
.ed-btn-ghost {
  background: transparent;
  color: var(--dark);
  border: 1.5px solid var(--border);
  font-weight: 600;
}

/* question number tag */
.ed-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #999;
  margin: 0 0 14px;
}

/* answer options */
.ed-options { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.ed-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--dark);
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, transform .06s ease;
}
.ed-option:hover { border-color: var(--accent); }
.ed-option:active { transform: scale(.995); }
.ed-option.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, white);
}
.ed-option-key {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--warm-white);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #888;
}
.ed-option.is-selected .ed-option-key {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

/* nav row */
.ed-nav { display: flex; gap: 12px; margin-top: 22px; }
.ed-nav .ed-btn { width: auto; }
.ed-back {
  background: transparent;
  border: none;
  color: #999;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 4px;
}
.ed-back:hover { color: var(--dark); }

/* email gate */
.ed-field { margin: 18px 0; }
.ed-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #555;
}
.ed-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--warm-white);
}
.ed-field input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.ed-error {
  color: #c0392b;
  font-size: 13px;
  font-weight: 600;
  margin: 8px 0 0;
}
.ed-privacy { font-size: 12px; color: #999; margin: 14px 0 0; line-height: 1.5; }

/* result */
.ed-result-emoji { font-size: 46px; line-height: 1; margin: 0 0 10px; }
.ed-result-tagline {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-text);
  background: var(--accent);
  display: inline-block;
  padding: 5px 12px;
  border-radius: 7px;
  margin: 0 0 16px;
}
.ed-result-body p { font-size: 16px; line-height: 1.6; color: #333; margin: 0 0 14px; }
.ed-result-fix {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 20px 0;
}
.ed-result-fix h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #666;
}
.ed-result-fix p { font-size: 15px; line-height: 1.55; margin: 0 0 8px; }
.ed-ctas { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }

.ed-share { margin-top: 18px; text-align: center; }
.ed-share button {
  background: transparent;
  border: none;
  color: #999;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.ed-share button:hover { color: var(--dark); }

.ed-footer {
  margin-top: auto;
  padding-top: 28px;
  text-align: center;
  font-size: 12px;
  color: #aaa;
}
.ed-footer a { color: #888; text-decoration: none; }
.ed-footer a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .ed-screen { padding: 24px 18px; }
}
