/* ===== Reset & base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

/* colours: css/themes.css swaps these when the theme is Light */
:root {
  --bg: #0f0a1f;
  --bg-raise: #161033;
  --line: rgba(196, 181, 253, 0.16);
  --text: #efeafd;
  --muted: #a99fd0;
  --accent: #7c3aed;
  color-scheme: dark;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-underline-offset: 3px; }

/* ===== Hero ===== */
.hero {
  padding: max(3.5rem, calc(env(safe-area-inset-top) + 2rem)) 1.5rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero__title {
  font-size: clamp(2rem, 9vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero__lede {
  margin-top: 0.6rem;
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(1rem, 3.6vw, 1.15rem);
}

/* ===== Leaders grid ===== */
.leaders {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2.25rem 1.75rem;
  justify-items: center;
}

.leaders__empty { color: var(--muted); text-align: center; }

.leader {
  width: min(100%, 340px);
  aspect-ratio: 320 / 500;       /* keeps the layout stable before the card loads */
  border-radius: 24px;
}

/* grey placeholder only while the card has not loaded yet */
.leader:empty { background: rgba(255, 255, 255, 0.04); }
.leader > .reflective-card { margin-inline: auto; }

.footer {
  text-align: center;
  padding: 1.25rem 1rem;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.footer p + p { margin-top: 0.2rem; }
.footer__small { font-size: 0.8rem; }

/* =========================================================
   ReflectiveCard
   ========================================================= */
.reflective-card {
  position: relative;
  width: var(--rc-width, 320px);
  max-width: 100%;
  aspect-ratio: var(--rc-aspect, 320 / 500);
  opacity: var(--rc-presence, 1);
  transform: translateY(var(--rc-lift, 0px));
  touch-action: pan-y;            /* vertical scrolling still works on phones */
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  color: var(--rc-ink);
}

.reflective-card__body {
  position: absolute;
  inset: 0;
  border-radius: var(--rc-radius, 24px);
  background: var(--rc-base);
  box-shadow: var(--rc-shadow);
  overflow: hidden;
  transform: perspective(900px) rotateX(var(--rc-rotate-x, 0deg)) rotateY(var(--rc-rotate-y, 0deg));
  will-change: transform;
}

.reflective-card__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.reflective-card__content {
  position: absolute;
  inset: 0;
  padding: var(--rc-pad, 20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--rc-ink);
  pointer-events: none;
}

.reflective-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.reflective-card__badge,
.reflective-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--rc-muted);
}

.reflective-card__badge svg { width: 16px; height: 16px; flex: none; }

.reflective-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rc-status, #22c55e);
  box-shadow: 0 0 8px var(--rc-status, #22c55e);
}

/* leader photo: fills the space between the top of the card and the name */
.reflective-card__photo {
  flex: 1 1 0;
  min-height: 0;
  margin-bottom: 1rem;
  border-radius: calc(var(--rc-radius, 24px) * 0.6);
  overflow: hidden;
  background: var(--rc-tile);
  box-shadow: inset 0 0 0 1px var(--rc-rim), 0 6px 18px -8px rgba(0, 0, 0, 0.6);
}
.reflective-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reflective-card__photo + .reflective-card__identity { margin-top: 0; margin-bottom: 1rem; }

.reflective-card__identity { margin-top: auto; margin-bottom: 1.5rem; }

.reflective-card__name {
  font-size: clamp(1.4rem, 7vw, 1.85rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.reflective-card__role {
  margin-top: 0.3rem;
  color: var(--rc-muted);
  font-size: 0.95rem;
}

.reflective-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.reflective-card__id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.reflective-card__label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rc-muted);
}

.reflective-card__value {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.reflective-card__tile {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--rc-tile-radius, 12px);
  background: var(--rc-tile);
  border: 1px solid var(--rc-tile-edge);
  box-shadow: inset 0 1px 0 var(--rc-tile-highlight), var(--rc-tile-shadow);
}

.reflective-card__tile svg { width: 22px; height: 22px; }

.reflective-card__rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--rc-rim), inset 0 1px 0 var(--rc-rim-highlight);
}

/* hidden video sources that feed the reflection (must not be display:none) */
.reflective-card__media {
  position: absolute;
  width: 2px;
  height: 2px;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
}

/* ===== Small phones ===== */
@media (max-width: 600px) {
  .hero { padding: 2.25rem 1rem 0.5rem; }
  .leaders { padding: 1rem 1rem 3rem; gap: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reflective-card__body { will-change: auto; }
}
