/* ==========================================================================
   NEWTON THE TUTOR — PREMIUM TYPOGRAPHY & DESIGN UPGRADE
   Font System: Plus Jakarta Sans (display) · Playfair Display (accent)
                · Inter (UI/body) · DM Mono (code/numbers)
   ========================================================================== */

/* ── FONT IMPORT (CSS fallback — primary load is in <head>) ─────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500&family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600;1,700&family=Inter:wght@300;400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

/* ========================================================================
   CSS CUSTOM PROPERTIES — Font Stack Tokens
   ======================================================================== */
:root {
  /* ── Display / Heading font — Plus Jakarta Sans: geometric, premium, modern ── */
  --font-display:  'Plus Jakarta Sans', 'DM Sans', 'Inter', system-ui, sans-serif;

  /* ── Accent / Serif — Playfair Display: elegant italics, pull-quotes ── */
  --font-serif:    'Playfair Display', Georgia, 'Times New Roman', serif;

  /* ── Body / UI — Inter: ultra-readable, clean, professional ── */
  --font-body:     'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;

  /* ── Mono — DM Mono: numbers, code, labels ── */
  --font-mono:     'DM Mono', 'Fira Code', monospace;

  /* ── Typography Scale (augmented fourth — 1.333 ratio) ── */
  --text-2xs:  0.625rem;   /*  10px */
  --text-xs:   0.75rem;    /*  12px */
  --text-sm:   0.875rem;   /*  14px */
  --text-base: 1rem;       /*  16px */
  --text-md:   1.125rem;   /*  18px */
  --text-lg:   1.25rem;    /*  20px */
  --text-xl:   1.5rem;     /*  24px */
  --text-2xl:  1.875rem;   /*  30px */
  --text-3xl:  2.25rem;    /*  36px */
  --text-4xl:  3rem;       /*  48px */
  --text-5xl:  3.75rem;    /*  60px */
  --text-6xl:  4.5rem;     /*  72px */
  --text-7xl:  6rem;       /*  96px */

  /* ── Letter spacing ── */
  --tracking-tight:  -0.04em;
  --tracking-snug:   -0.025em;
  --tracking-normal:  0;
  --tracking-wide:    0.02em;
  --tracking-wider:   0.08em;
  --tracking-widest:  0.18em;
}

/* ========================================================================
   BODY & BASE TYPOGRAPHY
   ======================================================================== */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

/* ========================================================================
   HEADING SYSTEM — Plus Jakarta Sans Display
   ======================================================================== */

/* Override all heading classes */
.heading-xl,
.heading-lg,
.heading-md,
.heading-sm {
  font-family: var(--font-display);
}

/* Extra-large — hero headlines */
.heading-xl {
  font-size: clamp(2.5rem, 7vw, 5.5rem);   /* 40→88px */
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: var(--tracking-tight);
}

/* Large — section titles */
.heading-lg {
  font-size: clamp(2rem, 5vw, 3.75rem);    /* 32→60px */
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: var(--tracking-snug);
}

/* Medium — sub-sections */
.heading-md {
  font-size: clamp(1.5rem, 3.5vw, 2.75rem); /* 24→44px */
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

/* Small — card titles, feature headings */
.heading-sm {
  font-size: clamp(1.125rem, 2.5vw, 1.75rem); /* 18→28px */
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

/* ── Semantic heading elements ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-feature-settings: "kern" 1, "liga" 1;
}
h1 {
  font-size: clamp(2.25rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: var(--tracking-tight);
}
h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: var(--tracking-snug);
}
h3 {
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
}
h4 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
}
h5 {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.3;
}
h6 {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.4;
}

/* ── Playfair Display — italic/accent words within headings ── */
.heading-xl em,
.heading-lg em,
.heading-md em,
.heading-sm em,
h1 em, h2 em, h3 em,
.serif-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* hero-title em already has gradient — keep that, just change font */
.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
}

/* ── Playfair pull-quotes / testimonials ── */
.testi-quote,
blockquote,
.quote-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
}

/* ── Body text ── */
.body-xl  { font-size: 1.25rem;  line-height: 1.7;  font-weight: 400; color: var(--text-secondary); }
.body-lg  { font-size: 1.125rem; line-height: 1.78; font-weight: 400; color: var(--text-secondary); }
.body-md  { font-size: 0.9375rem; line-height: 1.75; font-weight: 400; color: var(--text-secondary); }
.body-sm  { font-size: 0.8125rem; line-height: 1.65; color: var(--text-muted); }
p {
  font-family: var(--font-body);
  line-height: 1.72;
}

/* ── Numeric / Stats — DM Mono for clarity ── */
.stat-number,
.stats-number,
.hero-stat-num,
[data-count],
.stat-val,
.hsc-ring-num span,
.nt-stat-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.02em;
}

/* ── Label / Tag — Inter, all-caps ── */
.label,
.badge,
.tag,
.pill-label,
.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}

/* ── Navigation ── */
.nav-link,
.btn,
.btn-nav-cta,
.lg-btn,
.footer-link,
.mobile-link,
.dropdown-title {
  font-family: var(--font-body);
}

