/* ==========================================================================
   Bharat Tech-Shakti Mission
   Shared stylesheet. Mobile first. Plain CSS, no build step.

   Palette is fixed and comes from the printed book. Do not add colours.
     Navy    #1A3A6B   headings, nav bar, rules, icons, links
     Saffron #F47920   accent bars, buttons, active menu item, highlights
     Cream   #FAF3E3   cards and illustration areas only, never a page flood
     Black   #000000   body text
     Grey    #555555   captions and hairlines
     White   #FFFFFF   page background, and text on navy
   ========================================================================== */

:root {
  --navy:    #1A3A6B;
  --saffron: #F47920;
  --cream:   #FAF3E3;
  --black:   #000000;
  --grey:    #555555;
  --white:   #FFFFFF;

  --font-head: "Trebuchet MS", "Lucida Grande", "Segoe UI", Tahoma, sans-serif;
  --font-body: Calibri, "Segoe UI", Candara, system-ui, -apple-system, sans-serif;
  --font-code: Consolas, "Courier New", monospace;
  --font-deva: "Noto Sans Devanagari", var(--font-body);

  --wrap: 62rem;
  --gap: 1.25rem;
}

/* --------------------------------------------------------------- reset -- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

/* Visible focus for keyboard users. Saffron reads clearly on white and navy. */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--saffron);
  color: var(--white);
  padding: 0.6rem 1rem;
  font-family: var(--font-head);
  font-weight: bold;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* -------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.125rem;
}

main { padding-block: 1.75rem 3rem; }

/* ---------------------------------------------------------- typography -- */

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: bold;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.3125rem; margin-top: 2rem; }
h3 { font-size: 1.0625rem; margin-top: 1.5rem; }

p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--saffron); }

code, pre { font-family: var(--font-code); font-size: 0.9375em; }

/* One brand anchor line. Never italic, per the brand rules. */
.deva { font-family: var(--font-deva); font-style: normal; }

/* Heading parts are separated by a middot, never a dash. */
.sep { color: var(--saffron); padding-inline: 0.35em; font-weight: normal; }

.lede { font-size: 1.1875rem; line-height: 1.55; }

.caption { color: var(--grey); font-size: 0.9375rem; margin-top: 0.5rem; }

/* Saffron accent bar above a heading. It runs the width of the heading text
   itself, so it is short over "Lab" and long over a full sentence. fit-content
   makes the heading box hug its longest line, and the bar then fills that. */
.accent-bar {
  width: fit-content;
  max-width: 100%;
}
.accent-bar::before {
  content: "";
  display: block;
  width: 100%;
  min-width: 3rem;
  height: 5px;
  background: var(--saffron);
  margin-bottom: 0.9rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--grey);
  opacity: 0.35;
  margin: 2rem 0;
}

/* -------------------------------------------------------------- header -- */

.site-header { background: var(--white); }

/* A saffron cap across the very top of every page, and a saffron accent bar
   down the left of the wordmark. Both are the "accent bar" element from the
   book palette, used at masthead scale. The page behind stays white. */
.masthead { border-top: 5px solid var(--saffron); }

.wordmark {
  display: block;
  text-decoration: none;
  color: var(--navy);
  border-left: 6px solid var(--saffron);
  padding-left: 0.95rem;
  margin-block: 1.15rem 1.25rem;
}
.wordmark:hover { color: var(--navy); }
.wordmark:hover .wordmark-name { color: var(--saffron); }

