/* =====================================================================
   TEAM INVERSE: SHARED STYLESHEET (site.css)
   Author: Alex Devlyashevskiy (AKA Axalon)
   Every page links to this one file, so dark and light mode, colours,
   type and components stay the same across the whole site.
   Edit design tokens in section 1; the light theme overrides only the
   tokens that differ.

   Sections
     1. Design tokens          6. Homepage sections
     2. Page basics            7. Site footer
     3. Sky and animation      8. Reduced motion
     4. Shared building blocks 9. Inner pages (heading, coming soon,
     5. Site header and nav       projects, team)
   ===================================================================== */
/* =====================================================================
   1. DESIGN TOKENS
   Every colour, font and shared size lives here. Change a value once
   and it updates everywhere. The light theme overrides only the tokens
   that differ; brand colours stay the same in both themes.
   ===================================================================== */
.ti-page {
  /* Brand colours (fixed in both themes) */
  --brand-gold: #FFC81E;
  --brand-cyan: #3DF2FF;
  --brand-pink: #FF3DD2;
  --brand-green: #5DFF2E;
  --brand-night: #0A0724;          /* deepest background */
  --text-on-gold: #1A0E00;         /* text on gold buttons */
  --text-on-cyan: #04122A;         /* text on cyan buttons */

  /* Fonts */
  --font-display: Unbounded, 'Arial Black', sans-serif;
  --font-body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;

  /* Layout */
  --content-width: 1240px;
  --page-gutter: 24px;

  /* Dark theme (default) */
  --text-strong: #FFFFFF;          /* headings */
  --text-body: #EDEBFF;            /* paragraphs */
  --text-muted: #C9C5F0;           /* supporting text */
  --text-faint: #A9A4DA;           /* small print */
  --link-color: #3DF2FF;
  --gold-text: #FFC81E;            /* prices, donate names */
  --glass-background: rgba(255, 255, 255, .06);
  --glass-border: rgba(255, 255, 255, .14);
  --pill-border: rgba(255, 255, 255, .22);
  --divider-line: rgba(255, 255, 255, .12);
  --footer-background: rgba(5, 3, 20, .7);
  --input-background: rgba(5, 3, 20, .5);
  --donate-border: rgba(255, 200, 30, .45);
  --focus-ring: #FFC81E;
  --star-dim: #FFFFFF;             /* the small pale twinkle star */
}

.ti-page.is-light {
  --text-strong: #140C42;
  --text-body: #241C57;
  --text-muted: #433B7A;
  --text-faint: #565088;
  --link-color: #075E86;
  --gold-text: #7A4E00;
  --glass-background: rgba(255, 255, 255, .72);
  --glass-border: rgba(20, 12, 66, .14);
  --pill-border: rgba(20, 12, 66, .28);
  --divider-line: rgba(20, 12, 66, .12);
  --footer-background: rgba(255, 255, 255, .6);
  --input-background: #FFFFFF;
  --donate-border: #9A6B1F;
  --focus-ring: #5B2FD0;
  --star-dim: #7A70C8;
}

/* =====================================================================
   2. PAGE BASICS
   ===================================================================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 128px;       /* in-page links stop below the sticky header */
}
body {
  margin: 0;
  background: #0A0724;
}
a       { color: var(--link-color); }
a:hover { color: var(--text-strong); }
main a  { font-size: 20px; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

/* The page wrapper: text defaults and the starry sky behind everything */
.ti-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
}

/* =====================================================================
   3. SKY BACKGROUND AND ANIMATION
   Two fixed layers: ::before is the night sky, ::after the light sky.
   Switching theme cross-fades their opacity. The aurora drifts slowly.
   ===================================================================== */
