/* ═══════════════════════════════════════
   TACT — Total Communication Technologies
   Shared stylesheet
   Used by: index.html, publications.html, stories.html
   ═══════════════════════════════════════ */

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

:root {
  --teal: #00D8A5;
  --teal-deep: #18a383;
  --teal-glow: rgba(244,152,155,0.12);
  --teal-subtle: rgba(244,152,155,0.05);
  --teal-faded: rgba(244,152,155,0.10);
  --navy: #FFFFFF;
  --navy-mid: #ffffff;
  --warm: #d97706;
  --warm-faded: rgba(217,119,6,0.12);
  --coral: #e04545;
  --coral-faded: rgba(224,69,69,0.12);
  --white: #111827;
  --text-primary: #1f2937;
  --text-secondary: #3d4247;
  --text-muted: #9ca3af;
  --font-display: 'Rubik', system-ui, sans-serif;
  --font-body: 'Rubik', system-ui, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.75;
  font-size: 16px;
}

/* Grain texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }


/* ═══════════════════════════════
   NAVIGATION
   ═══════════════════════════════ */

nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  padding: 1rem 2.5rem;
  display: flex; justify-content: space-between; align-items: center;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  background: rgba(243,244,246,0.7);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background 0.3s, border-color 0.3s;
}
nav.scrolled { background: rgba(243,244,246,0.95); border-bottom-color: rgba(0,0,0,0.1); }
.nav-brand { display: flex; align-items: center; text-decoration: none; }
.nav-logo-svg { height: 30px; }
.nav-links { display: flex; gap: 1.8rem; list-style: none; align-items: center; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-family: var(--font-display); font-size: 0.82rem;
  font-weight: 500; letter-spacing: 0.02em; transition: color 0.25s;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--teal); }
.nav-links a.active { color: var(--teal); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text-secondary); margin: 5px 0; border-radius: 2px; }


/* ═══════════════════════════════
   HERO
   ═══════════════════════════════ */

.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center;
  padding: 8rem 2rem 5rem; position: relative; overflow: hidden;
}
.orb { display: none; }
.hero-logo-wrap { margin-bottom: 2.5rem; }
.hero-logo-svg { width: 220px; filter: drop-shadow(0 0 30px rgba(244,152,155,0.15)); }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(2.2rem,5.5vw,3.8rem);
  font-weight: 400; color: var(--white); line-height: 1.15;
  max-width: 800px;
}
.hero h1 .accent { color: var(--teal); }
.hero-sub {
  font-size: clamp(1rem,2vw,1.15rem); max-width: 620px; margin-top: 1.5rem;
  font-weight: 300; color: var(--text-secondary);  line-height: 1.8;
}
.hero-badges { display: flex; gap: 0.8rem; margin-top: 2.5rem; flex-wrap: wrap; justify-content: center; animation: fadeUp 1s 0.8s both; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 1rem; border-radius: 100px;
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 500;
  border: 1px solid rgba(244,152,155,0.15); color: var(--text-secondary); background: rgba(244,152,155,0.04);
}

.hero-kings-logo {
  margin-top: 3rem;
  height: 60px;
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }


/* ═══════════════════════════════
   SHARED SECTIONS
   ═══════════════════════════════ */

section { padding: 7rem 2rem; max-width: 1100px; margin: 0 auto; }
.section-label { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal-deep); font-weight: 600; margin-bottom: 1rem; }
.section-title { font-family: var(--font-display); font-size: clamp(1.8rem,4vw,2.7rem); font-weight: 700; color: var(--white); line-height: 1.2; margin-bottom: 1.5rem; }
.section-body { font-size: 1.05rem; max-width: 700px; line-height: 1.85; color: var(--text-secondary); font-weight: 300; }
.divider { width: 100%; max-width: 1100px; margin: 0 auto; height: 1px; background: linear-gradient(90deg, transparent, var(--text-secondary), transparent); opacity: 0.2; }


/* ═══════════════════════════════
   THE GAP — infographic cards
   ═══════════════════════════════ */

