/* IMDAD X internship application (Acid Teal identity) */
:root {
  --teal: #0B4550; --teal-70: #547D84; --teal-40: #9DB5B9; --teal-15: #DAE3E5;
  --acid: #E6FF28; --off: #F1F1ED; --steel: #8A8D8F; --line: rgba(241,241,237,.14);
  --f: "Readex Pro", system-ui, sans-serif; --num: "Space Grotesk", "Readex Pro", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--teal); color: var(--off); font: 400 17px/1.7 var(--f); -webkit-font-smoothing: antialiased; overflow-x: hidden; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
button { font: inherit; color: inherit; }
kbd { font: 500 11px/1 var(--num); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; color: var(--teal-40); }

.bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.bg::before { content: ""; position: absolute; inset: 0; background: url("/assets/lattice-yellow.svg") 0 0 / 96px 96px repeat; opacity: .05; }
.bg-x { position: absolute; width: min(70vw, 720px); left: -18%; bottom: -26%; opacity: .07; transform: rotate(-8deg); }

.top { position: relative; z-index: 2; display: flex; align-items: center; gap: 28px; padding: 20px clamp(16px, 4vw, 40px); }
.brand img { display: block; width: 132px; height: auto; }
.steps { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 720px; margin-inline-start: auto; }
.seg { --p: 0; display: grid; gap: 8px; }
.seg i { display: block; height: 4px; border-radius: 4px; background: rgba(241,241,237,.15); overflow: hidden; position: relative; }
.seg i::after { content: ""; position: absolute; inset: 0; background: var(--acid); transform: scaleX(var(--p)); transform-origin: right; transition: transform .45s cubic-bezier(.2,.8,.2,1); }
.seg b { font-size: 12px; font-weight: 500; color: var(--teal-40); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.seg.on b { color: var(--off); }

.stage { position: relative; z-index: 1; flex: 1; display: grid; place-items: center; padding: 16px clamp(16px, 4vw, 40px) 120px; }
.card { width: 100%; max-width: 700px; }
.in .card { animation: inUp .5s cubic-bezier(.2,.8,.2,1) both; }
.in-back .card { animation: inDown .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes inUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes inDown { from { opacity: 0; transform: translateY(-28px); } to { opacity: 1; transform: none; } }
.shake { animation: shake .4s ease both !important; }
@keyframes shake { 20%, 60% { transform: translateX(8px); } 40%, 80% { transform: translateX(-8px); } }

/* intro */
.hero h1 { font: 700 clamp(38px, 7vw, 68px)/1.18 var(--f); margin: 0 0 18px; }
.kick { display: inline-block; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px; background: var(--acid); color: var(--teal); font-weight: 600; font-size: 14px; }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--teal-15); margin: 0 0 28px; max-width: 34em; }
.facts { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.facts li { border: 2px solid var(--line); border-radius: 18px; padding: 16px 14px; display: grid; gap: 2px; }
.facts b { font: 700 26px/1.2 var(--num); color: var(--acid); }
.facts li:nth-child(2) b { font-family: var(--f); font-size: 22px; }
.facts span { font-size: 13px; color: var(--teal-40); line-height: 1.4; }
.fine { font-size: 14px; color: var(--teal-40); margin: 0 0 24px; }
.tracks-mini { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
.tracks-mini span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); font-size: 14px; }
.tracks-mini svg { width: 18px; height: 18px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.start { display: inline-flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 32px; border: 0; border-radius: 999px; background: var(--acid); color: var(--teal); font-weight: 600; font-size: 18px; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .2s; }
.start:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(230,255,40,.6); }
.restart { margin-inline-start: 16px; background: none; border: 0; color: var(--teal-40); text-decoration: underline; cursor: pointer; font-size: 15px; }
.time { display: inline-block; margin-inline-start: 16px; font-size: 14px; color: var(--teal-40); }
.hp { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; }

