/* Kamala Science Campus — site styles */

:root {
  --navy: #0b2545;
  --navy-700: #133a63;
  --teal: #0e7c7b;
  --teal-600: #0b6564;
  --gold: #d99a2b;
  --gold-soft: #f6e3bd;
  --ink: #16212e;
  --ink-soft: #4d5b6b;
  --line: #e2e8ef;
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --bg-tint: #eef4f8;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(11, 37, 69, .06), 0 10px 30px rgba(11, 37, 69, .07);
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, .06), 0 4px 12px rgba(11, 37, 69, .05);
  --wrap: 1140px;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --deva: "Noto Sans Devanagari", var(--sans);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--teal-600); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

.deva { font-family: var(--deva); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: 10px 16px; z-index: 200;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */

.topbar {
  background: var(--navy);
  color: #cfe0f0;
  font-size: .82rem;
}
.topbar .wrap {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  align-items: center; justify-content: space-between;
  min-height: 38px;
}
.topbar a { color: #cfe0f0; }
.topbar-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 78px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.crest {
  width: 46px; height: 46px; flex: 0 0 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--teal), var(--navy) 78%);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.02rem;
  border: 2px solid var(--gold);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--serif); font-weight: 700;
  font-size: 1.12rem; color: var(--navy);
}
.brand-sub { font-size: .74rem; color: var(--ink-soft); letter-spacing: .04em; text-transform: uppercase; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 12px; cursor: pointer; color: var(--navy); font-size: 1rem;
}

