/* Key9 Identity — static rebuild, matched to live k9.io design tokens */

@import url('https://fonts.googleapis.com/css2?family=Rationale&family=Open+Sans:wght@400;600;700&display=swap');

:root {
  --black: #000000;
  --navy: #0c143f;
  --navy-raised: #121b4d;
  --red: #ff0043;
  --red-grad: #fd0043;
  --white: #ffffff;
  --text: #eef0f8;
  --text-dim: rgba(238, 240, 248, 0.68);
  --max-width: 1180px;
  --font-display: 'Rationale', Arial, sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4, .h1 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0 0 8px;
  line-height: 1.15;
}
h5 { font-family: var(--font-body); font-weight: 700; margin: 0 0 12px; }
p { margin: 0 0 16px; }

/* Heading underline icon */
.heading-icon {
  width: 45px;
  height: 24px;
  margin: 4px 0 18px;
  background: url("../assets/images/highlight-shape.svg") no-repeat center / contain;
}
.center .heading-icon { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.88rem + 0.5vw, 1.375rem);
  padding: clamp(8px, 6px + 0.5vw, 10px) clamp(18px, 14px + 2vw, 28px);
  border-radius: 100px;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid {
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--red);
}
.btn-solid:hover { box-shadow: 0 10px 24px rgba(255, 0, 67, 0.35); }
.btn-outline {
  background: var(--white);
  color: var(--red);
  border: 2px solid var(--red);
}
.btn-outline:hover {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(255, 0, 67, 0.35);
}
.btn-glow {
  box-shadow: 0 0 14px rgba(255, 0, 67, 0.6);
}

/* Badge (e.g. "Coming Soon") */
.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 0, 67, 0.12);
  color: var(--red);
  padding: 4px 10px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 10px;
}
.bg-gradient .badge { background: rgba(255, 255, 255, 0.18); color: var(--white); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Top bar */
.topbar { background: var(--black); font-size: 0.85rem; }
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 24px;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--white);
}
.topbar a { color: var(--white); }
.topbar .contact-info a { margin-right: 20px; }
.topbar .resource-links { display: flex; align-items: center; gap: 14px; }
.topbar .resource-links a {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  font-weight: 600;
}
.topbar .resource-links a:hover { text-decoration: underline; }
.topbar .social-links { display: flex; gap: 10px; margin-left: 8px; }
.topbar .social-links img { height: 15px; width: auto; filter: brightness(0) invert(1); opacity: 0.85; }

/* Social icon hover animation (shared by topbar + footer) */
.social-links a { transition: opacity 0.3s ease; }
.social-links a:hover { opacity: 0.6; }

/* Header / nav */
header.site-header {
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 100;
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 10px;
  gap: 24px;
}
.logo img { height: 36px; width: auto; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
nav.main-nav { display: flex; align-items: center; }
nav.main-nav .links { display: flex; gap: 32px; }
nav.main-nav a {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  position: relative;
  padding-bottom: 18px;
}
nav.main-nav a.active,
nav.main-nav a:hover { color: var(--red); }
nav.main-nav a.active::before,
nav.main-nav a:hover::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 17px;
  background: url("../assets/images/highlight-shape.svg") no-repeat center / contain;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  nav.main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    display: block;
  }
  nav.main-nav.is-open { max-height: 420px; }
  nav.main-nav .links {
    flex-direction: column;
    gap: 0;
    padding: 4px 24px 20px;
  }
  nav.main-nav a {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  nav.main-nav a.active::before,
  nav.main-nav a:hover::before {
    left: 0;
    transform: none;
    bottom: 10px;
  }
}

/* Hero (homepage) */
.hero {
  position: relative;
  background: var(--red);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 90px 0;
  text-align: center;
  overflow: hidden;
}
.hero .wrap { width: 100%; }
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-tint {
  position: absolute;
  inset: 0;
  background: var(--red);
  mix-blend-mode: multiply;
  z-index: 1;
}
.hero .wrap { position: relative; z-index: 2; }
.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  max-width: 900px;
  margin: 0 auto 32px;
}

/* Inner page banner */
.page-hero {
  background: linear-gradient(156deg, var(--red-grad) 0%, var(--navy) 100%),
              url("../assets/images/video-bg.png") center / cover no-repeat;
  background-blend-mode: overlay;
  padding: 40px 0;
}
.page-hero h1 { color: var(--white); font-size: clamp(1.75rem, 1.35rem + 2vw, 2.5rem); margin: 0; }

/* Sections */
section { padding: clamp(48px, 24px + 6vw, 92px) 0; }
.bg-light {
  background-color: var(--navy-raised);
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}
.bg-gradient {
  background: linear-gradient(156deg, var(--red-grad) 0%, var(--navy) 100%);
  color: var(--white);
}
.bg-gradient h1, .bg-gradient h2, .bg-gradient h3 { color: var(--white); }
.bg-navy { background: var(--navy); color: var(--white); }

