/* ============================================================
   Brand Discovery — STYLES
   Palette is taken straight from the Fortune 5 logo files:
     blue   #2297F9   the block behind the "5"
     silver #ABB0B4   the "5" itself
     steel  #6B6D6C   the dark wordmark
   The one signature move: a hard blue offset block, echoing the
   blue shape behind the 5. It appears on the selected answer,
   the primary button and the checked box, and nowhere else.
   ============================================================ */

/* Self-hosted so the page makes no third-party requests. */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/montserrat-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/montserrat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/montserrat-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/montserrat-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 800; font-display: swap; src: url('../assets/fonts/montserrat-latin-800-normal.woff2') format('woff2'); }

:root {
  --ink: #22262A;
  --steel: #6B6D6C;
  --silver: #ABB0B4;
  --line: #D9DDE0;
  --mist: #F1F3F5;
  --paper: #FFFFFF;
  --blue: #2297F9;
  --blue-deep: #0A6DC9;
  --blue-tint: #E4F2FE;
  --danger: #B42318;
  --bar-h: 68px;
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body[data-screen="welcome"], body[data-screen="done"] { background: var(--ink); }

:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 3px; }
.hero :focus-visible { outline-color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ico { display: inline-flex; flex: none; }

/* ---------- header + five-chapter progress ---------- */

.bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: var(--bar-h); padding: 0 clamp(20px, 4vw, 48px) 4px;
  background: var(--ink); color: #fff;
}
.brand img { display: block; height: 28px; width: auto; }
.bar-meta { display: flex; align-items: baseline; gap: 12px; font-size: 14px; color: var(--silver); }
.bar-step { font-weight: 700; color: #fff; }
.track {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px;
}
.seg { display: block; background: rgba(255, 255, 255, .16); overflow: hidden; }
.fill {
  display: block; height: 100%; background: var(--blue);
  transform-origin: left center; transform: scaleX(0);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

/* ---------- hero (welcome + thank-you) ---------- */

.hero {
  position: relative; overflow: hidden; color: #fff; background: var(--ink);
  min-height: calc(100vh - var(--bar-h)); min-height: calc(100svh - var(--bar-h));
  display: flex; align-items: center;
}
.hero-inner {
  width: 100%; max-width: 1120px; margin: 0 auto;
  padding: clamp(40px, 8vw, 88px) clamp(20px, 4vw, 48px) clamp(48px, 7vw, 80px);
}
.hero-main { position: relative; }
.hero-mark {
  position: absolute; z-index: 0; pointer-events: none; height: auto;
  right: clamp(-90px, -4vw, -16px); top: 50%; width: min(38vw, 430px); transform: translateY(-50%);
}
.hero-title, .hero-lede, .hero-actions, .hero-note, .next-steps { position: relative; z-index: 1; }
.hero-title {
  margin: 0 0 24px; max-width: 11ch;
  font-size: clamp(2.6rem, 7.2vw, 5.1rem); line-height: 1.02; font-weight: 800; letter-spacing: -.035em;
  outline: 0;
}
.hero-done .hero-title { max-width: 14ch; }
.hero-lede { margin: 0 0 36px; max-width: 32em; font-size: clamp(1.05rem, 1.7vw, 1.22rem); color: #C5CACE; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.hero-note { margin: 24px 0 0; max-width: 34em; font-size: 15px; color: var(--silver); }

.chapters {
  list-style: none; margin: clamp(56px, 9vw, 96px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 24px;
}
.chapters li {
  display: grid; align-content: start; gap: 4px; padding-top: 16px;
  border-top: 2px solid rgba(255, 255, 255, .18);
}
.chapters .n { font-size: 1.7rem; font-weight: 800; line-height: 1; color: var(--blue); }
.chapters .t { font-size: 15px; font-weight: 700; line-height: 1.3; }
.chapters .b { font-size: 14px; line-height: 1.45; color: var(--silver); }

.next-steps { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 16px; max-width: 34em; counter-reset: step; }
.next-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; font-size: 1.05rem; color: #E6E9EB; counter-increment: step; }
.next-steps li::before {
  content: counter(step); display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 9px; background: var(--blue); color: var(--ink); font-weight: 800; font-size: 15px;
}

/* ---------- buttons ---------- */

.btn {
  --shadow: var(--blue);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 17px 26px; border: 0; border-radius: 12px;
  background: var(--ink); color: #fff; text-decoration: none;
  font: 700 16px/1 var(--font); letter-spacing: -.005em; cursor: pointer;
  box-shadow: 5px 5px 0 var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--shadow); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--shadow); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; box-shadow: 5px 5px 0 var(--shadow); }
.btn-light { background: #fff; color: var(--ink); }
.btn.is-skip { --shadow: var(--silver); background: #fff; color: var(--ink); box-shadow: 5px 5px 0 var(--shadow), inset 0 0 0 2px var(--ink); }

.btn-ghost, .btn-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 6px;
  border: 0; background: none; cursor: pointer;
  font: 600 15px/1 var(--font); color: var(--steel);
}
.btn-ghost:hover { color: var(--ink); }
.btn-link { color: var(--silver); text-decoration: underline; text-underline-offset: 4px; }
.btn-link:hover { color: #fff; }

/* ---------- conversation page ---------- */

.wrap {
  max-width: 820px; margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 4vw, 40px) 120px;
}
.thread { position: relative; }
.reply {
  width: fit-content; max-width: min(100%, 520px); margin: 0 0 26px auto;
  padding: 11px 18px; border-radius: 18px 18px 4px 18px;
  background: var(--blue-tint); color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.4;
}
.convo { position: relative; }
.convo::before {
  content: ''; position: absolute; left: 21px; top: 58px; bottom: 0; width: 2px; background: var(--line);
}
.host { display: grid; grid-template-columns: 44px 1fr; gap: 18px; align-items: start; position: relative; }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ink); }
.avatar img { display: block; width: 20px; height: auto; }
.host-body { min-height: 44px; padding-top: 2px; }
.ask {
  margin: 0; outline: 0;
  font-size: clamp(1.55rem, 3.4vw, 2.15rem); line-height: 1.2; font-weight: 700; letter-spacing: -.022em;
}
.host-body .hint { margin: 12px 0 0; max-width: 34em; color: var(--steel); font-size: 16px; }

.typing { display: inline-flex; gap: 5px; padding: 15px 16px; border-radius: 18px 18px 18px 4px; background: var(--mist); }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--silver); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.typed .ask, .typed .host-body .hint { animation: rise .3s ease-out both; }
.typed .fields { animation: rise .32s .08s ease-out both; }

