/* Fonts loaded via <link preload> in HTML head */

:root {
  --color-primary: #033E3D;
  --color-primary-rgb: 3, 62, 61;
  --color-secondary: #FFFFFF;
  --color-accent-soft-teal: #0A6E6D;
  --color-accent-soft-teal-light: #E6F2F2;
  --color-accent-muted-green: #2C5E50;
  --color-accent-warm-grey: #F9F9F7;
  --color-accent-warm-grey-dark: #E6E6DF;
  --color-text-dark: #121A1A;
  --color-text-muted: #53605E;

  --font-headline: 'Anton', sans-serif;
  --font-body: 'Satoshi', sans-serif;
  --font-label: 'Oswald', sans-serif;
  --font-quote: 'Cormorant Garamond', serif;
}

/* Base styles */
body {
  font-family: var(--font-body);
  background-color: var(--color-accent-warm-grey);
  color: var(--color-text-dark);
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-accent-warm-grey);
}
::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-soft-teal);
}

/* Custom interactive cursor (Desktop only) */
@media (min-width: 1024px) {
  .custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
  }
  .custom-cursor-follower {
    width: 8px;
    height: 8px;
    background-color: var(--color-accent-soft-teal);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
  }
  .cursor-hover {
    width: 60px;
    height: 60px;
    background-color: rgba(3, 62, 61, 0.1);
    border-color: var(--color-accent-soft-teal);
  }
}

/* Fonts and Typography */
.font-headline {
  font-family: var(--font-headline);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.font-body {
  font-family: var(--font-body);
}
.font-label {
  font-family: var(--font-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.font-quote {
  font-family: var(--font-quote);
}

/* Custom visual components */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.glass-panel-dark {
  background: rgba(3, 62, 61, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Core Values Card Styles */
.core-value-card {
  --card-index: 0;
}

.core-value-card:nth-child(1) { --card-index: 0; }
.core-value-card:nth-child(2) { --card-index: 1; }
.core-value-card:nth-child(3) { --card-index: 2; }
.core-value-card:nth-child(4) { --card-index: 3; }
.core-value-card:nth-child(5) { --card-index: 4; }
.core-value-card:nth-child(6) { --card-index: 5; }

.icon-bg {
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.core-value-card:hover .icon-bg {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 20px 40px -15px rgba(3, 62, 61, 0.3);
}

.value-accent span {
  transition: all 0.3s ease;
}

.core-value-card:hover .value-accent span {
  opacity: 1 !important;
  transform: translateX(4px);
}

/* Pulse slow animation */
@keyframes pulse-slow {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

.animate-pulse-slow {
  animation: pulse-slow 6s ease-in-out infinite;
}

/* Staggered entrance animation for core values */
@keyframes value-reveal {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.core-value-card {
  animation: value-reveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.core-value-card[style*="--card-index: 0"] { animation-delay: 0.1s; }
.core-value-card[style*="--card-index: 1"] { animation-delay: 0.2s; }
.core-value-card[style*="--card-index: 2"] { animation-delay: 0.3s; }
.core-value-card[style*="--card-index: 3"] { animation-delay: 0.4s; }
.core-value-card[style*="--card-index: 4"] { animation-delay: 0.5s; }
.core-value-card[style*="--card-index: 5"] { animation-delay: 0.6s; }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .animate-pulse-slow,
  .core-value-card {
    animation: none !important;
  }
  .icon-bg,
  .core-value-card:hover .icon-bg {
    transform: none;
  }
}

/* Image mask reveal effect */
.mask-reveal {
  position: relative;
  overflow: hidden;
}
.mask-reveal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-primary);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}
.mask-reveal.revealed::after {
  transform: scaleX(0);
}

/* Hover buttons */
.btn-premium {
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease;
  z-index: 1;
}
.btn-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: -1;
}
.btn-premium:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-premium-dark {
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease;
  z-index: 1;
}
.btn-premium-dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: -1;
}
.btn-premium-dark:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

/* Marquee animation */
.marquee-content {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-content:hover {
  animation-play-state: paused;
}
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Page transitions */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-primary);
  z-index: 99999;
  transform: scaleY(0);
  transform-origin: top;
  pointer-events: none;
}

/* Custom text clip reveal for titles */
.char-reveal {
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
}

/* Skip-to-content focus style */
.skip-link:focus {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
}

/* --- HEADER & NAVIGATION --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#main-nav {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
  background-color: transparent;
  border-bottom: 1px solid transparent;
}

/* Nav Links default styling */
.nav-link {
  color: var(--color-primary);
  font-family: var(--font-label);
  font-size: 1.05rem; /* Larger font size */
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-accent-soft-teal);
}

/* Active Nav Link indicator */
.active-link {
  color: var(--color-accent-soft-teal) !important;
  font-weight: 700;
  position: relative;
}
.active-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent-soft-teal);
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

/* Homepage initial state (overlays dark hero slider) */
.home-page #main-nav .nav-link {
  color: rgba(255, 255, 255, 0.9);
}
.home-page #main-nav .nav-link:hover {
  color: var(--color-accent-soft-teal);
}
.home-page #main-nav .active-link {
  color: var(--color-accent-soft-teal) !important;
}
.home-page #main-nav .active-link::after {
  background-color: var(--color-accent-soft-teal);
}
.home-page #main-nav .nav-icon {
  color: rgba(255, 255, 255, 0.9);
}
.home-page #menu-toggle {
  color: rgba(255, 255, 255, 0.9);
}