.nav ul {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.nav a {
  display: block; padding: 9px 13px;
  border-radius: var(--radius-sm);
  color: var(--ink); font-size: .93rem; font-weight: 500;
}
.nav a:hover { background: var(--bg-tint); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--teal-600); background: var(--bg-tint); }
.nav .nav-cta {
  background: var(--navy); color: #fff; margin-left: 8px; padding: 10px 18px;
}
.nav .nav-cta:hover { background: var(--navy-700); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: .94rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--gold); color: #2b1d02; }
.btn-primary:hover { background: #c98c22; }
.btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background:
    radial-gradient(1100px 520px at 12% -10%, #1b4f7a 0%, transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, #0d3357 55%, var(--teal-600) 140%);
  color: #eaf2f9;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .45; pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; padding-top: 84px; padding-bottom: 84px; }
.hero-inner { max-width: 720px; }
.eyebrow {
  display: inline-block;
  font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-soft);
  border: 1px solid rgba(246, 227, 189, .4);
  border-radius: 999px; padding: 5px 14px; margin-bottom: 22px;
}
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero .deva-title {
  font-family: var(--deva); font-size: clamp(1rem, 2.2vw, 1.3rem);
  color: var(--gold-soft); font-weight: 500; margin-bottom: 18px;
}
.hero p.lead { font-size: 1.1rem; color: #d3e2ef; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.page-head {
  background: linear-gradient(120deg, var(--navy) 0%, #0f3a60 100%);
  color: #eaf2f9;
  padding: 62px 0 56px;
}
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p { color: #cfe0f0; max-width: 660px; margin: 0; }
.crumbs { font-size: .82rem; color: #9fbcd6; margin-bottom: 14px; }
.crumbs a { color: #9fbcd6; }

/* ---------- Sections ---------- */

section { padding: 72px 0; }
section.tight { padding: 52px 0; }
.bg-soft { background: var(--bg-soft); }
.bg-tint { background: var(--bg-tint); }

.section-head { max-width: 700px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker {
  font-size: .78rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 10px;
}
.section-head p { color: var(--ink-soft); }

/* ---------- Facts strip ---------- */

.facts {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.fact { background: #fff; padding: 26px 22px; }
.fact dt {
  font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 8px;
}
.fact dd {
  margin: 0; font-family: var(--serif); font-size: 1.22rem; color: var(--navy); line-height: 1.3;
}
.fact dd small { display: block; font-family: var(--sans); font-size: .82rem; color: var(--ink-soft); font-weight: 400; margin-top: 4px; }

/* ---------- Cards ---------- */

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .45em; }
.card p { color: var(--ink-soft); font-size: .96rem; }
.card-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--bg-tint); color: var(--teal-600);
  font-size: 1.15rem; margin-bottom: 16px;
}

.program-card { display: flex; flex-direction: column; }
.program-card .tag {
  align-self: flex-start;
  font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  background: var(--gold-soft); color: #6b4a06;
  padding: 4px 11px; border-radius: 999px; margin-bottom: 14px;
}
.program-card ul { margin: 0 0 20px; padding-left: 20px; color: var(--ink-soft); font-size: .94rem; }
.program-card ul li { margin-bottom: 5px; }
.program-card .more { margin-top: auto; font-weight: 600; font-size: .92rem; }

/* ---------- Split (text + panel) ---------- */

/* Grid children default to min-width:auto, which lets a wide table inside a
   .table-scroll push the whole page sideways. Reset it. */
.grid > *, .split > *, .contact-grid > *, .footer-grid > * { min-width: 0; }

.split {
  display: grid; gap: 44px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: start;
}
.panel {
  background: var(--navy);
  color: #dce8f3;
  border-radius: var(--radius);
  padding: 32px;
}
.panel h3 { color: #fff; }
.panel ul { list-style: none; margin: 0; padding: 0; }
.panel li {
  padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .13);
  font-size: .95rem; display: flex; justify-content: space-between; gap: 14px;
}
.panel li:last-child { border-bottom: 0; }
.panel li span:last-child { color: #fff; font-weight: 600; text-align: right; }

/* ---------- Lists ---------- */

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li {
  position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--ink-soft);
}
.ticks li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-tint); color: var(--teal-600);
  display: grid; place-items: center; font-size: .72rem; font-weight: 700;
}
.ticks strong { color: var(--ink); }

/* ---------- Steps ---------- */

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 56px;
  border-left: 2px solid var(--line);
  margin-left: 17px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: -18px; top: -2px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: .95rem;
}
.steps h3 { font-size: 1.05rem; margin-bottom: .3em; }
.steps p { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Table ---------- */

.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 520px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--bg-soft); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: var(--navy); }

/* ---------- FAQ ---------- */

.faq { max-width: 800px; }
details {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; margin-bottom: 12px; padding: 0 20px;
}
details[open] { box-shadow: var(--shadow-sm); }
summary {
  cursor: pointer; padding: 17px 0; font-weight: 600; color: var(--navy);
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--teal); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details .answer { padding-bottom: 18px; color: var(--ink-soft); font-size: .96rem; }

/* ---------- Notice ---------- */

.notice {
  border-left: 4px solid var(--gold);
  background: #fdf7ea;
  padding: 18px 22px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .94rem; color: #5d4a1f;
}
.notice strong { color: #3f320f; }

/* ---------- CTA band ---------- */

.cta {
  background: linear-gradient(120deg, var(--teal-600) 0%, var(--navy) 100%);
  color: #eaf2f9; text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: #cfe6e6; max-width: 560px; margin: 0 auto 26px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 34px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.field { margin-bottom: 16px; }
label { display: block; font-size: .86rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: .95rem;
  padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(14, 124, 123, .35); outline-offset: 1px; border-color: var(--teal);
}
textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .84rem; color: var(--ink-soft); margin-top: 12px; }
.form-status { font-size: .9rem; margin-top: 14px; font-weight: 600; color: var(--teal-600); }

.map-embed {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 10; background: var(--bg-tint);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */

.site-footer { background: #08192e; color: #a9c2d8; padding: 58px 0 0; font-size: .93rem; }
.footer-grid {
  display: grid; gap: 34px;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(160px, 1fr));
  padding-bottom: 40px;
}
.site-footer h4 {
  color: #fff; font-family: var(--sans); font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #a9c2d8; }
.site-footer a:hover { color: #fff; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: #7f9cb8; }
.footer-brand p { margin-top: 14px; max-width: 340px; color: #90aac4; font-size: .9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 18px 0; display: flex; flex-wrap: wrap; gap: 8px 20px;
  justify-content: space-between; font-size: .84rem; color: #7f9cb8;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .split, .contact-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 10px 16px 18px;
    display: none;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav a { padding: 12px 10px; }
  .nav .nav-cta { margin: 10px 0 0; text-align: center; }
  .site-header .wrap { position: relative; min-height: 68px; }
  section { padding: 56px 0; }
  .hero .wrap { padding-top: 62px; padding-bottom: 62px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand-name { font-size: .98rem; }
  .brand-sub { font-size: .66rem; }
  .crest { width: 38px; height: 38px; flex-basis: 38px; font-size: .84rem; }
  .site-header .wrap { min-height: 62px; gap: 10px; }
  .nav-toggle { padding: 7px 10px; font-size: .9rem; }
  .topbar { display: none; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; text-align: center; }
  .card { padding: 22px; }
  .panel { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .topbar, .nav, .cta, .site-footer { display: none; }
  body { font-size: 11pt; }
}

/* Subject chips */
.chips {
  list-style: none; margin: 0 0 1.8em; padding: 0;
  display: flex; flex-wrap: wrap; gap: 9px;
}
.chips li {
  background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 15px;
  font-size: .9rem; color: var(--navy); font-weight: 500;
}

/* Key/value tables (no header row) should wrap, not scroll */
table.table-kv { min-width: 0; }
table.table-kv th[scope="row"] {
  width: 34%; background: var(--bg-soft); vertical-align: top;
}
@media (max-width: 480px) {
  table.table-kv th[scope="row"], table.table-kv td { display: block; width: auto; }
  table.table-kv th[scope="row"] { border-bottom: 0; padding-bottom: 4px; }
  table.table-kv td { padding-top: 0; }
}

/* Language switch in the main navigation */
.nav .lang-switch {
  font-weight: 600;
  color: var(--teal-600);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 15px;
  margin-inline-start: 6px;
}
.nav .lang-switch:hover { background: var(--bg-tint); text-decoration: none; }
@media (max-width: 820px) {
  .nav .lang-switch { margin: 8px 0 0; text-align: center; }
}

/* Nepali pages: Devanagari needs more leading and no letter-spacing tricks */
body.lang-ne { font-family: var(--deva); line-height: 1.85; }
body.lang-ne h1, body.lang-ne h2, body.lang-ne h3, body.lang-ne h4,
body.lang-ne .brand-name, body.lang-ne .fact dd, body.lang-ne .steps h3 {
  font-family: var(--deva); letter-spacing: 0; line-height: 1.5;
}
body.lang-ne .eyebrow, body.lang-ne .kicker, body.lang-ne .fact dt,
body.lang-ne th, body.lang-ne .brand-sub, body.lang-ne .site-footer h4,
body.lang-ne .program-card .tag {
  text-transform: none; letter-spacing: .02em;
}
body.lang-ne .hero h1 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
