/* ============================================================
   eSewak v3.6 — Home, Login, Register-chooser pages
   File: /assets/css/home.css   (theme-mc.css ke baad load karein)
   Font: "Baloo 2" (headings, Devanagari bhi) + Poppins (body)
   ============================================================ */

.hm { background: var(--mc-paper); color: var(--mc-ink); font-family: 'Poppins', system-ui, sans-serif; }
.hm h1, .hm h2, .hm h3, .hm .hm-logo { font-family: 'Baloo 2', 'Poppins', sans-serif; letter-spacing: -0.01em; }
.hm a { color: inherit; }
.hm-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.hm-head { position: sticky; top: 0; z-index: 50; background: rgba(251, 251, 254, .92); backdrop-filter: blur(10px); border-bottom: 1px solid #e7e8f2; }
.hm-head .hm-wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.hm-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--mc-ink); }
.hm-logo img { width: 36px; height: 36px; border-radius: 10px; }
.hm-logo b { font-weight: 800; }
.hm-head nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hm-head .hm-link { text-decoration: none; font-size: .9rem; font-weight: 500; padding: 8px 10px; border-radius: 8px; color: #43465e; }
.hm-head .hm-link:hover { background: #eef0f8; }
@media (max-width: 560px) {
  .hm-head .hm-link { display: none; }
  .hm-logo { font-size: 1.35rem; }
  .hm-head nav .btn { padding: 7px 12px; font-size: .82rem; }
}

/* ---------- Hero ---------- */
.hm-hero { padding: 56px 0 40px; overflow: hidden; }
.hm-hero .hm-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: center; }
.hm-hero h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); line-height: 1.02; font-weight: 800; margin: 0 0 10px; color: var(--mc-ink); }
.hm-hi { font-family: 'Baloo 2', 'Poppins', sans-serif; font-size: clamp(1.05rem, 2vw, 1.3rem); font-weight: 600; color: #4a4d68; margin: 0 0 16px; }
.hm-lead { font-size: 1.04rem; line-height: 1.65; color: #3d4058; max-width: 34em; margin: 0 0 26px; }
.hm-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hm-cta .btn { min-width: 180px; padding: 13px 24px; font-size: 1.02rem; border-radius: 14px; }
.hm-note { margin: 14px 0 0; font-size: .85rem; color: #6a6d85; }
.hm-welcome { display: none; margin: 0 0 18px; padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid #e3e5f0; font-size: .92rem; }
.hm-welcome.show { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }

/* Chakra: 6 role rang ka ghoomta chakra, beech me eSewak, bahar 6 app icons */
.hm-chakra { position: relative; width: min(420px, 86vw); aspect-ratio: 1; margin: 0 auto; }
.hm-ring {
  position: absolute; inset: 17%; border-radius: 50%;
  background: conic-gradient(var(--mc-customer) 0 60deg, var(--mc-shop) 0 120deg, var(--mc-worker) 0 180deg,
                             var(--mc-rider) 0 240deg, var(--mc-supervisor) 0 300deg, var(--mc-admin) 0 360deg);
  -webkit-mask: radial-gradient(circle, transparent 57%, #000 58%);
  mask: radial-gradient(circle, transparent 57%, #000 58%);
  animation: hmTurn 48s linear infinite;
}
.hm-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(transparent 0 59deg, var(--mc-paper) 59deg 60deg); }
@keyframes hmTurn { to { transform: rotate(360deg); } }
.hm-core {
  position: absolute; inset: 32.5%; border-radius: 50%; background: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 40px -14px rgba(26, 27, 46, .35); text-align: center;
}
.hm-core img { width: 46%; border-radius: 22%; }
.hm-core span { display: block; font-family: 'Baloo 2', 'Poppins', sans-serif; font-weight: 800; font-size: clamp(.95rem, 2.2vw, 1.2rem); margin-top: 2px; }
.hm-orb {
  position: absolute; width: 21%; aspect-ratio: 1; left: 39.5%; top: 39.5%;
  transform: rotate(var(--r)) translate(0, calc(min(420px, 86vw) * -0.395)) rotate(calc(-1 * var(--r)));
  display: grid; place-items: center; text-decoration: none; border-radius: 26%;
  transition: transform .25s ease, filter .25s ease;
}
.hm-orb img { width: 100%; height: 100%; border-radius: 24%; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .45); }
.hm-orb:hover, .hm-orb:focus-visible { filter: saturate(1.2); transform: rotate(var(--r)) translate(0, calc(min(420px, 86vw) * -0.395)) rotate(calc(-1 * var(--r))) scale(1.1); outline: none; }
.hm-orb em { position: absolute; bottom: -1.5em; left: 50%; transform: translateX(-50%); font-style: normal; font-size: .72rem; font-weight: 600; white-space: nowrap; color: #4a4d68; }
@media (prefers-reduced-motion: reduce) { .hm-ring { animation: none; } }
@media (max-width: 860px) {
  .hm-hero { padding: 32px 0 24px; }
  .hm-hero .hm-wrap { grid-template-columns: 1fr; text-align: center; }
  .hm-lead { margin-left: auto; margin-right: auto; }
  .hm-cta { justify-content: center; }
  .hm-cta .btn { flex: 1 1 150px; min-width: 0; }
  .hm-chakra { width: min(340px, 82vw); margin-top: 28px; }
  .hm-orb { transform: rotate(var(--r)) translate(0, calc(min(340px, 82vw) * -0.395)) rotate(calc(-1 * var(--r))); }
  .hm-orb:hover, .hm-orb:focus-visible { transform: rotate(var(--r)) translate(0, calc(min(340px, 82vw) * -0.395)) rotate(calc(-1 * var(--r))) scale(1.1); }
}

/* ---------- Sections ---------- */
.hm-sec { padding: 52px 0; }
.hm-sec + .hm-sec { padding-top: 12px; }
.hm-sec h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; margin: 0 0 6px; line-height: 1.1; }
.hm-sec .hm-sub { margin: 0 0 24px; color: #5a5d76; max-width: 40em; }

/* Role cards — har card apne role ke rang me */
.hm-roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .hm-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .hm-roles { grid-template-columns: 1fr; } }
.hm-role {
  --c: var(--mc-customer);
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 22px 18px 18px; border-radius: 18px; background: #fff;
  border: 1px solid #e6e7f1; border-top: 6px solid var(--c);
}
.hm-role[data-role="shop"] { --c: var(--mc-shop); }
.hm-role[data-role="worker"] { --c: var(--mc-worker); }
.hm-role[data-role="rider"] { --c: var(--mc-rider); }
.hm-role img { width: 54px; height: 54px; border-radius: 14px; }
.hm-role h3 { margin: 4px 0 0; font-size: 1.35rem; font-weight: 800; color: var(--c); }
.hm-role p { margin: 0; font-size: .9rem; line-height: 1.5; color: #4a4d68; flex: 1; }
.hm-role .hm-role-act { display: flex; gap: 8px; margin-top: 8px; }
.hm-role .hm-role-act .btn { flex: 1; border-radius: 10px; }
.hm-staff { margin: 18px 0 0; font-size: .9rem; color: #5a5d76; }
.hm-staff a { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--mc-supervisor); }
.hm-staff a + a { border-bottom-color: var(--mc-admin); margin-left: 10px; }

/* Steps — asli kram (1 → 2 → 3) */
.hm-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: s; list-style: none; margin: 0; padding: 0; }
@media (max-width: 760px) { .hm-steps { grid-template-columns: 1fr; gap: 18px; } }
.hm-steps li { counter-increment: s; position: relative; padding: 0 22px 0 64px; }
.hm-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-family: 'Baloo 2', 'Poppins', sans-serif; font-size: 1.4rem; font-weight: 800; color: #fff;
  background: var(--c, var(--mc-customer));
}
.hm-steps li:nth-child(1) { --c: var(--mc-customer); }
.hm-steps li:nth-child(2) { --c: var(--mc-worker); }
.hm-steps li:nth-child(3) { --c: var(--mc-shop); }
.hm-steps h3 { margin: 6px 0 4px; font-size: 1.15rem; font-weight: 700; }
.hm-steps p { margin: 0; font-size: .9rem; color: #4a4d68; line-height: 1.55; }

/* Apps row */
.hm-apps { display: flex; flex-wrap: wrap; gap: 10px; }
.hm-app { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 14px; background: #fff; border: 1px solid #e6e7f1; text-decoration: none; font-weight: 600; font-size: .9rem; }
.hm-app:hover { border-color: var(--mc-customer); }
.hm-app img { width: 38px; height: 38px; border-radius: 10px; }

/* Footer */
.hm-foot { margin-top: 40px; background: var(--mc-ink); color: #c9cbe0; }
.hm-foot .hm-wrap { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; padding-top: 22px; padding-bottom: 26px; font-size: .88rem; }
.hm-foot a { color: #fff; text-decoration: none; }
.hm-foot a:hover { text-decoration: underline; }
.hm-foot .hm-copy { margin-left: auto; }

/* ============================================================
   LOGIN + REGISTER: role chooser
   ============================================================ */
.hm-auth { padding: 36px 0 20px; }
.hm-auth .hm-wrap { max-width: 760px; }
.hm-auth h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; margin: 0 0 4px; }
.hm-auth .hm-sub { margin: 0 0 20px; color: #5a5d76; }
.hm-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 20px; }
@media (max-width: 560px) { .hm-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hm-pick button, .hm-pick a {
  --c: var(--mc-customer);
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px;
  background: #fff; border: 2px solid #e3e5f0; cursor: pointer; font: inherit; font-weight: 600; font-size: .92rem;
  color: var(--mc-ink); text-align: left; text-decoration: none; transition: border-color .15s, background .15s, transform .15s;
}
.hm-pick img { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; }
.hm-pick small { display: block; font-weight: 400; font-size: .74rem; color: #6a6d85; }
.hm-pick [data-role="shop"] { --c: var(--mc-shop); }
.hm-pick [data-role="worker"] { --c: var(--mc-worker); }
.hm-pick [data-role="rider"] { --c: var(--mc-rider); }
.hm-pick [data-role="supervisor"] { --c: var(--mc-supervisor); }
.hm-pick [data-role="admin"] { --c: var(--mc-admin); }
.hm-pick button:hover, .hm-pick a:hover { border-color: var(--c); transform: translateY(-1px); }
.hm-pick [aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, #fff); box-shadow: inset 0 0 0 1px var(--c); }
.hm-pick button:focus-visible, .hm-pick a:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; }

.hm-card { background: #fff; border: 1px solid #e3e5f0; border-radius: 20px; padding: 24px; border-top: 6px solid var(--c, var(--mc-customer)); }
.hm-card h2 { margin: 0 0 14px; font-family: 'Baloo 2', 'Poppins', sans-serif; font-size: 1.4rem; font-weight: 800; }
.hm-card .btn-lg { border-radius: 12px; }
.hm-alt { margin-top: 16px; padding-top: 14px; border-top: 1px dashed #dfe1ec; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: .9rem; }
.hm-tabs { display: flex; gap: 6px; margin: 0 0 14px; }
.hm-tabs button { flex: 1; padding: 8px; border-radius: 10px; border: 1px solid #e3e5f0; background: #f4f5fa; font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; }
.hm-tabs button[aria-selected="true"] { background: #fff; border-color: var(--c, var(--mc-customer)); color: var(--c, var(--mc-customer)); }

/* Register pages ke upar role switch bar (installed role app me chhupta hai) */
.rs-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 10px; border-radius: 14px; background: #fff; border: 1px solid #e3e5f0; }
.rs-bar span { width: 100%; font-size: .8rem; font-weight: 600; color: #5a5d76; }
.rs-bar a {
  --c: var(--mc-customer);
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 2px solid #e3e5f0; text-decoration: none; font-size: .86rem; font-weight: 600; color: var(--mc-ink); background: #fff;
}
.rs-bar a img { width: 22px; height: 22px; border-radius: 6px; }
.rs-bar a[data-role="shop"] { --c: var(--mc-shop); }
.rs-bar a[data-role="worker"] { --c: var(--mc-worker); }
.rs-bar a[data-role="rider"] { --c: var(--mc-rider); }
.rs-bar a:hover { border-color: var(--c); }
.rs-bar a[aria-current="page"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); }

/* Password dikhayein button + chetavni (role-app.css jaisa, yahan bhi) */
.hm .ra-pw { position: relative; }
.hm .ra-pw .input { padding-right: 44px; }
.hm .ra-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; font-size: 1.05rem; padding: 6px; }
.hm .ra-warn { background: #fff8e6 !important; border-color: #f3c96b !important; }
.hm .hidden { display: none !important; }
.hm .hm-chakra { margin-bottom: .5em; }

/* ---------- v3.7: logo + bhasha ---------- */
.hm-logo .brand-logo { width: auto; height: 46px; border-radius: 0; }
.hm-head nav { gap: 10px; }
.hm[lang="hi"] h1, html[lang="hi"] .hm h1 { line-height: 1.15; }
html[lang="hi"] .hm .hm-lead, html[lang="hi"] .hm .hm-sub, html[lang="hi"] .hm-role p, html[lang="hi"] .hm-steps p { line-height: 1.75; }
@media (max-width: 640px) {
  .hm-hide-sm { display: none !important; }
  .hm-logo .brand-logo { height: 36px; }
  .hm-head .lang-sw button { padding: 6px 8px; }
}

/* ---------- v3.9: login page ka type header ---------- */
.lg-type { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.lg-type img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .35); }
.lg-type h1 { margin: 0; color: var(--rt-ink, var(--mc-ink)); }
.hm-card { border-top-color: var(--rt, var(--c, var(--mc-customer))) !important; }
body.hm[data-role-theme] { background: var(--rt-bg) !important; }
body.hm[data-role-theme] .hm-head { background: color-mix(in srgb, var(--rt-bg) 88%, transparent); border-bottom-color: var(--rt-bg2); }
#ls-holder .ls-gear { width: 40px; height: 40px; }

/* ---------- v3.12: Registration type — Basic details ke upar ek line ---------- */
.rs-bar.rs-line { flex-wrap: nowrap; align-items: center; gap: 10px; margin: 4px 0 14px; padding: 8px 10px; overflow: hidden; }
.rs-bar.rs-line .rs-label { width: auto; flex-shrink: 0; white-space: nowrap; font-size: .82rem; font-weight: 700; color: var(--rt-ink, #3a3d56); }
.rs-bar.rs-line .rs-chips { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding: 2px; width: auto; font-size: inherit; font-weight: inherit; color: inherit; -webkit-overflow-scrolling: touch; }
.rs-bar.rs-line .rs-chips a, .rs-bar.rs-line .rs-chips b { flex-shrink: 0; white-space: nowrap; padding: 5px 10px; font-size: .82rem; }
.rs-bar.rs-line .rs-chips b { --c: var(--mc-customer); display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); }
.rs-bar.rs-line .rs-chips b[data-role="shop"] { --c: var(--mc-shop); }
.rs-bar.rs-line .rs-chips b[data-role="worker"] { --c: var(--mc-worker); }
.rs-bar.rs-line .rs-chips b[data-role="rider"] { --c: var(--mc-rider); }
.rs-bar.rs-line .rs-chips img { width: 20px; height: 20px; border-radius: 6px; }
.rs-bar.rs-line span[data-l] { width: auto; font-size: inherit; font-weight: inherit; color: inherit; }
@media (max-width: 480px) { .rs-bar.rs-line { flex-direction: row; } .rs-bar.rs-line .rs-label { font-size: .75rem; } }
/* v3.12: chips chhote — icon sirf chune hue type par, taaki ek line me aa jaye */
.rs-bar.rs-line .rs-chips a:not([aria-current]) img { display: none; }
.rs-bar.rs-line .rs-chips a, .rs-bar.rs-line .rs-chips b { padding: 4px 9px; gap: 5px; }
.rs-bar.rs-line { gap: 8px; padding: 7px 8px; }
.rs-bar.rs-line .rs-label { font-size: .76rem; }
.rs-bar.rs-line .rs-chips { gap: 4px; }
.rs-bar.rs-line .rs-chips a, .rs-bar.rs-line .rs-chips b { padding: 3px 8px; font-size: .78rem; border-width: 1.5px; }
@media (max-width: 480px) {
  .rs-bar.rs-line { gap: 6px; padding: 6px; }
  .rs-bar.rs-line .rs-label { font-size: .7rem; }
  .rs-bar.rs-line .rs-chips a, .rs-bar.rs-line .rs-chips b { padding: 3px 7px; font-size: .74rem; }
  .rs-bar.rs-line .rs-chips img { width: 16px; height: 16px; }
}
@media (max-width: 480px) { .rs-bar.rs-line .rs-chips img { display: none; } }

/* ---------- v3.14: chakra ke beech live analog ghadi ---------- */
/* Ring ka andar ka gol hissa (radius ≈ 26.6% chakra) = dial; beech me logo, upar suiyan */
.hm-clock-face, .hm-clock-hands { position: absolute; inset: 23.6%; width: 52.8%; height: 52.8%; overflow: visible; pointer-events: none; }
.hm-clock-face {
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #ffffff 0 55%, #f3f5fb 100%);
  box-shadow: inset 0 2px 10px rgba(26, 27, 46, .08);
}
.hm-tick-m { stroke: #b9bdd0; stroke-width: 1.4; stroke-linecap: round; }
.hm-tick-h { stroke-width: 3.6; stroke-linecap: round; }
.hm-chakra .hm-core { z-index: 1; }
.hm-clock-hands { z-index: 2; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .35)); }
.hm-hand { transform-origin: 100px 100px; transform-box: view-box; }
.hm-hand line { stroke-linecap: round; }
/* v3.15: radium jaisi chamakti suiyan — har sui alag rang */
.hm-hand-h { --lume: #7dff3f; --lume-deep: #0d6b00; }   /* ghanta: hara radium */
.hm-hand-m { --lume: #2ff3ff; --lume-deep: #0089b8; }   /* minute: aqua radium */
.hm-hand-s { --lume: #ff7a1f; --lume-deep: #e0221b; }   /* second: narangi-laal radium */
.hm-lume { fill: var(--lume); stroke: var(--lume-deep); stroke-width: 1.3; stroke-linejoin: round; }
.hm-hand-s line.hm-lume { stroke: var(--lume); stroke-width: 2; fill: none; }
.hm-lume-glow { fill: var(--lume); stroke: var(--lume); stroke-width: 3; opacity: .85; filter: url(#hmGlow); animation: hmLume 2.6s ease-in-out infinite; }
.hm-hand-s line.hm-lume-glow { stroke-width: 3.4; fill: none; }
.hm-hand-m .hm-lume-glow { animation-delay: -.9s; }
.hm-hand-s .hm-lume-glow { animation-delay: -1.7s; }
.hm-shine { stroke: rgba(255, 255, 255, .85); stroke-width: 1; stroke-linecap: round; }
.hm-hand-cap { fill: #fff; stroke: #1d1f33; stroke-width: .8; }
@keyframes hmLume { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.hm-num { font-family: 'Poppins', system-ui, sans-serif; font-weight: 800; font-size: 19px; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.hm-hand { transition: none; will-change: transform; }   /* v3.16: JS har frame par ghumata hai (smooth sweep) */
.hm-clock-hands.no-anim .hm-hand { transition: none; }
@media (prefers-reduced-motion: reduce) { .hm-hand { transition: none !important; } .hm-lume-glow { animation: none; opacity: .85; } }

/* ============================================================
   v4.1.0 — Bihar line, header Track Order, footer Contact us
   ============================================================ */
.hm-reach { margin: -12px 0 24px; font-size: .95rem; font-weight: 600; color: #1f5f3a; background: #eaf7ef; border: 1px solid #c9ead6; border-radius: 12px; padding: 8px 14px; display: inline-block; max-width: 34em; }
.hm-reach b { color: #b45309; }
/* Track Order mobile par bhi dikhe (baaki .hm-link chhupte hain) */
.hm-head .hm-link.hm-track { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #1d4ed8; }
@media (max-width: 560px) {
  .hm-head .hm-link.hm-track { display: inline-flex; padding: 7px 8px; }
  .hm-head .hm-track-t { display: none; }
}
.hm-foot .hm-contact-btn { background: none; border: 1px solid rgba(255,255,255,.45); color: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; cursor: pointer; }
.hm-foot .hm-contact-btn:hover { background: rgba(255,255,255,.12); }
@media (max-width: 900px) { .hm-reach { margin-left: auto; margin-right: auto; } }
