/* ============================================================
   Kasisi Facing Mount Kenya — hub stylesheet
   Palette: deep navy + gold ("Mount Kenya"), cream canvas
   ============================================================ */

:root {
  --navy-900: #081826;
  --navy-800: #0b2236;
  --navy-700: #0e2c45;
  --gold-500: #d4a017;
  --gold-400: #e0b43d;
  --gold-200: #f0d99a;
  --cream: #f8f5ef;
  --cream-200: #efe9df;
  --ink: #1c2733;
  --muted: #5d6b78;
  --white: #ffffff;
  --accent: var(--gold-500); /* per-card override */

  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(8, 24, 38, 0.08);
  --shadow-md: 0 12px 32px rgba(8, 24, 38, 0.12);
  --shadow-lg: 0 24px 60px rgba(8, 24, 38, 0.18);
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* overflow-x: clip contains the off-canvas mobile menu without breaking the
   sticky header (unlike overflow:hidden, clip creates no scroll container) */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

/* inline SVG icons (sprite) — size via font-size, inherit color via currentColor */
.ion { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex-shrink: 0; }
/* icons never swallow the click — it always lands on the button/link */
.btn .ion, .icon-btn .ion, .nav-cta .ion, .social-row .ion { pointer-events: none; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, .brand-name, .card-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.container { width: min(var(--maxw), 92%); margin-inline: auto; }
.text-gold { color: var(--gold-400); }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--gold-500); color: var(--navy-900);
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem;
  padding: 13px 24px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), color 0.25s var(--ease);
  font-family: inherit; white-space: nowrap;
}
.btn-sm { padding: 9px 18px; font-size: 0.875rem; min-height: 40px; }
.btn-primary { background: var(--gold-500); color: var(--navy-900); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--gold-400); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary:disabled { background: var(--cream-200); color: var(--muted); cursor: not-allowed; box-shadow: none; transform: none; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; opacity: 0.92; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }

.pulse-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #e8503a;
  display: inline-block; box-shadow: 0 0 0 0 rgba(232, 80, 58, 0.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232, 80, 58, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(232, 80, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 80, 58, 0); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(8, 24, 38, 0.85);
  backdrop-filter: blur(12px);
  color: var(--cream);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 8px; }
.brand-name { font-size: 1.15rem; color: var(--cream); }
.brand-name em { color: var(--gold-400); font-style: normal; font-weight: 500; }

.nav-list { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-link {
  color: var(--cream); padding: 9px 14px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 500; transition: background 0.2s, color 0.2s;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.1); }
.nav-cta {
  background: var(--gold-500); color: var(--navy-900); font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px;
}
.nav-cta:hover { background: var(--gold-400); }

.nav-toggle { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: none; border: 0; cursor: pointer; min-width: 44px; min-height: 44px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--cream); border-radius: 2px; transition: 0.3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(120% 120% at 80% 0%, var(--navy-700) 0%, var(--navy-900) 55%);
  color: var(--cream);
  padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 9vw, 120px);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto -10% -40% auto; width: 60%; height: 80%;
  background: radial-gradient(circle, rgba(212, 160, 23, 0.16), transparent 60%);
  pointer-events: none;
}
.hero-inner {
  width: min(var(--maxw), 92%); margin-inline: auto;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 72px);
  align-items: center; position: relative; z-index: 1;
}
.eyebrow {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-400); font-weight: 600; margin-bottom: 18px;
}
.hero-title { font-size: clamp(2.3rem, 5.5vw, 4rem); margin-bottom: 22px; }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: #c7d3de; max-width: 46ch; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero-meta { display: flex; align-items: center; gap: 8px; color: #9fb0bd; font-size: 0.9rem; }
.hero-meta .ion { font-size: 1.1rem; color: var(--gold-400); }
.hero-meta [data-counter-display] { color: var(--cream); font-weight: 600; }
.hero-portrait { position: relative; }
.hero-portrait img {
  width: 100%; height: auto; /* height:auto so the width/height attrs set ratio, not a fixed px height */
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--alt { background: var(--cream-200); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(36px, 5vw, 60px); }
.subheading {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: #7d5e0f; font-weight: 700; margin-bottom: 12px; /* darker gold for AA contrast on light bg */
}
.section-title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: var(--navy-900); }
.section-intro { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }

/* ---------- Network grid ---------- */
.network-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px;
}
.card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  border: 1px solid var(--cream-200);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
/* The media is the element that clips the image, so it carries the top radius
   itself — this keeps rounded corners even while the image scales on hover
   (a nested overflow:hidden + transform otherwise leaks square corners in WebKit). */
.card-media {
  position: relative; display: block; aspect-ratio: 16 / 10;
  overflow: hidden; background: var(--navy-800);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  border-bottom: 4px solid var(--accent);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }

.live-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(8, 24, 38, 0.82); color: var(--white);
  font-size: 0.72rem; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; backdrop-filter: blur(4px);
}

.card-media--brand {
  display: flex; align-items: center; justify-content: center; position: relative;
  background: linear-gradient(150deg, var(--accent), var(--navy-900));
}
.brand-monogram {
  font-family: "Fraunces", serif; font-weight: 700; color: var(--white);
  font-size: 1.7rem; text-align: center; letter-spacing: 0.04em; line-height: 1.15;
}
.brand-monogram small { font-size: 0.95rem; font-weight: 500; opacity: 0.85; letter-spacing: 0.12em; }
.soon-badge {
  position: absolute; top: 12px; right: 12px; background: var(--white); color: var(--navy-900);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 5px 11px; border-radius: 999px;
}