.wordmark-name {
  display: block;
  font-family: var(--font-head);
  font-weight: bold;
  color: var(--navy);
  font-size: clamp(1.5rem, 5.4vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.wordmark-tag {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.55rem;
  margin-top: 0.55rem;
}

/* The Devanagari is the brand anchor, so it leads and the transliteration
   supports it. Never italic. */
.wordmark-tag .deva {
  font-size: clamp(1.0625rem, 3.4vw, 1.375rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.wordmark-tag .sep { padding: 0; }

.wordmark-translit {
  font-family: var(--font-head);
  font-weight: bold;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--saffron);
  white-space: nowrap;
}

/* ---------------------------------------------------------- navigation -- */

.site-nav-bar { background: var(--navy); }

/* Ships hidden. The nav script reveals it on small screens, so a visitor
   without JavaScript never sees a button that would do nothing. */
.nav-toggle[hidden] { display: none; }

.nav-toggle {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: bold;
  font-size: 1rem;
  text-align: left;
  padding: 0.85rem 1.125rem;
  cursor: pointer;
}
.nav-toggle::after {
  content: "\25BE";           /* small down triangle */
  float: right;
  transition: transform 0.15s ease;
}
.nav-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }

/* Closed by default on small screens. The nav JS flips the hidden attribute.
   Without JS the menu stays open, so every link is still reachable. */
.site-nav[hidden] { display: none; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0.5rem;
}
.site-nav li { margin: 0; }

.site-nav a {
  display: block;
  padding: 0.7rem 1.125rem;
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 1rem;
  border-left: 4px solid transparent;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.09); color: var(--white); }

.site-nav a[aria-current="page"] {
  border-left-color: var(--saffron);
  color: var(--saffron);
  font-weight: bold;
}

/* -------------------------------------------------------------- footer -- */

.site-footer {
  background: var(--navy);
  color: var(--white);
  margin-top: 3rem;
  padding-block: 1.75rem 2rem;
  font-size: 0.9375rem;
}
.site-footer a { color: var(--white); text-decoration: underline; }
.site-footer a:hover { color: var(--saffron); }
.site-footer h2 {
  color: var(--white);
  font-size: 1rem;
  margin: 0 0 0.4rem;
}
.footer-grid { display: grid; gap: 1.5rem; }
.footer-block p { margin: 0 0 0.3rem; }
.footer-label {
  display: inline-block;
  min-width: 6em;
  color: rgba(255, 255, 255, 0.75);
}
.footer-legal {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}
.footer-legal p { margin: 0 0 0.3rem; }

/* --------------------------------------------------------------- cards -- */

/* Cream belongs here and nowhere else. The page behind stays white. */
.card {
  background: var(--cream);
  border-left: 4px solid var(--saffron);
  padding: 1rem 1.125rem;
  margin-bottom: 1rem;
}
.card h2, .card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.card-list { display: grid; gap: 0.875rem; }

/* A whole card that is one big tap target. Built for a phone, because most
   visitors arrive here by scanning a QR code. */
.card-link {
  display: block;
  background: var(--cream);
  border-left: 4px solid var(--saffron);
  padding: 1rem 1.125rem;
  text-decoration: none;
  color: var(--black);
  min-height: 3.5rem;
}
.card-link:hover { background: #F6ECD8; color: var(--black); }
.card-link:hover .card-link-title { color: var(--saffron); }

.card-link-kicker {
  display: block;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 0.15rem;
}
.card-link-title {
  display: block;
  font-family: var(--font-head);
  font-weight: bold;
  font-size: 1.125rem;
  color: var(--navy);
  line-height: 1.25;
}
.card-link-note {
  display: block;
  margin-top: 0.3rem;
  color: var(--black);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------- specs --
   Label and value rows. Used for course facts and lab equipment. A list
   rather than a table, because a table of this shape does not fit a phone. */

.spec { list-style: none; padding: 0; margin: 0 0 1rem; }

.spec li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.15rem 1rem;
  padding: 0.45rem 0;
  margin: 0;
  border-bottom: 1px solid rgba(85, 85, 85, 0.25);
}
.spec li:last-child { border-bottom: 0; }

.spec-label { color: var(--grey); }
.spec-value { font-family: var(--font-head); font-weight: bold; color: var(--navy); }

/* -------------------------------------------------------------- badges -- */

.badge {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: bold;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  vertical-align: 0.2em;
  margin-left: 0.5rem;
}
.badge-live { background: var(--saffron); color: var(--white); }
.badge-planned { background: var(--white); color: var(--grey); border: 1px solid var(--grey); }

/* ------------------------------------------------------------- buttons -- */

.btn {
  display: inline-block;
  background: var(--saffron);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: bold;
  font-size: 1.0625rem;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.btn:hover { background: var(--navy); color: var(--white); }

.btn-placeholder {
  background: var(--white);
  color: var(--grey);
  border: 2px dashed var(--grey);
  cursor: not-allowed;
}
.btn-placeholder:hover { background: var(--white); color: var(--grey); }

/* -------------------------------------------------------------- notice -- */

.notice {
  border: 1px solid var(--grey);
  border-left: 4px solid var(--navy);
  padding: 0.875rem 1.125rem;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}
.notice p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- marks --
   Small inline line drawings. Navy strokes with one saffron accent, drawn
   from the palette only. No image files, so nothing extra to download. */

.mark {
  display: block;
  width: 78px;
  height: 78px;
  margin-bottom: 0.9rem;
}
svg .ink,
svg .hot {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
svg .ink { stroke: var(--navy); }
svg .hot { stroke: var(--saffron); }
svg .ink-fill { fill: var(--navy); stroke: none; }
svg .hot-fill { fill: var(--saffron); stroke: none; }

/* A wider rule made of the same two colours, used to close a page. */
.rule-mark { display: block; width: 100%; height: 10px; margin: 2.5rem 0 1.5rem; }

/* ------------------------------------------------------------- counter --
   Ships hidden. The counter script reveals it only after a real number comes
   back, so a visitor never sees a placeholder, a zero, or a wrong figure. */

.counter[hidden] { display: none; }

.counter {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--cream);
  border-left: 4px solid var(--saffron);
  padding: 1.125rem;
  margin-bottom: 1.25rem;
}

.counter svg { flex: 0 0 auto; width: 44px; height: 44px; margin-top: 0.15rem; }

.counter-body { min-width: 0; }

.counter-number {
  font-family: var(--font-head);
  font-weight: bold;
  font-size: 2.25rem;
  line-height: 1.05;
  color: var(--navy);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.counter-label {
  margin: 0.15rem 0 0.6rem;
  color: var(--grey);
  font-size: 0.9375rem;
}

.counter-note { margin: 0; font-size: 0.9375rem; }

/* ----------------------------------------------------------------- map --
   A live slice of Google Maps, framed to match the cards. It carries
   loading="lazy", so a visitor who never scrolls down to it never causes a
   request to Google at all. */

.map {
  border: 1px solid var(--grey);
  border-left: 4px solid var(--saffron);
  background: var(--cream);
  margin-bottom: 0.6rem;
  line-height: 0;              /* removes the inline gap under the iframe */
}

.map iframe {
  display: block;
  width: 100%;
  height: 290px;
  border: 0;
}

@media (min-width: 40em) {
  .map iframe { height: 380px; }
}

/* ------------------------------------------------------------- figures -- */

figure { margin: 0 0 1.5rem; }
figure img { border: 1px solid var(--grey); }

/* The collage carries its own saffron edge, so it does not want a second one. */
.figure-bleed img { border: 0; }
figure figcaption { color: var(--grey); font-size: 0.9375rem; margin-top: 0.5rem; }

/* --------------------------------------------------------- wider views -- */

@media (min-width: 40em) {
  h1 { font-size: 2.125rem; }
  h2 { font-size: 1.5rem; }

  .card-list { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 52em) {
  .wordmark { margin-block: 1.5rem 1.6rem; padding-left: 1.15rem; }
  .wordmark-tag { gap: 0.1rem 0.8rem; margin-top: 0.6rem; }
  .wordmark-translit { font-size: 0.8125rem; letter-spacing: 0.2em; }

  /* The hamburger is a small-screen device only. */
  .nav-toggle { display: none; }

  /* Always visible on a wide screen, whatever the toggle last set. */
  .site-nav[hidden] { display: block; }

  .site-nav ul { display: flex; flex-wrap: wrap; padding: 0; }

  .site-nav a {
    border-left: 0;
    border-bottom: 4px solid transparent;
    padding: 0.85rem 0.9rem;
  }
  .site-nav a[aria-current="page"] {
    border-left: 0;
    border-bottom-color: var(--saffron);
  }
}

/* ----------------------------------------------------------------- print */

@media print {
  .site-nav-bar, .nav-toggle, .skip-link { display: none; }
  body { font-size: 11pt; }
  a { text-decoration: none; color: var(--black); }
}
