/* Imperial Ageing & Longevity Society — shared styles */

:root {
  --bg: #090e22;
  --bg-alt: #0c1428;
  --card: #103748;
  --border: rgba(255, 255, 255, 0.08);
  --green: #39FF14;
  --cyan: #00FFFF;
  --blue: #00BFFF;
  --purple: #B026FF;
  --body: #94a3b8;
  --white: #FFFFFF;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--body);
  line-height: 1.65;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1, h2, h3, h4 {
  color: var(--white);
  font-weight: 800;
  line-height: 1.2;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

.icon {
  width: 1.4em;
  height: 1.4em;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: square;
  stroke-linejoin: miter;
  vertical-align: -0.25em;
  flex-shrink: 0;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--body);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 0;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  color: var(--bg) !important;
  font-weight: 800;
  font-size: 0.95rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 120%;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 255, 255, 0.1), transparent 60%);
  pointer-events: none;
}

.hero > * {
  position: relative;
}

.hero img.logo {
  width: 120px;
  height: 120px;
  border-radius: 0;
  margin-bottom: 2rem;
  filter: drop-shadow(0 0 24px rgba(0, 255, 255, 0.3));
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.gradient-text {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .subtitle {
  max-width: 44rem;
  margin: 0 auto 1.8rem;
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.pills {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
}

.pill {
  padding: 0.35rem 1rem;
  border-radius: 0;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.pill.green { color: var(--green); border-color: rgba(57, 255, 20, 0.4); }
.pill.cyan  { color: var(--cyan);  border-color: rgba(0, 255, 255, 0.4); }

/* ---------- Sections ---------- */

section {
  padding: 4.5rem 0;
}

section.alt {
  background: var(--bg-alt);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 2.2rem;
}

.section-heading .icon { color: var(--cyan); }

.section-heading.center {
  justify-content: center;
  text-align: center;
}

.page-header {
  text-align: center;
  padding: 4rem 1.5rem 1rem;
}

.page-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 0.8rem;
}

.page-header p {
  max-width: 40rem;
  margin: 0 auto;
}

/* ---------- Cards & grids ---------- */

.grid {
  display: grid;
  gap: 1.3rem;
}

.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-5 { grid-template-columns: repeat(5, 1fr); }

.card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 0;
  padding: 1.7rem;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.card p {
  font-size: 0.93rem;
}

.card.edge-cyan   { border-left: 3px solid var(--cyan); }
.card.edge-green  { border-left: 3px solid var(--green); }
.card.edge-purple { border-left: 3px solid var(--purple); }

.stat-number {
  display: block;
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.stat-number.green { color: var(--green); }
.stat-number.cyan  { color: var(--cyan); }
.stat-number.blue  { color: var(--blue); }

.banner {
  margin-top: 1.6rem;
  padding: 1.3rem 1.7rem;
  border-radius: 0;
  background: linear-gradient(90deg, rgba(0, 255, 255, 0.08), rgba(0, 191, 255, 0.08));
  border: 2px solid rgba(0, 255, 255, 0.25);
  color: var(--white);
  font-size: 0.98rem;
}

.banner strong { color: var(--cyan); }

/* ---------- Icon rows (strategic pillars) ---------- */

.icon-row {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 0;
  padding: 1rem 1.2rem;
}

.icon-row + .icon-row { margin-top: 0.9rem; }

.icon-row .icon { margin-top: 0.15rem; }

.icon-row.green  .icon { color: var(--green); }
.icon-row.cyan   .icon { color: var(--cyan); }
.icon-row.blue   .icon { color: var(--blue); }
.icon-row.purple .icon { color: var(--purple); }

.icon-row p { color: var(--white); font-weight: 600; font-size: 0.95rem; }

/* ---------- Aims list ---------- */

.aims-box {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 0;
  padding: 1.6rem;
  margin-top: 1.4rem;
}

.aims-box h3 { margin-bottom: 1rem; }

.aims-box ul { list-style: none; }

.aims-box li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
}

.aims-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 0;
  background: var(--green);
}

.aims-box li strong { color: var(--white); }

/* ---------- Timeline ---------- */

.timeline {
  position: relative;
  margin-left: 0.6rem;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--cyan), var(--blue), var(--purple));
}

.timeline-node {
  position: relative;
  padding-bottom: 2.2rem;
}

.timeline-node:last-child { padding-bottom: 0; }

.timeline-node::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 0;
  background: var(--bg);
  border: 3px solid var(--cyan);
  transform: translateX(-6px);
}

.timeline-node .when {
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-node h3 { margin: 0.25rem 0 0.4rem; }

/* ---------- Quote ---------- */

.quote {
  text-align: center;
  font-style: italic;
  color: var(--white);
  font-size: 1.1rem;
  max-width: 38rem;
  margin: 2.2rem auto 0;
}

/* ---------- Committee ---------- */

.member-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.member-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 255, 255, 0.45);
  box-shadow: 0 14px 34px rgba(0, 255, 255, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  .member-card,
  .member-card:hover {
    transition: none;
    transform: none;
  }
}

.member-card .role {
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.member-card .exp {
  font-size: 0.88rem;
}

.exec-footer {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-top: 1.3rem;
}

.exec-footer .badge {
  text-align: center;
  min-width: 110px;
  background: rgba(57, 255, 20, 0.08);
  border: 2px solid rgba(57, 255, 20, 0.3);
  border-radius: 0;
  padding: 0.9rem;
}

.exec-footer .badge .stat-number { font-size: 2rem; margin-bottom: 0.1rem; }

.exec-footer .badge small { color: var(--body); font-size: 0.75rem; }

/* ---------- Strip (newsletter/socials) ---------- */

.strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.3rem;
  margin-top: 1.3rem;
}

