/* ISOPARB Delhi Chapter - motion and polish (loaded after site.css)
   Hover effects apply only on devices with a real mouse; everything is switched off
   for visitors whose device asks for reduced motion. */
:root {
  --ease: cubic-bezier(.2, .75, .25, 1);
  --shadow-sm: 0 2px 10px -4px rgba(10, 4, 56, .12);
  --shadow-lg: 0 22px 44px -18px rgba(10, 4, 56, .35);
}
html { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--yellow); color: var(--navy); }
a { text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .3s var(--ease); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }

/* page fades in */
.js body { animation: page-in .9s var(--ease) both; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- header ---------- */
.site-header { transition: box-shadow .52s var(--ease), background-color .52s var(--ease); }
.site-header .wrap { transition: min-height .52s var(--ease); }
.site-header.scrolled {
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  backdrop-filter: saturate(1.5) blur(12px);
  box-shadow: 0 10px 30px -18px rgba(10, 4, 56, .45);
}
.site-header.scrolled .wrap { min-height: 80px; }
.brand img.logo { transition: transform .75s var(--ease), width .52s var(--ease), height .52s var(--ease); }
.site-header.scrolled .brand img.logo { width: 68px; height: 68px; }
.brand:hover img.logo { transform: rotate(-10deg) scale(1.06); }

.site-nav a { position: relative; transition: color .3s var(--ease), background-color .3s var(--ease); }
.site-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
  background: var(--yellow); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.site-nav a:not(.nav-cta):hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"]::after { display: none; }
.site-nav a.nav-cta { transition: transform .38s var(--ease), box-shadow .38s var(--ease), background-color .38s var(--ease); }
.site-nav a.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(196, 35, 32, .8); }

/* menu button: three bars that turn into an X */
.nav-toggle { align-items: center; gap: 8px; font-weight: 600; transition: background-color .3s var(--ease); }
.nav-toggle:hover { background: var(--peach-soft); }
.nav-toggle .bars { position: relative; width: 18px; height: 14px; display: inline-block; }
.nav-toggle .bars span {
  position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .52s var(--ease), opacity .3s var(--ease), top .52s var(--ease);
}
.nav-toggle .bars span:nth-child(1) { top: 0; }
.nav-toggle .bars span:nth-child(2) { top: 6px; }
.nav-toggle .bars span:nth-child(3) { top: 12px; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bars span:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* ---------- hero: soft drifting glows + entrance ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  mix-blend-mode: screen;
}
.hero::before {
  width: 640px; height: 640px; top: -300px; right: -180px;
  background: radial-gradient(circle, rgba(250, 240, 60, .16) 0%, rgba(250, 240, 60, .06) 40%, rgba(250, 240, 60, 0) 70%);
  animation: drift-a 30s ease-in-out infinite alternate;
}
.hero::after {
  width: 620px; height: 620px; bottom: -320px; left: -200px;
  background: radial-gradient(circle, rgba(70, 80, 255, .45) 0%, rgba(70, 80, 255, .14) 42%, rgba(70, 80, 255, 0) 70%);
  animation: drift-b 36s ease-in-out infinite alternate;
}
@media (max-width: 600px) {
  .hero::before { width: 360px; height: 360px; top: -200px; right: -160px; }
  .hero::after { width: 380px; height: 380px; bottom: -220px; left: -170px; }
}
@keyframes drift-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(-90px, 70px) scale(1.12); } }
@keyframes drift-b { from { transform: translate(0, 0) scale(1); } to { transform: translate(110px, -60px) scale(1.08); } }

.js .hero .wrap > * { animation: rise 1.35s var(--ease) both; }
.js .hero .wrap > :nth-child(1) { animation-delay: .15s; }
.js .hero .wrap > :nth-child(2) { animation-delay: .33s; }
.js .hero .wrap > :nth-child(3) { animation-delay: .54s; }
.js .hero .wrap > :nth-child(4) { animation-delay: .75s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
.btn { position: relative; overflow: hidden; transition: transform .38s var(--ease), box-shadow .38s var(--ease), background-color .38s var(--ease), color .38s var(--ease); }
.btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  transform: skewX(-20deg); opacity: 0; pointer-events: none;
}
@keyframes shine { from { left: -60%; } to { left: 130%; } }

/* ---------- page title band ---------- */
.page-title { position: relative; overflow: hidden; }
.page-title::after {
  content: ""; position: absolute; right: -120px; top: -170px; width: 440px; height: 440px; border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 240, 60, .32) 0%, rgba(251, 186, 160, .24) 45%, rgba(251, 186, 160, 0) 70%);
  pointer-events: none; animation: drift-a 33s ease-in-out infinite alternate;
}
.page-title .wrap { position: relative; z-index: 1; }
.js .page-title h1::after { animation: grow-bar 1.35s var(--ease) .45s both; transform-origin: left; }
@keyframes grow-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- cards ---------- */
.card { transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .6s var(--ease); box-shadow: var(--shadow-sm); }
.card .icon { transition: transform .6s var(--ease), background-color .45s var(--ease), color .45s var(--ease); }
.card > a:last-child { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.card > a:last-child::after { content: "\2192"; transition: transform .45s var(--ease); }
.card.person, .card.event { position: relative; }
.card.person::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--blue), var(--yellow), var(--red));
  transform: scaleX(0); transform-origin: left; transition: transform .75s var(--ease);
}
img.photo { transition: transform .75s var(--ease), box-shadow .75s var(--ease); }
.event-photos { overflow: hidden; }
.event-photos img { transition: transform 1.8s var(--ease); cursor: zoom-in; }