.fields {
  position: relative; margin: 32px 0 0 62px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px 20px;
}
.field { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; }
.field.half { grid-column: auto; }

.field > label:not(.drop), .field > legend, .field > .label, .sub > label {
  display: block; padding: 0; margin: 0 0 8px; font-size: 15px; font-weight: 700; line-height: 1.35;
}
.sub > label { font-size: 14px; font-weight: 600; color: var(--steel); margin-bottom: 6px; }
.req { font-weight: 500; color: var(--steel); }
.hint { margin: 8px 0 0; color: var(--steel); font-size: 14.5px; line-height: 1.5; }
.field > legend + .hint, .field > .label + .hint { margin: -2px 0 12px; }
.error { margin: 8px 0 0; color: var(--danger); font-size: 14.5px; font-weight: 600; }
.count { margin: 12px 0 0; font-size: 14px; font-weight: 600; color: var(--steel); }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  display: block; width: 100%; padding: 13px 16px;
  font: 500 17px/1.4 var(--font); color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: 10px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #8A8E92; font-weight: 400; }
input[type="text"]:hover, input[type="email"]:hover, input[type="tel"]:hover, textarea:hover { border-color: var(--silver); }
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, textarea:focus {
  outline: 0; border-color: var(--blue-deep); box-shadow: 0 0 0 4px rgba(34, 151, 249, .22);
}
.has-error input[type="text"], .has-error input[type="email"], .has-error input[type="tel"], .has-error textarea { border-color: var(--danger); }

/* ---------- answer chips (the signature offset block) ---------- */

.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; padding-right: 4px; }
.chips.compact { display: flex; flex-wrap: wrap; gap: 12px; }
.chips.compact .chip { flex: 0 1 auto; max-width: 100%; }
.chips.compact .chip-label { white-space: nowrap; }
.chips.list { grid-template-columns: 1fr; max-width: 520px; }
.chip { position: relative; display: block; cursor: pointer; }
.chip input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip-box {
  display: flex; align-items: flex-start; gap: 12px; height: 100%; padding: 14px 16px;
  background: #fff; border: 2px solid var(--line); border-radius: 12px;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.chips.compact .chip-box { padding: 12px 14px; }
.chip:hover .chip-box { border-color: var(--silver); }
.chip input:checked + .chip-box { border-color: var(--ink); box-shadow: 5px 5px 0 var(--blue); transform: translate(-2px, -2px); }
.chip input:focus-visible + .chip-box { outline: 3px solid var(--blue-deep); outline-offset: 3px; }
.chip input:disabled { cursor: not-allowed; }
.chip input:disabled + .chip-box { opacity: .45; }
.chip-mark {
  flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px;
  border: 2px solid var(--silver); border-radius: 50%; transition: background-color .12s ease, border-color .12s ease;
}
.chip.is-multi .chip-mark { border-radius: 6px; }
.chip input:checked + .chip-box .chip-mark { background: var(--ink); border-color: var(--ink); }
.chip input:checked + .chip-box .chip-mark::after {
  content: ''; width: 9px; height: 5px; margin-top: -2px;
  border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg);
}
.chip-text { min-width: 0; overflow-wrap: break-word; }
.chip-label { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.chip-desc { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; line-height: 1.4; color: var(--steel); }
.other { margin-top: 16px; max-width: 420px; }

/* ---------- consent ---------- */

.field .consent { display: flex; align-items: flex-start; gap: 12px; margin: 0; font-size: 15.5px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.consent input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.consent-box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 0; background: #fff; border: 2px solid var(--silver); border-radius: 7px; transition: background-color .12s ease, box-shadow .12s ease; }
.consent input:checked + .consent-box { background: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--blue); }
.consent input:checked + .consent-box::after { content: ''; width: 11px; height: 6px; margin-top: -2px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg); }
.consent input:focus-visible + .consent-box { outline: 3px solid var(--blue-deep); outline-offset: 3px; }

