/* ==========================================================================
   INSTITUTE OF HEART RESEARCH — site.css
   Vanilla CSS. Mobile-first. 8px spacing scale.
   Breakpoints: 360 (base) · 768 · 1024 · 1440

   CONTENTS
   01. Tokens
   02. Reset & base
   03. Typography
   04. Layout helpers
   05. Buttons
   06. ECG rule (signature device)
   07. Contact strip
   08. Masthead & navigation
   09. Hero
   10. Trust bar
   11. Prose sections
   12. Cards
   13. Faculty & list blocks
   14. Contact page
   15. Call-to-action band
   16. Footer
   17. WhatsApp button
   18. Utilities & motion
   ========================================================================== */


/* 01. TOKENS ============================================================== */
:root {
  /* Colour — brand blue sampled directly from the existing logo (#000093) */
  --brand:      #000093;
  --brand-deep: #000070;
  --brand-wash: #EFEFF8;
  --pulse:      #C8102E;   /* ECG accent, used sparingly */
  --ink:        #10122B;
  --muted:      #494D6B;
  --rule:       #DCDCE8;
  --paper:      #FFFFFF;
  --paper-2:    #F7F7FB;

  /* Type */
  --display: "Spectral", Georgia, "Noto Serif Tamil", serif;
  --body:    "IBM Plex Sans", -apple-system, "Segoe UI", "Noto Sans Tamil", sans-serif;

  /* 8px spacing scale */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 48px; --s6: 64px; --s7: 96px; --s8: 128px;

  --wrap: 1200px;
  --radius: 2px;   /* near-square: institutional, not startup-rounded */
}


/* 02. RESET & BASE ======================================================== */
*, *::before, *::after { box-sizing: border-box; }

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

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

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

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-deep); }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--pulse);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--brand); color: #fff;
  padding: var(--s2) var(--s3); z-index: 100;
}
.skip-link:focus { left: var(--s2); top: var(--s2); }


/* 03. TYPOGRAPHY ========================================================== */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 var(--s2);
}
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 var(--s3); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 var(--s2);
}

.lede { font-size: 1.15rem; color: var(--muted); }


/* 04. LAYOUT HELPERS ====================================================== */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s3);
}

.section { padding-block: var(--s6); }
.section--tint { background: var(--paper-2); }
.section--top  { padding-top: var(--s5); }

.grid { display: grid; gap: var(--s4); }


/* 05. BUTTONS ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  min-height: 48px;                 /* comfortable Android tap target */
  padding: 0 var(--s3);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid var(--brand);
  transition: background .15s ease, color .15s ease;
}
.btn--solid  { background: var(--brand); color: #fff; }
.btn--solid:hover  { background: var(--brand-deep); color: #fff; }
.btn--ghost  { background: transparent; color: var(--brand); }
.btn--ghost:hover  { background: var(--brand-wash); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s2); }


/* 06. ECG RULE — the signature device ====================================
   A hairline electrocardiogram trace stands in for the usual decorative
   divider. It is taken from the Institute's own diagnostic work.
   ======================================================================== */
.ecg {
  display: block;
  width: 240px;
  max-width: 100%;
  height: 24px;
  color: var(--pulse);
  margin: var(--s3) 0;
}
.ecg--hero { width: 320px; }
.ecg--foot { color: #8A8FC0; margin-top: var(--s3); }
.ecg--center { margin-inline: auto; }

/* Draw-on animation, once, on load */
.ecg--hero path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: trace 1.6s ease-out forwards;
}
@keyframes trace { to { stroke-dashoffset: 0; } }


/* 07. CONTACT STRIP ======================================================= */
.strip {
  background: var(--brand);
  color: #fff;
  font-size: 0.82rem;
}
.strip__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s1);
  min-height: 40px;
  padding-block: var(--s1);
}
.strip p { margin: 0; }
.strip__estd { opacity: .88; letter-spacing: .02em; }
.strip a { color: #fff; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.strip a:hover { color: #fff; text-decoration: underline; }
.ico { width: 14px; height: 14px; }


/* 08. MASTHEAD & NAVIGATION =============================================== */
.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 40;
}
.masthead__inner {
  display: flex;
  flex-wrap: wrap;               /* lets the mobile nav drop to its own row */
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding-block: var(--s2);
}
.brand img { width: 180px; height: auto; }

.burger {
  width: 48px; height: 48px;
  display: grid; place-content: center; gap: 5px;
  background: none; border: 1px solid var(--rule); border-radius: var(--radius);
  cursor: pointer;
}
.burger__bar { width: 20px; height: 2px; background: var(--brand); display: block; }