/* notes */
.note { text-align: start; }
.tag { display: inline-block; font-size: 13px; color: var(--acid); border: 2px solid rgba(230,255,40,.4); border-radius: 999px; padding: 4px 12px; margin-bottom: 18px; }
.note h2 { font: 700 clamp(30px, 5vw, 48px)/1.3 var(--f); margin: 0 0 12px; }
.note p { font-size: 20px; color: var(--teal-15); margin: 0; max-width: 30em; }

/* questions */
.qnum { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.qnum span { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 10px; background: var(--acid); color: var(--teal); font: 700 16px/1 var(--num); }
.qnum em { font-style: normal; font-size: 13px; color: var(--teal-40); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.q { font: 600 clamp(24px, 3.6vw, 34px)/1.45 var(--f); margin: 0 0 8px; }
.sub { margin: 0 0 8px; color: var(--teal-40); font-size: 15px; }
.field { display: block; width: 100%; margin-top: 22px; background: transparent; border: 0; border-bottom: 2px solid rgba(241,241,237,.3); color: var(--off); font: 400 clamp(20px, 3vw, 26px)/1.5 var(--f); padding: 10px 2px; outline: none; transition: border-color .2s; border-radius: 0; }
.field::placeholder { color: rgba(241,241,237,.35); }
.field:focus { border-bottom-color: var(--acid); }
.field[dir="ltr"] { text-align: right; }
.area { border: 2px solid rgba(241,241,237,.25); border-radius: 18px; padding: 16px 18px; font-size: 18px; resize: vertical; min-height: 150px; }
.area:focus { border-color: var(--acid); }
.hint { margin: 14px 0 0; font-size: 13px; color: var(--teal-40); }
.err { min-height: 1.6em; margin: 14px 0 0; color: #FFB4B4; font-size: 15px; font-weight: 500; }

.choices { display: grid; gap: 10px; margin-top: 22px; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; text-align: start; padding: 16px 18px; border-radius: 16px; border: 2px solid var(--line); background: rgba(241,241,237,.04); cursor: pointer; font-size: 18px; transition: border-color .15s, background .15s, transform .15s; }
.choice:hover { border-color: rgba(230,255,40,.6); transform: translateX(-3px); }
.choice.sel { background: var(--acid); border-color: var(--acid); color: var(--teal); }
.choice.sel kbd { border-color: rgba(11,69,80,.3); color: var(--teal); }

.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.trk { position: relative; display: grid; gap: 4px; justify-items: start; text-align: start; padding: 20px; border-radius: 20px; border: 2px solid var(--line); background: rgba(241,241,237,.04); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.trk:hover { border-color: rgba(230,255,40,.6); transform: translateY(-3px); }
.trk .ti { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(230,255,40,.12); color: var(--acid); margin-bottom: 8px; }
.trk .ti svg { width: 24px; height: 24px; }
.trk b { font-size: 18px; font-weight: 600; }
.trk small { font-size: 14px; color: var(--teal-40); }
.trk kbd { position: absolute; top: 14px; left: 14px; }
.trk.sel { background: var(--acid); border-color: var(--acid); color: var(--teal); }
.trk.sel .ti { background: var(--teal); color: var(--acid); }
.trk.sel small, .trk.sel kbd { color: var(--teal); }

.about { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; background: rgba(241,241,237,.06); border: 2px solid var(--line); margin-bottom: 26px; }
.about-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--acid); color: var(--teal); }
.about-icon svg { width: 22px; height: 22px; }
.about b { display: block; font-size: 16px; margin-bottom: 4px; }
.about p { margin: 0; font-size: 15px; color: var(--teal-15); line-height: 1.75; }

.matrix { margin-top: 22px; display: grid; gap: 8px; }
.mx-head, .mx-row { display: grid; grid-template-columns: minmax(150px, 1.3fr) repeat(4, 1fr); gap: 6px; align-items: center; }
.mx-head span { font-size: 12px; color: var(--teal-40); text-align: center; }
.mx-row { padding: 6px; border-radius: 16px; border: 2px solid var(--line); transition: border-color .2s; }
.mx-row.done { border-color: rgba(230,255,40,.35); }
.mx-tool { font: 500 15px/1.3 var(--num); padding: 0 10px; text-align: right; }
.lv { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; border: 0; background: rgba(241,241,237,.05); cursor: pointer; transition: background .15s; }
.lv span { display: none; font-size: 12px; }
.lv:hover { background: rgba(230,255,40,.14); }
.lv.sel { background: var(--acid); color: var(--teal); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; direction: ltr; }
.bars em { width: 5px; border-radius: 2px; background: rgba(241,241,237,.25); }
.bars em:nth-child(1) { height: 6px; } .bars em:nth-child(2) { height: 11px; } .bars em:nth-child(3) { height: 16px; }
.b0 em { background: transparent; border: 1.5px solid rgba(241,241,237,.3); }
.b1 em:nth-child(-n+1), .b2 em:nth-child(-n+2), .b3 em { background: var(--acid); }
.lv.sel .bars em { background: var(--teal) !important; border-color: var(--teal); }
.lv.sel .b0 em { background: transparent !important; }

/* done */
.done { text-align: center; }
.done h1 { font: 700 clamp(36px, 6vw, 58px)/1.25 var(--f); margin: 10px 0 14px; }
.done .lead { margin-inline: auto; }
.close { font-weight: 600; color: var(--acid); font-size: 20px; margin: 0 0 30px; }
.burst { position: relative; width: 140px; height: 140px; margin: 0 auto; }
.burst img { position: absolute; inset: 22px; width: 96px; animation: pop .7s cubic-bezier(.2,1.6,.4,1) both; }
.burst i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--acid); animation: fly 1s ease-out both; }
.burst i:nth-child(odd) { background: var(--off); width: 6px; height: 6px; }
@keyframes pop { from { transform: scale(0) rotate(-30deg); } to { transform: none; } }
@keyframes fly { from { transform: rotate(var(--a)) translateX(0); opacity: 1; } to { transform: rotate(var(--a)) translateX(90px); opacity: 0; } }
.burst i:nth-child(1){--a:0deg}.burst i:nth-child(2){--a:30deg}.burst i:nth-child(3){--a:60deg}.burst i:nth-child(4){--a:90deg}.burst i:nth-child(5){--a:120deg}.burst i:nth-child(6){--a:150deg}.burst i:nth-child(7){--a:180deg}.burst i:nth-child(8){--a:210deg}.burst i:nth-child(9){--a:240deg}.burst i:nth-child(10){--a:270deg}.burst i:nth-child(11){--a:300deg}.burst i:nth-child(12){--a:330deg}

