/* ==========================================================================
   LeaWin — Learning & Winning
   Design tokens
   Palette:  --ink (deep indigo, headlines/nav) · --gold (amber, "winning" accent)
             --paper (warm parchment bg) · --teal (secondary/success)
             --charcoal (body text) · --mist (hairline borders)
   Type:     display = Fraunces (falls back to Georgia) — used sparingly, large sizes only
             body    = Work Sans (falls back to system sans)
             utility = JetBrains Mono (falls back to ui-monospace) — prices, counts, labels
   Signature: the "win-ladder" — ascending step bars used in the hero and beside plan names,
              standing in for progress/achievement without leaning on cliché badges.
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/Fraunces-Variable.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Work Sans';
  src: url('../fonts/WorkSans-Variable.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --ink: #1B2A4A;
  --ink-light: #2E4270;
  --gold: #E8A33D;
  --gold-dark: #C97F1E;
  --paper: #FBF8F2;
  --paper-dim: #F2EEE3;
  --teal: #1F7A5C;
  --charcoal: #23262B;
  --muted: #6E6A5E;
  --mist: #E7E2D6;
  --white: #FFFFFF;
  --danger: #B3432B;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(27, 42, 74, 0.06);
  --shadow-md: 0 8px 24px rgba(27, 42, 74, 0.10);
  --shadow-lg: 0 20px 48px rgba(27, 42, 74, 0.16);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--charcoal); }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--gold-dark);
  font-weight: 600;
}
.text-muted { color: var(--muted); }
.center { text-align: center; }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--ink-light); box-shadow: var(--shadow-md); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-dark); color: var(--white); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-danger { background: var(--danger); color: var(--white); }

/* ---------------- Header / Nav ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--mist);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 600; color: var(--ink);
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--ink);
  display: flex; align-items: end; justify-content: center; gap: 3px;
  padding: 6px 6px 5px;
}
.brand-mark span { width: 4px; background: var(--gold); border-radius: 2px; display: block; }
.brand-mark span:nth-child(1) { height: 6px; }
.brand-mark span:nth-child(2) { height: 11px; }
.brand-mark span:nth-child(3) { height: 16px; }
.brand small { display: block; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; text-transform: uppercase; }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--ink); }
.nav-links a:hover { color: var(--gold-dark); }
.nav-actions { display: flex; gap: 12px; align-items: center; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; }

@media (max-width: 900px) {
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; padding: 16px 24px; border-bottom: 1px solid var(--mist); display: none; gap: 16px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-actions .btn-outline { display: none; }
}

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-dim) 100%);
  padding: 72px 0 56px;
  overflow: hidden;
  position: relative;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 0.3em; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.hero-ctas { display: flex; gap: 14px; margin: 28px 0; flex-wrap: wrap; }
.trust-row { display: flex; gap: 22px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink); }
.trust-row span { display: flex; align-items: center; gap: 7px; }
.trust-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

.win-ladder { display: flex; align-items: flex-end; gap: 10px; height: 220px; }
.win-ladder .bar { flex: 1; border-radius: 10px 10px 0 0; background: var(--ink); position: relative; }
.win-ladder .bar:nth-child(1) { height: 40%; background: var(--mist); }
.win-ladder .bar:nth-child(2) { height: 60%; background: var(--teal); }
.win-ladder .bar:nth-child(3) { height: 78%; background: var(--ink); }
.win-ladder .bar:nth-child(4) { height: 100%; background: var(--gold); }
.win-ladder .bar .cap { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: inherit; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .win-ladder { display: none; }
}

/* ---------------- Sections ---------------- */
section { padding: 64px 0; }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head.left { margin: 0 0 40px; text-align: left; }

/* ---------------- Cards / Grids ---------------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.card-step { position: relative; padding-top: 34px; }
.card-step .num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--gold-dark); font-weight: 700; }

.subject-pill, .lang-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white); border: 1px solid var(--mist); border-radius: 999px;
  padding: 10px 16px; font-size: 0.9rem; font-weight: 500;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.subject-pill:hover, .lang-pill:hover { border-color: var(--gold); transform: translateY(-1px); }
.subject-pill .count { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------- Tutor cards ---------------- */
.tutor-card { display: flex; flex-direction: column; gap: 12px; }
.tutor-avatar {
  width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-sm);
  background: var(--paper-dim); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 2.2rem; color: var(--ink); overflow: hidden;
}
.tutor-avatar img { width: 100%; height: 100%; object-fit: cover; }
.badge-verified {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(31,122,92,0.1); color: var(--teal);
  font-size: 0.72rem; font-weight: 700; padding: 4px 9px; border-radius: 999px;
  font-family: var(--font-mono);
}
.rating { font-family: var(--font-mono); font-size: 0.85rem; color: var(--gold-dark); }
.tutor-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--paper-dim); border-radius: 6px; padding: 3px 9px; font-size: 0.78rem; color: var(--ink); }