/* ── Nav link — tighter, crisper ── */
.nav-link {
  font-size: 0.8125rem;
  font-weight: 550;
  letter-spacing: 0.01em;
}

/* ── Dropdown subtitle ── */
.dropdown-sub {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
}
.dropdown-title {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ── Buttons ── */
.btn,
.lg-btn,
.btn-nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.btn-lg { font-size: 0.9375rem; font-weight: 600; }
.btn-sm { font-size: 0.8125rem; }

/* ── Card titles ── */
.service-card-title,
.card-title,
.stat-card h3,
.value-card-title,
.team-card-name,
.pricing-card-name,
.exam-cat-title,
.platform-card-title,
.learn-card-title,
.resource-card-title,
.assign-card-title,
.material-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
}

/* ── Footer ── */
.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.footer-link {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0;
}

/* ========================================================================
   GENERAL DESIGN UPGRADE — Spacing, Visual Hierarchy, Polish
   ======================================================================== */

/* ── Improved Section Spacing ── */
section,
.section {
  padding-top: clamp(64px, 8vw, 120px);
  padding-bottom: clamp(64px, 8vw, 120px);
}

/* ── Section header refinement ── */
.section-header,
.section-head {
  margin-bottom: clamp(40px, 5vw, 72px);
  max-width: 680px;
}
.section-header.text-center,
.section-head.text-center {
  margin-left: auto;
  margin-right: auto;
}

/* ── Label badge — more polished ── */
.label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 6px 16px;
  border-radius: 100px;
  gap: 8px;
}
.label i { font-size: 9px; }

/* ── Enhanced gradient text ── */
.accent-word,
.gradient-text {
  background: linear-gradient(
    125deg,
    #818cf8 0%,
    #a78bfa 35%,
    #c084fc 60%,
    #818cf8 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: type-gradient-shift 5s linear infinite;
}
[data-theme="light"] .accent-word {
  background: linear-gradient(125deg, #2900a6 0%, #4e2780 40%, #7c4dcc 70%, #2900a6 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: type-gradient-shift 5s linear infinite;
}
@keyframes type-gradient-shift {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ── Hero title weight boost ── */
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: 0.98;
}

/* ── Hero eyebrow ── */
.hero-eyebrow-text {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
[data-theme="light"] .hero-eyebrow-text { color: rgba(0,0,0,0.45); }

/* ── Hero body paragraph ── */
.hero-body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 400;
  line-height: 1.78;
  max-width: 520px;
  color: rgba(255,255,255,0.62);
}
[data-theme="light"] .hero-body { color: rgba(0,0,0,0.58); }

/* ── Hero stat numbers ── */
.hero-stat-num {
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Page hero (sub-pages) ── */
.page-hero-title,
.page-hero-content .heading-lg {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--tracking-snug);
}
.page-hero-sub,
.page-hero-content .body-lg {
  font-size: 1.0625rem;
  line-height: 1.78;
  max-width: 540px;
  color: rgba(255,255,255,0.6);
}
[data-theme="light"] .page-hero-content .body-lg { color: rgba(0,0,0,0.55); }

/* ── Service / feature cards ── */
.service-card {
  transition:
    transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.42s ease,
    border-color 0.3s ease;
}
.service-card h3,
.service-card-title {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.service-card p,
.service-card-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ── Stats band numbers ── */
.stat-number,
.stats-number {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-label {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-muted);
}

/* ── Pricing card ── */
.pricing-card-name {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-alt);
}
.pricing-card-price {
  font-family: var(--font-mono);
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.pricing-card-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── Process / step ── */
.step-num,
.process-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
}

/* ── Testimonials ── */
.testi-card blockquote,
.testi-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.9375rem, 1.5vw, 1.125rem);
  line-height: 1.72;
  font-weight: 400;
}
.testi-author {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.testi-role {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ── Team member ── */
.team-card-name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.team-card-role {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-alt);
}

/* ── FAQ items ── */
.faq-q {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.faq-a {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* ── Contact ── */
.contact-method-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── About timeline ── */
.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--accent-alt);
}
.timeline-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── Blog card ── */
.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

/* ── Footer brand desc ── */
.footer-brand-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 280px;
}

/* ── Forms ── */
.form-label,
label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
input,
textarea,
select {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
}

/* ── Success/trust strip ── */
.hero-trust-label,
.trust-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ========================================================================
   DESIGN UPGRADE — Refined Card Aesthetics
   ======================================================================== */

/* ── Tighter, more premium card inner spacing ── */
.service-card,
.stat-card,
.value-card,
.exam-cat-card,
.platform-card,
.assign-card,
.material-card,
.learn-card,
.resource-card {
  padding: clamp(24px, 3vw, 36px);
  border-radius: 20px;
}

