/* =====================================================================
   The Decision Maker Archetype Test — Dark Data Atelier
   Cinematic & immersive build.
   ===================================================================== */
:root {
  --bg:        #09090d;
  --bg-2:      #101017;
  --panel:     #15151f;
  --panel-2:   #1c1c28;
  --line:      #2a2a39;
  --ink:       #f5f4f0;
  --ink-soft:  #bcbace;
  --ink-mute:  #807e92;
  --accent:    #c9a227;
  --accent-2:  #e8c64f;
  --good:      #6fbf8e;
  --warn:      #d98a5b;
  --lock:      #8a86ff;
  --radius:    16px;
  --maxw:      720px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- background atmosphere ---------------- */
.bg-gradient {
  position: fixed; inset: -25%; z-index: -4; pointer-events: none;
  background:
    radial-gradient(40% 40% at 26% 26%, rgba(201,162,39,0.26), transparent 68%),
    radial-gradient(46% 46% at 78% 60%, rgba(124,111,247,0.24), transparent 70%),
    radial-gradient(52% 52% at 50% 96%, rgba(95,208,192,0.16), transparent 72%);
  filter: blur(50px);
  animation: drift 34s ease-in-out infinite alternate;
  will-change: transform; transform: translateZ(0);
}
.bg-gradient::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(34% 34% at 72% 18%, rgba(232,198,79,0.18), transparent 70%),
    radial-gradient(40% 40% at 18% 78%, rgba(124,111,247,0.18), transparent 72%);
  filter: blur(40px);
  animation: drift2 28s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.16); }
}
@keyframes drift2 {
  from { transform: translate3d(3%, 2%, 0) scale(1.12); }
  to   { transform: translate3d(-4%, -3%, 0) scale(1); }
}
.bg-particles { position: fixed; inset: 0; z-index: -3; pointer-events: none; }
.bg-grain {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(125% 95% at 50% 28%, transparent 62%, rgba(0,0,0,0.42) 100%);
}

