/* Hope for Richmond — Styles */
/* IMB Brand: Sarum Blue #1B365D, Lively Jade #487A7B */

:root {
  --ink: #1B365D;
  --accent: #487A7B;
  --accent-light: rgba(72, 122, 123, 0.09);
  --muted: #707372;
  --prompt: #B2B4B2;
  --imb-red: #B83A4B;
  --imb-teal: #009681;
  --imb-orange: #E87722;
  --imb-yellow: #F3D54E;
  --white: #FFFFFF;
  --off-white: #F7F8FA;
  --card-shadow: 0 2px 16px rgba(27, 54, 93, 0.09);
  --radius: 14px;
  --transition: 0.24s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', 'Proform', sans-serif;
  color: #2d2d2d;
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: 'Nunito Sans', 'Azo Sans', sans-serif;
  color: var(--ink);
  line-height: 1.15;
}

img { max-width: 100%; }

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.1rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: var(--white);
  box-shadow: 0 2px 20px rgba(27, 54, 93, 0.08);
}

.nav-logo {
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--white);
  text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
}

.nav.scrolled .nav-logo { color: var(--ink); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  transition: color var(--transition);
}

.nav.scrolled .nav-links a { color: var(--ink); }
.nav-links a:hover { color: var(--accent) !important; }

.nav-cta {
  background: var(--accent) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.4rem;
  border-radius: 50px;
  font-weight: 700 !important;
}

.nav-cta:hover { background: var(--ink) !important; color: var(--white) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: background var(--transition);
  border-radius: 2px;
}

.nav.scrolled .hamburger span { background: var(--ink); }

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  transition: color var(--transition);
}

.mobile-menu a:hover { color: var(--imb-yellow); }

.mobile-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--imb-yellow);
  color: var(--ink);
}
.btn-primary:hover {
  background: #ffd700;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(243, 213, 78, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.45);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
}
.btn-accent:hover {
  background: #3a6567;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(72, 122, 123, 0.38);
}

.btn-ink {
  background: var(--ink);
  color: var(--white);
}
.btn-ink:hover {
  background: #152a4a;
  transform: translateY(-2px);
}

/* ─── Hero ─── */
.hero {
  min-height: 100vh;
  background: linear-gradient(155deg, var(--ink) 0%, #1e4a5c 55%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 9rem 2rem 6rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(27,54,93,0.82) 0%, rgba(30,74,92,0.75) 55%, rgba(72,122,123,0.7) 100%);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--white));
  z-index: 1;
}

.hero-content {
  max-width: 820px;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,0.9);
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.45rem 1.25rem;
  border-radius: 50px;
  margin-bottom: 1.75rem;
  border: 1px solid rgba(255,255,255,0.18);
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--imb-yellow);
}

.hero p {
  color: rgba(255,255,255,0.82);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  max-width: 580px;
  margin: 0 auto 2.75rem;
  line-height: 1.75;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.4);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: nudge 2.2s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(7px); }
}

/* ─── Layout ─── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section { padding: 5.5rem 0; }

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 4.5vw, 2.9rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ─── Cards ─── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(27, 54, 93, 0.06);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(27, 54, 93, 0.14);
}

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.7rem;
}

.card-text {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.75;
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent);
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: 1.25rem;
  transition: gap var(--transition), color var(--transition);
}
.card-link:hover { gap: 0.8rem; color: var(--ink); }

/* ─── Testimonials ─── */
.testimonial {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  border-left: 4px solid var(--accent);
  display: flex;
  flex-direction: column;
}

.testimonial-mark {
  font-size: 3.5rem;
  font-family: Georgia, serif;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.testimonial-text {
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.8;
  font-style: italic;
  flex: 1;
  margin-bottom: 1.25rem;
}

.testimonial-name {
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
}

.testimonial-place {
  font-size: 0.82rem;
  color: var(--prompt);
}

.testimonial-person {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1rem;
}

.testimonial-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(72,122,123,0.2);
  flex-shrink: 0;
}

/* ─── Dark sections ─── */
.dark-section {
  background: linear-gradient(140deg, var(--ink) 0%, #1f4d5e 100%);
  padding: 5.5rem 0;
  color: var(--white);
  text-align: center;
}

.dark-section .section-title { color: var(--white); }
.dark-section .section-sub { color: rgba(255,255,255,0.72); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.feature-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
  transition: all var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.feature-card:hover {
  background: rgba(255,255,255,0.13);
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.25);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 2rem;
}

.feature-title {
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 0.6rem;
}

.feature-text {
  color: rgba(255,255,255,0.65);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ─── Backgrounds ─── */
.bg-off-white { background: var(--off-white); }
.bg-accent-wash { background: rgba(72,122,123,0.06); }

/* ─── Footer ─── */
footer {
  background: var(--ink);
  color: rgba(255,255,255,0.55);
  padding: 3.5rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand { font-family: 'Nunito Sans', sans-serif; font-weight: 800; font-size: 1.3rem; color: var(--white); margin-bottom: 0.75rem; }

.footer-blurb { font-size: 0.9rem; line-height: 1.7; max-width: 280px; }

.footer-col-head {
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }

.footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--imb-yellow); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.83rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.83rem;
  transition: color var(--transition);
}
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }

/* ─── Resource cards (Training page) ─── */
.resource-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(27,54,93,0.06);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(27,54,93,0.14);
}

.rc-header {
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.rc-tag {
  display: inline-block;
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.15);
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  margin-bottom: 0.6rem;
}

.rc-title {
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--white);
  line-height: 1.3;
}

.rc-icon { font-size: 2rem; flex-shrink: 0; }

.rc-body {
  padding: 1.5rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.rc-text {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  flex: 1;
}

.rc-footer {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rc-label {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--prompt);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── Tool cards ─── */
.tool-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(27,54,93,0.06);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(27,54,93,0.12);
}

.code-block {
  background: var(--accent-light);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  color: var(--ink);
  word-break: break-all;
  margin-top: 1rem;
  border: 1px solid rgba(72,122,123,0.2);
}

/* ─── Train hero ─── */
.train-hero {
  background: linear-gradient(155deg, #1e4060 0%, var(--accent) 100%);
  padding: 8rem 2rem 5rem;
  text-align: center;
}

.train-hero h1 { color: var(--white); font-size: clamp(2.2rem, 5vw, 3.75rem); font-weight: 800; margin-bottom: 1rem; letter-spacing: -0.02em; }
.train-hero p { color: rgba(255,255,255,0.82); font-size: 1.15rem; max-width: 540px; margin: 0 auto; line-height: 1.75; }

/* ─── Chat page ─── */
.chat-wrap { display: flex; flex-direction: column; height: 100vh; }

.chat-topbar {
  background: var(--ink);
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.chat-back {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--transition);
}
.chat-back:hover { color: var(--white); }

.chat-topbar-title {
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 700;
  color: var(--white);
  font-size: 1rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.chat-frame {
  flex: 1;
  border: none;
  width: 100%;
  display: block;
}

/* ─── Animations ─── */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-up.visible { opacity: 1; transform: translateY(0); }

.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .grid-3, .feature-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .grid-3, .grid-2, .feature-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero { padding: 8rem 1.5rem 5rem; }
  .section { padding: 4rem 0; }
  .container { padding: 0 1.25rem; }
  .chat-topbar-title { display: none; }
}
