/* ==========================================================================
   DIXIIT JEE - public landing screen (#screen-home)
   Loads AFTER styles.css + theme.css so it reuses the same tokens.

   The nav + hero keep the fixed navy brand gradient (same language as
   .exam-topbar) so the logo-full-dark.png variant is always correct there;
   everything below the hero follows the light/dark theme variables.
   ========================================================================== */

/* the landing is public marketing copy, not exam material - let people select
   it (the global no-select rule in index.php stays on for the exam screens) */
#screen-home, #screen-home * {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

#screen-home { scroll-behavior: smooth; }
.hm-wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }
#screen-home section[id] { scroll-margin-top: 84px; }

/* ============ nav ============
   Light theme is the base, dark theme overrides follow each block. The nav
   logo swaps between the light/dark artwork in auth.js via .hm-logo-img. */
.hm-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .hm-nav {
  background: rgba(8, 20, 48, .82);
  border-bottom-color: rgba(255, 255, 255, .09);
}
.hm-nav-in { display: flex; align-items: center; gap: 22px; height: 66px; }
.hm-logo { display: flex; align-items: center; flex-shrink: 0; }
.hm-logo img { height: 36px; max-width: 168px; object-fit: contain; display: block; }
.hm-links { display: flex; gap: 26px; margin-left: auto; }
.hm-links a {
  color: var(--text-soft); text-decoration: none; font-size: 14.5px; font-weight: 500;
  position: relative; padding: 4px 0; transition: color .18s;
}
.hm-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--primary); transition: right .25s ease;
}
.hm-links a:hover { color: var(--primary); }
.hm-links a:hover::after { right: 0; }
[data-theme="dark"] .hm-links a { color: #c7d5ee; }
[data-theme="dark"] .hm-links a:hover { color: #fff; }
.hm-nav-cta { display: flex; align-items: center; gap: 14px; margin-left: 4px; }

/* theme toggle: the same sun/moon pill the student dashboard uses, so the
   landing reads as part of the product instead of a separate marketing page.
   Scoped to #screen-home - the original rules live in a mobile-only media
   query in index.php and must not be touched. */
#screen-home .theme-switch {
  position: relative; width: 54px; height: 29px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--border-strong); background: #dde5f2; padding: 0;
  display: inline-flex; align-items: center; flex: 0 0 auto;
  transition: border-color .18s, box-shadow .18s;
}
#screen-home .theme-switch:hover { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
[data-theme="dark"] #screen-home .theme-switch { background: #131c3d; border-color: rgba(148, 163, 184, .4); }
[data-theme="dark"] #screen-home .theme-switch:hover { border-color: rgba(148, 163, 184, .75); box-shadow: 0 0 0 4px rgba(148, 163, 184, .1); }
#screen-home .ts-icon { width: 27px; display: inline-flex; align-items: center; justify-content: center; }
#screen-home .ts-sun { color: #e8a317; }
#screen-home .ts-moon { color: #64748b; }
[data-theme="dark"] #screen-home .ts-sun { color: #f8df8b; }
[data-theme="dark"] #screen-home .ts-moon { color: #9fb0d8; }
#screen-home .ts-knob {
  position: absolute; top: 2px; left: 2px; width: 23px; height: 23px; border-radius: 50%;
  background: linear-gradient(135deg, #f8df8b, #f0b429 70%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .28s cubic-bezier(.3, 1.2, .4, 1); transform: translateX(25px);
}
#screen-home .theme-switch.light .ts-knob { transform: translateX(0); }