.top-bar-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.top-bar-social a:hover {
  background-color: var(--color-accent-soft-teal);
  color: var(--color-secondary);
}

/* SCROLLED HEADER STATE (applies to all pages) */
@media (min-width: 768px) {
  header.scrolled {
    transform: translateY(-40px); /* Moves top-bar out of viewport */
  }
}

header.scrolled #main-nav {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-accent-warm-grey-dark);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

header.scrolled #main-nav .nav-link {
  color: var(--color-primary);
}
header.scrolled #main-nav .nav-link:hover {
  color: var(--color-accent-soft-teal);
}
header.scrolled #main-nav .active-link {
  color: var(--color-accent-soft-teal) !important;
}
header.scrolled #main-nav .nav-icon {
  color: var(--color-primary);
}
header.scrolled #menu-toggle {
  color: var(--color-primary);
}

/* --- SWIPER HERO SLIDER --- */
.hero-slider {
  width: 100%;
  height: 100vh;
}
.hero-slider .swiper-slide {
  overflow: hidden;
  padding-top: 100px; /* Clear mobile header */
}
@media (min-width: 768px) {
  .hero-slider .swiper-slide {
    padding-top: 155px; /* Clear desktop topbar + header and add spacing */
  }
}

/* Swiper slide background Zoom in effect */
.hero-slider .swiper-slide img {
  transition: transform 6s ease-out;
  transform: scale(1.05);
}
.hero-slider .swiper-slide-active img {
  transform: scale(1);
}

/* Slide content fade/slide transition */
.hero-slider .swiper-slide .font-label {
  opacity: 0;
  transform: translateY(15px);
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.6s ease;
  transition-delay: 0.2s;
}
.hero-slider .swiper-slide .font-headline {
  opacity: 0;
  transform: translateY(30px);
  transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.8s ease;
  transition-delay: 0.4s;
}
.hero-slider .swiper-slide .font-quote {
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.7s ease;
  transition-delay: 0.6s;
}
.hero-slider .swiper-slide div.flex {
  opacity: 0;
  transform: translateY(15px);
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.6s ease;
  transition-delay: 0.8s;
}

.hero-slider .swiper-slide-active .font-label,
.hero-slider .swiper-slide-active .font-headline,
.hero-slider .swiper-slide-active .font-quote,
.hero-slider .swiper-slide-active div.flex {
  opacity: 1;
  transform: translateY(0);
}