.gap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 1.5rem; margin-top: 3rem; }
.gap-card { background: var(--navy-mid); border: 1px solid rgba(0,0,0,0.06); border-radius: 20px; padding: 2.5rem 2rem 2rem; text-align: center; transition: transform 0.3s, border-color 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.gap-card:hover { transform: translateY(-3px); border-color: rgba(0,0,0,0.12); }
.gap-visual { margin-bottom: 1.5rem; display: flex; justify-content: center; }
.gap-stat { font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; color: var(--text-primary); line-height: 1.55; }
.gap-stat strong { color: var(--white); font-weight: 700; }
.gap-stat .num { font-weight: 800; font-size: 1.25rem; }
.gap-stat .num.teal { color: var(--teal); }
.gap-stat .num.coral { color: var(--coral); }
.gap-stat .num.warm { color: var(--warm); }
.gap-source { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.6rem; font-style: italic; }


/* ═══════════════════════════════
   PULL QUOTE
   ═══════════════════════════════ */

.pull-quote-section { padding: 5rem 2rem; text-align: center; max-width: 900px; margin: 0 auto; }
.pull-quote { font-family: var(--font-display); font-size: clamp(1.35rem,3vw,2.1rem); font-weight: 600; color: var(--white); line-height: 1.5; position: relative; }
.pull-quote .highlight { color: var(--teal); font-weight: 700; }
.pull-quote::before { content: ''; position: absolute; top: -1.5rem; left: 50%; transform: translateX(-50%); width: 50px; height: 3px; background: var(--teal); border-radius: 3px; opacity: 0.4; }


/* ═══════════════════════════════
   COMMUNITIES
   ═══════════════════════════════ */

.community-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap: 2rem; margin-top: 3rem; }
.community-card { padding: 2.5rem 2rem; border-radius: 20px; border: 1px solid rgba(0,0,0,0.06); background: var(--navy-mid); transition: all 0.35s; position: relative; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.community-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 20px 20px 0 0; }
.community-card.aphasia::before { background: var(--teal); }
.community-card.children::before { background: var(--warm); }
.community-card:hover { border-color: rgba(0,0,0,0.10); transform: translateY(-2px); }
.community-icon { width: 50px; height: 50px; border-radius: 13px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.3rem; }
.community-icon.aphasia { background: var(--teal-glow); }
.community-icon.children { background: var(--warm-faded); }
.community-card h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--white); margin-bottom: 0.7rem; }
.community-card p { font-size: 0.95rem; font-weight: 300; color: var(--text-secondary); line-height: 1.75; }
.community-card strong { color: var(--text-primary); font-weight: 500; }


/* ═══════════════════════════════
   APPROACH — vertical timeline
   ═══════════════════════════════ */

.approach-timeline { margin-top: 3rem; position: relative; padding-left: 60px; }
.approach-timeline::before { content: ''; position: absolute; left: 24px; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--teal), rgba(0,0,0,0.06)); border-radius: 2px; }
.approach-item { position: relative; margin-bottom: 3rem; padding-left: 1.5rem; }
.approach-item:last-child { margin-bottom: 0; }
.approach-marker { position: absolute; left: -36px; top: 2px; width: 48px; height: 48px; border-radius: 50%; background: var(--navy); border: 2px solid var(--teal); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--teal); z-index: 1; }
.approach-content h4 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--white); margin-bottom: 0.4rem; }
.approach-content p { font-size: 0.95rem; font-weight: 300; color: var(--text-secondary); line-height: 1.75; max-width: 620px; }
.approach-tag { display: inline-block; font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-top: 0.5rem; }


/* ═══════════════════════════════
   TEAM
   ═══════════════════════════════ */

.team-grid { display: grid; grid-template-columns: 1fr !important; gap: 1.5rem; margin-top: 3rem; width: 100%; max-width: 100%; }
.team-card { text-align: center; padding: 2rem 1.2rem; border-radius: 16px; background: var(--navy-mid); border: 1px solid rgba(0,0,0,0.04); box-shadow: 0 1px 3px rgba(0,0,0,0.04); min-width: 0; width: 100%; }
.team-card:hover { border-color: rgba(0,0,0,0.10); transform: translateY(-2px); }
.team-avatar { width: 170px; height: 170px; border-radius: 50%; margin: 0 auto 1rem; object-fit: cover; display: block; max-width: 100%; }
.team-card h4 { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; color: var(--white); margin-bottom: 0.2rem; }
.team-role { font-size: 0.82rem; color: var(--text-muted); font-weight: 300; }
.team-org { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; font-style: italic; }
.advisors-grid { grid-template-columns: 1fr !important; max-width: 500px; margin: 0 auto; }
.advisor-org-logo { width: 80px; margin: 0.75rem auto 0; display: block; border-radius: 8px; }
.team-link { display: inline-block; margin-top: 0.6rem; color: var(--text-muted); }

/* restore multi-column only on larger screens */
@media (min-width: 700px) {
  .team-grid { grid-template-columns: repeat(auto-fit, minmax(190px,1fr)) !important; }
  .advisors-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* global overflow fix (very likely needed) */
html, body { max-width: 100%; overflow-x: hidden; }

/*Card queries for mobile*/

/* ═══════════════════════════════
   PARTNERS
   ═══════════════════════════════ */

.partners-section { text-align: center; }
.partner-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.2rem; margin-top: 3rem; }
.partner-logo { font-family: var(--font-display); font-size: 0.78rem; font-weight: 500; color: var(--text-secondary); letter-spacing: 0.03em; padding: 0.8rem 1.3rem; border: 1px solid rgba(0,0,0,0.05); border-radius: 10px; background: var(--navy-mid); transition: border-color 0.3s; }
.partner-logo:hover { border-color: rgba(244,152,155,0.25); }


/* ═══════════════════════════════
   CTA / CONTACT
   ═══════════════════════════════ */