/* ============ buttons ============ */
.hm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 11px; font-size: 14.5px; font-weight: 650;
  border: 1px solid transparent; text-decoration: none; white-space: nowrap;
  /* background is deliberately NOT transitioned: the ghost button's fill differs
     between themes, and animating it makes the theme toggle flash */
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.hm-btn:active { transform: translateY(1px); }
.hm-btn-primary {
  background: #1d4ed8;
  color: #fff; box-shadow: 0 2px 6px rgba(29, 78, 216, .22);
}
.hm-btn-primary:hover { background: #1e40af; box-shadow: 0 3px 10px rgba(29, 78, 216, .28); }
[data-theme="dark"] .hm-btn-primary { background: #2563eb; }
[data-theme="dark"] .hm-btn-primary:hover { background: #3b82f6; }
.hm-btn-ghost {
  background: var(--bg-2); color: var(--text);
  border-color: var(--border-strong);
}
.hm-btn-ghost:hover { background: var(--bg-2); border-color: var(--primary); color: var(--primary); }
[data-theme="dark"] .hm-btn-ghost {
  background: rgba(255, 255, 255, .06); color: #e6eeff;
  border-color: rgba(255, 255, 255, .22);
}
[data-theme="dark"] .hm-btn-ghost:hover {
  background: rgba(255, 255, 255, .11); color: #fff;
  border-color: rgba(255, 255, 255, .32);
}
.hm-btn-lg { padding: 14px 28px; font-size: 15.5px; border-radius: 13px; }

/* ============ hero ============ */
.hm-hero {
  position: relative; overflow: hidden;
  padding: 74px 0 86px;
  background: linear-gradient(180deg, #f8fafd 0%, #eef2f8 100%);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .hm-hero {
  background: linear-gradient(180deg, #0a142c 0%, #0c1a38 100%);
  border-bottom-color: rgba(255, 255, 255, .07);
}
.hm-hero-in { position: relative; text-align: center; max-width: 860px; margin-inline: auto; }
.hm-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: 999px; margin-bottom: 22px;
  background: rgba(37, 99, 235, .08); border: 1px solid rgba(37, 99, 235, .24);
  color: #1d4ed8; font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
.hm-pill b { color: #b45309; font-weight: 700; }
[data-theme="dark"] .hm-pill {
  background: rgba(96, 165, 250, .12); border-color: rgba(96, 165, 250, .32); color: #bfdbfe;
}
[data-theme="dark"] .hm-pill b { color: #fcd34d; }
.hm-hero h1 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: clamp(30px, 5.2vw, 52px); line-height: 1.14; font-weight: 800;
  letter-spacing: -.025em; color: #0f172a; margin: 0 0 18px;
}
[data-theme="dark"] .hm-hero h1 { color: #fff; }
.hm-grad {
  color: #1d4ed8;
}
[data-theme="dark"] .hm-grad {
  color: #7fb2fb;
}
.hm-lead {
  font-size: clamp(15px, 1.9vw, 17.5px); line-height: 1.72;
  color: var(--text-soft); margin: 0 auto 30px; max-width: 660px;
}
[data-theme="dark"] .hm-lead { color: #b9c8e4; }
.hm-cta { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; }
.hm-note { margin-top: 16px; font-size: 13px; color: var(--text-mute); }
[data-theme="dark"] .hm-note { color: #8fa3c6; }

/* hero stat strip */
.hm-stats {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; margin-top: 54px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  box-shadow: none;
}
.hm-stat { background: var(--bg-2); padding: 20px 12px; text-align: center; }
.hm-stat b {
  display: block; font-family: 'Sora', sans-serif; font-size: 24px; font-weight: 800;
  color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.hm-stat span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--text-mute); }
[data-theme="dark"] .hm-stats {
  background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .12); box-shadow: none;
}
[data-theme="dark"] .hm-stat { background: rgba(6, 15, 38, .72); }
[data-theme="dark"] .hm-stat b { color: #fff; }
[data-theme="dark"] .hm-stat span { color: #93a7c9; }

/* ============ generic section ============ */
.hm-sec { padding: 76px 0; }
.hm-sec-alt { background: var(--bg-3); }
.hm-head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.hm-kicker {
  display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 11px;
}
.hm-head h2 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: clamp(23px, 3.4vw, 33px); font-weight: 700; letter-spacing: -.02em;
  color: var(--text); margin: 0 0 12px; line-height: 1.25;
}
.hm-head p { color: var(--text-soft); margin: 0; font-size: 15.5px; line-height: 1.68; }

/* ============ feature cards ============ */
.hm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hm-card {
  position: relative; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 18px; padding: 28px 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.hm-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--primary);
  opacity: 0; transition: opacity .2s;
}
.hm-card:hover { border-color: var(--border-strong); box-shadow: 0 2px 10px rgba(15, 23, 42, .06); }
.hm-card:hover::before { opacity: 1; }
.hm-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(37, 99, 235, .09);
  color: var(--primary); margin-bottom: 16px;
}
.hm-card h3 { font-size: 16.5px; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.hm-card p { margin: 0; font-size: 14.2px; line-height: 1.68; color: var(--text-soft); }

/* ============ how it works ============ */
.hm-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.hm-step { position: relative; padding-top: 8px; }
.hm-step-n {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 17px; color: #fff;
  background: #1d4ed8; margin-bottom: 15px;
}
/* dotted connector between steps (desktop only) */
.hm-step:not(:last-child)::after {
  content: ""; position: absolute; top: 30px; left: 56px; right: -10px; height: 2px;
  background-image: linear-gradient(90deg, var(--border-strong) 55%, transparent 55%);
  background-size: 9px 2px;
}
.hm-step h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 7px; color: var(--text); }
.hm-step p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-soft); }

/* ============ question-type / marking cards ============ */
.hm-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hm-type {
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 18px;
  padding: 26px; transition: transform .2s ease, box-shadow .2s ease;
}
/* pin the marking chips to the bottom so all three cards line up */
.hm-type p { flex: 1 1 auto; }
.hm-type:hover { border-color: var(--border-strong); }
.hm-tag {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; margin-bottom: 14px;
  background: #1d4ed8; color: #fff;
}
.hm-tag.msq { background: #6d28d9; }
.hm-tag.nat { background: #b45309; }
.hm-type h3 { font-size: 16px; font-weight: 700; margin: 0 0 9px; color: var(--text); }
.hm-type p { margin: 0 0 14px; font-size: 14.2px; line-height: 1.65; color: var(--text-soft); }
.hm-mark {
  display: flex; flex-wrap: wrap; gap: 7px; padding-top: 14px;
  border-top: 1px dashed var(--border-strong);
}
.hm-mark span {
  font-size: 12.5px; font-weight: 650; padding: 4px 10px; border-radius: 7px;
  background: var(--bg-3); color: var(--text-soft); font-variant-numeric: tabular-nums;
}
.hm-mark span.pos { background: var(--success-soft); color: var(--success); }
.hm-mark span.neg { background: var(--danger-soft); color: var(--danger); }

/* ============ FAQ (native accordion, no JS) ============ */
.hm-faq { max-width: 780px; margin-inline: auto; }
.hm-faq details {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
  margin-bottom: 12px; overflow: hidden; transition: border-color .18s;
}
.hm-faq details[open] { border-color: var(--primary); }
.hm-faq summary {
  list-style: none; cursor: pointer; padding: 17px 52px 17px 20px; position: relative;
  font-size: 15.2px; font-weight: 650; color: var(--text);
}
.hm-faq summary::-webkit-details-marker { display: none; }
.hm-faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; line-height: 1; color: var(--primary); transition: transform .2s;
}
.hm-faq details[open] summary::after { content: "\2212"; }
.hm-faq summary:hover { color: var(--primary); }
.hm-faq .hm-ans { padding: 0 20px 18px; margin: 0; font-size: 14.4px; line-height: 1.72; color: var(--text-soft); }

/* ============ closing CTA ============ */
/* sits between the tinted FAQ band and the footer, so it needs real clearance
   above it - without this the dark card butts straight into the FAQ band */
.hm-sec-cta { padding-top: 72px; padding-bottom: 84px; }
.hm-final {
  position: relative; text-align: center;
  padding: 56px 30px; border-radius: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
}
.hm-final h2 {
  font-family: 'Sora', 'Inter', sans-serif; font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 700; color: var(--text); margin: 0 0 12px; letter-spacing: -.02em;
}
.hm-final p { color: var(--text-soft); margin: 0 auto 26px; max-width: 520px; font-size: 15.2px; line-height: 1.68; }

/* ============ footer ============ */
.hm-foot { background: #060e22; color: #93a7c9; padding: 54px 0 30px; }
/* three real columns rather than flex space-between, which left a dead gap
   in the middle of the row on wide screens */
.hm-foot-in {
  display: grid; align-items: start; gap: 40px;
  grid-template-columns: minmax(0, 1.7fr) minmax(130px, 1fr) minmax(130px, 1fr);
}
.hm-foot img { height: 34px; max-width: 160px; object-fit: contain; margin-bottom: 14px; display: block; }
.hm-foot-brand p { margin: 0; font-size: 13.5px; line-height: 1.75; max-width: 340px; }
.hm-foot-col h4 { color: #e2ebfa; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; margin: 4px 0 14px; }
.hm-foot-col a { display: block; color: #93a7c9; text-decoration: none; font-size: 13.8px; margin-bottom: 10px; transition: color .16s; }
.hm-foot-col a:last-child { margin-bottom: 0; }
.hm-foot-col a:hover { color: #60a5fa; }
.hm-foot-bot {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.hm-foot-bot a { color: #93a7c9; text-decoration: none; }
.hm-foot-bot a:hover { color: #60a5fa; text-decoration: underline; }

/* ============ responsive ============ */
/* --- laptop / small desktop --- */
@media (max-width: 1080px) {
  .hm-links { gap: 20px; }
  .hm-sec { padding: 68px 0; }
}

/* --- tablet landscape --- */
@media (max-width: 980px) {
  .hm-grid, .hm-types { grid-template-columns: repeat(2, 1fr); }
  .hm-steps { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  /* the dotted connector only makes sense between items on the same row */
  .hm-step:nth-child(2n)::after { display: none; }
  .hm-foot-in { grid-template-columns: minmax(0, 1.4fr) minmax(120px, 1fr) minmax(120px, 1fr); gap: 32px; }
}

/* --- tablet portrait: nav links collapse to the login button --- */
@media (max-width: 780px) {
  .hm-links { display: none; }
  .hm-nav-in { height: 60px; gap: 12px; }
  .hm-nav-cta { margin-left: auto; }
  .hm-hero { padding: 56px 0 64px; }
  .hm-sec { padding: 60px 0; }
  .hm-head { margin-bottom: 38px; }
  .hm-stats { grid-template-columns: repeat(2, 1fr); margin-top: 44px; }
  .hm-final { padding: 48px 24px; }
  .hm-foot-in { grid-template-columns: 1fr 1fr; gap: 34px 28px; }
  .hm-foot-brand { grid-column: 1 / -1; }
}

/* --- phones --- */
@media (max-width: 560px) {
  .hm-wrap { width: calc(100% - 32px); }
  .hm-grid, .hm-types, .hm-steps { grid-template-columns: 1fr; }
  .hm-steps { row-gap: 28px; }
  .hm-step:not(:last-child)::after { display: none; }
  .hm-hero { padding: 44px 0 54px; }
  .hm-sec { padding: 52px 0; }
  .hm-cta { flex-direction: column; }
  .hm-cta .hm-btn { width: 100%; }
  .hm-card { padding: 24px 20px; }
  .hm-type { padding: 22px 20px; }
  .hm-faq summary { padding: 15px 46px 15px 17px; font-size: 14.6px; }
  .hm-faq .hm-ans { padding: 0 17px 16px; }
  .hm-final { padding: 40px 20px; border-radius: 20px; }
  .hm-foot { padding: 44px 0 26px; }
  .hm-foot-bot { flex-direction: column; gap: 8px; margin-top: 32px; }
}

/* --- very narrow phones: keep the stat strip readable --- */
@media (max-width: 380px) {
  .hm-stats { grid-template-columns: 1fr; }
  .hm-nav-in { gap: 8px; }
  .hm-logo img { max-width: 128px; }
}

/* respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hm-card, .hm-type, .hm-btn { transition: none; }
  .hm-card:hover, .hm-type:hover, .hm-btn:hover { transform: none; }
}
