/* HIH7 quiz — brochure identity: deep indigo → electric violet, faceted hexagons, white type. */
:root {
  --indigo-900: #0B0140;
  --indigo-800: #100259;
  --indigo-600: #2c00de;
  --violet: #9038ff;
  --lavender: #f4e3fc;
  --ink: #FFFFFF;
  --ink-soft: #CFC4F5;
  --ink-mute: #B3A8E0;
  --glass: rgba(255, 255, 255, .07);
  --glass-2: rgba(255, 255, 255, .11);
  --line: rgba(255, 255, 255, .14);
  --accent: #4D7CFF;
  --accent-ink: #1F2FB8;
  --on-accent: #fff;
  --pole-a: #8F7BFF;
  --pole-b: #FF9F5A;
  --radius: 24px;
  --cut: 18px;
  --font: "Readex Pro", "Segoe UI", Tahoma, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background:
    radial-gradient(900px 520px at 85% -10%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(144, 56, 255, .45), transparent 60%),
    linear-gradient(160deg, var(--indigo-900) 0%, var(--indigo-800) 45%, #1a0a8a 100%);
  background-attachment: fixed;
  transition: background .8s var(--ease);
}
/* faint honeycomb lattice like the brochure */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 2l26 15v30L28 62 2 47V17zM28 62v35M0 0' fill='none' stroke='white' stroke-width='1.2'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
.bg-blobs { display: none; }
button { font-family: inherit; cursor: pointer; color: inherit; }
a { color: inherit; }
bdi { unicode-bidi: isolate; }

/* ---------- Top bar ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; max-width: 560px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .5px; font-size: 15px; }
.brand-mark svg { display: block; filter: drop-shadow(0 0 10px rgba(144, 56, 255, .9)); }
.brand-mark svg g { fill: #fff; }
.lang-btn { border: 1px solid var(--line); background: var(--glass); color: #fff; border-radius: 999px; padding: 7px 15px; font-weight: 600; font-size: 13px; backdrop-filter: blur(8px); }

#app { max-width: 560px; margin: 0 auto; padding: 0 18px 48px; }
.screen { animation: enter .55s var(--ease) both; }
.screen.leaving { animation: leave .22s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes leave { to { opacity: 0; transform: translateY(-10px); } }

/* ---------- Landing ---------- */
.hero { text-align: center; padding: 10px 0 4px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; color: var(--lavender); border: 1px solid var(--line); background: var(--glass); padding: 6px 14px; border-radius: 999px; }
.hero-title {
  font-size: clamp(40px, 12vw, 58px); line-height: 1.2; margin: 18px 0 10px; font-weight: 700;
  background: linear-gradient(180deg, #fff 30%, #d9c8ff); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(144, 56, 255, .35);
}
.hero-sub { color: var(--ink-soft); font-size: 16.5px; line-height: 1.8; margin: 0 auto 18px; max-width: 30em; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 6px; }
.stats div { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 10px 4px; display: grid; gap: 2px; }
.stats b { font-size: 20px; font-variant-numeric: tabular-nums; }
.stats span { font-size: 12px; color: var(--ink-mute); }

.comb-title { text-align: center; margin: 22px 0 8px; font-weight: 600; color: var(--lavender); font-size: 15px; }
.comb { display: grid; justify-content: center; margin: 0 0 22px; }
.comb-row { display: flex; justify-content: center; gap: 6px; }
.comb-row + .comb-row { margin-top: -22px; }
.cell { width: clamp(72px, 22vw, 100px); display: grid; justify-items: center; position: relative; animation: pulse 7s var(--ease) infinite; animation-delay: calc(var(--i) * 1s); }
.cell svg { width: 100%; height: auto; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35)); transition: transform .3s var(--ease); }
.cell span { position: absolute; bottom: 10%; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: rgba(11,1,64,.72); white-space: nowrap; pointer-events: none; }
.cell:hover svg { transform: scale(1.06); }
@keyframes pulse { 0%, 9%, 100% { filter: none; transform: none; } 4% { filter: drop-shadow(0 0 18px rgba(255, 255, 255, .55)); transform: translateY(-6px) scale(1.06); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 18px; padding: 17px 22px; font-size: 18px; font-weight: 700; text-decoration: none; transition: transform .15s var(--ease), box-shadow .25s, background .25s; width: 100%; min-height: 60px;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 50%); }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(90deg, #fff, var(--lavender)); color: var(--indigo-800); }
.glow-wrap { animation: glow 2.6s ease-in-out infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 22px rgba(196, 160, 255, .75)); } }
.btn-accent { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 80%, #fff), color-mix(in srgb, var(--accent) 60%, #fff)); color: var(--on-accent); }
.btn-ghost { background: var(--glass-2); color: #fff; font-size: 15px; min-height: 52px; padding: 13px; font-weight: 600; }
.arrow { display: inline-block; transition: transform .2s; }
[dir="rtl"] .arrow { transform: scaleX(-1); }

.site-foot { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 14px; justify-items: center; }
.partners { display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap; opacity: .92; }
.partners img:first-child { height: 26px; width: auto; }
.partners img:last-child { height: 48px; width: auto; }
.socials { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 12.5px; }
.socials a { color: var(--ink-mute); text-decoration: none; direction: ltr; }
.socials a:hover { color: #fff; }

/* ---------- Question ---------- */
.qhead { display: flex; align-items: center; gap: 12px; margin: 8px 0 22px; }
.back { width: 42px; height: 42px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass); color: #fff; display: grid; place-items: center; flex: none; }
[dir="rtl"] .back svg { transform: scaleX(-1); }
.progress { flex: 1; height: 8px; background: rgba(255, 255, 255, .1); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, #8F7BFF, #fff); border-radius: inherit; box-shadow: 0 0 12px rgba(255, 255, 255, .6); transition: width .45s var(--ease); }
.qcount { font-size: 13px; color: var(--ink-mute); font-variant-numeric: tabular-nums; min-width: 42px; text-align: end; }
.qcount b { color: #fff; font-size: 15px; }

.statement-card {
  position: relative; min-height: 210px; display: grid; place-items: center; text-align: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 22px 28px; backdrop-filter: blur(10px);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.qmark { position: absolute; top: 4px; inset-inline-start: 18px; font-size: 64px; line-height: 1; color: var(--violet); opacity: .55; font-family: Georgia, serif; }
.qtext { font-size: clamp(21px, 5.8vw, 26px); line-height: 1.65; font-weight: 600; margin: 0; }

.scale { display: flex; align-items: center; gap: 8px; margin: 28px 0 6px; }
.scale .end { font-size: 12px; font-weight: 700; width: 46px; flex: none; text-align: center; line-height: 1.3; }
.scale .agree { color: var(--pole-a); }
.scale .disagree { color: var(--pole-b); }
.dots { flex: 1; display: flex; align-items: center; justify-content: space-evenly; gap: 6px; }
.dot { --s: 44px; --c: var(--pole-a); width: var(--s); height: var(--s); border-radius: 50%; border: 3px solid var(--c); background: transparent; padding: 0; display: grid; place-items: center;
  transition: transform .18s var(--ease), background .2s, box-shadow .2s; animation: enter .4s var(--ease) both; animation-delay: calc(var(--n, 0) * 40ms); }
.dot i { width: 40%; height: 40%; border-radius: 50%; background: var(--c); opacity: 0; transform: scale(.4); transition: .2s var(--ease); }
.d0 { --s: 50px; } .d1 { --s: 40px; } .d2 { --s: 30px; --c: #B7AEE0; } .d3 { --s: 40px; --c: var(--pole-b); } .d4 { --s: 50px; --c: var(--pole-b); }
.dot:hover { transform: scale(1.08); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 60%, transparent); }
.dot:hover i { opacity: .5; transform: scale(1); }
.dot.chosen { background: var(--c); box-shadow: 0 0 24px color-mix(in srgb, var(--c) 70%, transparent); transform: scale(1.1); }
.dot.chosen i { background: #fff; opacity: 1; transform: scale(1); }
.scale-label { text-align: center; min-height: 1.5em; color: var(--ink-soft); font-size: 14px; font-weight: 600; margin: 8px 0 0; }

/* ---------- Analyzing ---------- */
.analyzing { text-align: center; padding: 60px 0; }
.spinner { position: relative; width: 210px; height: 210px; margin: 0 auto 26px; animation: spin 6s linear infinite; }
.spinner span { position: absolute; left: 50%; top: 50%; width: 58px; margin: -31px 0 0 -29px; transform: rotate(calc(var(--i) * 51.43deg)) translateY(-80px) rotate(calc(var(--i) * -51.43deg)); }
.spinner svg { width: 100%; height: auto; animation: spin 6s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing h2 { margin: 0 0 6px; font-size: 24px; }
.analyzing p { margin: 0; color: var(--ink-soft); }

/* ---------- Result ---------- */
.shared-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--glass-2); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; margin-bottom: 14px; font-size: 14px; }
.shared-banner button { border: 0; background: #fff; color: var(--indigo-800); border-radius: 12px; padding: 8px 12px; font-weight: 700; flex: none; }
.stagger > * { animation: enter .6s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .15s; } .stagger > *:nth-child(3) { animation-delay: .25s; } .stagger > *:nth-child(4) { animation-delay: .35s; }
.stagger > *:nth-child(5) { animation-delay: .45s; } .stagger > *:nth-child(n+6) { animation-delay: .55s; }

.result-hero { text-align: center; padding: 6px 0 10px; }
.halo { position: relative; width: 190px; margin: 4px auto 10px; }
.halo > svg { position: relative; width: 100%; height: auto; filter: drop-shadow(0 0 34px color-mix(in srgb, var(--accent) 80%, transparent)); animation: float 4s ease-in-out infinite; }
.halo .ring { position: absolute; inset: -14px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--accent) 70%, #fff); opacity: .45; animation: spin 18s linear infinite; }
.halo .ring.r2 { inset: -30px; border-style: solid; border-width: 1px; opacity: .2; animation-duration: 30s; animation-direction: reverse; }
@keyframes float { 50% { transform: translateY(-8px); } }
.youare { color: var(--ink-soft); font-size: 15px; margin-top: 14px; }
.rname { font-size: clamp(44px, 13vw, 62px); line-height: 1.15; margin: 2px 0 6px; font-weight: 700; text-shadow: 0 0 30px color-mix(in srgb, var(--accent) 70%, transparent); }
.rtag { font-size: 18px; color: var(--lavender); margin: 0 0 14px; }
.match { display: inline-flex; gap: 6px; align-items: baseline; background: var(--glass-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px; font-size: 14px; color: var(--ink-soft); }
.match b { font-size: 20px; color: #fff; font-variant-numeric: tabular-nums; }

.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 14px; backdrop-filter: blur(10px); }
.card h3 { margin: 0 0 12px; font-size: 14px; color: var(--ink-mute); font-weight: 600; letter-spacing: 0; }
.card p { margin: 0; line-height: 1.85; font-size: 16px; color: #F1ECFF; }

.axis { padding: 10px 0 14px; }
.axis + .axis { border-top: 1px solid rgba(255, 255, 255, .07); }
.axis-labels { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; }
.axis-labels b { font-variant-numeric: tabular-nums; }
.axis-labels .na { color: var(--pole-a); } .axis-labels .nb { color: var(--pole-b); }
.axis-bar { position: relative; display: flex; height: 12px; border-radius: 99px; margin: 9px 0 6px; background: rgba(255,255,255,.08); }
.axis-bar i { display: block; height: 100%; }
.axis-bar .pa { background: linear-gradient(90deg, var(--pole-a), #b4a8ff); border-start-start-radius: 99px; border-end-start-radius: 99px; }
[dir="rtl"] .axis-bar .pa { background: linear-gradient(-90deg, var(--pole-a), #b4a8ff); }
.axis-bar .pb { background: linear-gradient(90deg, #ffc08f, var(--pole-b)); border-start-end-radius: 99px; border-end-end-radius: 99px; }
[dir="rtl"] .axis-bar .pb { background: linear-gradient(-90deg, #ffc08f, var(--pole-b)); }
.axis-bar .knob { position: absolute; top: 50%; width: 22px; height: 22px; margin-inline-start: -11px; transform: translateY(-50%); border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.18), 0 0 14px rgba(255,255,255,.7); }
.axis-lean { font-size: 12.5px; color: var(--ink-mute); text-align: center; }

.chips { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 999px; padding: 6px 13px; font-size: 14px; font-weight: 600; }

.card.super { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, var(--indigo-800)), var(--indigo-800)); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.card.super h3 { color: var(--lavender); }
.card.super p { font-size: 19px; font-weight: 700; color: #fff; }

.duo { display: grid; gap: 14px; }
.mini { display: flex; align-items: center; gap: 14px; }
.mini-badge { width: 58px; flex: none; }
.mini-badge svg { width: 100%; height: auto; display: block; }
.mini small { display: block; font-size: 12px; color: var(--ink-mute); }
.mini b { display: block; font-size: 17px; }
.mini em { display: block; font-style: normal; font-size: 13px; color: var(--ink-soft); }

.actions { display: grid; gap: 10px; margin-top: 18px; }
.actions .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.hih-line { display: flex; flex-direction: column; gap: 4px; margin: 18px 0 0; padding: 14px 16px; border-radius: 16px; text-decoration: none; background: rgba(255,255,255,.05); border: 1px dashed var(--line); color: var(--ink-soft); font-size: 13.5px; line-height: 1.7; }
.hih-line b { color: #fff; }
.hih-line em { font-style: normal; font-weight: 700; color: #fff; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: #fff; color: var(--indigo-800); padding: 12px 18px; border-radius: 14px; font-weight: 600; opacity: 0; transition: .3s var(--ease); pointer-events: none; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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

/* footer brand: hackathon logo + slogan */
.foot-brand { display: flex; align-items: center; justify-content: center; gap: 18px; }
.foot-brand img { height: 64px; width: auto; filter: drop-shadow(0 0 12px rgba(144, 56, 255, .6)); }
.foot-calli { height: 44px !important; padding-inline-start: 18px; border-inline-start: 1px solid var(--line); filter: none !important; }

/* ===== UX audit fixes ===== */
[lang="en"] .hero-title { font-size: clamp(34px, 10vw, 54px); }
.rname { font-size: clamp(36px, 11vw, 62px); text-wrap: balance; }
[tabindex="-1"]:focus { outline: none; }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px #fff; }
.dot:focus-visible, .back:focus-visible, .lang-btn:focus-visible, .shared-banner button:focus-visible, a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.back { width: 44px; height: 44px; }
.lang-btn { min-height: 44px; min-width: 44px; }
.shared-banner button { min-height: 44px; }
.socials a { padding: 12px 4px; }
.axis-labels .na { color: #A99BFF; }
[dir="rtl"] .progress > i { background: linear-gradient(-90deg, #8F7BFF, #fff); }
[dir="rtl"] .ico-out { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .qmark { transform: scaleX(-1); }

/* Likert: five equal columns, each a 44px+ hit area with its own label (no clipped end labels) */
.scale { display: grid; grid-template-columns: repeat(5, 1fr); align-items: start; gap: 4px; margin: 28px 0 0; }
.opt-col { display: grid; justify-items: center; gap: 8px; }
.dot { min-width: 44px; min-height: 44px; }
.d0, .d4 { --s: 52px; } .d1, .d3 { --s: 46px; } .d2 { --s: 44px; }
.dot-lbl { font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.35; color: var(--ink-soft); }
.opt-col:nth-child(-n+2) .dot-lbl { color: #C9BFFF; }
.opt-col:nth-child(n+4) .dot-lbl { color: #FFC08F; }
.dot.d2 { border-width: 3px; }
.dot { position: relative; background: transparent; }
.comb-title { margin: 14px 0 6px; }
.comb { margin-bottom: 14px; }
.hero-sub { margin-bottom: 14px; }
.hero-title { margin-top: 12px; }