.ti-page::before,
.ti-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  transition: opacity .7s ease;
}
.ti-page::before {
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 62%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 47% 9%, #FFC81E 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 44%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 83% 71%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 23%, #FFC81E 50%, transparent 51%),
    radial-gradient(1px 1px at 5% 84%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 88%, #fff 50%, transparent 51%),
    radial-gradient(60% 50% at 15% 10%, rgba(61, 242, 255, .18), transparent 70%),
    radial-gradient(50% 45% at 85% 20%, rgba(255, 61, 210, .16), transparent 70%),
    radial-gradient(70% 60% at 50% 100%, rgba(42, 18, 140, .55), transparent 75%),
    #0A0724;
  background-size: 320px 320px, 320px 320px, 320px 320px, 320px 320px, 320px 320px, 320px 320px,
                   320px 320px, 320px 320px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}
.ti-page::after {
  opacity: 0;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #7A70C8 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 62%, #7A70C8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 47% 9%, #C99400 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 44%, #7A70C8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 83% 71%, #7A70C8 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 23%, #C99400 50%, transparent 51%),
    radial-gradient(60% 50% at 15% 10%, rgba(61, 242, 255, .22), transparent 70%),
    radial-gradient(50% 45% at 85% 20%, rgba(255, 61, 210, .14), transparent 70%),
    radial-gradient(70% 60% at 50% 100%, rgba(120, 100, 255, .18), transparent 75%),
    #F3F1FF;
  background-size: 320px 320px, 320px 320px, 320px 320px, 320px 320px, 320px 320px, 320px 320px,
                   100% 100%, 100% 100%, 100% 100%, 100% 100%;
}
.ti-page.is-light::before { opacity: 0; }
.ti-page.is-light::after  { opacity: 1; }

.ti-aurora {
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 32% at 28% 30%, rgba(61, 242, 255, .11), transparent 70%),
    radial-gradient(34% 30% at 72% 58%, rgba(255, 61, 210, .10), transparent 70%),
    radial-gradient(30% 28% at 48% 88%, rgba(93, 255, 46, .05), transparent 70%);
  animation: ti-aurora-drift 40s ease-in-out infinite alternate;
  will-change: transform;
}
.ti-page.is-light .ti-aurora { opacity: .75; }

@keyframes ti-aurora-drift {
  0%   { transform: translate3d(-4%, -2%, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(3%, 2%, 0) rotate(5deg) scale(1.05); }
  100% { transform: translate3d(-2%, 4%, 0) rotate(-4deg) scale(1); }
}

/* Added for 0.75 s while the theme switches, so colours fade instead of snapping */
.is-theme-fading,
.is-theme-fading * {
  transition: color .6s ease, background-color .6s ease, border-color .6s ease !important;
}

/* =====================================================================
   4. SHARED BUILDING BLOCKS
   ===================================================================== */

/* Frosted-glass panel used by the header, cards and buttons */
.ti-glass {
  background: var(--glass-background);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

/* A centred content band; every section uses this */
.ti-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 64px var(--page-gutter);
}

/* Section heading row: title and intro on the left, an action on the right */
.ti-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}
.ti-section-heading-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ti-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.1;
  color: var(--text-strong);
}
.ti-section-intro {
  margin: 0;
  max-width: 34em;
  color: var(--text-muted);
}
.ti-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--text-strong);
}

/* Buttons (links styled as pills). Pair .ti-button with one colour modifier. */
.ti-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.ti-button--gold,  .ti-button--gold:hover  { background: var(--brand-gold); color: var(--text-on-gold); }
.ti-button--cyan,  .ti-button--cyan:hover  { background: var(--brand-cyan); color: var(--text-on-cyan); }
.ti-button--glass, .ti-button--glass:hover { color: var(--text-strong); }

/* Round icon-only buttons (theme toggle, menu, photo arrows) */
.ti-icon-button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  color: var(--text-strong);
  cursor: pointer;
}
.ti-icon-button--small {
  width: 44px;
  height: 44px;
}

/* Small rounded link with an optional brand icon (community links) */
.ti-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ti-pill-link,
.ti-pill-link:hover {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--pill-border);
  color: var(--text-body);
  font-size: 19px;
  text-decoration: none;
}
.ti-pill-icon         { display: block; }
.ti-pill-icon--square { border-radius: 4px; }