.center { text-align: center; }
.lede { max-width: 700px; margin: 0 auto 24px; color: var(--text-dim); font-size: 1.05rem; }
.bg-gradient .lede, .bg-navy .lede { color: rgba(255,255,255,0.85); }

/* Two column intro (We don't keep secrets) */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.5fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
}
.split h2 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); }
.split .lede-left h5 { font-size: 1.15rem; }
.split .lede-left p { color: var(--text-dim); }
.bg-gradient .split .lede-left p,
.bg-gradient .split p { color: rgba(255,255,255,0.85); }

/* Solution rows (full width, alternating bg) */
.feature-row h2 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); }
.feature-row .desc-wrap { max-width: 640px; }
.feature-row h5 { font-size: 1.2rem; }
.feature-row p { color: var(--text-dim); }
.bg-gradient .feature-row p { color: rgba(255,255,255,0.85); }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 48px 32px;
}
.card { transition: transform 0.3s cubic-bezier(.2,.8,.2,1); }
.card:hover { transform: translateY(-6px); }
.card .media {
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 24px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.3s ease;
}
.card:hover .media { box-shadow: 0 18px 34px rgba(0, 0, 0, 0.4); }
.card img {
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover img { transform: scale(1.04); }
.card h3 { font-size: clamp(1.25rem, 1.05rem + 1vw, 1.6rem); }
.card p { color: var(--text-dim); font-size: 0.95rem; }
.card a.value { font-weight: 700; color: var(--text); }
.card a.value:hover { color: var(--red); }

/* Non-profits split */
.split.reverse { grid-template-columns: 1fr 0.9fr; }
.split.reverse .media img,
.split .media img {
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
@media (max-width: 860px) {
  .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .media { order: -1; }
}

/* Video embed */
.video-frame {
  max-width: 720px;
  margin: 0 auto 32px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.video-frame img { width: 100%; }

/* Stat counter */
.stat-counter { background: var(--navy); color: var(--white); padding: 56px 0; }
.stat-head { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.stat-head .label {
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}
.stat-head .big { font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); }
.stat-divider { width: 1px; height: 56px; background: rgba(255,255,255,0.25); }
.stat-boxes { display: flex; gap: 20px; flex-wrap: wrap; }
.stat-box { text-align: center; }
.stat-box .stat-label {
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.stat-box .stat-value {
  width: 88px;
  height: 88px;
  background: linear-gradient(180deg, #ffffff 50%, #c7cadd 50%);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}
.stat-box .stat-value.is-zero {
  background: linear-gradient(180deg, #ffffff 50%, #ffd7e0 50%);
  color: var(--red);
}
.stat-footnote {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 28px 0 0;
}

/* Contact cards */
.contact-band {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 36px 0;
}
.contact-band a { font-size: clamp(1.15rem, 0.95rem + 1vw, 1.6rem); font-family: var(--font-display); color: var(--white); }
.contact-band a:hover { color: var(--red); }
.contact-band .sep { margin: 0 16px; opacity: 0.4; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 28px;
  max-width: 640px;
  margin: 40px auto 0;
}
.contact-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 32px 24px;
  text-align: center;
}
.contact-card h3 { font-size: 1.4rem; }
.contact-card a.value { font-family: var(--font-body); font-weight: 700; color: var(--text); font-size: 1.05rem; }
.contact-card a.value:hover { color: var(--red); }

/* Footer */
footer.site-footer {
  background: var(--navy);
  color: var(--white);
  padding: 56px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding-bottom: 40px;
}
@media (max-width: 760px) {
  .footer-top { grid-template-columns: 1fr; text-align: center; }
}
.footer-links a { display: block; margin-bottom: 10px; font-size: 1rem; }
.footer-links a:hover { color: var(--red); }
.footer-links a.btn { display: inline-block; }
.footer-badge img { width: 110px; height: 110px; margin: 0 auto; }
.footer-copy { text-align: right; font-size: 0.9rem; opacity: 0.85; }
@media (max-width: 760px) { .footer-copy { text-align: center; } }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 18px 0;
}
.footer-bottom .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}
.footer-bottom .contact-info a { margin-right: 18px; }
.footer-bottom .resource-links { display: flex; gap: 14px; align-items: center; }
.footer-bottom .resource-links a { text-transform: uppercase; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; }
.footer-bottom .social-links { display: flex; gap: 10px; }
.footer-bottom .social-links img { height: 15px; filter: brightness(0) invert(1); opacity: 0.85; }
