/* ============================================================
   EDMRC Kangra — Design System
   Editorial / institutional aesthetic
   Indigo base, SHEE accent palette, Fraunces + Source Sans 3
   ============================================================ */

:root {
  /* Brand palette */
  --indigo: #2B2D5B;
  --indigo-soft: #3a3d6e;
  --indigo-deep: #1a1c3d;
  /* Safety = operational / Aapda Mitra response identity (was burnt orange #D4740E) */
  --safety: #D62828;
  --safety-soft: #E04F4F;
  --safety-deep: #A81E1E;
  --health: #2878A0;
  --environ: #2A8C5A;
  --empower: #7B539C;
  --gold: #D4A03C;

  /* Neutrals */
  --cream: #FAF6F0;
  --paper: #FFFEFB;
  --ink: #1A1D2E;
  --grey-1: #F2EEE8;
  --grey-2: #E0DBD2;
  --grey-3: #8B8478;
  --grey-4: #524C42;

  /* Type */
  --serif: 'Fraunces', 'Source Serif Pro', Georgia, serif;
  --sans: 'Source Sans 3', -apple-system, system-ui, sans-serif;

  /* Rhythm */
  --max: 1200px;
  --max-narrow: 880px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01", "kern";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--indigo); text-decoration: underline; text-decoration-color: rgba(43,45,91,0.25); text-underline-offset: 3px; transition: text-decoration-color .2s; }
a:hover { text-decoration-color: var(--safety); }

/* ----------- Typography ----------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.18;
  color: var(--indigo-deep);
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); font-weight: 400; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); font-weight: 500; }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--safety);
  margin-bottom: 0.75rem;
  display: block;
}
.eyebrow--indigo { color: var(--indigo); }
.eyebrow--health { color: var(--health); }
.eyebrow--environ { color: var(--environ); }
.eyebrow--empower { color: var(--empower); }

p { margin-bottom: 1.1em; max-width: 68ch; }
p.lead { font-size: 1.18rem; line-height: 1.55; color: var(--grey-4); }

/* ----------- Layout ----------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--space-3); }
.container-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 var(--space-3); }

section { padding: var(--space-7) 0; }
section.tight { padding: var(--space-5) 0; }

/* ----------- Header / Navigation ----------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,254,251,0.94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--grey-2);
}
.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem var(--space-3);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
}
.brand { display: flex; align-items: baseline; gap: 0.55rem; text-decoration: none; }
.brand__mark {
  font-family: var(--serif); font-weight: 600;
  font-size: 1.35rem; color: var(--indigo-deep);
  letter-spacing: -0.01em;
}
.brand__sub {
  font-size: 0.72rem; color: var(--grey-3);
  letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600;
}

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a {
  font-size: 0.92rem; font-weight: 500;
  color: var(--ink); text-decoration: none;
  position: relative; padding: 0.4rem 0;
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--safety);
  transition: width .25s ease;
}
.nav a:hover::after, .nav a.active::after { width: 100%; }

.nav-toggle {
  display: none;
  background: transparent; border: 0; cursor: pointer;
  padding: .5rem; color: var(--indigo);
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: var(--paper);
    border-bottom: 1px solid var(--grey-2);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav.open { max-height: 80vh; overflow-y: auto; padding: .5rem 0 1rem; }
  .nav a { padding: .8rem var(--space-3); border-top: 1px solid var(--grey-1); }
  .nav a::after { display: none; }
}

/* ----------- Hero ----------- */
.hero {
  position: relative;
  padding: var(--space-7) 0 var(--space-6);
  overflow: hidden;
  background:
    linear-gradient(180deg, #FAF6F0 0%, #FFFEFB 100%);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(214,40,40,0.07) 0%, transparent 45%),
    radial-gradient(circle at 15% 75%, rgba(43,45,91,0.05) 0%, transparent 45%);
  pointer-events: none;
}
.hero__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-6); align-items: center;
  position: relative;
}
.hero__copy h1 { margin-bottom: 1.2rem; }
.hero__copy .lead { margin-bottom: 1.8rem; max-width: 32ch; }
.hero__image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 30px 60px -20px rgba(43,45,91,0.25);
}
.hero__image img { width: 100%; height: 100%; object-fit: cover; }
.hero__image::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid rgba(255,255,255,0.4);
  pointer-events: none;
}
@media (max-width: 860px) {
  .hero { padding: var(--space-5) 0; }
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .hero__image { order: -1; aspect-ratio: 16/10; }
}

/* ----------- Buttons ----------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; border: 1.5px solid transparent;
  border-radius: 2px; cursor: pointer;
  transition: all .2s ease;
  letter-spacing: 0.01em;
}
.btn--primary {
  background: var(--indigo); color: white;
  border-color: var(--indigo);
}
.btn--primary:hover {
  background: var(--indigo-deep); border-color: var(--indigo-deep);
  color: white; transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(43,45,91,0.5);
}
.btn--ghost {
  background: transparent; color: var(--indigo);
  border-color: var(--indigo);
}
.btn--ghost:hover {
  background: var(--indigo); color: white;
}
.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ----------- Stats strip ----------- */
.stats {
  background: var(--indigo);
  color: var(--cream);
  padding: var(--space-5) 0;
}
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.stat__value {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1; color: var(--gold);
  letter-spacing: -0.02em;
  display: block;
}
.stat__label {
  font-size: 0.82rem; letter-spacing: 0.1em;
  text-transform: uppercase; margin-top: 0.5rem;
  color: rgba(250,246,240,0.85); font-weight: 500;
}
@media (max-width: 720px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-4) var(--space-3); }
}