/* ── Card headings ── */
.service-card h3,
.value-card h3,
.exam-cat-card h3,
.platform-card h3,
.assign-card h3,
.material-card h3,
.learn-card h3,
.resource-card h3 {
  font-family: var(--font-display);
  font-size: clamp(0.9375rem, 1.6vw, 1.125rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 10px;
}

/* ── Card descriptions ── */
.service-card p,
.value-card p,
.exam-cat-card p,
.platform-card p,
.assign-card p,
.material-card p,
.learn-card p,
.resource-card p {
  font-size: 0.875rem;
  line-height: 1.72;
}

/* ── Pricing card ── */
.pricing-card {
  padding: clamp(28px, 4vw, 44px);
  border-radius: 24px;
}

/* ── Stats band ── */
.stats-band,
.hero-stats-grid {
  gap: clamp(24px, 4vw, 56px);
}

/* ── Step / process items ── */
.step-item,
.process-step {
  gap: clamp(16px, 2vw, 24px);
}

/* ========================================================================
   DESIGN UPGRADE — Visual Refinements
   ======================================================================== */

/* ── Premium divider lines ── */
hr,
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border-subtle) 30%,
    var(--border-subtle) 70%,
    transparent
  );
  margin: clamp(32px, 4vw, 64px) 0;
}

/* ── Section intro text max-width ── */
.section-intro,
.section-desc,
.section-sub {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.78;
  max-width: 620px;
  color: var(--text-secondary);
}
.text-center .section-intro,
.text-center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* ── Improved link underline across the site ── */
a:not(.btn):not(.nav-link):not(.lg-btn):not(.footer-link):not(.mobile-link):not([class*="card"]):not([class*="social"]) {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* ── List styling ── */
.feature-list li,
.guarantee-list li,
.process-list li {
  font-size: 0.9375rem;
  line-height: 1.7;
  padding-left: 1.5em;
  position: relative;
}

/* ── Highlighted number callouts ── */
.callout-number {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}

/* ── Logo image sizing refinement ── */
.loader-logo-img {
  height: 72px;
  width: auto;
}

/* ── Hero success card number ── */
.hsc-ring-num {
  font-family: var(--font-mono);
  font-weight: 500;
}
.hsc-ring-num span {
  font-size: 1.75rem;
  letter-spacing: -0.04em;
}

/* ── Page hero label ── */
.page-hero-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ── Improved text contrast for dark mode ── */
[data-theme="dark"] .body-lg,
[data-theme="dark"] .body-md,
[data-theme="dark"] p {
  color: rgba(255, 255, 255, 0.68);
}
[data-theme="dark"] .heading-xl,
[data-theme="dark"] .heading-lg,
[data-theme="dark"] .heading-md,
[data-theme="dark"] .heading-sm,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
  color: #ffffff;
}

/* ── Light mode typography ── */
[data-theme="light"] .body-lg,
[data-theme="light"] .body-md,
[data-theme="light"] p {
  color: rgba(0, 0, 0, 0.64);
}
[data-theme="light"] .heading-xl,
[data-theme="light"] .heading-lg,
[data-theme="light"] .heading-md,
[data-theme="light"] .heading-sm,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3 {
  color: #0a0618;
}

/* ── Improved section title rhythm ── */
.section-header .label,
.section-head .label {
  margin-bottom: 14px;
}
.section-header .heading-lg,
.section-header h2,
.section-head .heading-lg,
.section-head h2 {
  margin-bottom: 16px;
}
.section-header .body-lg,
.section-head .body-lg,
.section-header p,
.section-head p {
  margin-top: 0;
}

/* ── Improved nav link text rendering ── */
.nav-link,
.dropdown-title {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Tighter leading for big display text ── */
.heading-xl .block,
.heading-lg .block {
  display: block;
}

/* ── Premium shimmer text effect ── */
.shimmer-text {
  background: linear-gradient(
    90deg,
    #818cf8 0%,
    #c4b5fd 30%,
    #f0abfc 55%,
    #c4b5fd 80%,
    #818cf8 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: type-gradient-shift 4s linear infinite;
}

/* ── About / mission body text ── */
.mission-body,
.about-intro-text {
  font-size: 1.0625rem;
  line-height: 1.82;
  color: var(--text-secondary);
}

/* ── Refined footer copy ── */
.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ── Mobile typography refinements ── */
@media (max-width: 768px) {
  body { font-size: 0.9375rem; }

  .heading-xl {
    font-size: clamp(2rem, 9vw, 2.75rem);
    letter-spacing: -0.03em;
    line-height: 1.05;
  }
  .heading-lg {
    font-size: clamp(1.625rem, 7vw, 2.25rem);
    letter-spacing: -0.025em;
  }
  .heading-md {
    font-size: clamp(1.25rem, 5.5vw, 1.75rem);
  }

  .hero-body { font-size: 0.9375rem; }
  .section-intro { font-size: 0.9375rem; }

  .btn { font-size: 0.875rem; }
  .btn-lg { font-size: 0.9375rem; padding: 14px 28px; }
}

@media (max-width: 480px) {
  .heading-xl { font-size: clamp(1.75rem, 10vw, 2.25rem); }
  .heading-lg { font-size: clamp(1.5rem, 8vw, 2rem); }
}

/* ── Print refinements ── */
@media print {
  body { font-family: 'Inter', Georgia, serif; font-size: 12pt; }
  h1, h2, h3 { font-family: 'Plus Jakarta Sans', Arial, sans-serif; }
}
