/* ESPC 2026 — shared base for all header/hero concepts.
   Mechanics only (ticker, dropdowns, drawer, slideshow, countdown, a11y).
   Each concept supplies its own look in concept.css. */

/* Resets are scoped to the new header/banner only, so the rest of the site (Bootstrap) is untouched. */
:is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap), :is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap) *, :is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap) *::before, :is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap) *::after { box-sizing: border-box; }
:is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap) { font-family: var(--sans); color: var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap) :is(img, canvas, svg) { display: block; max-width: 100%; }
:is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap) ul { list-style: none; margin: 0; padding: 0; }
:is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap) a { color: inherit; text-decoration: none; }
:is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap) :is(h1, h2, h3, p, figure, dl, dd) { margin: 0; }

:root { --ticker-h: 40px; --header-h: 84px; --focus: #ffd27a; --ease: cubic-bezier(.22, .61, .36, 1); }
:is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap) :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000; padding: 10px 16px;
  background: #fff; color: #111; border-radius: 6px; font-weight: 600;
}
.skip-link:focus { top: 12px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Fixed top (ticker + header) ---------- */
[data-site-top] { position: fixed; inset: 0 0 auto 0; z-index: 60; transition: transform .45s var(--ease); }
[data-site-top].is-scrolled { transform: translateY(calc(-1 * var(--ticker-h))); }

/* ---------- Ticker mechanics ---------- */
[data-ticker] { position: relative; overflow: hidden; }
[data-ticker-viewport] { overflow: hidden; min-width: 0; flex: 1 1 auto; }
[data-ticker-track] { display: flex; width: max-content; }
[data-ticker-group] { display: flex; flex: 0 0 auto; align-items: center; }
[data-ticker-clone] { display: flex; flex: 0 0 auto; align-items: center; }
[data-ticker].is-marquee [data-ticker-track] { animation: espc-marquee var(--ticker-duration, 30s) linear infinite; }
[data-ticker].is-marquee:hover [data-ticker-track],
[data-ticker].is-marquee:focus-within [data-ticker-track],
[data-ticker].is-user-paused [data-ticker-track] { animation-play-state: paused; }
[data-ticker].is-static [data-ticker-track] { width: auto; justify-content: center; }
[data-ticker].is-static [data-ticker-group] { flex-wrap: wrap; justify-content: center; }
[data-ticker].is-static [data-ticker-toggle] { display: none; }
@keyframes espc-marquee { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

/* Rotate mode: one message at a time */
[data-ticker].is-rotate [data-ticker-group] { position: relative; display: grid; }
[data-ticker].is-rotate [data-ticker-item] {
  grid-area: 1 / 1; opacity: 0; transform: translateY(100%);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
[data-ticker].is-rotate [data-ticker-item].is-active { opacity: 1; transform: none; }
[data-ticker].is-rotate [data-ticker-item].is-leaving { opacity: 0; transform: translateY(-100%); }
[data-ticker].is-rotate.is-static [data-ticker-group] { display: flex; gap: 2rem; flex-wrap: wrap; }
[data-ticker].is-rotate.is-static [data-ticker-item] { opacity: 1; transform: none; }

/* ---------- Dropdown mechanics ---------- */
[data-nav] .has-dropdown { position: relative; }
[data-nav] .sub-menu {
  position: absolute; top: 100%; left: 50%; min-width: 260px; z-index: 5;
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s linear .22s;
}
[data-nav] .has-dropdown.is-open > .sub-menu,
html:not(.js) [data-nav] .has-dropdown:hover > .sub-menu,
html:not(.js) [data-nav] .has-dropdown:focus-within > .sub-menu {
  opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s;
}
.nav-caret { display: inline-block; width: 9px; height: 9px; margin-left: 6px; transition: transform .25s var(--ease); flex: 0 0 auto; }
.has-dropdown.is-open > a .nav-caret { transform: rotate(180deg); }

/* ---------- Drawer mechanics ---------- */
[data-drawer] {
  position: fixed; inset: 0 0 0 auto; width: min(420px, 100%); z-index: 90; overflow-y: auto;
  transform: translateX(100%); transition: transform .35s var(--ease); overscroll-behavior: contain;
}
[data-drawer-overlay] { position: fixed; inset: 0; z-index: 85; opacity: 0; transition: opacity .35s var(--ease); }
.drawer-open [data-drawer] { transform: none; }
.drawer-open [data-drawer-overlay] { opacity: 1; }
.drawer-open body { overflow: hidden; }
[data-drawer-menu] .sub-menu { display: none; }
[data-drawer-menu] .has-dropdown.is-open > .sub-menu { display: block; }
[data-drawer-open] { display: none; }
@media (max-width: 1199.98px) {
  [data-drawer-open] { display: inline-flex; }
  [data-nav] { display: none !important; }
}

/* ---------- Slideshow mechanics ---------- */
[data-slideshow] { position: relative; overflow: hidden; }
[data-slide] { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s var(--ease), transform 7s linear; }
[data-slide].is-active { opacity: 1; z-index: 1; }
[data-slide] img { width: 100%; height: 100%; object-fit: cover; }
[data-slide].slide-top img { object-position: 50% 0; } /* keep heads in frame when cropped */
[data-slide-dots] { min-width: 0; }
.slide-dot { position: relative; width: 34px; min-width: 0; height: 24px; display: inline-flex; align-items: center; }
.slide-dot__bar { display: block; width: 100%; height: 2px; border-radius: 2px; background: currentColor; opacity: .35; position: relative; overflow: hidden; }
.slide-dot.is-active .slide-dot__bar { opacity: 1; }

/* ---------- Countdown ---------- */
[data-unit].is-tick { animation: espc-tick .45s var(--ease); }
@keyframes espc-tick { from { opacity: .35; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Micrograph canvas ---------- */
canvas[data-micrograph] { width: 100%; height: 100%; opacity: 0; transition: opacity 1s var(--ease); }
canvas[data-micrograph].is-rendered { opacity: 1; }

/* ---------- Scanning sweep (shared effect) ----------
   <div class="fx-scan" aria-hidden="true"></div> inside any position:relative box.
   Colour via --scan-rgb ("r,g,b"). --scan-dur is how long one pass takes; after each pass
   the sweep rests off-screen for 4 × that time before the next one. */
.fx-scan { position: absolute; inset: 0; pointer-events: none; overflow: hidden; container-type: size; z-index: var(--scan-z, 0); }
.fx-scan::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--scan-h, 170px);
  background: linear-gradient(180deg, transparent, rgba(var(--scan-rgb, 70, 227, 255), var(--scan-a1, .06)) 62%,
    rgba(var(--scan-rgb, 70, 227, 255), var(--scan-a2, .24)) 98.5%, rgba(var(--scan-rgb, 70, 227, 255), .55) 99.4%, transparent);
  transform: translateY(-100%); animation: fx-scan calc(var(--scan-dur, 9s) * 5) linear infinite;
}
/* pass during the first 20% of the cycle, then rest below the box for the remaining 80% */
@keyframes fx-scan {
  0% { transform: translateY(-100%); }
  20%, 100% { transform: translateY(100cqh); }
}

/* ---------- Ring countdown (shared) ----------
   Tokens: --rc-size --rc-gap --rc-fill --rc-track --rc-bar --rc-glow --rc-num --rc-lbl --rc-font --rc-num-size */
.rc { display: flex; gap: var(--rc-gap, 16px); }
.rc__unit {
  position: relative; width: var(--rc-size, 100px); aspect-ratio: 1; display: grid; place-items: center; align-content: center;
  border-radius: 50%; transition: transform .4s var(--ease), filter .4s var(--ease);
}
.rc__unit:hover { transform: translateY(-3px); filter: drop-shadow(0 12px 16px rgba(13, 47, 56, .16)); }
.rc__unit svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.rc__trk { fill: var(--rc-fill, rgba(255, 255, 255, .82)); stroke: var(--rc-track, rgba(184, 145, 63, .18)); stroke-width: 3; }
.rc__bar {
  fill: none; stroke: var(--rc-bar, #b8913f); stroke-width: 3.5; stroke-linecap: round;
  stroke-dasharray: 100px; stroke-dashoffset: calc((1 - var(--p, 0)) * 100px);
  transition: stroke-dashoffset .8s var(--ease); filter: drop-shadow(0 0 3px var(--rc-glow, rgba(226, 196, 131, .75)));
}
.rc__num { position: relative; font-family: var(--rc-font, inherit); font-size: var(--rc-num-size, 30px); font-weight: 600; line-height: 1; letter-spacing: -.02em; color: var(--rc-num, #0d2f38); font-variant-numeric: tabular-nums lining-nums; }
.rc__lbl { position: relative; margin-top: 5px; font-size: 9.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--rc-lbl, #8f6c25); }
@media (max-width: 640px) {
  .rc { gap: 8px; justify-content: space-between; }
  .rc__unit { width: auto; flex: 1; max-width: 92px; }
  .rc__num { font-size: 22px; }
  .rc__lbl { font-size: 8px; letter-spacing: .1em; }
}

/* ---------- Premium capsule ticker (shared, sits just after the banner) ----------
   Tokens: --lt-bg --lt-line --lt-text --lt-gem --lt-medal --lt-medal-ink --lt-font --lt-overlap */
.lux-ticker-wrap { position: relative; z-index: 6; margin-top: calc(-1 * var(--lt-overlap, 34px)); padding: 0 24px; }
.lux-ticker {
  position: relative; max-width: 1240px; margin: 0 auto; height: 68px; padding: 0 8px; display: flex; align-items: center; gap: 6px;
  border-radius: 999px; background: var(--lt-bg, #0d3a44); border: 1px solid var(--lt-line, rgba(226, 196, 131, .35));
  box-shadow: 0 26px 50px -24px rgba(13, 47, 56, .55), inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.lux-ticker:hover { border-color: var(--lt-gem, #e2c483); box-shadow: 0 30px 60px -24px rgba(13, 47, 56, .6), 0 0 0 4px rgba(226, 196, 131, .12); }
.lux-ticker::before {
  /* slow gold sheen across the capsule */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, rgba(236, 211, 154, .16) 50%, transparent 65%) no-repeat;
  background-size: 60% 100%; animation: lux-sheen 7s var(--ease) infinite;
}
@keyframes lux-sheen { 0% { background-position: -120% 0; } 60%, 100% { background-position: 220% 0; } }
.lux-ticker__medal {
  position: relative; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lt-medal, linear-gradient(135deg, #ecd39a, #b8913f)); color: var(--lt-medal-ink, #0d2f38);
  box-shadow: 0 6px 16px -6px rgba(184, 145, 63, .8);
}
.lux-ticker__medal svg { width: 22px; height: 22px; }
.lux-ticker__medal::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid var(--lt-gem, #e2c483); animation: lux-pulse 2.8s var(--ease) infinite; }
@keyframes lux-pulse { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
.lux-ticker [data-ticker-viewport] {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.lux-ticker__item {
  display: inline-flex; align-items: center; gap: 16px; padding: 0 52px; white-space: nowrap;
  font-family: var(--lt-font, inherit); font-size: 15px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--lt-text, #f3e2b8);
}
.lux-ticker__gem { width: 8px; height: 8px; transform: rotate(45deg); background: var(--lt-gem, #e2c483); box-shadow: 0 0 10px var(--lt-gem, #e2c483); }
.lux-ticker__toggle {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  color: var(--lt-gem, #e2c483); border: 1px solid var(--lt-line, rgba(226, 196, 131, .35)); transition: background .3s;
}
.lux-ticker__toggle:hover { background: rgba(226, 196, 131, .12); }
.lux-ticker__toggle svg { width: 11px; height: 11px; fill: currentColor; }
.lux-ticker__toggle .i-play, .lux-ticker.is-user-paused .i-pause { display: none; }
.lux-ticker.is-user-paused .i-play { display: block; }
@media (max-width: 640px) {
  .lux-ticker-wrap { padding: 0 12px; }
  .lux-ticker { height: 56px; padding: 0 6px; }
  .lux-ticker__medal, .lux-ticker__toggle { width: 42px; height: 42px; }
  .lux-ticker__medal svg { width: 18px; height: 18px; }
  .lux-ticker__item { font-size: 12px; padding: 0 28px; letter-spacing: .12em; }
}

/* ---------- Light / dark theme switch (shared) ----------
   Tokens: --tt-bg --tt-line --tt-ink */
.theme-toggle {
  position: relative; flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: var(--tt-bg, rgba(255, 255, 255, .66)); border: 1px solid var(--tt-line, rgba(184, 145, 63, .3)); color: var(--tt-ink, #8f6c25);
  box-shadow: 0 10px 24px -16px rgba(13, 47, 56, .4); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.theme-toggle:hover { transform: translateY(-2px); border-color: #d4b062; box-shadow: 0 14px 28px -14px rgba(184, 145, 63, .55); }
.theme-toggle svg { position: absolute; width: 21px; height: 21px; transition: transform .6s var(--ease), opacity .4s var(--ease); }
.theme-toggle__sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
.theme-toggle__moon { opacity: 1; transform: none; }
[data-theme="dark"] .theme-toggle__sun { opacity: 1; transform: none; }
[data-theme="dark"] .theme-toggle__moon { opacity: 0; transform: rotate(90deg) scale(.4); }
html.theme-anim body, html.theme-anim body *:not(svg), html.theme-anim body *::before, html.theme-anim body *::after {
  transition: background-color .6s ease, color .6s ease, border-color .6s ease, fill .6s ease, stroke .6s ease !important;
}
@media (max-width: 640px) { .theme-toggle { width: 44px; height: 44px; } }


/* ---------- Entrance animation (restrained) ---------- */
/* Uses the separate `translate` property so components keep `transform` free for hover effects. */
.reveal { opacity: 0; translate: 0 14px; }
.is-ready .reveal { opacity: 1; translate: none; transition: opacity .9s var(--ease) var(--d, 0s), translate .9s var(--ease) var(--d, 0s), transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease); }


@media (prefers-reduced-motion: reduce) {
  :is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap) *, :is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap) *::before, :is(.c3-top, .c3-drawer, .c3-hero, .lux-ticker-wrap) *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; translate: none; }
}

/* ---------- Inner pages: no banner, so reserve the fixed header's height ---------- */
.c3-header-spacer { height: var(--header-h, 100px); }