.conf-band { transition: transform .6s var(--ease), box-shadow .6s var(--ease); position: relative; overflow: hidden; }
.conf-band > * { position: relative; z-index: 1; }
.conf-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, 0) 70%);
  transform: translateX(-100%); animation: sheen 10.5s var(--ease) 2.25s infinite;
}
@keyframes sheen { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.site-footer a { transition: color .3s var(--ease), padding-left .38s var(--ease); }

/* ---------- hover effects: only on devices with a real mouse ---------- */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -14px rgba(10, 4, 56, .55); }
  .btn:hover::after { opacity: 1; animation: shine 1.2s var(--ease); }
  .card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
  .card:hover .icon { background: var(--blue); color: #fff; transform: rotate(-8deg) scale(1.1); }
  .card:hover > a:last-child::after { transform: translateX(5px); }
  .card.person:hover::before { transform: scaleX(1); }
  .card.person:hover img.photo { transform: scale(1.06); box-shadow: 0 0 0 3px var(--yellow), 0 16px 30px -10px rgba(10, 4, 56, .45); }
  .card.event:hover .event-photos img { transform: scale(1.07); }
  .conf-band:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
  .contact-list li { transition: background-color .38s var(--ease), padding-left .38s var(--ease); }
  .contact-list li:hover { background: var(--peach-soft); padding-left: 10px; }
  .site-footer li a:hover { padding-left: 4px; }
  table tbody tr { transition: background-color .3s var(--ease); }
  table tbody tr:hover { background: var(--peach-soft); }
}
/* gentle press feedback on touch screens */
@media (hover: none) {
  .card:active, .btn:active { transform: scale(.985); }
}

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- "Read the report" ---------- */
details summary { list-style: none; display: inline-flex; align-items: center; gap: 10px; }
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .45s var(--ease);
}
details[open] summary::before { transform: rotate(45deg); }
details[open] > :not(summary) { animation: unfold .68s var(--ease) both; }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 20;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; box-shadow: 0 12px 24px -10px rgba(10, 4, 56, .6);
  display: grid; place-items: center;
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity .52s var(--ease), transform .52s var(--ease), background-color .38s var(--ease), color .38s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 20px; height: 20px; }
.to-top:hover { background: var(--yellow); color: var(--navy); }

/* ---------- photo viewer ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px;
  background: rgba(10, 4, 56, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .52s var(--ease), visibility 0s linear .52s;
}
.lightbox.open { opacity: 1; visibility: visible; transition: opacity .52s var(--ease), visibility 0s; }
.lightbox img {
  max-width: min(1100px, 100%); max-height: 80vh; border-radius: 10px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
  transform: scale(.94); transition: transform .68s var(--ease), opacity .38s var(--ease);
}
.lightbox.open img { transform: none; }
.lightbox button {
  position: absolute; border: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .14);
  width: 46px; height: 46px; border-radius: 50%; font-size: 1.5rem; line-height: 1;
  display: grid; place-items: center; transition: background-color .38s var(--ease), color .38s var(--ease);
}
.lightbox button:hover { background: var(--yellow); color: var(--navy); }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox .lb-prev { left: 16px; top: 50%; margin-top: -23px; }
.lightbox .lb-next { right: 16px; top: 50%; margin-top: -23px; }
.lightbox .lb-caption { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #E6E4F5; font-size: .9rem; padding: 0 70px; }
@media (max-width: 600px) {
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 60px; margin: 0; }
  .lightbox .lb-caption { bottom: 16px; padding: 0 16px; }
}

/* ---------- small-screen refinements ---------- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  section.block { padding: 44px 0; }
  .hero { padding: 56px 0 52px; }
  .hero .btn-row { flex-direction: column; align-items: stretch; }
  .hero .btn { text-align: center; }
  .page-title { padding: 32px 0 22px; }
  .conf-band { padding: 24px; }
  .conf-band .btn { text-align: center; }
  .section-head { flex-direction: column; gap: 4px; }
  .brand-text strong { font-size: 1.35rem; }
  .brand img.logo { width: 72px; height: 72px; }
  .site-header .wrap { min-height: 92px; }
  .site-header.scrolled .brand img.logo { width: 58px; height: 58px; }
  .card { padding: 20px; }
  .grid-people { grid-template-columns: 1fr 1fr; gap: 14px; }
  .grid-people .card { padding: 18px 10px; }
  .grid-people img.photo { width: 104px; height: 104px; }
  .grid-people h3 { font-size: 1rem; }
  .person .role { font-size: .74rem; }
  .person-lines { font-size: .8rem; }
}
@media (max-width: 360px) { .grid-people { grid-template-columns: 1fr; } }

/* =====================================================================
   Round 2: typography, wave, facts, spotlight, timeline, progress, page fades
   ===================================================================== */