/* ----------- Section header ----------- */
.section-head { margin-bottom: var(--space-5); max-width: 720px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ----------- Cards ----------- */
.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) {
  .card-grid, .card-grid--2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border: 1px solid var(--grey-2);
  padding: var(--space-3);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
  display: flex; flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -20px rgba(43,45,91,0.18);
  border-color: var(--indigo-soft);
}
.card__tag {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--safety); margin-bottom: 0.6rem;
}
.card--health .card__tag { color: var(--health); }
.card--environ .card__tag { color: var(--environ); }
.card--empower .card__tag { color: var(--empower); }
.card__title { margin-bottom: 0.7rem; font-size: 1.18rem; }
.card__body { font-size: 0.95rem; color: var(--grey-4); flex: 1; line-height: 1.55; }
.card__more {
  margin-top: var(--space-2); font-size: 0.88rem;
  font-weight: 600; color: var(--indigo);
  text-decoration: none;
}
.card__more::after { content: ' →'; transition: margin-left .2s; }
.card__more:hover::after { margin-left: 4px; }

.card--image { padding: 0; overflow: hidden; }
.card--image img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.card--image .card__inner { padding: var(--space-3); flex: 1; display: flex; flex-direction: column; }

/* ----------- Service line (Assessments page) ----------- */
.service-line {
  display: grid; grid-template-columns: 1fr 2fr;
  gap: var(--space-4); padding: var(--space-4) 0;
  border-top: 1px solid var(--grey-2);
}
.service-line:last-child { border-bottom: 1px solid var(--grey-2); }
.service-line__num {
  font-family: var(--serif); font-size: 2.6rem;
  font-weight: 300; color: var(--safety);
  line-height: 1;
}
.service-line__title {
  margin-top: 0.4rem; margin-bottom: 0.8rem; font-size: 1.35rem;
}
.service-line__body { color: var(--grey-4); }
.service-line__meta {
  margin-top: 1rem; font-size: 0.85rem; color: var(--grey-3);
  font-style: italic;
}
@media (max-width: 720px) {
  .service-line { grid-template-columns: 1fr; gap: var(--space-2); }
}

/* ----------- Pull quotes / callouts ----------- */
.callout {
  background: var(--cream);
  border-left: 3px solid var(--safety);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--indigo-deep);
}
.callout cite {
  display: block; margin-top: 0.7rem;
  font-family: var(--sans);
  font-size: 0.82rem; font-style: normal;
  color: var(--grey-3); letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ----------- Recognition strip ----------- */
.recognition {
  background: var(--indigo-deep);
  color: var(--cream);
  padding: var(--space-6) 0;
  position: relative;
  overflow: hidden;
}
.recognition::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 90% 20%, rgba(212,160,60,0.10) 0%, transparent 50%);
}
.recognition .container { position: relative; }
.recognition .eyebrow { color: var(--gold); }
.recognition h2 { color: var(--cream); }
.recognition .recognition__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4); margin-top: var(--space-4);
}
.recognition__item img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 2px;
}
.recognition__cap {
  margin-top: 1rem; font-size: 0.92rem;
  color: rgba(250,246,240,0.9); line-height: 1.55;
}
.recognition__cap strong { color: var(--gold); font-weight: 600; }
@media (max-width: 720px) {
  .recognition .recognition__grid { grid-template-columns: 1fr; gap: var(--space-4); }
}

/* ----------- Team grid (About page) ----------- */
.team-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin: var(--space-3) 0;
}
.team-member {
  background: var(--paper);
  border: 1px solid var(--grey-2);
  border-left: 3px solid var(--indigo);
  padding: 1.4rem 1.5rem;
  transition: border-left-color .2s, box-shadow .2s;
}
.team-member:hover {
  border-left-color: var(--safety);
  box-shadow: 0 10px 30px -16px rgba(43,45,91,0.18);
}
.team-member__name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--indigo-deep);
  margin-bottom: 0.3rem;
  line-height: 1.25;
}
.team-member__role {
  font-size: 0.88rem;
  color: var(--grey-4);
  line-height: 1.5;
}
.team-member__role strong {
  color: var(--indigo);
  font-weight: 600;
}
@media (max-width: 720px) {
  .team-grid { grid-template-columns: 1fr; }
}

/* ----------- Track record list ----------- */
.tr-list { list-style: none; padding: 0; }
.tr-list li {
  padding: 1.1rem 0 1.1rem 2.2rem;
  border-top: 1px solid var(--grey-2);
  position: relative;
}
.tr-list li:last-child { border-bottom: 1px solid var(--grey-2); }
.tr-list li::before {
  content: '▸';
  position: absolute; left: 0; top: 1.1rem;
  color: var(--safety); font-size: 1rem;
}
.tr-list strong { color: var(--indigo-deep); font-weight: 600; }

