/* =============================================================
   My Chem Mentor — shared site styles
   Used by all sub-pages (about, how-it-works, services,
   testimonials, pricing, contact). Mirrors the design language
   established in Home Page v2.html.
   ============================================================ */

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

:root {
  --navy:       #0E2340;
  --navy-light: #163556;
  --navy-deep:  #0A1628;
  --blue:       #1666B5;
  --blue-soft:  #4A9BE8;
  --blue-hover: #0E4F8E;
  --silver:     #8A9BB0;
  --text:       #1A202C;
  --text-muted: #4A5568;
  --bg:         #FFFFFF;
  --bg-alt:     #F5F7FA;
  --bg-alt-2:   #EDF1F7;
  --border:     #E2E8F0;
  --green:      #16A34A;
  --green-light:#DCFCE7;
  --green-dark: #166534;
  --radius:     8px;
  --radius-lg:  14px;
  --shadow:     0 2px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 10px 30px rgba(14,35,64,0.12);
  --max-w:      1100px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 1rem;
  overflow-x: hidden;
}
h1, h2, h3, h4 { line-height: 1.25; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-block; background: var(--blue); color: #fff;
  padding: 0.65rem 1.35rem; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
  border: none; cursor: pointer; font-family: inherit;
}
.btn-primary:hover { background: var(--blue-hover); }

.btn-outline {
  display: inline-block; border: 2px solid var(--blue); color: var(--blue);
  padding: 0.65rem 1.35rem; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; transition: all 0.2s;
  background: transparent; cursor: pointer; font-family: inherit;
}
.btn-outline:hover { background: var(--blue); color: #fff; }

.btn-hero {
  display: inline-block; background: var(--blue); color: #fff;
  padding: 0.9rem 1.85rem; border-radius: var(--radius);
  font-size: 1rem; font-weight: 700;
  transition: background 0.2s, transform 0.2s;
}
.btn-hero:hover { background: var(--blue-hover); transform: translateY(-1px); }

.btn-ghost-light {
  display: inline-block; background: transparent; color: #fff;
  padding: 0.85rem 1.6rem; border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.35);
  transition: background 0.2s, border-color 0.2s;
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.08); border-color: #fff; }

/* ---------- Nav ---------- */
nav.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); padding: 0 2rem;
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  height: 68px; display: flex; align-items: center; gap: 2rem;
}
.logo-link { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 38px; width: auto; }
.nav-links { display: flex; list-style: none; gap: 2rem; margin-left: auto; }
.nav-links a, .nav-links .nav-current {
  font-size: 0.9rem; color: var(--text-muted);
  transition: color 0.2s; position: relative; padding: 0.25rem 0;
}
.nav-links a:hover { color: var(--navy); }
.nav-links .nav-current { color: var(--navy); font-weight: 600; cursor: default; }
.nav-links .nav-current::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px;
  height: 2px; background: var(--blue);
}
.btn-primary.nav-current { cursor: default; opacity: 0.55; pointer-events: none; }

/* ---------- Layout ---------- */
.container { max-width: var(--max-w); margin: 0 auto; }
section { padding: 5rem 2rem; }
.section-label {
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.78rem; font-weight: 600; color: var(--blue);
  margin-bottom: 0.75rem; display: inline-block;
}
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800; color: var(--navy);
  margin-bottom: 1rem; line-height: 1.25;
  text-wrap: balance;
}
.section-subtitle {
  font-size: 1.05rem; color: var(--text-muted);
  max-width: 680px; margin-bottom: 2.5rem;
}

/* ---------- Page hero (sub-pages) ---------- */
.page-hero {
  position: relative;
  background: var(--navy); color: #fff;
  padding: 5.5rem 2rem;
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 18% 30%, rgba(22,102,181,0.35), transparent 60%),
    radial-gradient(ellipse 50% 40% at 82% 70%, rgba(74,155,232,0.22), transparent 60%);
  pointer-events: none;
}
.page-hero-bg {
  position: absolute; inset: 0; opacity: 0.35;
  pointer-events: none;
}
.page-hero-bg svg { width: 100%; height: 100%; display: block; }
.cta-section .page-hero-bg { opacity: 0.30; }
.page-hero-inner {
  position: relative; z-index: 1;
  max-width: var(--max-w); margin: 0 auto;
}
.page-hero-inner.center { text-align: center; max-width: 1200px; }
.page-hero-label {
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.78rem; font-weight: 600; color: var(--silver);
  margin-bottom: 1rem; display: inline-flex; align-items: center; gap: 0.6rem;
}
.page-hero-label::before {
  content: ""; display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0 rgba(22,102,181,0.7);
  animation: heroPulse 2s infinite;
}
@keyframes heroPulse {
  0%   { box-shadow: 0 0 0 0 rgba(22,102,181,0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(22,102,181,0); }
  100% { box-shadow: 0 0 0 0 rgba(22,102,181,0); }
}
.page-hero h1 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 900; line-height: 1.15; margin-bottom: 1.25rem;
  text-wrap: balance;
}
.page-hero p.lede {
  font-size: 1.1rem; color: rgba(255,255,255,0.78);
  max-width: 580px; margin-bottom: 2rem;
}
.page-hero-inner.center p.lede { margin-left: auto; margin-right: auto; }

