/* ================================================================
   Justine C. Lee — Shared Design System
   ================================================================ */

:root {
  --paper: #fcfcfd;
  --mist: #f5f7fb;
  --rose-wash: #fff1f3;
  --peach-wash: #fff8f0;
  --lav-wash: #f5f3ff;
  --blue-wash: #eff6ff;
  --teal-wash: #f0fdfa;

  --ink: #18181b;
  --muted: rgba(24,24,27,.66);
  /* Secondary text remains visually quiet while meeting WCAG AA on --paper. */
  --soft: rgba(24,24,27,.62);
  --line: rgba(24,24,27,.09);

  --blue: #2563eb;
  --blue-light: #3b82f6;
  --pink: #be185d;
  --coral: #f97316;
  --purple: #7c3aed;
  --teal: #0d9488;

  --surgery: #be185d;
  --surgery-bg: rgba(190,24,93,.09);
  --surgery-border: rgba(190,24,93,.18);
  --science: #2563eb;
  --science-bg: rgba(37,99,235,.09);
  --science-border: rgba(37,99,235,.18);
  --mission: #7c3aed;
  --mission-bg: rgba(124,58,237,.09);
  --mission-border: rgba(124,58,237,.18);

  --white: #ffffff;
  --focus: #2563eb;
  --max: 1200px;
  --radius: 26px;
  --radius-sm: 16px;
  --shadow-sm: 0 2px 8px rgba(18,18,26,.05), 0 1px 2px rgba(18,18,26,.04);
  --shadow: 0 8px 32px rgba(18,18,26,.08), 0 2px 6px rgba(18,18,26,.04);
  --shadow-lg: 0 24px 80px rgba(18,18,26,.11), 0 4px 16px rgba(18,18,26,.05);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  letter-spacing: -.014em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ── Ambient background ── */
body::before {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -2;
  background:
    radial-gradient(circle at 16% 14%, rgba(255,175,195,.36), transparent 28vmax),
    radial-gradient(circle at 84% 6%,  rgba(37,99,235,.13),   transparent 24vmax),
    radial-gradient(circle at 80% 76%, rgba(124,58,237,.11),  transparent 26vmax),
    linear-gradient(180deg, #ffffff 0%, var(--mist) 50%, #ffffff 100%);
  animation: drift 24s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-1.5%,-1%,0) scale(1); }
  to   { transform: translate3d( 1.5%, 1%,0) scale(1.03); }
}