/* Gold hover glow shared by pills and donate buttons */
.ti-pill-link,
.ti-donate-link {
  transition: border-color .2s ease, background-color .2s ease;
}
.ti-pill-link:hover,
.ti-donate-link:hover {
  border-color: var(--brand-gold);
  background: rgba(255, 200, 30, .08);
}

/* Four-point sparkle, drawn from the symbol defined at the top of the markup */
.ti-sparkle { display: block; flex: 0 0 auto; }

/* List with a coloured sparkle for each bullet */
.ti-sparkle-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ti-sparkle-list > li {
  display: flex;
  gap: 10px;
}
.ti-sparkle-list > li > .ti-sparkle {
  width: 14px;
  height: 14px;
  margin-top: 7px;
}
.ti-sub-list {
  margin: 8px 0 0;
  padding: 0 0 0 4px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #C9C5F0;
}

/* =====================================================================
   5. SITE HEADER AND NAVIGATION
   ===================================================================== */
.ti-site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-width: 0 0 1px 0;
}
.ti-main-nav {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 18px var(--page-gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ti-brand-link,
.ti-brand-link:hover {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-strong);
  text-decoration: none;
}
.ti-brand-logo {
  width: 72px;
  height: 72px;
}
.ti-brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: .02em;
}
.ti-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
  font-size: 21px;
}
.ti-nav-links a,
.ti-nav-links a:hover {
  padding: 12px 0;
  color: var(--text-body);
  text-decoration: none;
}
.ti-nav-links a:hover { color: var(--text-strong); }
.ti-nav-links a.ti-nav-cta,
.ti-nav-links a.ti-nav-cta:hover {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--brand-gold);
  color: var(--text-on-gold);
  font-weight: 700;
}
.ti-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ti-menu-button {
  display: none;                   /* shown only on tablets and phones, see below */
  border-radius: 14px;
}

/* Tablets and phones: links fold into a drop-down menu */
@media (max-width: 1240px) {
  html                { scroll-padding-top: 96px; }
  .ti-menu-button     { display: grid; }
  .ti-main-nav        { padding: 10px 16px; }
  .ti-brand-logo      { width: 56px; height: 56px; }
  .ti-brand-name      { font-size: 19px; }
  .ti-nav-links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0 12px;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
  }
  .ti-nav-links.is-open { display: flex; }
  .ti-nav-links a,
  .ti-nav-links a:hover {
    padding: 14px 4px;
    border-top: 1px solid var(--divider-line);
  }
  .ti-nav-links a.ti-nav-cta,
  .ti-nav-links a.ti-nav-cta:hover {
    margin-top: 12px;
    padding: 14px 4px;
    justify-content: center;
    border-top: 0;
  }
}
/* Small phones */
@media (max-width: 400px) {
  .ti-main-nav   { gap: 8px; }
  .ti-brand-name { font-size: 16px; }
  .ti-icon-button:not(.ti-icon-button--small) { width: 46px; height: 46px; }
}
/* Very small phones: logo only */
@media (max-width: 340px) {
  .ti-brand-name { display: none; }
  .ti-brand-logo { width: 48px; height: 48px; }
}

/* =====================================================================
   6. HOMEPAGE SECTIONS
   ===================================================================== */