.page-hero .hero-cta-row {
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
}
.page-hero-inner.center .hero-cta-row { justify-content: center; }
.page-hero .secondary-link {
  color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: color 0.2s;
}
.page-hero .secondary-link:hover { color: #fff; }

/* split hero variant — copy left, image right */
.page-hero-split {
  position: relative; z-index: 1;
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 4rem; align-items: center;
}
.page-hero-img {
  width: 100%; height: 420px; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ---------- CTA section (dark) ---------- */
.cta-section {
  position: relative;
  background: var(--navy); color: #fff;
  text-align: center; padding: 5.5rem 2rem;
  overflow: hidden;
}
.cta-section::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(22,102,181,0.18), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(22,102,181,0.12), transparent 40%);
  pointer-events: none;
}
.cta-section .container { position: relative; z-index: 1; }
.cta-section h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 900; color: #fff; margin-bottom: 1rem; line-height: 1.25;
  text-wrap: balance;
}
.cta-section p {
  font-size: 1.1rem; color: rgba(255,255,255,0.78);
  margin-bottom: 2.25rem; max-width: 560px; margin-left: auto; margin-right: auto;
}
.cta-btn-row {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; align-items: center;
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--navy-deep); color: rgba(255,255,255,0.7);
  padding: 3rem 2rem;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; margin-bottom: 2rem; }
.footer-logo { font-size: 1.1rem; font-weight: 700; color: #fff; }
.footer-tagline { font-size: 0.82rem; color: rgba(255,255,255,0.45); margin-top: 0.25rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-contact a { display: block; font-size: 0.875rem; color: rgba(255,255,255,0.6); transition: color 0.2s; margin-bottom: 0.25rem; }
.footer-contact a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.8rem; color: rgba(255,255,255,0.4); align-items: center;
}
.footer-referral {
  background: rgba(22,102,181,0.25);
  border: 1px solid rgba(22,102,181,0.4);
  color: rgba(255,255,255,0.8);
  padding: 0.3rem 1rem; border-radius: 100px;
  font-size: 0.8rem; font-weight: 500;
}

/* ---------- Reveal (scroll into view) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Mobile nav: hamburger + slide-down drawer ---------- */
.nav-toggle { display: none; }
.nav-drawer { display: none; }

/* Tighten desktop nav between 901-1100 so logo + 6 links + CTA fit in tablet landscape (1024) */
@media (max-width: 1100px) and (min-width: 901px) {
  .nav-inner { gap: 1.25rem; }
  .nav-links { gap: 1.25rem; }
  .nav-inner > .btn-primary { padding: 0.55rem 1rem; font-size: 0.85rem; }
}

@media (max-width: 900px) {
  /* Swap desktop nav for hamburger + drawer */
  .nav-links { display: none; }
  .nav-inner > .btn-primary { display: none; }   /* hide desktop CTA on mobile (covers <a> and <span>) */

  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center;
    align-items: center; gap: 5px;
    width: 44px; height: 44px;
    margin-left: auto;
    background: transparent; border: 0; cursor: pointer; padding: 0;
  }
  .nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--navy);
    transition: transform 0.2s ease, opacity 0.15s 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); }

  .nav-drawer {
    display: block;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1.25rem;
    box-shadow: 0 12px 28px rgba(14,35,64,0.08);
  }
  .nav-drawer[hidden] { display: none; }
  .nav-drawer ul { list-style: none; margin: 0; padding: 0; }
  .nav-drawer li { border-bottom: 1px solid var(--border); }
  .nav-drawer li:last-child { border-bottom: 0; }
  .nav-drawer li > a,
  .nav-drawer li > span {
    display: block;
    padding: 0.95rem 0.25rem;
    font-size: 1rem; color: var(--navy);
    font-weight: 500; text-decoration: none;
  }
  .nav-drawer li > a[aria-current="page"],
  .nav-drawer li > span[aria-current="page"] {
    color: var(--blue); font-weight: 700; cursor: default;
  }
  .nav-drawer .drawer-cta {
    display: block; margin-top: 1rem;
    padding: 0.95rem 1.25rem;
    background: var(--blue); color: #fff;
    border-radius: var(--radius);
    text-align: center; font-weight: 600;
    text-decoration: none; min-height: 44px;
  }
  .nav-drawer .drawer-cta[aria-current="page"] {
    background: transparent; color: var(--blue);
    border: 1px solid var(--blue); cursor: default; opacity: 0.7;
  }
}

/* ---------- Responsive base ---------- */
@media (max-width: 900px) {
  .page-hero-split { grid-template-columns: 1fr; gap: 2rem; }
  .page-hero-img { height: 320px; }
  .footer-top { flex-direction: column; gap: 1.5rem; }
}
@media (max-width: 760px) {
  /* Tap targets and inline CTAs */
  .btn-primary, .btn-hero, .btn-outline, .btn-ghost {
    min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .footer-links { gap: 0.6rem 1.25rem; }
}
@media (max-width: 600px) {
  section { padding: 3.5rem 1.25rem; }
  nav.site-nav { padding: 0 1.25rem; }
  .page-hero { padding: 3.5rem 1.25rem 2.75rem; }
  .cta-section { padding: 4rem 1.25rem; }
  .hero-cta-row { flex-direction: column; align-items: flex-start; }
  .page-hero-inner.center .hero-cta-row { align-items: center; }
  .footer-inner { padding: 0; }
}