.wrap {
  position: relative; z-index: 1;
  max-width: 1080px; margin: 0 auto;
  padding: clamp(28px, 6vw, 60px) 22px 30px;
  min-height: 78vh;
}
/* keep reading-width screens centered within the wider stage */
.intro, .interstitial, .calc { max-width: 660px; margin-left: auto; margin-right: auto; }
.result { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ---------------- type + buttons ---------------- */
.eyebrow {
  text-transform: uppercase; letter-spacing: .24em; font-size: .72rem;
  font-weight: 600; color: var(--accent); margin-bottom: 14px;
}
h1 { font-family: "Fraunces", Georgia, serif; font-weight: 600;
     font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1.05; letter-spacing: -.01em; }
h2 { font-family: "Fraunces", Georgia, serif; font-weight: 600; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .14em;
     color: var(--ink-mute); margin-bottom: 8px; font-weight: 600; }

.btn { font: inherit; font-weight: 600; cursor: pointer; border-radius: 999px;
  border: 1px solid transparent; padding: 13px 26px;
  transition: transform .12s ease, background .2s, border-color .2s, color .2s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: var(--accent); color: #15130a; box-shadow: 0 6px 24px rgba(201,162,39,.22); }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink-mute); color: var(--ink); }
.btn:disabled { opacity: .4; cursor: default; }

/* ---------------- transitions ---------------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes keyIn  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn .55s ease both; }
.screen.question { animation: fadeIn .4s ease both; }
.screen.leaving { opacity: 0; transform: translateY(-12px) scale(.99);
  transition: opacity .26s ease, transform .26s ease; }
.key-in { animation: keyIn .46s ease both; }
.options.key-in .option { animation: keyIn .44s ease both; animation-delay: var(--d, 0s); }

/* ---------------- intro ---------------- */
.intro { display: flex; flex-direction: column; gap: 18px; }
.intro .lede { color: var(--ink-soft); font-size: 1.08rem; max-width: 52ch; }
.intro .meta { list-style: none; display: flex; gap: 28px; margin: 6px 0 4px; }
.intro .meta li { color: var(--ink-mute); font-size: .9rem; }
.intro .meta strong { color: var(--ink); font-size: 1.5rem; display: block; font-family: "Fraunces", serif; }
.intro .btn { align-self: flex-start; margin-top: 6px; }
.fineprint { color: var(--ink-mute); font-size: .82rem; }

/* ---------------- section interstitial ---------------- */
.interstitial {
  min-height: 64vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: 14px; animation: fadeIn .6s ease both;
}
.inter-index { text-transform: uppercase; letter-spacing: .3em; font-size: .76rem;
  font-weight: 600; color: var(--accent); }
.inter-title { font-size: clamp(2.4rem, 8vw, 4rem); line-height: 1; }
.inter-sub { color: var(--ink-soft); max-width: 40ch; font-size: 1.05rem; }
.inter-rule { width: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: ruleGrow 1s ease .2s forwards; margin: 8px 0 4px; }
@keyframes ruleGrow { to { width: 180px; } }
.interstitial .btn { margin-top: 8px; }

/* ---------------- question frame ---------------- */
.screen.question { display: flex; flex-direction: column; gap: 20px; }
.qframe { display: flex; flex-direction: column; }

/* desktop: two-column stage — questions left, live signature rail right */
@media (min-width: 880px) {
  .screen.question {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px;
    gap: 48px; align-items: start;
  }
  .qframe { grid-column: 1; }
  .sig-panel {
    grid-column: 2; position: sticky; top: 72px;
    flex-direction: column; align-items: stretch; gap: 18px; padding: 22px;
  }
  .sig-panel .sig-sigil { width: 132px; height: 132px; margin: 0 auto; }
  .sig-panel .sig-readout { gap: 16px; }
  .sig-panel .sig-eq { height: 60px; }
  .sig-panel .sig-axes { flex-direction: column; gap: 12px; }
  .sig-panel .sig-axis { font-size: .68rem; }
  .sig-panel .sig-meta { text-align: center; }
  .sig-panel .sig-pct { font-size: 2rem; }
  .sig-panel .sig-cap { font-size: .62rem; }
}
/* mobile: keep the panel visible by pinning it to the top while options scroll */
@media (max-width: 879px) {
  .sig-panel { position: sticky; top: 8px; z-index: 5; }
}
.qtop { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.qchapter { text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; color: var(--accent); font-weight: 600; }
.qcount { font-family: "Fraunces", serif; font-size: 1.1rem; color: var(--ink); }
.qcount i { color: var(--ink-mute); font-style: normal; font-size: .85rem; }
.progress { height: 3px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 26px; }
.progress .bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(201,162,39,.5); transition: width .4s ease; }
.qprompt { font-size: clamp(1.35rem, 3.8vw, 1.9rem); line-height: 1.22; margin-bottom: 22px; }

/* ---------------- options ---------------- */
.options { display: flex; flex-direction: column; gap: 10px; }
.options.split { flex-direction: row; gap: 14px; }
.option {
  position: relative; text-align: left; display: flex; align-items: center; gap: 13px;
  background: linear-gradient(180deg, rgba(30,30,42,.92), rgba(22,22,32,.92));
  border: 1px solid var(--line); color: var(--ink-soft); border-radius: 13px;
  padding: 15px 18px; cursor: pointer; font: inherit;
  transition: border-color .15s, background .15s, color .15s, transform .12s, box-shadow .15s;
}
.option:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(0,0,0,.35); }
.option.selected { border-color: var(--accent); background: rgba(201,162,39,.14); color: var(--ink); }
.option.big { flex: 1; flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px 20px; min-height: 132px; }
.opt-key { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center;
  font-size: .74rem; font-weight: 600; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-mute); }
.option:hover .opt-key, .option.selected .opt-key { border-color: var(--accent); color: var(--accent); }
.opt-text { flex: 1; }
.option.big .opt-text { font-size: 1.05rem; color: var(--ink); }
.opt-go { color: var(--ink-mute); opacity: 0; transition: opacity .15s, transform .15s; }
.option:hover .opt-go { opacity: 1; transform: translateX(3px); }
@media (max-width: 560px) { .options.split { flex-direction: column; } .option.big { min-height: 0; } }

