/* ============================================
   NM Psychometrics — Design tokens & base
   ============================================ */
:root {
  --bg-light: #F3F7FB;
  --white: #FFFFFF;
  --navy-deep: #0F2A43;
  --navy: #1B3A52;
  --blue: #2E6FA8;
  --ice: #8ECAE6;
  --ice-tint: #E6F1FB;
  --text-dark: #1C2B38;
  --text-muted: #4A6379;
  --border: rgba(15, 42, 67, 0.12);
  --radius: 14px;
  --shadow: 0 4px 20px rgba(15, 42, 67, 0.08);
  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Open Sans', 'Segoe UI', sans-serif;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--navy-deep);
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: 0.4em; }

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

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--navy-deep);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-wrap {
  max-width: 1550px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.logo-block {
  color: var(--white);
  line-height: 1.2;
}
.logo-block a { color: var(--white); }
.logo-block .brand {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.logo-block .tagline {
  font-size: 0.72rem;
  color: var(--ice);
  opacity: 0.8;
  white-space: nowrap;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.main-nav a {
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 1px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
  border-color: var(--ice);
}
.nav-cta {
  background: var(--blue);
  color: var(--white) !important;
  padding: 10px 20px !important;
  border-radius: 999px;
  border-bottom: none !important;
}
.nav-cta:hover { background: var(--navy); border-color: transparent !important; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}
.has-submenu { position: relative; }
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  min-width: 230px;
  padding: 8px;
  margin-top: 8px;
}
.has-submenu:hover .submenu { display: block; }
.submenu a {
  color: var(--text-dark) !important;
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  border: none !important;
  font-weight: 400;
  font-size: 0.9rem;
}
.submenu a:hover { background: var(--ice-tint); }

@media (max-width: 980px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }
  .nav-toggle:hover { background: rgba(255,255,255,0.08); }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-deep);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 20px 20px;
    gap: 2px;
  }
  .main-nav.open { display: flex; }
  .main-nav > a, .has-submenu > a { padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .has-submenu.open > .submenu-toggle::after { transform: rotate(180deg); }
  .submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .submenu-toggle::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--ice);
    border-bottom: 2px solid var(--ice);
    transform: rotate(45deg);
    transition: transform 0.2s;
    margin-right: 6px;
  }
  .submenu {
    position: static;
    box-shadow: none;
    background: rgba(0,0,0,0.15);
    margin-top: 0;
    border-radius: 8px;
    display: none;
    padding: 4px 0 4px 14px;
    border-left: 2px solid var(--blue);
    margin-left: 4px;
  }
  .has-submenu.open .submenu { display: block; }
  .has-submenu:hover .submenu { display: none; }
  .has-submenu.open:hover .submenu { display: block; }
  .submenu a {
    color: var(--ice) !important;
    font-size: 0.85rem;
    padding: 9px 8px;
  }
  .submenu a:hover { background: rgba(255,255,255,0.08); }
  .nav-cta { margin-top: 10px; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  text-align: center;
}
.hero.small { padding: 48px 0 36px; }
.hero .eyebrow {
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero p.lead {
  max-width: 640px;
  margin: 0 auto 1.5em;
  color: var(--text-muted);
  font-size: 1.08rem;
}
.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  text-align: left;
}
.hero-split .lead { margin-left: 0; }
.hero-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 880px) {
  .hero-split { grid-template-columns: 1fr; text-align: center; }
  .hero-split .btn-row { justify-content: center !important; }
  .hero-photo { max-width: 420px; margin: 0 auto; }
}

.banner-photo {
  width: 100%;
  height: 280px;
  overflow: hidden;
}
.banner-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 880px) {
  .banner-photo { height: 180px; }
}

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--white); border-bottom: 1px solid var(--border); }
.trust-strip-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 18px 24px;
}
.trust-item {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-deep);
  white-space: nowrap;
}
.trust-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .trust-divider { display: none; }
  .trust-strip-inner { gap: 6px 18px; }
}

/* ---------- Offer grid (homepage services) ---------- */
.offer-tile {
  text-align: center;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.offer-tile .service-icon { margin: 0 auto; }
.offer-tile h3 { font-size: 1rem; margin: 0; }
.offer-tile-all { justify-content: center; }
@media (max-width: 1040px) {
  .offer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .offer-grid { grid-template-columns: 1fr; }
}

/* ---------- CTA photo section ---------- */
.cta-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
}
.cta-photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(46,111,168,0.35); }
.btn-outline { background: transparent; color: var(--navy-deep); border: 2px solid var(--navy-deep); }
.btn-outline:hover { background: var(--navy-deep); color: var(--white); }
.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Cards / sections ---------- */
.section { padding: 56px 0; scroll-margin-top: 90px; }
.section.alt { background: var(--white); }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title .eyebrow {
  color: var(--blue); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
}

.card {
  background: var(--navy-deep);
  color: var(--white);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.card h3, .card h2 { color: var(--white); }
.card.light {
  background: var(--white);
  color: var(--text-dark);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.card.light h3, .card.light h2 { color: var(--navy-deep); }
.card-link {
  display: block;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15,42,67,0.14);
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 880px) {
  .two-col { grid-template-columns: 1fr; }
}

.profile-photo {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  background: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 3rem;
  border: 6px solid var(--white);
  box-shadow: var(--shadow);
}

.photo-frame {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  border: 1.5px dashed var(--border);
  background: var(--ice-tint);
  color: var(--blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
}

.badge-row {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.badge-row img { height: 46px; width: auto; }

/* ---------- Service list items ---------- */
.service-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.service-item:last-child { border-bottom: none; }
.service-icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--ice-tint);
  color: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.service-item .price {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- School partner grid ---------- */
.school-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: center;
}
.school-tile {
  background: var(--white);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  box-shadow: var(--shadow);
}
.school-tile img { max-height: 70px; max-width: 100%; }
.school-tile.text-only {
  color: var(--navy-deep);
  font-weight: 600;
  text-align: center;
  font-size: 0.95rem;
  padding: 12px;
}
@media (max-width: 880px) {
  .school-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Forms ---------- */
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--navy-deep);
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--white);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--blue);
}
.form-row textarea { resize: vertical; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--white);
  padding: 20px 0;
  text-align: center;
  font-size: 0.88rem;
}
.site-footer a { text-decoration: underline; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-grid h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--blue); }

.social-row { display: flex; gap: 14px; margin-top: 16px; }
.social-row a {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--navy-deep); color: var(--white);
  display: flex; align-items: center; justify-content: center;
}

.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-top: 40px; }
.map-wrap iframe { width: 100%; height: 340px; border: 0; display: block; }

/* ---------- Blog ---------- */
.blog-post {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.blog-post .meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 8px; }
.blog-post h3 { margin-bottom: 10px; }
