/* ACMERI — palette taken from the ACMERI logo (yellow · blue · red) */

:root {
  /* Logo colours */
  --logo-yellow: #fdc400;
  --logo-blue: #0aa0d8;
  --logo-red: #e2311d;

  /* Text-safe working shades of the logo colours */
  --blue: #0a72ab;        /* links, primary buttons (4.8:1 on white) */
  --navy: #0b2a45;        /* dark sections, hero overlay */
  --navy-deep: #081d31;   /* footer */
  --blue-soft: #e3f3fb;
  --yellow: var(--logo-yellow);
  --yellow-dark: #8a6a00; /* yellow-family text on light backgrounds */
  --yellow-soft: #fff5cf;
  --red: #cc2a17;         /* eyebrows, highlights (5:1 on white) */
  --red-soft: #fde8e5;

  --ink: #141c26;
  --ink-2: #3b4656;
  --muted: #687384;
  --line: #e3e6eb;
  --paper: #fafbfc;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 42, 69, .06), 0 8px 24px rgba(11, 42, 69, .07);
  --max: 1160px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tricolor: linear-gradient(90deg, var(--logo-yellow) 0 33.34%, var(--logo-blue) 33.34% 66.67%, var(--logo-red) 66.67% 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--red); margin-bottom: .8rem;
}
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header::before, .site-footer::before { content: ""; display: block; height: 4px; background: var(--tricolor); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
/* Logo emblem: the circle from acmeri.png, clipped so its background is always transparent */
.brand-logo { width: 46px; height: 46px; flex: none; clip-path: circle(49% at 50% 50%); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--serif); font-size: 1.35rem; letter-spacing: .03em; }
.brand-text small { font-size: .68rem; color: var(--muted); letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none;
  color: var(--ink-2); font-size: .93rem; font-weight: 500;
}
.nav-links a:hover { background: var(--blue-soft); color: var(--navy); }
.nav-links a[aria-current="page"] { color: var(--blue); background: var(--blue-soft); }
.nav-links .nav-institute { color: var(--red); }
.nav-links .nav-institute:hover, .nav-links .nav-institute[aria-current="page"] { color: var(--red); background: var(--red-soft); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--ink); font: inherit; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  font-family: var(--sans); transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-accent { background: var(--yellow); color: var(--ink); }
.btn-accent:hover { background: #ebb500; color: var(--ink); }
.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-light { background: #fff; color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: 64px 0 40px; border-bottom: 1px solid var(--line); background:
  radial-gradient(circle at 94% 8%, var(--yellow-soft) 0, transparent 34%),
  radial-gradient(circle at 70% 120%, var(--red-soft) 0, transparent 34%),
  radial-gradient(circle at 0% 100%, var(--blue-soft) 0, transparent 45%); }
.page-head .lead { margin-top: .4rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }

/* ---------- Hero (full-bleed photo with text overlay) ---------- */
.hero, .hero.page-head {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(88vh, 780px); display: flex; align-items: center;
  padding: 120px 0 104px; background: var(--navy); border-bottom: 0;
}
.hero-grid { display: block; }
.hero-grid > div:first-child { position: relative; z-index: 2; max-width: 660px; }
.hero h1 { color: #fff; font-size: clamp(2.5rem, 6vw, 4.4rem); text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
.hero h1 em { font-style: italic; color: var(--yellow); }
.hero .lead { color: rgba(255, 255, 255, .9); }
.hero .eyebrow { color: var(--yellow); }
.hero .crumbs, .hero .crumbs a { color: rgba(255, 255, 255, .7); }
.hero .btn-ghost { color: #fff; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 29, 49, .92) 0%, rgba(8, 29, 49, .72) 42%, rgba(8, 29, 49, .15) 78%, rgba(8, 29, 49, 0) 100%),
    linear-gradient(0deg, rgba(8, 29, 49, .55) 0%, rgba(8, 29, 49, 0) 35%);
}
.hero-badge {
  position: absolute; z-index: 2; right: max(16px, calc((100% - var(--max)) / 2)); bottom: 40px;
  background: #fff; border-radius: 14px; padding: 14px 18px; border-top: 4px solid var(--logo-yellow);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25); display: flex; gap: 12px; align-items: center; max-width: 290px;
}
.hero-badge b { font-family: var(--serif); font-size: 1.9rem; color: var(--red); line-height: 1; }
.hero-badge span { font-size: .82rem; line-height: 1.35; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }
.section-dark { background: var(--navy); color: #d3e2ee; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .eyebrow { color: var(--yellow); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 3/2; object-fit: cover; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  box-shadow: 0 1px 2px rgba(11, 42, 69, .04);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; margin-bottom: 18px;
}
.icon svg { width: 24px; height: 24px; }
.icon.saffron { background: var(--yellow-soft); color: #a77f00; }
/* Cycle the three logo colours across icon rows */
.grid > :nth-child(3n+2) > .icon:not(.saffron) { background: var(--red-soft); color: var(--red); }
.grid > :nth-child(3n) > .icon:not(.saffron) { background: var(--yellow-soft); color: #a77f00; }
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .2s ease, box-shadow .2s ease; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.card-link .more { color: var(--blue); font-weight: 600; font-size: .92rem; }

.media-card { padding: 0; overflow: hidden; }
.media-card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.media-card .body { padding: 22px 24px 26px; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); margin-bottom: 10px;
}
.tag.saffron { background: var(--yellow-soft); color: var(--yellow-dark); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.stat { padding: 28px 24px; border-right: 1px solid var(--line); border-top: 4px solid var(--logo-blue); }
.stat:nth-child(3n+2) { border-top-color: var(--logo-red); }
.stat:nth-child(3n) { border-top-color: var(--logo-yellow); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--serif); font-size: 2.4rem; color: var(--navy); line-height: 1; margin-bottom: 8px; }
.stat span { font-size: .9rem; }

/* Values / pills */
.pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.pills li { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 500; color: var(--ink); }

/* Lists */
.check { list-style: none; padding: 0; margin: 0; }
.check li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--blue-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a72ab' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat;
}
.feature .check li::before { background-color: var(--yellow); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 26px 28px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--logo-blue); box-shadow: 0 0 0 4px var(--paper); }
.timeline li:nth-child(3n+2)::before { background: var(--logo-red); }
.timeline li:nth-child(3n)::before { background: var(--logo-yellow); }
.section-alt .timeline li::before { box-shadow: 0 0 0 4px #fff; }
.timeline time { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); margin-bottom: 2px; }
.timeline p { margin: 0; color: var(--ink); }

/* Research list */
.research { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.research li { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--logo-blue); border-radius: 12px; padding: 18px 22px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.research li:nth-child(3n+2) { border-left-color: var(--logo-red); }
.research li:nth-child(3n) { border-left-color: var(--logo-yellow); }
.research li strong { color: var(--ink); font-weight: 600; display: block; }
.research .partner { font-size: .82rem; color: var(--muted); white-space: nowrap; text-align: right; }

/* People */
.person { text-align: left; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%; background: var(--blue); color: #fff;
  display: grid; place-items: center; font-family: var(--serif); font-size: 1.3rem; margin-bottom: 16px;
}
.grid > :nth-child(4n+2) .avatar { background: var(--red); }
.grid > :nth-child(4n+3) .avatar { background: var(--yellow); color: var(--ink); }
.grid > :nth-child(4n) .avatar { background: var(--navy); }
.person h3 { font-size: 1.15rem; margin-bottom: .2em; }
.person p { font-size: .92rem; color: var(--muted); margin: 0; }

/* Feature (institute) band */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; border-radius: 20px; overflow: hidden; background: var(--navy); color: #d3e2ee;
}
.feature img { width: 100%; height: 100%; object-fit: cover; min-height: 380px; }
.feature .body { padding: 52px 48px; }
.feature h2 { color: #fff; }
.feature .eyebrow { color: var(--yellow); }

/* Quote */
.quote { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.8rem); color: var(--ink); line-height: 1.35; font-style: italic; margin: 0 0 1rem; border-left: 4px solid var(--logo-yellow); padding-left: 18px; }

/* Hindi block */
.hi { font-family: "Noto Sans Devanagari", var(--sans); line-height: 1.85; }
.card-hindi { background: var(--yellow-soft); border-color: #f4e1a0; }

/* CTA */
.cta { background: linear-gradient(120deg, var(--blue) 0%, var(--navy) 100%); color: #d3e2ee; border-radius: 20px; padding: 56px; display: flex; justify-content: space-between; align-items: center; gap: 32px; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--tricolor); }
.cta h2 { color: #fff; margin-bottom: .3em; }
.cta p { margin: 0; max-width: 56ch; }

/* Forms */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--ink); }
.form input, .form textarea, .form select {
  font: inherit; font-weight: 400; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent; }
.form textarea { min-height: 140px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: .82rem; color: var(--muted); margin: 0; }
.form .hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-size: .92rem; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.ok { color: #1c7a3a; }
.form-status.err { color: var(--red); }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact-list li { display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: start; }
.contact-list .icon { margin: 0; width: 42px; height: 42px; }
.contact-list b { display: block; color: var(--ink); font-size: .85rem; letter-spacing: .02em; }

.map { border: 0; width: 100%; height: 320px; border-radius: var(--radius); filter: saturate(.85); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 12px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.gallery figcaption { font-size: .8rem; color: var(--muted); margin-top: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #a9b8c7; padding: 0 0 28px; font-size: .92rem; }
.site-footer::before { margin-bottom: 64px; }
.site-footer a { color: #dbe6f0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 48px; }
.site-footer h4 { color: var(--yellow); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .brand { color: #fff; margin-bottom: 18px; gap: 14px; }
.site-footer .brand:hover { text-decoration: none; }
.site-footer .brand-logo { width: 64px; height: 64px; }
.site-footer .brand-text strong { font-size: 1.7rem; color: #fff; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--line); padding: 12px 16px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  section { padding: 56px 0; }
  /* !important beats the inline padding on the Institute hero */
  .hero, .hero.page-head { min-height: 0; padding: 72px 0 150px !important; }
  .hero-media::after { background: linear-gradient(0deg, rgba(8, 29, 49, .93) 0%, rgba(8, 29, 49, .8) 55%, rgba(8, 29, 49, .58) 100%); }
  .split, .feature { grid-template-columns: 1fr; gap: 32px; }
  .hero-badge { left: 16px; right: auto; bottom: 20px; }
  .feature .body { padding: 36px 24px; }
  .feature img { min-height: 240px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cta { flex-direction: column; align-items: flex-start; padding: 36px 24px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .research li { grid-template-columns: 1fr; }
  .research .partner { text-align: left; white-space: normal; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid-4, .foot-grid, .form .row { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
}