/* Mobile: nav collapses */
.nav {
  display: none;
  width: 100%;
  order: 3;
  border-top: 1px solid var(--rule);
  padding-top: var(--s2);
  margin-top: var(--s2);
}
.nav.is-open { display: block; }
.nav__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav__list a:not(.btn) {
  display: block;
  padding: 12px 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.nav__list a:not(.btn):hover { color: var(--brand); }
.nav__list a:not(.btn)[aria-current="page"] { color: var(--brand); font-weight: 600; }
.nav__cta-wrap { margin-top: var(--s2); }
.nav__cta-wrap a { color: #fff; }
.nav__cta-wrap a:hover { color: #fff; }


/* 09. HERO ================================================================
   No hero photograph: the page paints from HTML and CSS alone, which keeps
   LCP fast on 4G. The headline itself is the hero.
   ======================================================================== */
.hero {
  background: linear-gradient(180deg, var(--brand-wash) 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--rule);
  padding-block: var(--s6) var(--s6);
}
.hero h1 {
  font-size: clamp(2rem, 7vw, 3.4rem);
  max-width: 18ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand);
}
.hero__lede { max-width: 56ch; font-size: 1.1rem; color: var(--muted); }

/* Inner page banner — smaller sibling of the hero */
.banner {
  background: var(--brand);
  color: #fff;
  padding-block: var(--s5);
}
.banner h1 { color: #fff; font-size: clamp(1.8rem, 6vw, 2.8rem); }
.banner .crumbs { font-size: 0.85rem; color: #C9CBE8; margin: 0; }
.banner .crumbs a { color: #fff; }


/* 10. AT-A-GLANCE PANEL ===================================================
   Trust details — years, legal status, address, phone, GSTIN — held beside
   the headline so they are visible without scrolling on a laptop.
   ======================================================================== */
.panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: var(--s4);
  margin-top: var(--s5);
}
.panel__h {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; color: var(--brand);
  margin: 0 0 var(--s3);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--rule);
}
.panel__dl { margin: 0; }
.panel__dl dt {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 2px;
}
.panel__dl dd {
  margin: 0 0 var(--s3);
  font-size: .95rem; font-weight: 600; line-height: 1.45;
}
.panel__dl dd:last-child { margin-bottom: 0; }
.panel__num {
  font-family: var(--display);
  font-size: 1.8rem; line-height: 1;
  color: var(--brand);
  margin-right: 4px;
}
.panel__hours { font-weight: 400; color: var(--muted); font-size: .85rem; }


/* 11. PROSE SECTIONS ====================================================== */
.prose { max-width: 68ch; }
.prose h2 { margin-top: var(--s5); }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--muted); }
.prose strong { color: var(--ink); }

.split { display: grid; gap: var(--s5); }
.split__media img { border-radius: var(--radius); border: 1px solid var(--rule); }

.caption { font-size: .8rem; color: var(--muted); margin-top: var(--s1); }


/* 12. CARDS =============================================================== */
.cards { display: grid; gap: var(--s3); }
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: var(--s4);
}
.card h3 { margin-bottom: var(--s2); }
.card p { color: var(--muted); font-size: .97rem; }
.card__link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: .9rem; text-decoration: none;
  margin-top: var(--s2);
}
.card__link::after { content: "→"; transition: transform .15s ease; }
.card__link:hover::after { transform: translateX(3px); }


/* 13. FACULTY & LIST BLOCKS =============================================== */
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.people li {
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--rule);
}
.people b { display: block; font-weight: 600; font-size: .98rem; }
.people span { color: var(--muted); font-size: .88rem; }