/* bottom nav */
.nav { position: fixed; z-index: 3; inset-inline: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 14px clamp(16px, 4vw, 40px); background: linear-gradient(to top, var(--teal) 60%, rgba(11,69,80,0)); }
.nav[hidden] { display: none; }
.back { background: none; border: 2px solid var(--line); border-radius: 999px; height: 50px; padding: 0 18px; cursor: pointer; color: var(--teal-15); }
.back:hover { border-color: var(--off); }
.count { margin-inline-start: auto; font: 500 14px/1 var(--num); color: var(--teal-40); }
.next { height: 54px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--acid); color: var(--teal); font-weight: 600; cursor: pointer; transition: transform .15s; }
.next:hover { transform: translateY(-2px); }
.next.send { padding: 0 34px; }
.next.busy { opacity: .7; pointer-events: none; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .top { flex-wrap: wrap; gap: 14px; padding-bottom: 6px; }
  .steps { flex-basis: 100%; }
  .seg b { display: none; }
  .seg.on b { display: block; position: absolute; }
  .steps { position: relative; padding-bottom: 18px; }
  .seg.on b { bottom: 0; inset-inline-start: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .tracks { grid-template-columns: 1fr; }
  .trk { grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
  .trk .ti { grid-row: span 2; margin: 0; }
  .mx-head { display: none; }
  .mx-row { grid-template-columns: repeat(4, 1fr); padding: 10px; }
  .mx-tool { grid-column: 1 / -1; padding: 0 2px 6px; }
  .lv span { display: block; }
  .stage { place-items: start center; padding-top: 18px; }
  .back span { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