/* ---------- repeating rows ---------- */

.rows { display: grid; gap: 22px; }
.row { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.row-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sub { min-width: 0; }
.sub.wide { grid-column: 1 / -1; }
.btn-add, .btn-remove {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 600 15px/1 var(--font); color: var(--ink); background: none;
}
.btn-add { margin-top: 20px; padding: 12px 18px; border: 2px dashed var(--silver); border-radius: 10px; }
.btn-add:hover { border-color: var(--ink); }
.btn-remove { margin-top: 12px; padding: 6px 2px; border: 0; color: var(--steel); font-size: 14px; }
.btn-remove:hover { color: var(--danger); }

/* ---------- uploads ---------- */

.drop {
  display: grid; justify-items: center; gap: 4px; padding: 28px 20px; text-align: center;
  border: 2px dashed var(--silver); border-radius: 14px; background: var(--mist); color: var(--ink);
  cursor: pointer; transition: border-color .12s ease, background-color .12s ease;
}
.drop:hover, .drop.over { border-color: var(--blue-deep); background: var(--blue-tint); }
.field-files > input:focus-visible + .drop { outline: 3px solid var(--blue-deep); outline-offset: 3px; }
.drop .ico { margin-bottom: 4px; color: var(--steel); }
.drop-main { font-weight: 700; }
.drop-link { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }
.drop-sub { font-size: 14px; color: var(--steel); }
.file-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.file { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; align-items: center; padding: 10px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.file-name { grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.file-meta { grid-column: 1; font-size: 13.5px; color: var(--steel); }
.file.is-error { border-color: #F4B4AC; }
.file.is-error .file-meta { color: var(--danger); font-weight: 600; }
.file-x { grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--steel); cursor: pointer; }
.file-x:hover { background: var(--mist); color: var(--ink); }
.bar-mini { grid-column: 1 / -1; height: 4px; margin-top: 8px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar-mini span { display: block; height: 100%; background: var(--blue); transition: width .15s linear; }

/* ---------- navigation ---------- */

.nav { margin: 44px 0 0 62px; }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.banner {
  margin: 0 0 18px; padding: 12px 16px; border: 2px solid #F4B4AC; border-radius: 10px;
  background: #FDECEA; color: #7A1A12; font-size: 15px; font-weight: 600; line-height: 1.5;
}

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  .chapters { grid-template-columns: 1fr; gap: 20px; }
  .chapters li { grid-template-columns: 40px 1fr; column-gap: 14px; }
  .chapters .n { grid-row: span 2; }
}

@media (max-width: 720px) {
  .bar-chapter { display: none; }
  .hero-mark { top: 0; right: -14vw; width: 62vw; transform: none; opacity: .22; }
  .hero-title { max-width: 9ch; }
  .host { grid-template-columns: 36px 1fr; gap: 12px; }
  .avatar { width: 36px; height: 36px; border-radius: 10px; }
  .avatar img { width: 16px; }
  .convo::before { display: none; }
  .fields { margin-left: 0; margin-top: 26px; grid-template-columns: 1fr; }
  .field.half { grid-column: 1 / -1; }
  .row-grid { grid-template-columns: 1fr; }
  .chips { grid-template-columns: 1fr 1fr; }
  .chips.list { grid-template-columns: 1fr; }
  .nav {
    position: sticky; bottom: 0; z-index: 10;
    margin: 28px calc(-1 * clamp(20px, 4vw, 40px)) 0;
    padding: 14px clamp(20px, 4vw, 40px) calc(14px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
  }
}
@media (max-width: 400px) { .chips { grid-template-columns: 1fr; } }

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