.card-body { padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-title { font-size: 1.3rem; color: var(--navy-900); }
.card-text { color: var(--muted); font-size: 0.96rem; flex: 1; }
.card-text em { color: var(--ink); font-style: italic; }
/* Live "now playing" pill (Radio Kenya United) */
.now-playing {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--muted);
  background: var(--cream); border: 1px solid var(--cream-200);
  border-radius: 999px; padding: 6px 12px; margin-top: 2px; max-width: 100%;
}
.now-playing .np-dot { width: 8px; height: 8px; border-radius: 50%; background: #e8503a; flex-shrink: 0; animation: pulse 1.8s infinite; }
.now-playing .np-label { font-weight: 700; color: var(--navy-900); white-space: nowrap; flex-shrink: 0; }
.now-playing .np-track { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-playing.is-off { color: var(--muted); }
.now-playing.is-off .np-dot { background: #9aa7b2; animation: none; }

.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.card-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  background: var(--cream); border: 1px solid var(--cream-200); color: var(--muted);
  border-radius: 999px; padding: 9px 14px; min-height: 40px; cursor: pointer; font-size: 0.85rem; font-weight: 600;
  transition: 0.2s var(--ease); font-family: inherit;
}
.icon-btn .ion { font-size: 1.05rem; }
.icon-btn:hover { background: var(--cream-200); color: var(--ink); }
.like-btn.is-liked { color: #e8503a; border-color: #f4c4ba; background: #fdeeeb; }
.like-btn.is-liked .ion { transform: scale(1.1); }
.like-btn.bump { animation: bump 0.35s var(--ease); }
@keyframes bump { 0%,100% { transform: scale(1); } 40% { transform: scale(1.18); } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-portrait img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.about-text p { color: var(--muted); margin-top: 14px; }
.about-text .section-title { margin-top: 6px; }
.creds { list-style: none; margin: 24px 0; display: grid; gap: 12px; }
.creds li { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--ink); }
.creds .ion { font-size: 1.3rem; color: var(--gold-500); flex-shrink: 0; }

.social-row { list-style: none; display: flex; gap: 12px; }
.social-row a {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--navy-900); color: var(--cream); transition: 0.25s var(--ease);
}
.social-row a:hover { background: var(--gold-500); color: var(--navy-900); transform: translateY(-3px); }
.social-row .ion { font-size: 1.3rem; }

/* ---------- Books ---------- */
.books-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; }
.book { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 220px; text-align: center; transition: transform 0.3s var(--ease); }
.book:hover { transform: translateY(-6px); }
.book img { height: 280px; width: auto; border-radius: 8px; box-shadow: var(--shadow-md); }
.book span { font-weight: 600; color: var(--navy-900); font-size: 0.95rem; }
.book small { color: var(--muted); font-weight: 500; }

/* ---------- Ad slot (no ads served by default) ---------- */
.ad-slot { padding: 24px 0; }
.ad-slot__inner {
  min-height: 90px; border: 1px dashed var(--cream-200); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.ad-slot__label { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- CTA ---------- */
.section--cta { background: var(--navy-900); color: var(--cream); }
.cta-card { text-align: center; max-width: 720px; }
.section--cta .section-title { color: var(--cream); }
.cta-lead { color: #c7d3de; margin: 14px auto 28px; font-size: 1.1rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.section--cta .btn-ghost { color: var(--cream); }

/* ---------- Contact form ---------- */
.contact-form { max-width: 600px; margin: 30px auto 0; text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--gold-200); margin-bottom: 6px; }
.field-label .opt { color: #8da0ae; font-weight: 400; }
.contact-form input, .contact-form textarea {
  width: 100%; font: inherit; font-size: 0.95rem; color: var(--cream);
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px; padding: 12px 14px;
  transition: border-color 0.2s, background 0.2s;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #7d8d9a; }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--gold-400); background: rgba(255, 255, 255, 0.1);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:user-invalid, .contact-form textarea:user-invalid { border-color: #e8503a; }
/* honeypot — visually and audibly hidden, but bots will still fill it */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; justify-content: center; }
.form-status { margin-top: 16px; font-size: 0.92rem; min-height: 1.2em; text-align: center; }
.form-status.is-error { color: #ff9b8a; }
.form-status.is-success { color: #8fe3b0; }
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #aebcc8; padding: clamp(48px, 6vw, 72px) 0 28px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
.footer-brand .brand-logo { width: 52px; height: 52px; border-radius: 10px; margin-bottom: 14px; }
.footer-tagline { font-family: "Fraunces", serif; color: var(--gold-200); font-size: 1.05rem; margin-bottom: 18px; }
.footer-heading { color: var(--cream); font-weight: 600; margin-bottom: 16px; font-size: 0.95rem; letter-spacing: 0.02em; }
.footer-col ul { list-style: none; display: grid; gap: 11px; }
.footer-col a { color: #aebcc8; font-size: 0.92rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--gold-400); }
.footer-contact a { color: var(--gold-400); font-weight: 600; }
.footer-contact p { margin-top: 12px; font-size: 0.9rem; line-height: 1.7; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem; color: #7d8d9a;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-text { order: 2; }
  .hero-portrait { order: 1; max-width: 340px; margin-inline: auto; }
  .hero-actions, .hero-meta { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 360px; margin-inline: auto; }
  .social-row { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(78%, 320px);
    background: var(--navy-900); padding: 84px 28px 28px;
    transform: translateX(100%); transition: transform 0.35s var(--ease);
    box-shadow: var(--shadow-lg); z-index: 95;
  }
  body.nav-open .main-nav { transform: translateX(0); }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; z-index: 94;
    background: rgba(8, 24, 38, 0.55); animation: fadeIn 0.3s var(--ease);
  }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  .nav-list { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-link { padding: 14px 16px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .card-footer { flex-direction: column; align-items: stretch; }
  .card-actions { justify-content: space-between; }
}

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