/* Two brand identities over one layout: Hex8 (dark, default) and Improve Marketing (light). */
:root {
  --bg: #040A24;
  --bg-2: #07133D;
  --surface: rgba(12, 27, 79, 0.72);
  --line: rgba(56, 213, 255, 0.18);
  --text: #F7FAFF;
  --muted: #B9C7E6;
  --accent: #2D6BFF;
  --accent-2: #38D5FF;
  --accent-3: #B347FF;
  --on-accent: #FFFFFF;
  --ok: #43E6A4;
  --warn: #FFB84D;
  --grad: linear-gradient(135deg, #2D6BFF 0%, #38D5FF 48%, #B347FF 100%);
  --grad-btn: linear-gradient(135deg, #2D6BFF 0%, #3E4BF5 50%, #9B3BEB 100%);
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --r: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}
:root[data-brand="im"] {
  --bg: #F3F3F3;
  --bg-2: #FFFFFF;
  --surface: #FFFFFF;
  --line: #D9DDEB;
  --text: #000A4D;
  --muted: #3D4468;
  --accent: #000E5A;
  --accent-2: #000E5A;
  --accent-3: #FFBC00;
  --on-accent: #FFFFFF;
  --grad: linear-gradient(90deg, #FFBC00 0%, #FFD45C 100%);
  --grad-btn: linear-gradient(180deg, #13237A 0%, #000E5A 100%);
  --display: 'Roboto Condensed', system-ui, sans-serif;
  --body: 'Roboto', system-ui, -apple-system, sans-serif;
  --r: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
:root:not([data-brand="im"]) body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(179, 71, 255, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(45, 107, 255, 0.20), transparent 60%),
    var(--bg);
}
:root[data-brand="im"] body {
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(255, 188, 0, 0.16), transparent 60%),
    radial-gradient(900px 480px at -10% 0%, rgba(75, 0, 231, 0.08), transparent 60%),
    var(--bg);
}

#app { max-width: 720px; margin: 0 auto; padding: 0 20px 48px; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0 8px; }
.wordmark { font: 700 22px/1 var(--display); letter-spacing: 0.08em; }
.wordmark b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark-im { font: 800 21px/1 var(--display); letter-spacing: -0.02em; text-transform: none; color: var(--text); }
.wordmark-im b { color: var(--accent); background: none; -webkit-background-clip: initial; background-clip: initial; font-weight: 800; }
.wordmark-im i { color: var(--accent-3); font-style: normal; }
.stage { padding-top: 24px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(30px, 6vw, 46px); letter-spacing: -0.03em; font-weight: 700; }
h2 { font-size: clamp(23px, 4.4vw, 31px); letter-spacing: -0.02em; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
.eyebrow { display: inline-block; font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px; }
:root[data-brand="im"] .eyebrow { font-family: var(--display); font-weight: 800; color: var(--accent); }
.lede { color: var(--muted); font-size: 18px; margin-top: 16px; max-width: 60ch; }
h1 + .lede { margin-top: 16px; }

/* Intro */
.intro { display: grid; gap: 28px; }
.intro h1 { max-width: 20ch; }
.modes { display: grid; gap: 12px; grid-template-columns: 1.2fr 1fr; }
.mode {
  display: grid; gap: 6px; text-align: left; cursor: pointer;
  padding: 20px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.mode:active:not([disabled]) { transform: translateY(0); }
.mode[disabled] { cursor: not-allowed; opacity: 0.6; }
.mode-primary { background: var(--grad-btn); border-color: transparent; color: #fff; box-shadow: 0 18px 40px -18px rgba(45, 107, 255, 0.6); }
:root[data-brand="im"] .mode-primary { background: var(--accent); box-shadow: 0 16px 36px -16px rgba(75, 0, 231, 0.55); }
.mode-title { font: 700 20px/1.2 var(--display); }
.mode-meta { font: 500 13px/1.3 var(--mono); opacity: 0.85; }
:root[data-brand="im"] .mode-meta { font-family: var(--body); }
.mode-desc { font-size: 14px; color: var(--muted); }
.mode-primary .mode-desc { color: rgba(255, 255, 255, 0.85); }
.mode-cta { font-weight: 600; margin-top: 6px; }
.soon { font: 600 11px/1 var(--body); font-style: normal; text-transform: uppercase; letter-spacing: 0.08em; padding: 4px 7px; border-radius: 99px; background: var(--line); margin-left: 6px; vertical-align: 3px; }
.hero { display: grid; gap: 0; }
.pain { padding: 22px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 12px; }
.pain ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pain li { position: relative; padding-left: 26px; color: var(--muted); }
.pain li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--accent-2); transform: rotate(45deg); }
:root[data-brand="im"] .pain li::before { border-color: var(--accent); }
.pain-close { font-weight: 600; }
.how { padding: 22px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 16px; }
.how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.how li { display: grid; gap: 10px; align-content: start; }
.how-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--accent-2); background: rgba(56, 213, 255, 0.10); border: 1px solid var(--line); }
:root[data-brand="im"] .how-icon { color: var(--accent); background: #FFF4D1; }
.how li b { display: block; font-family: var(--display); font-size: 16px; }
.how li small { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 2px; }
.about { color: var(--muted); font-size: 14px; border-left: 2px solid var(--accent-2); padding-left: 14px; }
:root[data-brand="im"] .about { border-color: var(--accent-3); }
.faq summary { cursor: pointer; font-weight: 600; padding: 6px 0; list-style-position: inside; }
.faq dl { margin: 6px 0 0; display: grid; gap: 4px 0; }
.faq dt { font-weight: 600; margin-top: 10px; }
.faq dd { margin: 0; color: var(--muted); font-size: 15px; }

/* Question */
.q { display: grid; gap: 16px; }
.progress { height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--grad); transform-origin: left; transition: transform 0.4s var(--ease); }
.q-meta { display: flex; justify-content: space-between; gap: 12px; font: 500 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
:root[data-brand="im"] .q-meta { font-family: var(--body); }
.q-meta .block { color: var(--accent-2); }
:root[data-brand="im"] .q-meta .block { color: var(--accent); }
.q h2:focus, .capture h2:focus, .result h1:focus { outline: none; }
.help { color: var(--muted); font-size: 14px; margin-top: -6px; }
.kpi-intro { padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; cursor: pointer;
  padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: 500 16px/1.35 var(--body); text-align: left;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.opt:active { transform: translateX(0) scale(0.99); }
.opt.on { border-color: var(--accent-2); background: rgba(45, 107, 255, 0.22); background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
:root[data-brand="im"] .opt.on { border-color: var(--accent); background: #FFF4D1; background: color-mix(in srgb, var(--accent) 9%, #fff); }
.opt kbd { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); font: 600 12px/1 var(--mono); color: var(--muted); }
.opt-multi .box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; }
.opt-multi.on .box { background: var(--accent); border-color: var(--accent); }
.opt-multi.on .box::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.multi-note { font-weight: 600; color: var(--accent-2); font-size: 14px; margin-top: -6px; }
:root[data-brand="im"] .multi-note { color: var(--accent); }
.opt.on kbd { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.txt, .nums input, .capture input:not([type="checkbox"]), .audio textarea {
  width: 100%; font: 16px/1.4 var(--body); color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px;
}
.audio textarea { resize: vertical; min-height: 120px; }
.nums { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.nums label, .capture label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.q-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; }
.q-nav-r { display: flex; gap: 10px; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  border: 0; border-radius: var(--r); padding: 13px 20px; font: 600 16px/1 var(--body); text-decoration: none;
  background: var(--grad-btn); color: #fff; box-shadow: 0 14px 30px -16px rgba(45, 107, 255, 0.7);
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease);
}
:root[data-brand="im"] .btn { background: var(--accent); box-shadow: 0 12px 26px -14px rgba(75, 0, 231, 0.6); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.btn-lg { padding: 17px 24px; font-size: 17px; width: 100%; }
.ghost { cursor: pointer; background: none; border: 0; color: var(--muted); font: 500 15px/1 var(--body); padding: 12px 6px; border-radius: 8px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
:root[data-brand="im"] button:focus-visible, :root[data-brand="im"] a:focus-visible, :root[data-brand="im"] input:focus-visible, :root[data-brand="im"] textarea:focus-visible { outline-color: var(--accent); }

/* Capture */
.capture { display: grid; gap: 20px; }
.capture form { display: grid; gap: 14px; }
.capture small { font-size: 12px; }
.capture .check { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: 15px; }
.capture .check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.err { color: var(--warn); min-height: 1.2em; font-size: 14px; }
:root[data-brand="im"] .err { color: #B42318; }

/* Audio */
.audio { display: grid; gap: 10px; }
.audio-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rec { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; padding: 11px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 15px/1 var(--body); }
.rec[disabled] { opacity: 0.5; cursor: not-allowed; }
.rec .dot { width: 10px; height: 10px; border-radius: 50%; background: #FF5A5F; }
.rec.on { border-color: #FF5A5F; }
.rec.on .dot { animation: pulse 1s ease-in-out infinite; }
.timer { font: 500 14px/1 var(--mono); color: var(--muted); }
.audio audio { height: 36px; max-width: 100%; }
.audio-status { font-size: 14px; color: var(--muted); min-height: 1.2em; }
@keyframes pulse { 50% { opacity: 0.25; transform: scale(0.8); } }

/* Result */
.result { display: grid; gap: 22px; }
.r-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.card { padding: 20px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 10px; align-content: start; }
.card ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.card p { color: var(--muted); }
.offer { padding: 26px; border-radius: calc(var(--r) + 4px); display: grid; gap: 12px; position: relative; overflow: hidden; background: var(--bg-2); border: 1px solid var(--accent-2); }
:root[data-brand="im"] .offer { border: 2px solid var(--accent); }
.offer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.offer p { color: var(--muted); }
.price { font: 700 22px/1.2 var(--display); color: var(--text) !important; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cta-done { color: var(--ok); font-weight: 600; }
:root[data-brand="im"] .cta-done { color: #0B7A48; }
.bonus-invite { padding: 22px; border-radius: var(--r); border: 1px dashed var(--accent-2); display: grid; gap: 10px; }
:root[data-brand="im"] .bonus-invite { border-color: var(--accent); background: #FFF8E1; }
.bonus-invite p, .bonus-done { color: var(--muted); }

.foot { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 12px; color: var(--muted); }
.foot a { color: var(--muted); }

@media (hover: hover) and (pointer: fine) {
  .mode:hover:not([disabled]) { transform: translateY(-2px); border-color: var(--accent-2); }
  .opt:hover { border-color: var(--accent-2); transform: translateX(3px); }
  .btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
  .ghost:hover { color: var(--text); }
}
@media (max-width: 560px) {
  .how ol { grid-template-columns: 1fr; }
  .how li { grid-template-columns: 42px 1fr; align-items: center; }
  .modes, .r-grid { grid-template-columns: 1fr; }
  .opt kbd { display: none; }
  .lede { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; animation: none !important; }
}

/* Primary choice reads as a physical button: raised face, bottom edge, press-down on tap. */
.mode-primary {
  position: relative; gap: 10px; padding: 22px 22px 20px;
  border-radius: 18px;
  box-shadow: 0 7px 0 0 #1B2FA8, 0 18px 34px -10px rgba(45, 107, 255, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(0);
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
:root[data-brand="im"] .mode-primary { background: var(--grad-btn); box-shadow: 0 7px 0 0 #000633, 0 18px 34px -10px rgba(0, 14, 90, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.mode-primary:active { transform: translateY(6px); box-shadow: 0 1px 0 0 #1B2FA8, 0 6px 14px -6px rgba(45, 107, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
:root[data-brand="im"] .mode-primary:active { box-shadow: 0 1px 0 0 #000633, 0 6px 14px -6px rgba(0, 14, 90, 0.45); }
.mode-primary .mode-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px;
  padding: 14px 16px; border-radius: 12px; background: #FFFFFF; color: #0B1A5C; font: 700 16px/1.25 var(--body);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}
:root[data-brand="im"] .mode-primary .mode-cta { color: #000A4D; background: #FFBC00; }
:root[data-brand="im"] .mode-arrow { background: #000E5A; }
.mode-arrow { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 18px; animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 0%, 60%, 100% { transform: translateX(0); } 30% { transform: translateX(4px); } }
@media (hover: hover) and (pointer: fine) {
  .mode-primary:hover { transform: translateY(-2px); }
}

:root[data-brand="im"] h1, :root[data-brand="im"] h2, :root[data-brand="im"] .mode-title { text-transform: uppercase; font-weight: 800; letter-spacing: -0.01em; }
:root[data-brand="im"] h1 { font-size: clamp(34px, 7vw, 54px); line-height: 1.02; }
:root[data-brand="im"] .btn { background: #FFBC00; color: #000A4D; box-shadow: 0 5px 0 0 #C99400, 0 12px 24px -12px rgba(0, 14, 90, 0.35); }
:root[data-brand="im"] .btn:active { transform: translateY(4px); box-shadow: 0 1px 0 0 #C99400; }
:root[data-brand="im"] .offer { border-color: #000E5A; }
:root[data-brand="im"] .wordmark-im b { color: #000E5A; }
:root[data-brand="im"] .wordmark-im i { color: #FFBC00; }

.ai-note { font-size: 14px; color: var(--muted); padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--line); }
