/* ===== Sam Math Tutor — styles ===== */
:root {
  --brand: #1450c4;
  --brand-dark: #0f3a96;
  --accent: #f59e0b;
  --ink: #1e2235;
  --body: #4b5168;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f5f6fc;
  --card: #ffffff;
  --border: #e6e8f2;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(31, 35, 80, .08);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 200;
}
.skip-link:focus { left: 0; }
.hidden { position: absolute; left: -9999px; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; font-weight: 600; padding: 10px 20px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s;
  text-decoration: none; font-size: .95rem;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(20, 80, 196, .28); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; }
.brand { display: flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 42px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink); font-weight: 500; }
.nav a:hover { color: var(--brand); text-decoration: none; }
.nav-cta { color: #fff !important; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

/* ===== Hero ===== */
.hero { padding: 64px 0 56px; background: radial-gradient(1100px 480px at 80% -10%, #e7f0fc 0, transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow, .section-eyebrow {
  display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 12px;
}
.lead { font-size: 1.12rem; color: var(--body); max-width: 36ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 30px; }
.stats { list-style: none; display: flex; gap: 34px; padding: 0; margin: 0; }
.stats li { display: flex; flex-direction: column; }
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--ink); }
.stat-label { font-size: .85rem; color: var(--muted); }
.hero-art img { margin: 0 auto; filter: drop-shadow(0 20px 40px rgba(20,80,196,.18)); }

/* ===== Sections ===== */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-intro { max-width: 60ch; font-size: 1.08rem; margin-bottom: 36px; }

.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding: 10px 0 10px 34px; border-bottom: 1px solid var(--border); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 9px; width: 22px; height: 22px;
  background: var(--brand); color: #fff; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700;
}

/* ===== Service cards ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: transform .15s ease, box-shadow .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d7d9ee; }
.card h3 { color: var(--brand-dark); }
.card p { margin: 0; font-size: .96rem; }

/* ===== Steps ===== */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; counter-reset: none; }
.steps li { background: var(--bg-alt); border-radius: var(--radius); padding: 26px 22px; }
.section-alt .steps li { background: #fff; border: 1px solid var(--border); }
.step-num {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 14px;
}
.steps h3 { margin-bottom: .35em; }
.steps p { margin: 0; font-size: .95rem; }

/* ===== Reviews ===== */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 44px; }
.quote { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.quote .stars { color: var(--accent); letter-spacing: 2px; font-size: 1rem; margin-bottom: 10px; }
.quote figcaption span { color: var(--muted); font-weight: 500; }
.quote blockquote { margin: 0 0 14px; font-size: 1.02rem; color: var(--ink); }
.quote blockquote::before { content: "“"; color: var(--brand); font-size: 2.4rem; line-height: 0; vertical-align: -.4em; margin-right: 4px; }
.quote figcaption { color: var(--muted); font-weight: 600; font-size: .9rem; }
.reviews-more-text { text-align: center; margin: 4px 0 14px; color: var(--ink); font-weight: 600; }
.review-cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 0 0 44px; }
.review-btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px; border-radius: 12px;
  font-weight: 700; text-decoration: none; transition: transform .12s ease, box-shadow .2s ease;
  box-shadow: 0 6px 16px rgba(31, 35, 80, .12);
}
.review-btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(31, 35, 80, .2); }
.review-btn-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.review-btn-text { display: flex; flex-direction: column; line-height: 1.2; text-align: left; font-size: .98rem; }
.review-btn-stars { color: #fbbf24; font-size: .82rem; letter-spacing: 1.5px; margin-top: 2px; }
.review-btn-fb { background: #1877F2; color: #fff; }
.review-btn-fb .review-btn-stars { color: #ffd24d; }
.review-btn-google { background: #fff; color: var(--ink); border: 1px solid var(--border); }
.reviews-cta { text-align: center; background: var(--brand); color: #fff; border-radius: 22px; padding: 44px 24px; }
.reviews-cta h3 { color: #fff; font-size: 1.6rem; }
.reviews-cta p { max-width: 52ch; margin: 0 auto 22px; color: #dbe7fb; }
.reviews-cta .btn-primary { background: #fff; color: var(--brand-dark); box-shadow: none; }
.reviews-cta .btn-primary:hover { background: #eaf1fd; }

/* ===== Contact ===== */
.contact-block { max-width: 620px; margin: 0 auto; text-align: center; }
.contact-list { list-style: none; padding: 0; margin: 22px 0; display: inline-block; text-align: left; }
.contact-list li { padding: 8px 0; }
.contact-list a { color: var(--ink); }
.contact-list a:hover { color: var(--brand); }
.socials-title { margin-top: 18px; font-size: 1.1rem; }
.socials { display: flex; gap: 22px; margin-top: 16px; justify-content: center; flex-wrap: wrap; }
.social { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: .85rem; text-decoration: none; }
.social:hover { text-decoration: none; color: var(--brand); }
.social-icon { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(31,35,80,.18); transition: transform .15s; }
.social:hover .social-icon { transform: translateY(-3px); }
.social-icon img { width: 28px; height: 28px; display: block; }
.social-fb  .social-icon { background: #1877F2; }
.social-ig  .social-icon { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.social-msg .social-icon { background: linear-gradient(45deg, #0084ff, #a334fa 60%, #ff5e84); }
.social-wa  .social-icon { background: #25D366; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: #c9cce0; padding: 36px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-logo { height: 40px; width: auto; display: block; }
.footer-brand p { margin: 0; font-size: .9rem; }
.footer-brand a { color: #c9cce0; }
.copyright { margin: 0; font-size: .88rem; color: #9aa0bd; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav {
    position: fixed; inset: 70px 0 auto 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: 8px 22px 18px;
    transform: translateY(-130%); transition: transform .28s ease; box-shadow: var(--shadow);
  }
  .nav.open { transform: translateY(0); }
  .nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-cta { margin-top: 12px; text-align: center; }
  .nav-toggle { display: block; }
  .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); }

  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 360px; margin: 0 auto; }
  .stats { gap: 24px; }
}
/* ===== Subject landing pages ===== */
.subject-hero { padding: 48px 0 40px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.crumbs span { margin: 0 6px; }
.lead.wide { max-width: 70ch; }
.subject-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.who-box { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.who-box h3 { margin-top: 18px; }
.who-box h3:first-child { margin-top: 0; }
.who-box .btn { margin-top: 16px; }

.faqs { max-width: 820px; }
.faq { background: #fff; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; padding: 4px 18px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 14px 0; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.4rem; color: var(--brand); transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 16px; color: var(--body); }

.related h2 { text-align: center; }
.pills { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pill { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 999px; padding: 10px 18px; font-weight: 600; color: var(--ink); }
.pill:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.card-link { color: var(--brand); font-weight: 600; font-size: .9rem; display: inline-block; margin-top: 10px; }

@media (max-width: 860px) {
  .subject-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; }
}