.navrow { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.hint { color: var(--ink-mute); font-size: .76rem; }
@media (max-width: 520px) { .hint { display: none; } }

/* ---------------- ranking interaction ---------------- */
.rank-instruct { color: var(--ink-mute); font-size: .9rem; margin: -8px 0 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rank-count { font-weight: 600; color: var(--accent-2); border: 1px solid var(--line);
  border-radius: 99px; padding: 2px 11px; font-size: .8rem; }
.rank-count.bump { animation: bump .32s ease; }
@keyframes bump { 0%,100% { transform: none; } 32% { transform: scale(1.2); color: var(--warn); } }

.ranked-options .option { padding-right: 54px; }
.opt-rank { position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: transparent; font-weight: 700; font-size: .82rem;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s; }
.option.ranked { border-color: var(--accent); background: rgba(201,162,39,.13); color: var(--ink); }
.option.ranked .opt-key { border-color: var(--accent); color: var(--accent); }
.option.ranked .opt-rank { color: #15130a; border-color: var(--accent);
  box-shadow: 0 0 12px rgba(201,162,39,.5); }
.option.r1 .opt-rank { background: var(--accent-2); }
.option.r2 .opt-rank { background: var(--accent); }
.option.r3 .opt-rank { background: #a8821d; color: #1a1608; }

/* ---------------- live signature panel ---------------- */
.sig-panel {
  display: flex; align-items: center; gap: 16px;
  background: rgba(16,16,23,.92); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 16px; animation: fadeIn .6s ease both;
}
.sig-sigil { width: 64px; height: 64px; flex: 0 0 auto; }
.sig-readout { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sig-eq { display: flex; align-items: flex-end; gap: 5px; height: 38px; }
.eqbar { flex: 1; height: var(--h, 4%); min-height: 2px; border-radius: 3px 3px 0 0;
  background: #3a3a4c; transition: height .5s cubic-bezier(.22,1,.36,1), background .3s; }
.eqbar.lead { background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: 0 0 8px rgba(201,162,39,.5); }
.sig-axes { display: flex; gap: 16px; }
.sig-axis { display: flex; align-items: center; gap: 6px; flex: 1; font-size: .62rem; color: var(--ink-mute); }
.sig-axis .track { position: relative; flex: 1; height: 3px; background: var(--bg-2); border-radius: 99px; }
.sig-axis .track b { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2); transform: translate(-50%, -50%); transition: left .6s cubic-bezier(.22,1,.36,1); }
.sig-meta { flex: 0 0 auto; text-align: right; }
.sig-pct { display: block; font-family: "Fraunces", serif; font-size: 1.3rem; color: var(--accent-2); }
.sig-cap { font-size: .58rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-mute); line-height: 1.2; }
@media (max-width: 460px) { .sig-sigil { width: 52px; height: 52px; } .sig-meta { display: none; } }

/* ---------------- mute button ---------------- */
.mute-btn { position: fixed; top: 16px; right: 16px; z-index: 50; width: 40px; height: 40px;
  border-radius: 50%; cursor: pointer; background: var(--panel); border: 1px solid var(--line);
  font-size: 1rem; transition: border-color .2s, transform .1s; }
.mute-btn:hover { border-color: var(--accent); }
.mute-btn:active { transform: scale(.92); }

/* ---------------- calculating ---------------- */
.calc { min-height: 60vh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 30px; text-align: center; }
.scanner { position: relative; width: 120px; height: 120px; }
.scan-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--line);
  border-top-color: var(--accent); animation: spin 1s linear infinite; }
.scan-core { position: absolute; inset: 34px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%); animation: pulse 1.4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: .4; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.1); } }
.calc-line { font-family: "Fraunces", serif; font-size: 1.25rem; color: var(--ink-soft); transition: opacity .2s ease; }