/* ── Accessibility ── */
.skip-link {
  position: absolute; left: 16px; top: 8px;
  transform: translateY(-160%); z-index: 200;
  background: var(--white); color: var(--ink);
  padding: 10px 16px; border-radius: 8px; font-weight: 700;
  transition: transform .2s; text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

/* ── Navigation ── */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(252,252,253,.84);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid rgba(24,24,27,.07);
}
nav {
  max-width: var(--max); margin: 0 auto;
  min-height: 58px; padding: 0 24px;
  display: flex; align-items: center; gap: 6px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  color: var(--ink); font-size: 14px; font-weight: 720;
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  letter-spacing: -.025em; margin-right: 8px;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-icon { width: 28px; height: 28px; flex-shrink: 0; display: block; }

/* Pillar switcher */
.pillar-switch {
  display: flex; align-items: center; gap: 3px;
  padding: 4px; background: rgba(24,24,27,.05);
  border-radius: 9px; flex-shrink: 0;
}
.pillar-link {
  padding: 5px 13px; border-radius: 6px;
  font-size: 13px; font-weight: 650; text-decoration: none;
  color: var(--muted);
  transition: all .18s ease;
}
.pillar-link:hover { color: var(--ink); text-decoration: none; background: rgba(255,255,255,.7); }
.pillar-link.active { color: #fff; }
.pillar-link.active-surgery { background: var(--surgery); color: #fff; }
.pillar-link.active-science  { background: var(--science);  color: #fff; }
.pillar-link.active-mission  { background: var(--mission);  color: #fff; }

/* Section links */
.nav-links {
  display: flex; align-items: center; gap: 2px;
  margin-left: auto; font-size: 12.5px;
}
.nav-links a {
  color: var(--muted); text-decoration: none;
  padding: 6px 9px; border-radius: 8px;
  transition: color .15s, background .15s; white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); background: rgba(24,24,27,.05); }
.mobile-global-link { display: none; }
.nav-cta {
  background: var(--ink) !important;
  color: #fff !important;
  padding: 7px 14px !important;
  border-radius: 7px !important;
  font-weight: 620 !important;
  margin-left: 4px !important;
}
.nav-cta:hover { opacity: .88; }

/* Hamburger */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 10px; cursor: pointer; flex-shrink: 0; margin-left: auto;
  min-width: 44px; min-height: 44px;
}
.nav-toggle span {
  display: block; width: 20px; height: 1.5px;
  background: var(--ink); border-radius: 2px;
  transition: transform .28s ease, opacity .28s ease;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Typography ── */
a { color: var(--blue); text-decoration-thickness: .07em; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .13em; }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 12px;
}
h1, h2, h3, h4 { margin: 0; letter-spacing: -.03em; line-height: 1.06; }
h1 { font-size: clamp(48px, 7.5vw, 90px); font-weight: 800; }
h2 { font-size: clamp(34px, 5vw, 60px); font-weight: 760; }
h3 { font-size: clamp(21px, 2.6vw, 32px); font-weight: 720; }
p  { margin: 0; }

.gradient-text {
  background: linear-gradient(110deg, #6140ba 0%, #8b4ed9 32%, #c13f70 66%, #e85d46 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow {
  display: inline-flex; align-items: center; margin: 0 0 20px;
  font-size: 11px; font-weight: 720; letter-spacing: .14em; text-transform: uppercase;
  padding: 2px 0 2px 14px; border-radius: 0;
  background: transparent;
}
.eyebrow.surgery { color: var(--surgery); border-left: 2px solid var(--surgery); }
.eyebrow.science  { color: var(--science);  border-left: 2px solid var(--science); }
.eyebrow.mission  { color: var(--mission);  border-left: 2px solid var(--mission); }
.eyebrow.neutral  { color: var(--muted);    border-left: 2px solid rgba(24,24,27,.32); }

/* ── Layout ── */
main { overflow: clip; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
/* Shared hero left indent — keeps text/image edge identical across all 4 pages */
.hero-pad { padding-left: clamp(40px, 5.5vw, 72px); }
.section { padding: clamp(72px,9vw,130px) 0; }
.section, section[id] { scroll-margin-top: 76px; }
.section-header { text-align: left; max-width: 860px; margin: 0 0 52px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { color: var(--muted); font-size: clamp(17px,2vw,21px); line-height: 1.55; }

/* ── Cards / Panels ── */
.panel {
  background: rgba(255,255,255,.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card {
  padding: clamp(24px,3.6vw,42px);
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 300px; position: relative; overflow: hidden;
  transition: transform .24s ease, box-shadow .24s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card::before {
  content: ""; position: absolute;
  width: 160px; height: 160px; border-radius: 50%;
  right: -50px; top: -50px; opacity: .32;
  background: var(--blob, radial-gradient(circle, var(--blue-light), transparent 68%));
}
.card h3 { position: relative; line-height: 1.1; }
.card p  { color: var(--muted); font-size: 17px; position: relative; margin-top: 14px; }

/* ── Buttons ── */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 11px 22px;
  border-radius: 8px; font-size: 16px; font-weight: 610;
  text-decoration: none; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap; font-family: inherit;
}
.button.primary {
  background: linear-gradient(135deg, #7c3aed 0%, #be185d 52%, #f97316 100%);
  color: #fff; box-shadow: 0 8px 24px rgba(190,24,93,.26);
}
.button.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(190,24,93,.34); text-decoration: none; color: #fff; }
.button.secondary {
  background: rgba(255,255,255,.82); color: var(--blue);
  border-color: rgba(37,99,235,.22);
}
.button.secondary:hover { background: #fff; box-shadow: var(--shadow-sm); text-decoration: none; }
.button.dark { background: var(--ink); color: #fff; box-shadow: 0 6px 20px rgba(18,18,26,.18); }
.button.dark:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(18,18,26,.26); text-decoration: none; color: #fff; }
.button.surgery { background: var(--surgery); color: #fff; box-shadow: 0 8px 24px rgba(190,24,93,.24); }
.button.surgery:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(190,24,93,.32); text-decoration: none; color: #fff; }
.button.science { background: var(--science); color: #fff; box-shadow: 0 8px 24px rgba(37,99,235,.22); }
.button.science:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(37,99,235,.30); text-decoration: none; color: #fff; }
.button.mission { background: var(--mission); color: #fff; box-shadow: 0 8px 24px rgba(124,58,237,.22); }
.button.mission:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(124,58,237,.30); text-decoration: none; color: #fff; }
.button.outline-surgery { background: transparent; color: var(--surgery); border-color: var(--surgery-border); }
.button.outline-surgery:hover { background: var(--surgery-bg); text-decoration: none; }

/* Links row */
.links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 22px; }
.links a { text-decoration: none; font-weight: 660; }
.links a::after { content: " ›"; }
.links a:hover { text-decoration: underline; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* Tags */
.tag {
  display: inline-flex; border-radius: 999px;
  padding: 5px 10px; font-size: 11.5px; font-weight: 750;
  border: 1px solid color-mix(in srgb, var(--tag-color, var(--blue)) 26%, transparent);
  background: color-mix(in srgb, var(--tag-color, var(--blue)) 9%, white);
  color: color-mix(in srgb, var(--tag-color, var(--blue)) 72%, #18181b);
}
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }

/* ── Reveal animation ──
   Content is visible by default. JS opts into the hidden starting state so a
   blocked script, no-JS browser, or assistive technology never gets a blank page. */
.reveal { opacity: 1; transform: none; }
.reveal-ready .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .72s cubic-bezier(.22,.68,0,1.2), transform .72s cubic-bezier(.22,.68,0,1.2);
}
.reveal-ready .reveal.visible { opacity: 1; transform: none; }

/* ── Scroll-to-top ── */
.back-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 50;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: #fff; border: none;
  cursor: pointer; font-size: 18px; display: grid; place-items: center;
  box-shadow: 0 4px 20px rgba(18,18,26,.22);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
.back-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { background: var(--pink); }

/* ── Professional contact form ── */
[hidden], .trap { display:none !important; }
#contact-form { align-content:start; }
#contact-form label { margin-top:8px; }
#contact-form #professional-fields { display:grid; gap:8px; }
#contact-form #professional-fields p { margin:4px 0; }
#contact-form .contact-confirm { display:flex; align-items:flex-start; gap:10px; font-size:14px; font-weight:500; line-height:1.45; }
#contact-form .contact-confirm input { width:18px; height:18px; flex:none; margin:2px 0 0; padding:0; }
#clinical-route { padding:18px; border-radius:var(--radius-sm); background:rgba(37,99,235,.07); }
#contact-status { min-height:1.5em; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; padding: clamp(28px,4vw,50px); }
.contact-info h2 { font-size: clamp(28px,3.5vw,44px); line-height: 1.1; margin-bottom: 14px; }
.contact-info p { color: var(--muted); font-size: 18px; line-height: 1.55; }
.contact-detail { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.contact-detail a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 560; min-height: 24px; display: inline-flex; align-items: center; }
.contact-detail a:hover { color: var(--ink); }
form { display: grid; gap: 14px; }
label { font-size: 13.5px; font-weight: 700; display: block; margin-bottom: 5px; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; font: inherit; background: rgba(255,255,255,.82); color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); outline: none;
}
input:user-invalid, textarea:user-invalid, select:user-invalid {
  border-color: #b42318;
}
textarea { min-height: 120px; resize: vertical; }
.fine { color: var(--soft); font-size: 13px; margin: 0; line-height: 1.5; }
.form-status { min-height: 24px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.application-panel { margin-bottom: 28px; padding: 0; overflow: hidden; }
.application-top { display: grid; grid-template-columns: minmax(0,1fr) minmax(250px,.42fr); gap: clamp(28px,5vw,64px); align-items: end; padding: clamp(30px,4vw,48px); background: linear-gradient(135deg,#f8fbff 0%,#eef5ff 100%); border-bottom: 1px solid var(--line); }
.application-top h3 { font-size: clamp(30px,4vw,48px); margin: 0; }
.application-cycle { border-left: 3px solid var(--science); padding-left: 20px; }
.application-cycle strong { display: block; font-size: 17px; line-height: 1.4; }
.application-cycle span { display: block; margin-top: 7px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.application-body { padding: clamp(30px,4vw,48px); }
.application-body > h4 { margin: 0 0 18px; font-size: 18px; }
.application-requirements { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 34px; }
.application-requirement { padding: 18px 0 20px; border-top: 1px solid var(--line); }
.application-requirement.wide { grid-column: 1 / -1; }
.application-requirement h5 { margin: 0 0 7px; color: var(--science); font-size: 11px; font-weight: 760; letter-spacing: .1em; text-transform: uppercase; }
.application-requirement p { color: var(--muted); font-size: 15px; line-height: 1.58; }
.application-requirement p + p { margin-top: 8px; }
.application-apply { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 28px; align-items: end; margin-top: 12px; padding-top: 28px; border-top: 1px solid var(--line); }
.application-apply h4 { margin: 0 0 8px; font-size: 22px; }
.application-apply p { color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 720px; }
.application-apply .application-note { margin-top: 10px; color: var(--ink); font-weight: 650; }
.application-action { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 11px 18px; border-radius: 8px; background: var(--science); color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.application-action::after { content: "↗"; font-size: .9em; }
.application-action:hover { background: #1748b9; }

/* ── Footer ── */
footer { border-top: 1px solid var(--line); padding: 52px 0 36px; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px 28px; margin-bottom: 40px;
}
.footer-brand { font-size: 15px; font-weight: 720; color: var(--ink); margin-bottom: 10px; letter-spacing: -.02em; }
.footer-desc { color: var(--soft); font-size: 13px; line-height: 1.65; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.social-links a {
  width: 27px; height: 27px;
  color: var(--muted); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color .18s ease, opacity .18s ease, transform .18s ease;
}
.social-links a:hover { color: var(--ink); transform: translateY(-1px); }
.social-links img { width: 15px; height: 15px; display: block; opacity: .68; }
.social-links a:hover img { opacity: 1; }
.social-links a[href*="profiles.ucla.edu"] img { width: 20px; }
.footer-heading { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--soft); margin-bottom: 13px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 13.5px; min-height: 24px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 22px;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 14px; color: var(--soft); font-size: 12px;
}
.footer-legal { line-height: 1.65; max-width: 660px; }

.footer-policy-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 14px; }
.footer-policy-links a { color: var(--muted); text-decoration: none; font-weight: 650; }
.footer-policy-links a:hover { color: var(--ink); }

/* ── Privacy statement ── */
.policy-main { padding: clamp(74px,10vw,132px) 0; }
.policy-header { max-width: 820px; margin-bottom: clamp(46px,7vw,76px); }
.policy-header h1 { font-size: clamp(48px,8vw,88px); margin-bottom: 20px; }
.policy-header > p:last-child { color: var(--muted); font-size: clamp(18px,2.2vw,23px); line-height: 1.55; }
.policy-content { max-width: 820px; }
.policy-section { padding: 30px 0; border-top: 1px solid var(--line); }
.policy-section h2 { margin-bottom: 14px; font-size: clamp(24px,3vw,34px); }
.policy-section p, .policy-section li { color: var(--muted); font-size: 16px; line-height: 1.72; }
.policy-section p + p { margin-top: 13px; }
.policy-section ul { margin: 13px 0 0; padding-left: 1.2rem; }
.policy-section li + li { margin-top: 8px; }
.policy-note { margin-top: 28px; padding: 20px 22px; border-left: 3px solid var(--blue); background: var(--blue-wash); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); line-height: 1.65; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .pillar-switch { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .application-top, .application-apply { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 760px) {
  .back-top { display: none; }

  .nav-toggle { display: flex; }
  .pillar-switch { display: none; }
  .nav-links {
    display: flex; flex-direction: column;
    position: fixed; inset: 58px 0 auto 0; height: calc(100dvh - 58px);
    background: rgba(252,252,253,.97);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    padding: 24px 22px 44px; gap: 2px;
    overflow-y: auto; z-index: 99; font-size: 16px;
    opacity: 0; pointer-events: none; transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease;
    margin-left: 0;
  }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: none; }
  .mobile-global-link { display: block; }
  .desktop-nav-only { display: none !important; }
  .nav-links a { padding: 13px 4px; border-bottom: 1px solid var(--line); font-weight: 560; color: var(--ink); border-radius: 0; background: transparent; }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links .nav-cta { margin-top: 14px; text-align: center; border-radius: 7px; padding: 14px; border-bottom: none; margin-left: 0; }
  .page-hero-inner, .page-hero-text { min-width: 0; max-width: 100%; }
  .page-hero-text.hero-pad { padding-left: 24px; padding-right: 24px; }
  .page-hero-text h1 { font-size: clamp(40px,12vw,56px); overflow-wrap: anywhere; }
  .reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 520px) {
  .button { white-space: normal; text-align: center; width: 100%; }
  .cta-row { align-items: stretch; }
  .application-requirements { grid-template-columns: 1fr; }
  .application-requirement.wide { grid-column: auto; }
  .application-action { white-space: normal; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    scroll-behavior: auto !important; transition-duration: .001ms !important;
  }
  .reveal-ready .reveal { opacity: 1; transform: none; }
}

@media (forced-colors: active) {
  .gradient-text { color: CanvasText; background: none; -webkit-text-fill-color: CanvasText; }
  .panel, .card, .button, .nav-toggle { border: 1px solid CanvasText; }
}

/* ================================================================
   Motion — only runs when user has not requested reduced motion
   ================================================================ */
@media (prefers-reduced-motion: no-preference) {

  /* ── Hero text entrance: each direct child staggers in ── */
  .hero-text-inner > *,
  .page-hero-text > * {
    animation: heroIn .92s cubic-bezier(.22,.68,0,1.1) both;
  }
  .hero-text-inner > *:nth-child(1), .page-hero-text > *:nth-child(1) { animation-delay: .08s; }
  .hero-text-inner > *:nth-child(2), .page-hero-text > *:nth-child(2) { animation-delay: .22s; }
  .hero-text-inner > *:nth-child(3), .page-hero-text > *:nth-child(3) { animation-delay: .36s; }
  .hero-text-inner > *:nth-child(4), .page-hero-text > *:nth-child(4) { animation-delay: .48s; }
  .hero-text-inner > *:nth-child(5), .page-hero-text > *:nth-child(5) { animation-delay: .58s; }
  @keyframes heroIn {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
  }

  /* ── Stagger delay for reveals inside grids ── */
  /* JS adds data-stagger-index; this converts it to a transition-delay */
  .reveal[data-stagger] { transition-delay: calc(var(--stagger-delay, 0) * 1ms); }

  /* ── Enhanced button micro-interaction ── */
  .button {
    transition: transform .18s ease, box-shadow .2s ease,
                background .2s ease, color .2s ease, border-color .2s ease !important;
  }
  .button:hover  { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(18,18,26,.15); }
  .button:active { transform: translateY(0) scale(.98); transition-duration: .08s !important; }

  /* ── Card hover lift ── */
  .card {
    transition: transform .3s cubic-bezier(.22,.68,0,1.2),
                box-shadow .3s ease !important;
  }
  .card:hover { transform: translateY(-5px); }

  /* ── Metric count-up pop ── */
  @keyframes metricPop {
    from { opacity: 0; transform: translateY(14px) scale(.95); }
    to   { opacity: 1; transform: none; }
  }
  .metric-animated { animation: metricPop .7s cubic-bezier(.22,.68,0,1.2) both; }
}