/* ----------- Image grid ----------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.gallery-grid img {
  aspect-ratio: 1; object-fit: cover; width: 100%;
}
@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----------- Featured page image ----------- */
.feature-image {
  position: relative;
  margin: var(--space-5) 0;
}
.feature-image img {
  width: 100%; max-height: 520px;
  object-fit: cover; border-radius: 2px;
}
.feature-image figcaption {
  margin-top: 0.8rem; font-size: 0.88rem;
  color: var(--grey-3); font-style: italic;
  max-width: 720px;
}

/* ----------- Sub-page banner ----------- */
.page-banner {
  background: var(--indigo);
  color: var(--cream);
  padding: var(--space-6) 0 var(--space-5);
  position: relative; overflow: hidden;
}
.page-banner::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 85% 30%, rgba(214,40,40,0.16) 0%, transparent 55%);
}
.page-banner .container { position: relative; }
.page-banner .eyebrow { color: var(--gold); }
.page-banner h1 { color: var(--cream); margin-bottom: 0.8rem; }
.page-banner p.lead { color: rgba(250,246,240,0.92); }

/* Breadcrumbs */
.breadcrumb {
  font-size: 0.85rem; color: var(--grey-3);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--grey-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--safety); }
.breadcrumb span { color: var(--grey-3); margin: 0 0.5rem; }
.page-banner .breadcrumb,
.page-banner .breadcrumb a { color: rgba(250,246,240,0.8); }

/* ----------- Programme tile (home page) ----------- */
.tile {
  position: relative; overflow: hidden;
  aspect-ratio: 3/4;
  border-radius: 2px;
}
.tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.tile:hover img { transform: scale(1.04); }
.tile__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(26,28,61,0.92) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--space-3); color: white;
}
.tile__tag {
  font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 700;
  color: var(--gold); margin-bottom: 0.4rem;
}
.tile__name {
  font-family: var(--serif); font-size: 1.3rem;
  font-weight: 500; line-height: 1.2; color: white;
}
.tile a {
  position: absolute; inset: 0;
  text-decoration: none;
}

/* ----------- Two-col body content ----------- */
.two-col {
  display: grid; grid-template-columns: 2fr 1fr;
  gap: var(--space-5);
}
.two-col__side {
  background: var(--cream);
  padding: var(--space-3);
  border-left: 2px solid var(--safety);
  font-size: 0.92rem;
  height: fit-content;
  position: sticky; top: 100px;
}
.two-col__side h4 {
  font-family: var(--sans); font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--safety); margin-bottom: 0.8rem;
}
.two-col__side ul { list-style: none; padding: 0; }
.two-col__side li {
  padding: 0.5rem 0; border-top: 1px solid var(--grey-2);
  color: var(--grey-4); font-size: 0.88rem;
}
.two-col__side li:first-child { border-top: 0; }
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col__side { position: static; }
}

/* ----------- Footer ----------- */
.site-footer {
  background: var(--ink); color: rgba(250,246,240,0.85);
  padding: var(--space-6) 0 var(--space-4);
  margin-top: var(--space-7);
  font-size: 0.92rem;
}
.site-footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.site-footer h4 {
  font-family: var(--sans); font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { padding: 0.3rem 0; }
.site-footer a {
  color: rgba(250,246,240,0.85); text-decoration: none;
  font-size: 0.92rem;
}
.site-footer a:hover { color: var(--gold); }
.site-footer__brand-mark {
  font-family: var(--serif); font-size: 1.4rem;
  color: var(--cream); margin-bottom: 0.6rem;
}
.site-footer__brand-tag {
  font-size: 0.88rem; line-height: 1.6; color: rgba(250,246,240,0.7);
  margin-bottom: 1rem;
}
.site-footer__bottom {
  padding-top: var(--space-3); border-top: 1px solid rgba(250,246,240,0.12);
  font-size: 0.82rem; color: rgba(250,246,240,0.55);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
@media (max-width: 860px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* ----------- Bands / alternating sections ----------- */
.band-cream { background: var(--cream); }
.band-paper { background: var(--paper); }

/* ----------- Utility ----------- */
.text-center { text-align: center; }
.mt-3 { margin-top: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.divider {
  border: 0; border-top: 1px solid var(--grey-2);
  margin: var(--space-4) 0;
}

/* ----------- Animation: subtle page-load reveal ----------- */
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0; animation: slideUpFade .8s ease-out forwards;
}
.reveal-d1 { animation-delay: 0.05s; }
.reveal-d2 { animation-delay: 0.18s; }
.reveal-d3 { animation-delay: 0.32s; }
.reveal-d4 { animation-delay: 0.46s; }

/* Print */
@media print {
  .site-header, .nav-toggle, .site-footer { display: none; }
  body { background: white; color: black; font-size: 11pt; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