/* ---------------- Pricing ---------------- */
.plan-card { position: relative; display: flex; flex-direction: column; }
.plan-card.popular { border-color: var(--gold); box-shadow: var(--shadow-md); }
.plan-badge {
  position: absolute; top: -13px; left: 26px;
  background: var(--gold); color: var(--ink); font-weight: 700;
  font-size: 0.72rem; padding: 4px 12px; border-radius: 999px;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em;
}
.plan-freq { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.plan-freq .mini-ladder { display: flex; gap: 2px; align-items: flex-end; height: 14px; }
.plan-freq .mini-ladder i { width: 3px; background: var(--gold); border-radius: 1px; display: block; }
.plan-price { font-family: var(--font-display); font-size: 2.1rem; color: var(--ink); margin: 6px 0 2px; }
.plan-price small { font-family: var(--font-body); font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.plan-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-bottom: 14px; }
.plan-features { list-style: none; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 10px; }
.plan-features li { display: flex; gap: 10px; font-size: 0.92rem; }
.plan-features li::before { content: '✓'; color: var(--teal); font-weight: 700; }

/* ---------------- Services (academic coaching) ---------------- */
.service-card { display: flex; flex-direction: column; gap: 10px; }
.service-icon {
  width: 42px; height: 42px; border-radius: 10px; background: var(--ink);
  color: var(--gold); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.1rem;
}
.service-features { list-style: none; padding: 0; margin: 6px 0 14px; font-size: 0.88rem; color: var(--muted); }
.service-features li { padding: 4px 0; border-top: 1px solid var(--mist); }

/* ---------------- Testimonials ---------------- */
.testimonial { display: flex; flex-direction: column; gap: 14px; }
.testimonial p { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); font-weight: 400; }
.testimonial-author { display: flex; gap: 10px; align-items: center; }
.avatar-initials {
  width: 38px; height: 38px; border-radius: 50%; background: var(--paper-dim);
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--ink); font-size: 0.85rem;
}

/* ---------------- WhatsApp banner ---------------- */
.wa-banner {
  background: var(--ink); color: var(--white); border-radius: var(--radius-lg);
  padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.wa-banner h3 { color: var(--white); margin-bottom: 6px; }
.wa-banner p { color: rgba(255,255,255,0.75); margin: 0; max-width: 44ch; }

/* ---------------- Forms ---------------- */
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; color: var(--ink); }
input, select, textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--mist); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.95rem; background: var(--white); color: var(--charcoal);
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
.form-hint { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.form-card { max-width: 460px; margin: 0 auto; background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-md); }
.form-card.wide { max-width: 640px; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; margin-bottom: 18px; }
.alert-error { background: rgba(179,67,43,0.1); color: var(--danger); border: 1px solid rgba(179,67,43,0.25); }
.alert-success { background: rgba(31,122,92,0.1); color: var(--teal); border: 1px solid rgba(31,122,92,0.25); }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-card { border: 1.5px solid var(--mist); border-radius: var(--radius-sm); padding: 14px; cursor: pointer; }
.radio-card input { width: auto; display: inline-block; margin-right: 8px; }
.radio-card:has(input:checked) { border-color: var(--ink); background: var(--paper-dim); }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.8); padding: 56px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { color: var(--white); font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-grid a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--gold); }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.9rem; max-width: 32ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.14); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.82rem; color: rgba(255,255,255,0.55); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------------- Dashboards (parent/tutor/admin shared shell) ---------------- */
.dash-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.dash-sidebar { background: var(--ink); color: rgba(255,255,255,0.85); padding: 24px 18px; }
.dash-sidebar .brand { color: var(--white); margin-bottom: 30px; }
.dash-nav { display: flex; flex-direction: column; gap: 4px; }
.dash-nav a { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 500; color: rgba(255,255,255,0.75); }
.dash-nav a:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.dash-nav a.active { background: var(--gold); color: var(--ink); }
.dash-main { padding: 32px 40px; }
.dash-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.stat-card { background: var(--white); border: 1px solid var(--mist); border-radius: var(--radius-md); padding: 20px; }
.stat-card .stat-num { font-family: var(--font-display); font-size: 2rem; color: var(--ink); }
.stat-card .stat-label { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

table.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-md); overflow: hidden; }
table.data-table th, table.data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--mist); font-size: 0.9rem; }
table.data-table th { background: var(--paper-dim); font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
table.data-table tr:last-child td { border-bottom: none; }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; font-family: var(--font-mono); }
.status-pending, .status-requested, .status-pending_payment, .status-draft, .status-scheduled, .status-not_started, .status-pending_review { background: rgba(232,163,61,0.18); color: var(--gold-dark); }
.status-active, .status-confirmed, .status-verified, .status-published, .status-completed, .status-graded, .status-submitted, .status-present, .status-live, .status-in_progress { background: rgba(31,122,92,0.14); color: var(--teal); }
.status-suspended, .status-cancelled, .status-rejected, .status-no_show, .status-archived, .status-closed, .status-absent, .status-late, .status-overdue { background: rgba(179,67,43,0.12); color: var(--danger); }
.status-excused { background: rgba(27,42,74,0.08); color: var(--muted); }

@media (max-width: 900px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
  .dash-main { padding: 24px; }
}

/* ---------------- Blog ---------------- */
.blog-card img { border-radius: var(--radius-md); aspect-ratio: 16/10; object-fit: cover; margin-bottom: 14px; }
.blog-meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); margin-bottom: 6px; }
.post-body { max-width: 68ch; margin: 0 auto; font-size: 1.05rem; }
.post-body img { border-radius: var(--radius-md); margin: 24px 0; }

/* ---------------- FAQ accordion ---------------- */
.faq-item { border-bottom: 1px solid var(--mist); }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 18px 0; font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; color: var(--muted); }
.faq-item.open .faq-a { max-height: 300px; padding-bottom: 18px; }