.strip .item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--bg-alt);
  border: 2px solid var(--border);
  border-radius: 0;
  padding: 1rem 1.3rem;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
}

.strip .item .icon { color: var(--green); }

/* ---------- Partner cards ---------- */

.partner-card {
  display: block;
  text-align: center;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.partner-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 255, 255, 0.45);
  box-shadow: 0 14px 34px rgba(0, 255, 255, 0.14);
}

.partner-card p {
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.88rem;
  margin-top: 0.4rem;
}

.partner-logo {
  width: 92px;
  height: 92px;
  margin: 0 auto 1.1rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.12), rgba(57, 255, 20, 0.12));
  border: 2px solid var(--border);
  color: var(--white);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  .partner-card,
  .partner-card:hover {
    transition: none;
    transform: none;
  }
}

/* ---------- Member headshot ---------- */

.headshot-wrap {
  width: 128px;
  height: 128px;
  margin: 0 auto 1.4rem;
  position: relative;
  border-radius: 0;
  overflow: hidden;
  border: 2px solid var(--border);
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.14), rgba(57, 255, 20, 0.14));
  display: flex;
  align-items: center;
  justify-content: center;
}

.headshot-wrap .initials {
  color: var(--white);
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: 0.03em;
}

.headshot-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-bio {
  font-style: italic;
  color: var(--muted);
}

/* ---------- Event highlight cards ---------- */

.event-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.event-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 0;
  margin-bottom: 0.7rem;
}

.event-tag.cyan   { color: var(--cyan);   background: rgba(0, 255, 255, 0.1); }
.event-tag.green  { color: var(--green);  background: rgba(57, 255, 20, 0.1); }
.event-tag.purple { color: var(--purple); background: rgba(168, 85, 247, 0.12); }

.event-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.event-foot {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.event-foot .stat-number { font-size: 1.6rem; }

.event-cohost {
  font-size: 0.78rem;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .event-card,
  .event-card:hover { transition: none; transform: none; }
}

/* ---------- Event gallery marquee ---------- */

.gallery-marquee {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.gallery-row {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: gallery-scroll 55s linear infinite;
}

.gallery-row-rev {
  animation-direction: reverse;
  animation-duration: 65s;
}

.gallery-marquee:hover .gallery-row {
  animation-play-state: paused;
}

.gallery-tile {
  flex-shrink: 0;
  width: 300px;
  height: 200px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-tile:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* Two copies sit in each row, so shifting by half the row width
   (plus half a gap) loops seamlessly. */
@keyframes gallery-scroll {
  to { transform: translateX(calc(-50% - 0.5rem)); }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-row { animation: none; }
  .gallery-marquee {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(3, 6, 15, 0.92);
  backdrop-filter: blur(4px);
  padding: 2rem;
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: min(90vw, 1100px);
  max-height: 82vh;
  border-radius: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  position: absolute;
  bottom: 1.4rem;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--border);
  color: #fff;
  cursor: pointer;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox-close {
  top: 1.4rem;
  right: 1.6rem;
  width: 44px;
  height: 44px;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-prev { left: 1.6rem; }
.lightbox-next { right: 1.6rem; }

@media (max-width: 768px) {
  .lightbox-prev { left: 0.6rem; }
  .lightbox-next { right: 0.6rem; }
  .gallery-tile { width: 220px; height: 150px; }
}

/* ---------- Partner carousel ---------- */

.carousel {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  padding: 0.6rem 0;
}

.carousel-track {
  display: flex;
  gap: 1.3rem;
  width: max-content;
  animation: carousel-scroll 25s linear infinite;
}

.carousel-track:hover {
  animation-play-state: paused;
}

.carousel .partner-card {
  width: 270px;
  flex-shrink: 0;
}

/* Track holds two copies of the card set; shifting by half its width
   (plus half a gap) lines the second copy up exactly where the first
   started, making the loop seamless. */
@keyframes carousel-scroll {
  to { transform: translateX(calc(-50% - 0.65rem)); }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track { animation: none; }
  .carousel {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ---------- Tally embed ---------- */

.tally-wrap {
  max-width: 800px;
  margin: 0 auto;
}

/* ---------- CTA band ---------- */

.cta-band {
  text-align: center;
  padding: 4.5rem 1.5rem;
  background: linear-gradient(180deg, transparent, rgba(0, 255, 255, 0.05));
}

.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0.8rem; }

.cta-band p { max-width: 36rem; margin: 0 auto 1.8rem; }

/* ---------- Footer ---------- */

footer {
  border-top: 2px solid var(--border);
  background: var(--bg-alt);
  padding: 2.8rem 0 2rem;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-inner h4 { font-size: 1rem; margin-bottom: 0.4rem; }

.footer-links { display: flex; gap: 1.1rem; margin-top: 0.5rem; }

.footer-links a { color: var(--body); }

.footer-links a:hover { color: var(--white); }

.copyright {
  text-align: center;
  margin-top: 2.2rem;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.6);
}

/* ---------- Two-column helper ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .grid.cols-3, .grid.cols-2, .grid.cols-4, .grid.cols-5, .two-col, .strip {
    grid-template-columns: 1fr;
  }
  .exec-footer { flex-direction: column; align-items: stretch; }
  section { padding: 3rem 0; }
}