/* ---------- typography ---------- */
body { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: -.003em; }
h1, h2, h3, .brand-text strong, .btn, .fact-num, .fee-amount, .eyebrow, .site-nav a.nav-cta, .person .role, .tag {
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
h1 { letter-spacing: -.025em; font-weight: 800; }
h2 { letter-spacing: -.02em; font-weight: 800; }
h3 { letter-spacing: -.01em; font-weight: 700; }
.lead, .hero p { font-weight: 400; }

/* ---------- curved bottom edge on the home banner ---------- */
.hero { padding-bottom: 160px; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 80px; fill: #fff; pointer-events: none; }

/* ---------- facts panel floating over the banner ---------- */
.facts-wrap { position: relative; z-index: 2; margin-top: -110px; }
.facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 34px 70px -34px rgba(10, 4, 56, .5);
  overflow: hidden;
}
.fact { position: relative; padding: 28px 22px 26px; text-align: center; }
.fact + .fact::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--line); }
.fact-num {
  display: block; font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; line-height: 1; margin-bottom: 10px;
  background: linear-gradient(135deg, var(--blue) 10%, #6A2BC0 55%, var(--red) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.fact-label { display: block; color: var(--muted); font-size: .9rem; line-height: 1.4; max-width: 220px; margin: 0 auto; }
.facts-wrap + section.block { padding-top: 48px; }
@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3)::before { display: none; }
  .fact:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .hero { padding-bottom: 130px; }
  .hero-wave { height: 46px; }
  .facts-wrap { margin-top: -86px; }
  .fact { padding: 20px 12px 18px; }
  .fact-label { font-size: .8rem; }
}

/* ---------- soft spotlight that follows the mouse over cards ---------- */
.card { position: relative; }
@media (hover: hover) and (pointer: fine) {
  .card::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    opacity: 0; transition: opacity .6s var(--ease);
    background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(250, 240, 60, .16), rgba(251, 186, 160, .10) 40%, rgba(251, 186, 160, 0) 70%);
  }
  .card:hover::after { opacity: 1; }
}

/* ---------- events page as a timeline ---------- */
@media (min-width: 700px) {
  .event-list { position: relative; padding-left: 46px; }
  .event-list::before {
    content: ""; position: absolute; left: 14px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px;
    background: linear-gradient(var(--blue), var(--yellow) 55%, var(--red));
  }
  .event-list > .card { overflow: visible; }
  .event-list > .card::before {
    content: ""; position: absolute; left: -41px; top: 28px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; border: 4px solid var(--blue); box-shadow: 0 0 0 5px var(--peach-soft);
    transition: transform .52s var(--ease), border-color .52s var(--ease);
  }
  .event-list .event-photos { border-radius: var(--radius) var(--radius) 0 0; }
  .event-list > .card:hover::before { transform: scale(1.25); border-color: var(--red); }
}
@media (min-width: 900px) {
  .event-list .event-photos { border-radius: var(--radius) 0 0 var(--radius); }
}

/* ---------- phones: headline scales with the screen so it keeps its three lines ---------- */
@media (max-width: 600px) {
  .hero h1 { font-size: clamp(1.4rem, 7vw, 2rem); line-height: 1.2; }
}

/* ---------- mid-size screens: keep the larger menu on one line ---------- */
@media (min-width: 861px) and (max-width: 1180px) {
  .site-nav a { font-size: .97rem; padding: 8px 9px; }
  .site-nav a:not(.nav-cta)::after { left: 9px; right: 9px; }
  .brand img.logo { width: 80px; height: 80px; }
  .brand-text strong { font-size: 1.45rem; }
  .brand-text span { font-size: .9rem; }
}

@media (min-width: 861px) and (max-width: 980px) {
  .site-nav a { font-size: .9rem; padding: 8px 6px; }
  .site-nav a:not(.nav-cta)::after { left: 6px; right: 6px; }
  .site-nav a.nav-cta { padding: 8px 12px; }
  .brand { gap: 10px; }
  .brand img.logo { width: 70px; height: 70px; }
  .brand-text strong { font-size: 1.25rem; }
  .brand-text span { font-size: .82rem; }
}

/* ---------- reading-progress bar ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none;
  transform-origin: left; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--blue), var(--yellow), var(--red));
}

/* ---------- smooth cross-fade between pages (Chrome, Edge, Safari) ---------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: vt-out .33s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .57s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
@supports (view-transition-name: none) { .js body { animation: none; } }

/* ---------- respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .progress { display: none; }
}