/* Hero: headline on the left, split "porthole" photo on the right */
.ti-hero {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 96px var(--page-gutter) 80px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 64px;
}
.ti-hero-text {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.ti-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.04;
  letter-spacing: -.02em;
  color: var(--text-strong);
}
.ti-hero-gallery {
  flex: 1 1 420px;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

/* The porthole is two copies of the photo, each clipped to one triangle,
   which slide apart along the diagonal like the Team Inverse logo. */
.ti-porthole {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1 / 1;
  margin: 24px;
}
.ti-porthole-half {
  position: absolute;
  inset: 0;
  transition: transform 1.1s cubic-bezier(.2, .8, .2, 1);
}
.ti-porthole-half--upper { clip-path: polygon(0 0, 100% 0, 0 100%); }
.ti-porthole-half--lower { clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.ti-porthole-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 14px solid var(--brand-green);
}
.ti-porthole-window {
  position: absolute;
  inset: 24px;
  overflow: hidden;
  border-radius: 50%;
  background: #1C0E6B;
}
.ti-porthole-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ti-twinkle {
  position: absolute;
  animation: ti-twinkle 4s ease-in-out infinite;
}
@keyframes ti-twinkle {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}
.ti-photo-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ti-photo-caption {
  min-width: min(15em, 48vw);
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
}

/* "What we do": artwork cards. They stay dark in both themes so the white
   text always sits on a dark shade over the bright artwork. */
.ti-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}
.ti-feature-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--glass-border);
  background: var(--brand-night);
}
.ti-feature-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ti-feature-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(10, 7, 36, .25) 0px,
    rgba(10, 7, 36, .6) 110px,
    rgba(10, 7, 36, .9) 190px,
    rgba(10, 7, 36, .94) 100%);
}
.ti-feature-body {
  padding: 190px 30px 32px;        /* top padding leaves the artwork visible */
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: #E9E6FF;
  font-size: 18px;
  line-height: 1.55;
}
.ti-feature-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  color: #FFFFFF;
}
.ti-callout {
  margin-top: 20px;
  padding: 22px 28px;
  border-radius: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}

/* Project cards */
.ti-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.ti-project-card,
.ti-project-card:hover {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 170px;
  padding: 24px;
  border-radius: 22px;
  color: var(--text-body);
  text-decoration: none;
}
.ti-project-card { transition: border-color .2s ease, transform .2s ease; }
.ti-project-card:hover {
  border-color: rgba(255, 200, 30, .6);
  transform: translateY(-3px);
}
.ti-project-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  color: var(--text-strong);
}
.ti-project-blurb {
  font-size: 17px;
  color: var(--text-muted);
}

/* Community panels */
.ti-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}
.ti-panel {
  padding: 28px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ti-copy-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ti-copy-field label {
  font-size: 16px;
  color: var(--text-muted);
}
.ti-copy-row {
  display: flex;
  gap: 8px;
}
.ti-copy-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--pill-border);
  background: var(--input-background);
  color: var(--text-body);
  font: inherit;
  font-size: 14px;
}
.ti-copy-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid var(--gold-text);
  background: transparent;
  color: var(--gold-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* Support: Patreon tiers and one-off donations */
.ti-support-panel {
  min-width: 0;
  padding: 36px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ti-tier-name   { font-weight: 700; font-size: 18px; color: var(--text-strong); }
.ti-tier-price  { font-weight: 700; font-size: 16px; color: var(--gold-text); }
.ti-tier-approx { font-size: 15px; color: var(--text-faint); }
.ti-tier-summary {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
}
.ti-badge {
  padding: 0 10px;
  border-radius: 999px;
  background: var(--brand-gold);
  color: var(--text-on-gold);
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
}
.ti-donate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}
.ti-donate-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 18px;
  border-radius: 18px;
  border: 2px solid var(--donate-border);
  text-decoration: none;
}
.ti-donate-name { font-weight: 700; font-size: 20px; color: var(--gold-text); }
.ti-donate-note { font-size: 16px; color: var(--text-muted); overflow-wrap: anywhere; }
/* White tile behind logos too dark to read on the night background (PayPal) */
.ti-icon-tile {
  padding: 4px;
  border-radius: 9px;
  background: #FFFFFF;
}

/* =====================================================================
   7. SITE FOOTER
   ===================================================================== */
.ti-site-footer {
  border-top: 1px solid var(--divider-line);
  background: var(--footer-background);
}
.ti-footer-columns {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 56px var(--page-gutter) 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 32px;
  font-size: 18px;
}
.ti-footer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ti-footer-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 20px;
}
.ti-footer-heading {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.4;
  color: var(--text-strong);
}
.ti-social-row {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 12px var(--page-gutter) 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  border-top: 1px solid var(--divider-line);
  font-size: 19px;
}
.ti-social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
}
.ti-copyright {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 8px var(--page-gutter) 40px;
  font-size: 16px;
  color: var(--text-faint);
}

