/* ==========================================================================
   TechForze Arcade, public + portal stylesheet
   Tokens mirror the existing techforze.in theme so the two sites feel identical.
   ========================================================================== */

:root {
  /* Shared with techforze.in (light corporate theme) */
  --paper: #f8fafc;
  --paper-2: #ffffff;
  --ink: #0b1220;
  --ink-soft: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #ff4d1c;
  --accent-soft: #fff1eb;
  --ok: #15803d;
  --bad: #b91c1c;
  --warn: #a16207;
  --info: #1d4ed8;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.025em; line-height: 1.15; margin: 0 0 .5em; font-weight: 800; color: var(--ink); }
h3, h4 { font-weight: 700; }
h1 { font-size: clamp(30px, 5vw, 52px); }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section--tight { padding: 32px 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ----------------------------------------------------------------- header */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head__inner { display: flex; align-items: center; gap: 22px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
.logo em { font-style: normal; color: var(--accent); }
.site-nav { display: flex; gap: 18px; margin-left: auto; }
.site-nav a { text-decoration: none; font-size: 14.5px; color: var(--ink-soft); padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-color: var(--line); }
.site-nav a[aria-current="page"] { border-color: var(--accent); }
.site-actions { display: flex; align-items: center; gap: 8px; }
.inline { display: inline; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; background: var(--ink); content: ""; position: relative;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 4px; }
/* ☰ morphs into ✕ while the menu is open. */
.nav-toggle__bars { transition: background-color .2s ease; }
.nav-toggle__bars::before, .nav-toggle__bars::after { transition: top .25s ease, transform .3s cubic-bezier(.5, 1.6, .4, 1); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background-color: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: -2px; transform: rotate(-45deg); }
.nav-toggle { transition: transform .15s ease, border-color .2s ease; }
.nav-toggle:active { transform: scale(.92); }

/* Menu panel slides down; its links follow one after another. */
.mobile-nav:not([hidden]) { animation: nav-in .28s cubic-bezier(.2, .8, .2, 1) both; transform-origin: top; }
.mobile-nav:not([hidden]) > * { animation: nav-item .35s ease both; }
.mobile-nav > *:nth-child(1) { animation-delay: .04s; }
.mobile-nav > *:nth-child(2) { animation-delay: .08s; }
.mobile-nav > *:nth-child(3) { animation-delay: .12s; }
.mobile-nav > *:nth-child(4) { animation-delay: .16s; }
.mobile-nav > *:nth-child(5) { animation-delay: .2s; }
.mobile-nav > *:nth-child(6) { animation-delay: .24s; }
.mobile-nav > *:nth-child(n+7) { animation-delay: .28s; }
.mobile-nav.is-closing { animation: nav-out .2s ease both; }
.mobile-nav.is-closing > * { animation: none; }
@keyframes nav-in { from { opacity: 0; transform: translateY(-10px) scaleY(.96); } to { opacity: 1; transform: none; } }
@keyframes nav-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-8px) scaleY(.97); } }
@keyframes nav-item { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .mobile-nav, .mobile-nav > *, .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { animation: none !important; transition: none !important; }
}
.mobile-nav { display: none; flex-direction: column; gap: 10px; padding: 12px 20px 20px; border-top: 1px solid var(--line); }
.mobile-nav[hidden] { display: none; }
@media (max-width: 900px) {
  .site-nav, .site-actions { display: none; }
  .nav-toggle { display: block; }
  .mobile-nav { display: flex; }
  .mobile-nav a { text-decoration: none; padding: 6px 0; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 600;
  font-size: 14.5px; cursor: pointer; transition: transform .12s ease, opacity .12s ease;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn--accent { background: var(--accent); border-color: var(--accent); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--sm { padding: 8px 14px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------------------- hero */
.hero { padding: 72px 0 48px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: auto -10% -60% 40%; height: 420px;
  background: radial-gradient(circle at 50% 50%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.hero__grid { display: grid; gap: 40px; grid-template-columns: 1.1fr .9fr; align-items: center; }
@media (max-width: 880px) { .hero__grid { grid-template-columns: 1fr; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--mono);
  text-transform: uppercase; letter-spacing: .12em; color: var(--accent);
  border: 1px solid var(--accent-soft); background: rgba(255, 77, 28, .06);
  padding: 7px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero p.lede { font-size: 18px; color: var(--muted); max-width: 54ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 34px; }
.hero__stats div strong { display: block; font-size: 28px; letter-spacing: -.03em; }
.hero__stats div span { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card--flat { box-shadow: none; }
.card__title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.program-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; transition: transform .14s ease, border-color .14s ease; }
.program-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.program-card h3 { margin: 0; }
.program-card__meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------ chips */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font: 600 11.5px/1.6 var(--mono); text-transform: uppercase; letter-spacing: .06em;
  background: rgba(14, 16, 20, .06); color: var(--ink-soft);
}
.badge--ok { background: rgba(18, 183, 106, .14); color: #0a7c48; }
.badge--warn { background: rgba(247, 144, 9, .16); color: #a45c00; }
.badge--bad { background: rgba(229, 72, 77, .14); color: #b42318; }
.badge--info { background: rgba(79, 107, 255, .14); color: #2b45c9; }
.badge--muted { background: rgba(14, 16, 20, .07); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ------------------------------------------------------------------ forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"],
input[type="number"], input[type="date"], input[type="datetime-local"], input[type="search"],
input[type="tel"], select, textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.is-invalid input, .is-invalid textarea, .is-invalid select { border-color: var(--bad); }
.error-text { color: var(--bad); font-size: 13px; margin-top: 5px; display: block; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-narrow { max-width: 460px; margin: 0 auto; }
.form-grid { display: grid; gap: 0 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 4px; }
.crumbs { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }

/* ----------------------------------------------------------------- alerts */
.flash { margin: 18px 0; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--paper-2); }
.flash--success { border-color: rgba(18, 183, 106, .4); background: rgba(18, 183, 106, .08); }
.flash--error { border-color: rgba(229, 72, 77, .4); background: rgba(229, 72, 77, .08); }
.flash--warning { border-color: rgba(247, 144, 9, .4); background: rgba(247, 144, 9, .1); }
/* 'bad' and 'info' are the two names controllers actually pass to flash(). */
.flash--bad { border-color: rgba(229, 72, 77, .4); background: rgba(229, 72, 77, .08); }
.flash--info { border-color: rgba(79, 107, 255, .35); background: rgba(79, 107, 255, .07); }
.alert { border-radius: var(--radius-sm); padding: 14px 16px; border: 1px solid var(--line); background: var(--paper-2); }
.alert--info { border-color: rgba(79, 107, 255, .35); background: rgba(79, 107, 255, .07); }
.alert--bad { border-color: rgba(229, 72, 77, .35); background: rgba(229, 72, 77, .07); }
.alert--ok { border-color: rgba(18, 183, 106, .35); background: rgba(18, 183, 106, .07); }

/* ------------------------------------------------------------------ table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-2); }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font: 600 12px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: rgba(14, 16, 20, .02); }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: rgba(255, 77, 28, .03); }

/* ----------------------------------------------------------------- footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 64px; padding: 40px 0; background: var(--ink); color: #d7dae0; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.site-foot__inner { display: grid; gap: 26px; grid-template-columns: 1.2fr .8fr 1fr; }
.site-foot nav { display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.site-foot .muted { color: #8b929e; }
@media (max-width: 760px) { .site-foot__inner { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- sections */
.split { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.steps { counter-reset: step; display: grid; gap: 16px; }
/* Scoped to the home page "How it works" list: the course player also uses .step. */
.steps > .step { position: relative; padding-left: 46px; }
.steps > .step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: #fff; font: 600 13px var(--mono);
}
.rail { display: grid; gap: 10px; }
.meter { margin: 10px 0 4px; }

/* ------------------------------------------------------------- dark areas */
body.dark-shell { background: var(--ink); color: #e8eaef; }
body.dark-shell .card, body.dark-shell .table-wrap { background: #14171d; border-color: rgba(255, 255, 255, .1); }
body.dark-shell input, body.dark-shell select, body.dark-shell textarea { background: #14171d; color: #e8eaef; border-color: rgba(255, 255, 255, .14); }
body.dark-shell .muted { color: #8b929e; }

@media print {
  .site-head, .site-foot, .btn, .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; }
}

/* ------------------------------------------------------- auth / split screen */
.auth-main { padding: 44px 0 20px; }
.auth-grid {
  display: grid; gap: 0; max-width: 1040px; margin: 0 auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--paper-2); box-shadow: var(--shadow);
  grid-template-columns: 1.15fr .85fr;
}
@media (max-width: 880px) { .auth-grid { grid-template-columns: 1fr; } }
.auth-panel { padding: 30px; }
@media (max-width: 480px) { .auth-panel { padding: 22px 18px; } }
.auth-aside {
  padding: 30px; background: var(--ink); color: #d7dae0;
  display: flex; flex-direction: column; justify-content: center;
}
.auth-aside h2 { color: #fff; }
.auth-aside .muted, .auth-aside ul { color: #8b929e; }
.auth-aside ul { padding-left: 18px; margin: 0; }
.auth-aside li { margin-bottom: 6px; }
.auth-head { margin-bottom: 22px; }
.auth-head h1 { font-size: clamp(22px, 3.4vw, 30px); margin-bottom: 6px; }
.auth-foot { padding: 22px 0 40px; text-align: center; }
.auth-foot a { color: var(--muted); }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.terms-scroll { max-height: 150px; overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13.5px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.pw-meter { height: 4px; border-radius: 4px; background: rgba(14,16,20,.1); overflow: hidden; margin-top: 8px; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--bad); transition: width .2s ease, background .2s ease; }
.status-box { text-align: center; padding: 12px 0; }
.status-box .glyph { font-size: 42px; line-height: 1; margin-bottom: 10px; }
.status-box--ok .glyph { color: var(--ok); }
.status-box--bad .glyph { color: var(--bad); }

/* --------------------------------------------------------------- rich text */
/* Output of rich_text(): bare allow-listed tags only, links auto-linked. */
.prose { font-size: 15.5px; line-height: 1.72; }
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }
.prose p { margin: 0 0 12px; }
.prose h3 { font-size: 19px; margin: 22px 0 8px; }
.prose h4 { font-size: 17px; margin: 18px 0 6px; }
.prose h5 { font-size: 15px; margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin-bottom: 5px; }
.prose blockquote {
  margin: 0 0 12px; padding: 10px 16px; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose code {
  font: 13px/1.5 var(--mono); background: rgba(14, 16, 20, .06);
  padding: 2px 5px; border-radius: 5px;
}
.prose pre {
  font: 13px/1.6 var(--mono); background: var(--ink); color: #f4f3ee;
  padding: 14px 16px; border-radius: var(--radius-sm); overflow-x: auto; margin: 0 0 12px;
}
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 14.5px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { background: var(--paper-2); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.prose a { word-break: break-word; }