/* Swiper vertical dots pagination custom styling */
.hero-slider .swiper-pagination-bullets.swiper-pagination-vertical {
  right: 24px;
}
.hero-slider .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: var(--color-secondary);
  opacity: 0.4;
  border-radius: 50%;
  margin: 12px 0 !important;
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}
.hero-slider .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--color-accent-soft-teal);
  transform: scale(1.3);
}

/* --- MOBILE NAVIGATION TOGGLE --- */
#menu-toggle {
  color: var(--color-primary);
  transition: color 0.3s ease;
}

/* --- TESTIMONIALS SLIDER PAGINATION --- */
.testimonials-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
}
.testimonials-pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  opacity: 0.3;
  margin: 0 6px !important;
  transition: all 0.3s ease;
  border-radius: 50%;
}
.testimonials-pagination .swiper-pagination-bullet-active {
  background: var(--color-accent-soft-teal) !important;
  width: 20px;
  border-radius: 4px;
  opacity: 1;
}

/* Hide testimonials pagination on desktop since all 3 slides are visible */
@media (min-width: 768px) {
  .testimonials-pagination {
    display: none !important;
  }
}

/* Reset positioning for headers inside main content areas */
#main-content header,
article header,
.post-header {
  position: static !important;
  transform: none !important;
  width: auto !important;
  z-index: auto !important;
}

/* Core Values Section Styles */
@keyframes pulse-slow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.animate-pulse-slow {
  animation: pulse-slow 6s ease-in-out infinite;
}

.core-value-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.core-value-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 1.875rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent-soft-teal));
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
  filter: blur(8px);
}

.core-value-card:hover::before {
  opacity: 0.3;
}

.core-value-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 32px 64px -12px rgba(3, 62, 61, 0.15), 0 16px 32px -8px rgba(3, 62, 61, 0.1);
}

.icon-bg {
  transform-style: preserve-3d;
  perspective: 500px;
}

.icon-bg:hover {
  box-shadow: 0 16px 32px -8px rgba(10, 110, 109, 0.25);
}

.value-accent span {
  transform: translateX(-10px);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.core-value-card:hover .value-accent span {
  transform: translateX(0);
  opacity: 1 !important;
}

/* Staggered entrance animation for core values */
@keyframes value-reveal {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.core-value-card {
  animation: value-reveal 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  opacity: 0;
}

.core-value-card[style*="--card-index: 0"] { animation-delay: 0.1s; }
.core-value-card[style*="--card-index: 1"] { animation-delay: 0.2s; }
.core-value-card[style*="--card-index: 2"] { animation-delay: 0.3s; }
.core-value-card[style*="--card-index: 3"] { animation-delay: 0.4s; }
.core-value-card[style*="--card-index: 4"] { animation-delay: 0.5s; }
.core-value-card[style*="--card-index: 5"] { animation-delay: 0.6s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-pulse-slow,
  .core-value-card,
  .icon-bg,
  .value-accent span {
    animation: none !important;
    transition: none !important;
  }
  .core-value-card {
    opacity: 1;
    transform: none;
  }
  .core-value-card:hover {
    transform: none;
  }
  .value-accent span {
    opacity: 1 !important;
    transform: none;
  }
}

/* ============================================
   BOARD OF TRUSTEES - Architectural/Brutalist
   ============================================ */

#board-of-trustees {
  position: relative;
}

.trustee-card {
  background: var(--color-accent-warm-grey);
  border: 1px solid var(--color-accent-warm-grey-dark);
  border-radius: 1.5rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.trustee-card:hover {
  border-color: var(--color-accent-soft-teal);
  box-shadow: 
    0 0 0 1px var(--color-accent-soft-teal),
    0 24px 48px -12px rgba(3, 62, 61, 0.15),
    0 12px 24px -8px rgba(3, 62, 61, 0.1);
  transform: translateY(-4px);
}

/* Structural frame */
.trustee-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.frame-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-accent-soft-teal);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.frame-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; transform: translate(-50%, -50%); }
.frame-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; transform: translate(50%, -50%); }
.frame-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; transform: translate(-50%, 50%); }
.frame-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; transform: translate(50%, 50%); }