/* =====================================================================
   9. INNER PAGES
   Shared by every page except the homepage: page heading, "coming soon"
   panels, project pages and the team roster.
   ===================================================================== */

/* AI policy article: a narrower reading column with a glass panel */
.ti-article {
  max-width: 860px;
  margin: 0 auto;
  padding: 88px var(--page-gutter) 96px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.ti-article-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--text-strong);
}
.ti-article-panel {
  padding: clamp(24px, 5vw, 48px);
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.ti-article-panel p {
  margin: 0;
  font-size: 19px;
  line-height: 1.75;
  color: var(--text-body);
}
.ti-article-panel strong { color: var(--text-strong); }

/* Light theme: match the page background so overscroll never flashes dark */
body:has(.ti-page.is-light) { background: #F3F1FF; }

/* Current page in the navigation */
.ti-nav-links a[aria-current="page"],
.ti-footer-links a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.ti-nav-links a.ti-nav-cta[aria-current="page"] { text-decoration: none; }

/* Page heading block at the top of every inner page */
.ti-page-hero {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 72px var(--page-gutter) 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ti-back-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}
.ti-eyebrow {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.ti-page-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--text-strong);
}
.ti-page-lead {
  margin: 0;
  max-width: 40em;
  font-size: 21px;
  color: var(--text-muted);
}
.ti-section--tight { padding-top: 24px; }

/* "Coming soon" panel used on pages still being written */
.ti-coming-soon {
  padding: clamp(24px, 5vw, 48px);
  border-radius: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  align-items: flex-start;
}
.ti-coming-soon-body {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ti-coming-soon-body p {
  margin: 0;
  color: var(--text-body);
}
.ti-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.ti-status-badge {
  align-self: flex-start;
  padding: 2px 12px;
  border-radius: 999px;
  border: 2px solid var(--gold-text);
  color: var(--gold-text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
}

/* Project pages */
.ti-project-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 320px;
  border-radius: 28px;
  border: 1px solid var(--glass-border);
  background: var(--brand-night);
}
.ti-project-banner img {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ti-project-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px;
  margin-top: 20px;
}
.ti-fact-list {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
}
.ti-fact-list dt { font-weight: 700; color: var(--text-strong); }
.ti-fact-list dd { margin: 0; color: var(--text-muted); }
.ti-project-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.ti-pager-link,
.ti-pager-link:hover {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 22px;
  border-radius: 20px;
  color: var(--text-strong);
  text-decoration: none;
}
.ti-pager-link--next { text-align: right; }
.ti-pager-label { font-size: 15px; color: var(--text-muted); }
.ti-pager-name { font-family: var(--font-display); font-weight: 600; font-size: 20px; }

/* Team roster */
.ti-team-groups {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.ti-team-heading {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  color: var(--text-strong);
}
.ti-role-dot {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
}
.ti-team-count {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
}
.ti-team-note {
  margin: 6px 0 0;
  color: var(--text-muted);
}
.ti-team-grid {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}
.ti-member-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 16px;
  border-radius: 18px;
}
.ti-member-initial {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
}
.ti-member-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ti-member-name {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-strong);
  overflow-wrap: break-word;
}
.ti-member-role { font-size: 15px; color: var(--text-muted); }

/* =====================================================================
   8. REDUCED MOTION
   Visitors who ask their device for less motion get no animation,
   no cross-fades and no smooth scrolling.
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ti-aurora,
  .ti-twinkle { animation: none; }
  .ti-page::before,
  .ti-page::after,
  .ti-porthole-half,
  .ti-project-card,
  .ti-pill-link,
  .ti-donate-link,
  .ti-pager-link { transition: none; }
  .is-theme-fading,
  .is-theme-fading * { transition: none !important; }
  .ti-project-card:hover { transform: none; }
}
