/*
Theme Name: TiE Nairobi
Theme URI: https://tienairobi.org
Author: TiE Nairobi
Description: Custom WordPress theme for TiE Nairobi, blending the membership-tier structure of TiE Bangalore with the polish of TiE Silicon Valley. Built around a "horizon at golden hour" visual signature — a thin gold rule marking section breaks, echoing the Nairobi savanna skyline.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: tie-nairobi
*/

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
  /* Color — TiE global brand: red & white, applied consistently across chapters */
  --tie-ink: #1A1A1A;         /* near-black, body text */
  --tie-cream: #FFFFFF;       /* white, primary background */
  --tie-clay: #C8102E;        /* TiE red — primary accent, CTAs, links */
  --tie-leaf: #7A0C1D;        /* deep maroon — secondary accent, hovers */
  --tie-gold: #FFFFFF;        /* white, used for accents/rules on dark red/black */
  --tie-white: #FFFFFF;
  --tie-red: #C8102E;         /* alias for direct reference */
  --tie-red-dark: #7A0C1D;
  --tie-ink-70: rgba(26, 26, 26, 0.7);
  --tie-ink-40: rgba(26, 26, 26, 0.4);
  --tie-cream-60: rgba(255, 255, 255, 0.6);

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --step-eyebrow: 0.75rem;
  --step-body: 1.0625rem;
  --step-h3: 1.5rem;
  --step-h2: 2.25rem;
  --step-h1: clamp(2.5rem, 5vw, 4.25rem);

  /* Layout */
  --rule-gold: 2px solid var(--tie-red);
  --radius: 2px;
  --container: 1180px;
  --section-pad: clamp(3.5rem, 8vw, 7rem);
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  font-size: var(--step-body);
  color: var(--tie-ink);
  background: var(--tie-cream);
  line-height: 1.6;
  margin: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--tie-ink);
}

h1 { font-size: var(--step-h1); font-weight: 500; }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); }

a { color: var(--tie-clay); text-decoration: none; }
a:hover { text-decoration: underline; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--tie-clay);
  outline-offset: 2px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tie-clay);
  display: block;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   HORIZON SIGNATURE — thin gold rule marking section breaks
   ========================================================================== */
.horizon {
  position: relative;
  border: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tie-red) 15%, var(--tie-red) 85%, transparent);
  margin: 0;
}

section {
  padding: var(--section-pad) 0;
  position: relative;
}

section + section {
  border-top: 1px solid rgba(14, 31, 28, 0.08);
}

section.on-ink {
  background: var(--tie-red-dark);
  color: var(--tie-cream);
}
section.on-ink h1, section.on-ink h2, section.on-ink h3 { color: var(--tie-cream); }

/* ==========================================================================
   SITE HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--tie-cream);
  border-bottom: var(--rule-gold);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.site-logo img { height: 42px; width: auto; display: block; }

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  color: var(--tie-ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.primary-nav .sub-menu {
  display: none;
  position: absolute;
  background: var(--tie-white);
  border: 1px solid rgba(14,31,28,0.1);
  padding: 0.5rem 0;
  min-width: 200px;
  margin-top: 0.75rem;
  box-shadow: 0 8px 24px rgba(14,31,28,0.12);
}
.primary-nav li:hover > .sub-menu { display: block; }
.primary-nav .sub-menu li { padding: 0; }
.primary-nav .sub-menu a { display: block; padding: 0.6rem 1.25rem; }

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--tie-ink);
}

.btn-primary {
  background: var(--tie-clay);
  border-color: var(--tie-clay);
  color: var(--tie-white);
}
.btn-primary:hover { background: var(--tie-ink); border-color: var(--tie-ink); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--tie-ink);
}
.btn-ghost:hover { background: var(--tie-ink); color: var(--tie-cream); text-decoration: none; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  background: var(--tie-red-dark);
  color: var(--tie-cream);
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tie-white) 50%, transparent);
}

.hero .container { max-width: 760px; }
.hero p.lede { font-size: 1.2rem; color: var(--tie-cream-60); margin-bottom: 2rem; }
.hero .cta-row { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ==========================================================================
   IMPACT / STAT STRIP — "surveyor's markers" along the horizon
   ========================================================================== */
.impact-strip { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: var(--rule-gold);
}
.impact-item {
  padding: 1.75rem 1rem 0;
  border-left: 1px solid rgba(14,31,28,0.12);
  text-align: left;
}
.impact-item:first-child { border-left: none; }
.impact-number {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  color: var(--tie-clay);
  display: block;
}
.impact-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tie-ink-70);
}

/* ==========================================================================
   CARD GRIDS — pillars, programs, members
   ========================================================================== */
.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--tie-white);
  border: 1px solid rgba(14,31,28,0.1);
  padding: 2rem;
}
.card img { width: 100%; height: 180px; object-fit: cover; margin-bottom: 1.25rem; }

.member-card { text-align: left; }
.member-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin-bottom: 1rem;
  filter: grayscale(15%);
}
.member-card .tier {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tie-clay);
}
.member-card h4 { margin: 0.25rem 0 0; font-size: 1.05rem; }
.member-card .company { color: var(--tie-ink-70); font-size: 0.9rem; }

/* ==========================================================================
   EVENTS
   ========================================================================== */
.event-row {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(14,31,28,0.1);
  align-items: baseline;
}
.event-date {
  font-family: var(--font-mono);
  color: var(--tie-clay);
  min-width: 110px;
  font-size: 0.85rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--tie-ink);
  color: var(--tie-cream-60);
  padding: 4rem 0 2rem;
}
.site-footer h4 { color: var(--tie-cream); font-size: 0.95rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; }
.site-footer a { color: var(--tie-cream-60); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 3rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-bottom {
  border-top: 1px solid rgba(246,241,228,0.15);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 860px) {
  .primary-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
