/* Sopan Education and Skills Foundation — website styles
   Concept: "Sopan" means staircase. The one bold element is the stepped
   pathway in the hero; everything else stays quiet and orderly. */

:root {
  --ink: #14284b;          /* school-uniform navy: headings, steps */
  --ink-soft: #2b4572;
  --paper: #f6f7f9;        /* cool exercise-book white */
  --surface: #ffffff;
  --marigold: #e9a21a;     /* marigold / pencil yellow: the single accent */
  --leaf: #1e7457;         /* confirmations, "open" states */
  --text: #1d2433;
  --muted: #566173;
  --line: #dde2ea;
  --focus: #e9a21a;
  --step-1: #14284b;
  --step-2: #1d3762;
  --step-3: #284878;
  --step-4: #345b8f;
  --step-top: #e9a21a;

  --font-head: "Anek Bangla", "Hind Siliguri", system-ui, sans-serif;
  --font-body: "Hind Siliguri", "Noto Sans Bengali", system-ui, sans-serif;

  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-s: 4px;
  --radius-m: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #dfe6f3;
    --ink-soft: #b9c6dd;
    --paper: #0f1626;
    --surface: #16203a;
    --text: #e6eaf2;
    --muted: #a3adbf;
    --line: #2a3654;
    --step-1: #1f3561;
    --step-2: #27427a;
    --step-3: #305092;
    --step-4: #3a5fa8;
  }
}
:root[data-theme="dark"] {
  --ink: #dfe6f3; --ink-soft: #b9c6dd; --paper: #0f1626; --surface: #16203a;
  --text: #e6eaf2; --muted: #a3adbf; --line: #2a3654;
  --step-1: #1f3561; --step-2: #27427a; --step-3: #305092; --step-4: #3a5fa8;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

/* Bilingual switching: every translatable string exists in both languages */
html[data-lang="bn"] body [lang="en"] { display: none !important; }
html[data-lang="en"] body [lang="bn"] { display: none !important; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; line-height: 1; color: var(--ink); }
.brand-full { display: block; font-size: .78rem; color: var(--muted); line-height: 1.2; margin-top: 3px; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 10px; border-radius: var(--radius-s); color: var(--text); font-size: .95rem; }
.nav a:hover { background: var(--surface); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-toggle {
  font: inherit; font-size: .9rem; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: var(--radius-s); padding: 6px 10px; min-height: 40px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border-radius: var(--radius-s); padding: 10px 18px; min-height: 44px;
  border: 2px solid var(--ink); background: var(--ink); color: var(--paper);
}
.btn:hover { background: var(--ink-soft); border-color: var(--ink-soft); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--surface); color: var(--ink); }
.menu-btn { display: none; }

@media (max-width: 1020px) {
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column;
         background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; }
  .nav.open { display: flex; }
  .menu-btn { display: inline-flex; }
  .header-actions .btn-portal { display: none; }
}

/* ---------- Hero: the staircase ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 0; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); align-items: end; }
.hero h1 {
  font-family: var(--font-head); color: var(--ink);
  font-size: clamp(2.2rem, 5.2vw, 3.9rem); line-height: 1.12; font-weight: 700;
  margin: 0 0 20px; letter-spacing: -0.01em;
}
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 46ch; margin: 0 0 28px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.status-note {
  display: inline-block; font-size: .9rem; color: var(--muted);
  border-left: 3px solid var(--marigold); padding: 2px 0 2px 12px; margin: 0 0 clamp(32px, 5vw, 64px);
}

.stairs {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; gap: 0;
  min-height: 380px;
}
.stairs li {
  position: relative; color: #fff;
  padding: 14px 12px 16px; display: flex; flex-direction: column; justify-content: flex-start;
  border-right: 1px solid rgba(255,255,255,.12);
  transform-origin: bottom;
}
.stairs li:nth-child(1) { height: 110px; background: var(--step-1); }
.stairs li:nth-child(2) { height: 175px; background: var(--step-2); }
.stairs li:nth-child(3) { height: 240px; background: var(--step-3); }
.stairs li:nth-child(4) { height: 305px; background: var(--step-4); }
.stairs li:nth-child(5) { height: 380px; background: transparent; padding: 0; border: 0; display: grid; grid-template-rows: 1fr 1fr; gap: 6px; }
.stairs .step-no { font-family: var(--font-head); font-size: .85rem; opacity: .75; }
.stairs .step-name { font-family: var(--font-head); font-weight: 600; font-size: clamp(.95rem, 1.4vw, 1.1rem); line-height: 1.3; }
.landing {
  background: var(--step-top); color: #1b1606; padding: 14px 12px;
  display: flex; flex-direction: column; justify-content: flex-start;
}
.landing + .landing { background: #f3c25a; }
.stairs-caption { font-size: .9rem; color: var(--muted); margin: 12px 0 0; }

@media (prefers-reduced-motion: no-preference) {
  .stairs li { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .stairs li:nth-child(2) { animation-delay: .12s; }
  .stairs li:nth-child(3) { animation-delay: .24s; }
  .stairs li:nth-child(4) { animation-delay: .36s; }
  .stairs li:nth-child(5) { animation-delay: .5s; }
  @keyframes rise { from { transform: scaleY(0); opacity: .3; } to { transform: scaleY(1); opacity: 1; } }
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .stairs { min-height: 0; grid-template-columns: 1fr; gap: 4px; }
  .stairs li, .stairs li:nth-child(n) { height: auto; border-right: 0; flex-direction: row; gap: 10px; align-items: baseline; }
  .stairs li:nth-child(1) { width: 60%; }
  .stairs li:nth-child(2) { width: 70%; }
  .stairs li:nth-child(3) { width: 80%; }
  .stairs li:nth-child(4) { width: 90%; }
  .stairs li:nth-child(5) { width: 100%; grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .stairs { justify-items: start; }
  @media (prefers-reduced-motion: no-preference) {
    .stairs li { transform-origin: left; }
    @keyframes rise { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line); }
.section-alt { background: var(--surface); }
.section-head { max-width: var(--measure); margin-bottom: 36px; }
.section h2 {
  font-family: var(--font-head); color: var(--ink); font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.2; margin: 0 0 12px;
}
.section h3 { font-family: var(--font-head); color: var(--ink); font-size: 1.2rem; line-height: 1.35; margin: 0 0 6px; font-weight: 600; }
.section p { margin: 0 0 14px; max-width: var(--measure); }
.muted { color: var(--muted); }
.small { font-size: .92rem; }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 760px) { .two-col { grid-template-columns: minmax(0, 1fr); } }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); margin: 8px 0 0; }
.facts div { padding: 16px 16px 16px 0; }
.facts dt { font-size: .9rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: 1.1rem; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } .facts div { border-bottom: 1px solid var(--line); } }

.values { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; margin: 16px 0 0; }
.values li { border: 1px solid var(--line); background: var(--surface); padding: 4px 12px; border-radius: 999px; font-size: .95rem; }

/* Work areas: an index, not a card grid */
.areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); margin: 0; padding: 0; list-style: none; }
.areas li { padding: 18px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 2.2rem 1fr; gap: 6px 12px; }
.areas .area-letter { font-family: var(--font-head); font-weight: 700; color: var(--marigold); font-size: 1.2rem; line-height: 1.4; }
.areas p { margin: 0; color: var(--muted); font-size: .98rem; }
@media (max-width: 760px) { .areas { grid-template-columns: minmax(0, 1fr); } }