.ticklist { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.ticklist li {
  position: relative;
  padding-left: var(--s3);
  margin-bottom: var(--s1);
  color: var(--muted);
}
.ticklist li::before {
  content: "";
  position: absolute; left: 0; top: 11px;
  width: 8px; height: 2px; background: var(--pulse);
}

/* Numbered list — used only where the source content is genuinely a
   numbered set of research projects, not as decoration. */
.numlist { margin: 0 0 var(--s3); padding-left: var(--s3); color: var(--muted); }
.numlist li { margin-bottom: var(--s1); padding-left: var(--s1); }
.numlist li::marker { color: var(--brand); font-weight: 600; }


/* 14. CONTACT PAGE ======================================================== */
.office {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: var(--s4);
  background: var(--paper);
}
.office h2 { font-size: 1.25rem; }
.office address { font-style: normal; color: var(--muted); }
.office dl { margin: var(--s3) 0 0; display: grid; gap: var(--s1); }
.office dt {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.office dd { margin: 0 0 var(--s2); font-weight: 600; }
.office dd:last-child { margin-bottom: 0; }


/* 15. CALL-TO-ACTION BAND ================================================= */
.cta-band {
  background: var(--brand);
  color: #fff;
  padding-block: var(--s6);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #D3D5EE; max-width: 52ch; }
.cta-band .btn--solid { background: #fff; color: var(--brand); border-color: #fff; }
.cta-band .btn--solid:hover { background: var(--brand-wash); color: var(--brand); }
.cta-band .btn--ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.cta-band .btn--ghost:hover { background: rgba(255,255,255,.1); color: #fff; }


/* 16. FOOTER ============================================================== */
.foot { background: #0B0E28; color: #C9CBE8; padding-top: var(--s6); font-size: .93rem; }
.foot__grid { display: grid; gap: var(--s5); }
.foot__h {
  font-family: var(--body);
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: #8A8FC0; margin: 0 0 var(--s2);
}
.foot__name { font-family: var(--display); font-size: 1.25rem; color: #fff; margin: 0 0 var(--s1); }
.foot__legal { color: #9CA0CB; margin: 0; }
.foot__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.foot a { color: #C9CBE8; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot__addr { font-style: normal; line-height: 1.7; }

.foot__trust {
  display: flex; flex-wrap: wrap; gap: var(--s3);
  padding-top: var(--s4);
  font-size: .82rem; color: #8A8FC0;
}
.foot__bar { margin-top: var(--s5); border-top: 1px solid #23264D; padding-block: var(--s3); }
.foot__bar-inner { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: space-between; }
.foot__bar p { margin: 0; font-size: .85rem; color: #8A8FC0; }
.foot__social { list-style: none; display: flex; gap: var(--s3); margin: 0; padding: 0; font-size: .85rem; }


/* 17. WHATSAPP BUTTON ===================================================== */
.wa {
  position: fixed; right: var(--s3); bottom: var(--s3);
  width: 52px; height: 52px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: grid; place-content: center;
  box-shadow: 0 3px 12px rgba(0,0,0,.25);
  z-index: 50;
}
.wa svg { width: 28px; height: 28px; }


/* 18. UTILITIES & MOTION ================================================== */
.note {
  border-left: 3px solid var(--pulse);
  background: #FDF3F4;
  padding: var(--s3);
  font-size: .9rem;
  color: var(--ink);
  border-radius: var(--radius);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .ecg--hero path { stroke-dashoffset: 0; }
}


/* ==========================================================================
   BREAKPOINT: 768px — tablets
   ========================================================================== */
@media (min-width: 768px) {
  body { font-size: 17px; }
  .section { padding-block: var(--s7); }

  .cards { grid-template-columns: repeat(2, 1fr); }
  /* Columns align to the top: these hold prose of unequal length, and
     centring them leaves the shorter column floating down the page. */
  .split { grid-template-columns: 1fr 1fr; align-items: start; }
  .split--middle { align-items: center; }
  .foot__grid { grid-template-columns: repeat(2, 1fr); }
  .office { padding: var(--s5); }
}


/* ==========================================================================
   BREAKPOINT: 1024px — laptops. Nav goes horizontal here.
   ========================================================================== */
@media (min-width: 1024px) {
  .burger { display: none; }

  .nav {
    display: block;
    width: auto; order: 0;
    border-top: 0; padding-top: 0; margin-top: 0;
  }
  .nav__list {
    display: flex; align-items: center; gap: var(--s4);
  }
  /* Note: this rule is scoped away from .btn so the CTA keeps its own
     horizontal padding — a plain `.nav__list a` would out-specify it. */
  .nav__list a:not(.btn) { padding: var(--s1) 0; font-size: .96rem; }
  .nav__list a:not(.btn)[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--pulse); }
  .nav__cta-wrap { margin-top: 0; margin-left: var(--s2); }
  .nav__cta-wrap a { box-shadow: none; white-space: nowrap; }

  .brand img { width: 220px; }

  .hero { padding-block: var(--s7) var(--s7); }

  /* Hero splits: headline left, at-a-glance panel right and above the fold */
  .hero__grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: var(--s6);
    align-items: start;
  }
  .panel { margin-top: 0; position: relative; top: var(--s2); }
  .foot__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .split--wide { grid-template-columns: 1.1fr 1fr; gap: var(--s6); }
}


/* ==========================================================================
   BREAKPOINT: 1440px — large desktop
   ========================================================================== */
@media (min-width: 1440px) {
  :root { --wrap: 1240px; }
  body { font-size: 18px; }
}