.frame-line {
  position: absolute;
  background: var(--color-accent-soft-teal);
  opacity: 0;
  transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.frame-line.top { top: 0; left: 24px; right: 24px; height: 2px; transform: scaleX(0); transform-origin: left; }
.frame-line.bottom { bottom: 0; left: 24px; right: 24px; height: 2px; transform: scaleX(0); transform-origin: right; }
.frame-line.left { left: 0; top: 24px; bottom: 24px; width: 2px; transform: scaleY(0); transform-origin: top; }
.frame-line.right { right: 0; top: 24px; bottom: 24px; width: 2px; transform: scaleY(0); transform-origin: bottom; }

.trustee-card:hover .frame-corner,
.trustee-card:hover .frame-line {
  opacity: 1;
}

.trustee-card:hover .frame-line.top,
.trustee-card:hover .frame-line.bottom {
  transform: scaleX(1);
}

.trustee-card:hover .frame-line.left,
.trustee-card:hover .frame-line.right {
  transform: scaleY(1);
}

/* Portrait block */
.trustee-portrait-block {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2rem;
  margin-bottom: 1.5rem;
}

.portrait-ring {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-accent-warm-grey-dark);
  background: var(--color-primary);
  transition: all 0.4s ease;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(100%) contrast(1.1);
  transition: all 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: scale(1.05);
}

.portrait-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, var(--color-primary) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.trustee-card:hover .portrait-ring {
  border-color: var(--color-accent-soft-teal);
  box-shadow: 0 0 0 4px var(--color-accent-warm-grey), 0 16px 32px -8px rgba(10, 110, 109, 0.3);
}

.trustee-card:hover .portrait-img {
  filter: grayscale(0%) contrast(1);
  transform: scale(1);
}

.trustee-card:hover .portrait-overlay {
  opacity: 1;
}

/* Content block */
.trustee-content {
  padding: 0 2rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.name-block h3 {
  line-height: 1.1;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1rem 0 1.5rem;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent-warm-grey-dark), transparent);
}

.divider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent-soft-teal);
  flex-shrink: 0;
}

.trustee-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--color-accent-warm-grey-dark);
}

.meta-label {
  color: var(--color-text-muted);
}

.meta-value {
  color: var(--color-primary);
}

/* Mandate block */
.mandate-block {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.mandate-border-top {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent-soft-teal), transparent);
  margin-bottom: 2rem;
}

.mandate-content {
  text-align: center;
  padding: 0 1rem;
}

.mandate-label {
  display: block;
  margin-bottom: 1rem;
}

.mandate-content blockquote {
  position: relative;
  padding: 0 2rem;
  margin: 0;
  border: none;
}

.mandate-content blockquote::before,
.mandate-content blockquote::after {
  content: '"';
  font-size: 6rem;
  color: var(--color-accent-soft-teal);
  opacity: 0.15;
  position: absolute;
  font-family: var(--font-headline);
  line-height: 1;
}

.mandate-content blockquote::before {
  top: -2rem;
  left: -1rem;
}

.mandate-content blockquote::after {
  bottom: -4rem;
  right: -1rem;
}

.mandate-signatures {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 2rem;
}

.signature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.signature:hover {
  opacity: 1;
}

.signature-line {
  width: 120px;
  height: 1px;
  background: var(--color-text-muted);
}

/* Staggered entrance for trustee cards */
.trustee-card {
  animation: trustee-reveal 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) both;
  opacity: 0;
}

.trustee-card[style*="--card-index: 0"] { animation-delay: 0.1s; }
.trustee-card[style*="--card-index: 1"] { animation-delay: 0.2s; }
.trustee-card[style*="--card-index: 2"] { animation-delay: 0.3s; }

@keyframes trustee-reveal {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ============================================
   INSTITUTIONAL ROLES - Operations Deck
   ============================================ */

#institutional-roles {
  position: relative;
}