/* Pathway: a real sequence, so numbered */
.pathway { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; }
.pathway li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.pathway li::before {
  content: counter(step, bengali); font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; color: var(--ink);
  width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; line-height: 1;
}
html[data-lang="en"] .pathway li::before { content: counter(step); }
.pathway p { margin: 0; color: var(--muted); }

.chain { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 12px 0 0; list-style: none; counter-reset: c; }
.chain li { background: var(--paper); border: 1px solid var(--line); padding: 4px 12px; border-radius: var(--radius-s); font-size: .95rem; }
.section-alt .chain li { background: var(--paper); }
.chain li:not(:last-child)::after { content: ""; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 12px 0 0; padding: 0; }
.tags li { border: 1px solid var(--line); padding: 3px 12px; border-radius: 999px; font-size: .95rem; background: var(--surface); }
.section-alt .tags li { background: var(--paper); }

.note {
  border-left: 3px solid var(--marigold); background: color-mix(in srgb, var(--marigold) 9%, transparent);
  padding: 12px 16px; margin: 20px 0 0; max-width: var(--measure); font-size: .97rem;
}

.block { padding: 20px 0; border-top: 1px solid var(--line); }
.block:first-child { border-top: 0; padding-top: 0; }

/* Governance diagram */
.org { display: grid; gap: 10px; max-width: 640px; }
.org-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.org-node { border: 2px solid var(--ink); border-radius: var(--radius-s); padding: 10px 14px; background: var(--surface); }
.org-node.primary { background: var(--ink); color: var(--paper); }
.org-node strong { display: block; font-family: var(--font-head); }
.org-node span { font-size: .9rem; opacity: .85; }
.org-arrow { height: 18px; width: 2px; background: var(--ink); margin-left: 24px; }

/* Tables */
.table-wrap { align-self: start; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .97rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-head); color: var(--ink); font-weight: 600; background: var(--paper); }
tr:last-child td { border-bottom: 0; }

.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.badge { font-size: .85rem; white-space: nowrap; color: var(--muted); }
.badge.ok { color: var(--leaf); font-weight: 600; }

/* Forms */
form { display: grid; gap: 14px; max-width: 640px; }
.field { display: grid; gap: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
label { font-weight: 600; font-size: .95rem; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid #b9c2d0; border-radius: var(--radius-s); padding: 10px 12px; min-height: 44px; width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
.hint { font-size: .88rem; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; min-height: 20px; height: 20px; margin-top: 5px; flex: none; }
.hp { position: absolute; left: -5000px; }
.form-status { min-height: 1.5em; font-weight: 600; }
.form-status.ok { color: var(--leaf); }
.form-status.err { color: #b3261e; }

/* Footer */
.site-footer { background: var(--ink); color: #dfe6f3; padding: 48px 0 32px; }
:root[data-theme="dark"] .site-footer { background: #0a101d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: #0a101d; } }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-family: var(--font-head); font-size: 1.05rem; margin: 0 0 8px; color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 4px 0; }
.legal { border-top: 1px solid rgba(255,255,255,.18); margin-top: 32px; padding-top: 16px; font-size: .9rem; color: #b9c6dd; }

/* Simple content page (privacy) */
.page { padding: clamp(40px, 6vw, 72px) 0; }
.page h1 { font-family: var(--font-head); color: var(--ink); font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.2; margin: 0 0 12px; }
.page h2 { font-family: var(--font-head); color: var(--ink); font-size: 1.3rem; margin: 32px 0 8px; }
.page p, .page li { max-width: var(--measure); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b3261e; box-shadow: 0 0 0 1px #b3261e; }
.mt-tight { margin-top: -6px !important; }
.mt-s { margin-top: 12px !important; }
.mt-m { margin-top: 16px !important; }
.mt-l { margin-top: 24px !important; }
.legal-plain { border: 0; margin: 0; padding: 0; }

.centre-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.centre-list li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface, transparent); }