/* ---------------- result ---------------- */
.result { display: flex; flex-direction: column; gap: 16px; }
.reveal-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 0 8px; }
.sigil-big { width: 200px; height: 200px; margin-bottom: 6px; filter: drop-shadow(0 0 24px rgba(201,162,39,.25)); }
.reveal-hero .eyebrow { margin-bottom: 2px; }
.arch-name { text-align: center; font-size: clamp(2.3rem, 7vw, 3.7rem);
  transition: opacity .8s ease, filter .8s ease, transform .8s ease; }
.arch-name.pending { opacity: 0; filter: blur(16px); transform: scale(.95); }
.arch-code { color: var(--ink-mute); font-size: .92rem; letter-spacing: .03em; }
.share-row { margin-top: 14px; }

.reveal-body { display: flex; flex-direction: column; gap: 16px;
  transition: opacity .8s ease, transform .8s ease; }
.reveal-body.veiled { opacity: 0; transform: translateY(24px); pointer-events: none; }

.card { background: rgba(21,21,31,.92); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; color: var(--ink-soft); }
.card.avatar-card p { color: var(--ink); font-size: 1.05rem; }
.signature { font-family: "Fraunces", serif; font-size: 1.18rem; color: var(--ink); font-style: italic; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card.good { border-color: rgba(111,191,142,.4); } .card.good h3 { color: var(--good); }
.card.warn { border-color: rgba(217,138,91,.4); } .card.warn h3 { color: var(--warn); }

/* meters */
.meters { display: flex; flex-direction: column; gap: 10px; }
.meter { display: grid; grid-template-columns: 132px 1fr 28px; align-items: center; gap: 12px; }
.meter-label { font-size: .82rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter-track { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.meter-fill { display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, #4a4a5e, #6a6a82); transition: width .9s cubic-bezier(.22,1,.36,1); }
.meter.win .meter-label { color: var(--accent-2); font-weight: 600; }
.meter.win .meter-fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 12px rgba(201,162,39,.4); }
.meter-val { font-size: .82rem; color: var(--ink-mute); text-align: right; }
@media (max-width: 480px) { .meter { grid-template-columns: 104px 1fr 24px; } }

/* axis sliders */
.axis { display: grid; grid-template-columns: 76px 1fr 76px; align-items: center; gap: 12px; margin-top: 12px; }
.axis-end { font-size: .76rem; color: var(--ink-mute); }
.axis .axis-end:first-child { text-align: right; }
.axis .axis-end:last-child { text-align: left; }
.axis-track { position: relative; height: 6px; background: var(--bg-2); border-radius: 99px; }
.axis-thumb { position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-2); border: 2px solid var(--bg); transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(201,162,39,.5); transition: left 1s cubic-bezier(.22,1,.36,1); }

/* locked */
.card.locked { background: linear-gradient(180deg, rgba(28,28,40,.8), rgba(21,21,31,.8)); border-color: rgba(138,134,255,.35); }
.locked-h { text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 1.05rem; margin-bottom: 14px; }
.locked-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.locked-item { color: var(--ink-mute); display: flex; gap: 10px; align-items: baseline; }
.locked-item .lock { color: var(--lock); }
.capture { display: flex; gap: 10px; }
.capture input { flex: 1; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 13px 18px; color: var(--ink); font: inherit; }
.capture input:focus { outline: none; border-color: var(--accent); }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } .capture { flex-direction: column; } }

/* footer */
.site-foot { position: relative; z-index: 1; text-align: center; color: var(--ink-mute);
  font-size: .78rem; padding: 30px 22px 50px; max-width: var(--maxw); margin: 0 auto; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, .arch-name, .meter-fill, .axis-thumb, .bg-gradient, .eqbar { animation: none !important; transition: none !important; }
  .arch-name.pending { opacity: 1; filter: none; transform: none; }
  .reveal-body.veiled { opacity: 1; transform: none; pointer-events: auto; }
  .meter-fill { transition: width .3s linear !important; }
}