.cta-section { text-align: center; padding: 7rem 2rem; max-width: 700px; margin: 0 auto; }
.cta-button { display: inline-block; margin-top: 2rem; padding: 1rem 2.5rem; border-radius: 60px; background: linear-gradient(135deg, var(--teal), var(--teal-deep)); color: var(--navy); font-family: var(--font-display); font-size: 1rem; font-weight: 600; text-decoration: none; letter-spacing: 0.02em; transition: all 0.3s; box-shadow: 0 4px 28px rgba(244,152,155,0.25); }
.cta-button:hover { transform: translateY(-2px); box-shadow: 0 8px 36px rgba(244,152,155,0.35); }


/* ═══════════════════════════════
   FOOTER
   ═══════════════════════════════ */

footer { text-align: center; padding: 3rem 2rem; border-top: 1px solid rgba(0,0,0,0.06); }
.footer-logos { display: flex; justify-content: center; align-items: center; gap: 2.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.footer-logo-text { font-family: var(--font-display); font-size: 0.72rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; }
footer p { font-size: 0.8rem; color: var(--text-muted); font-weight: 300; }
footer a { color: var(--teal); text-decoration: none; }
footer a:hover { text-decoration: underline; }


/* ═══════════════════════════════
   SUB-PAGE STYLES
   (publications.html, stories.html)
   ═══════════════════════════════ */

.page-header { padding: 10rem 2rem 4rem; max-width: 1100px; margin: 0 auto; }
.page-header .section-body { margin-top: 0.5rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-display); font-size: 0.82rem; font-weight: 500; color: var(--teal); text-decoration: none; margin-bottom: 2rem; transition: opacity 0.2s; }
.back-link:hover { opacity: 0.7; }

/* Publications */
.pub-list { max-width: 800px; margin: 0 auto; padding: 0 2rem 5rem; }
.pub-item { padding: 1.8rem 0; border-bottom: 1px solid rgba(0,0,0,0.06); }
.pub-item:last-child { border-bottom: none; }
.pub-venue { font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--warm); font-weight: 600; margin-bottom: 0.4rem; }
.pub-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--white); margin-bottom: 0.3rem; line-height: 1.4; }
.pub-title a { color: var(--white); text-decoration: none; transition: color 0.2s; }
.pub-title a:hover { color: var(--teal); }
.pub-authors { font-size: 0.88rem; color: var(--text-muted); font-weight: 300; }
.pub-placeholder { padding: 3rem 2rem; border-radius: 16px; background: var(--teal-subtle); border: 1px dashed rgba(0,0,0,0.08); text-align: center; max-width: 700px; margin: 0 auto; }
.pub-placeholder p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }
.pub-placeholder a { color: var(--teal); text-decoration: none; }
.pub-placeholder a:hover { text-decoration: underline; }

/* Stories */
.stories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap: 2rem; max-width: 1100px; margin: 0 auto; padding: 0 2rem 5rem; }
.story-card { border-radius: 16px; background: var(--navy-mid); border: 1px solid rgba(0,0,0,0.06); overflow: hidden; transition: all 0.3s; }
.story-card:hover { border-color: rgba(0,0,0,0.10); transform: translateY(-2px); }
.story-card-body { padding: 1.8rem; }
.story-date { font-family: var(--font-display); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem; }
.story-card h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--white); margin-bottom: 0.5rem; line-height: 1.35; }
.story-card p { font-size: 0.9rem; color: var(--text-secondary); font-weight: 300; line-height: 1.7; }


/* ═══════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════ */

.skip-link { position: absolute; top: -100px; left: 0; background: var(--teal); color: var(--navy); padding: 0.8rem 1.5rem; z-index: 200; font-family: var(--font-display); font-weight: 600; text-decoration: none; border-radius: 0 0 8px 0; }
.skip-link:focus { top: 0; }


/* ═══════════════════════════════
   RESPONSIVE
   ═══════════════════════════════ */

@media (max-width: 768px) {
  nav { padding: 0.9rem 1.5rem; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: rgba(243,244,246,0.97); backdrop-filter: blur(20px); flex-direction: column; padding: 1.5rem 2rem; gap: 1.2rem; border-bottom: 1px solid rgba(0,0,0,0.06); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  section { padding: 5rem 1.5rem; }
  .hero { padding: 7rem 1.5rem 4rem; }
  .hero-logo-svg { width: 170px; }
  .gap-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2,1fr); }
  .approach-timeline { padding-left: 50px; }
  .approach-marker { left: -26px; width: 40px; height: 40px; font-size: 0.8rem; }
  .page-header { padding: 8rem 1.5rem 3rem; }
  .stories-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-badges { gap: 0.5rem; }
  .partner-logos { gap: 0.8rem; }
  .approach-timeline { padding-left: 44px; }
  .approach-marker { left: -22px; width: 36px; height: 36px; }
}


/* Kill all motion without touching layout */
@media (prefers-reduced-motion: no-preference), (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.0001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.0001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Make reveal content visible immediately */
.reveal {
  opacity: 1 !important;
  transform: none !important;
}