.role-module {
  background: var(--color-secondary);
  border: 1px solid var(--color-accent-warm-grey-dark);
  border-radius: 1.5rem;
  overflow: hidden;
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.role-module:focus-visible {
  outline: 2px solid var(--color-accent-soft-teal);
  outline-offset: 2px;
}

/* Department color indicator */
.role-module::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--dept-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 5;
}

.role-module:hover::before,
.role-module:focus-visible::before {
  transform: scaleX(1);
}

/* Subtle glow on hover */
.role-module:hover {
  border-color: var(--dept-color);
  box-shadow: 
    0 0 0 1px var(--dept-color),
    0 24px 48px -12px var(--dept-glow),
    0 12px 24px -8px var(--dept-glow);
  transform: translateY(-4px);
}

/* Module frame corners */
.module-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.module-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 1px solid var(--dept-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.module-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.module-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.module-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.module-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }

.role-module:hover .module-corner {
  opacity: 1;
}

/* Module header */
.module-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem;
  position: relative;
  z-index: 2;
}

.module-classification {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.class-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--dept-glow);
  color: var(--dept-color);
  border: 1px solid var(--dept-color);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.class-level {
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.module-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dept-color);
  animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--dept-color); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px var(--dept-glow); }
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-soft-teal);
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Module body */
.module-body {
  padding: 0 1.5rem 1.5rem;
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.module-body h3 {
  line-height: 1.15;
}

.module-body p {
  flex: 1;
}

/* Module metrics */
.module-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-top: 1px solid var(--color-accent-warm-grey-dark);
  position: relative;
  z-index: 2;
  background: var(--color-accent-warm-grey/30);
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.metric-value {
  line-height: 1;
  margin-bottom: 4px;
}

.metric-label {
  line-height: 1.2;
}

.metric-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, transparent, var(--color-accent-warm-grey-dark), transparent);
}

/* Module trigger */
.module-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  border-top: 1px solid var(--color-accent-warm-grey-dark);
  color: var(--color-primary);
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.module-trigger:hover {
  background: var(--dept-glow);
  color: var(--dept-color);
}

.trigger-text {
  transition: transform 0.3s ease;
}

.trigger-arrow {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.module-trigger:hover .trigger-text {
  transform: translateX(4px);
}

.module-trigger:hover .trigger-arrow {
  transform: translateX(4px);
}

/* Staggered entrance for role modules */
.role-module {
  animation: module-reveal 0.7s cubic-bezier(0.25, 0.8, 0.25, 1) both;
  opacity: 0;
}

.role-module[style*="--card-index: 0"] { animation-delay: 0.05s; }
.role-module[style*="--card-index: 1"] { animation-delay: 0.15s; }
.role-module[style*="--card-index: 2"] { animation-delay: 0.25s; }
.role-module[style*="--card-index: 3"] { animation-delay: 0.35s; }

@keyframes module-reveal {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* System status bar */
.system-status {
  max-width: 800px;
  margin: 0 auto;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--color-primary);
  border-radius: 1rem;
  border: 1px solid var(--color-accent-soft-teal);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot-lg {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent-soft-teal);
  animation: status-pulse 2s ease-in-out infinite;
}

.status-divider {
  width: 1px;
  height: 24px;
  background: var(--color-accent-soft-teal/30);
}

/* Reduced motion for new sections */
@media (prefers-reduced-motion: reduce) {
  .trustee-card,
  .role-module,
  .portrait-img,
  .portrait-overlay,
  .status-indicator,
  .status-dot-lg {
    animation: none !important;
    transition: none !important;
  }
  .trustee-card:hover,
  .role-module:hover {
    transform: none;
  }
  .trustee-card .frame-corner,
  .trustee-card .frame-line,
  .role-module .module-corner {
    opacity: 1;
  }
  .trustee-card .frame-line.top,
  .trustee-card .frame-line.bottom {
    transform: scaleX(1);
  }
  .trustee-card .frame-line.left,
  .trustee-card .frame-line.right {
    transform: scaleY(1);
  }
}

