/* =========================================================
   CAZMATHS — CORE BRAND STYLESHEET (style.css)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-header: #F7F6F1;
  --bg-page: #FAFBFD;
  --bg-card: #FFFFFF;
  --bg-sky-panel: #EBF4FF;
  --ink: #181D2C;
  --ink-soft: #4B5565;
  --line: #E6E9EF;

  /* Palette pulled directly from Ca3Maths wordmark */
  --orange: #F26422;
  --pink: #E83E78;
  --blue: #198CE6;
  --green: #1FA85B;
  --purple: #7C4DFF;
  --yellow: #FFD23F;
  --yellow-hover: #F5C427;

  --radius-lg: 20px;
  --radius-btn: 10px;
  --max-w: 1120px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1, h2, h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ==================== HEADER ==================== */
header {
  background: var(--bg-header);
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-stack {
  display: flex;
  align-items: center;
}

.brand-stack img {
  height: 76px;
  max-height: 76px;
  width: auto;
  object-fit: contain;
  display: block;
  margin-bottom: -8px;
  mix-blend-mode: multiply;
  filter: contrast(1.06) brightness(1.03);
}

nav.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav.desktop-nav a.nav-link {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

nav.desktop-nav a.nav-link:hover,
nav.desktop-nav a.nav-link.active {
  color: var(--ink);
  font-weight: 600;
}

.menu-btn {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 16px 28px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
}

.mobile-nav.open {
  display: flex;
}

/* ==================== BUTTONS & TAGS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 0.92rem;
  transition: background-color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-ink {
  background: var(--ink);
  color: #FFFFFF;
}

.btn-ink:hover {
  background: var(--blue);
}

.btn-yellow {
  background: var(--yellow);
  color: var(--ink);
}

.btn-yellow:hover {
  background: var(--yellow-hover);
}

.kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 12px;
}

/* ==================== SHARED PAGE LAYOUTS ==================== */
.section {
  padding: 72px 0;
}

.page-header {
  padding: 32px 0 36px;
  background: linear-gradient(180deg, #F7F6F1 0%, var(--bg-page) 100%);
}

.page-header h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.3rem);
  margin-bottom: 16px;
  max-width: 760px;
}

.page-header p.lead {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 680px;
  line-height: 1.65;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
}

.card.accent-blue::before   { background: var(--blue); }
.card.accent-green::before  { background: var(--green); }
.card.accent-orange::before { background: var(--orange); }
.card.accent-pink::before   { background: var(--pink); }
.card.accent-purple::before { background: var(--purple); }

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(24, 29, 44, 0.06);
}

.card h3 {
  font-size: 1.32rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.96rem;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--blue);
  margin-top: 20px;
}

.arrow-link:hover {
  text-decoration: underline;
}

.manifesto-strip {
  margin-top: 44px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 28px;
  text-align: center;
  font-weight: 700;
  font-size: 1.06rem;
  color: var(--ink);
}

/* ==================== FOOTER ==================== */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  padding: 36px 0;
  margin-top: auto;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-weight: 600;
  color: var(--ink);
}

.footer-links a:hover {
  color: var(--pink);
}

@media (max-width: 880px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  nav.desktop-nav {
    display: none;
  }
  .menu-btn {
    display: inline-block;
  }
  .brand-stack img {
    height: 60px;
    max-height: 60px;
  }
}
/* =========================================
   HEADER DROPDOWNS & IMAGE SIZING
   ========================================= */

/* Keep header logo compact */
.brand-stack img {
  height: 44px;
  width: auto;
  display: block;
}

/* Navigation Dropdowns */
.nav-dropdown {
  position: relative;
  display: inline-block;
}
.nav-drop-btn {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 4px;
}
.nav-drop-btn .caret {
  font-size: 0.72rem;
  opacity: 0.75;
  transition: transform 0.18s ease;
}
.nav-dropdown:hover .caret,
.nav-dropdown:focus-within .caret {
  transform: rotate(180deg);
}
.nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  background: #FFFFFF;
  border: 1.5px solid var(--line, #E4E2DC);
  border-radius: 18px;
  padding: 8px;
  box-shadow: 0 14px 32px rgba(24, 29, 44, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 100;
}
/* Invisible hover bridge so moving mouse down doesn't close menu */
.nav-drop-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
.nav-dropdown:hover .nav-drop-menu,
.nav-dropdown:focus-within .nav-drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-drop-item {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease;
}
.nav-drop-item:hover {
  background: #F7F6F1;
}
.nav-drop-item strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}
.nav-drop-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 2px;
}

/* Mobile Nav Section Labels */
.mobile-group-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 10px 0 2px;
}