/* ==========================================================================
   RittsEd - SAT, Math & Physics tutoring
   Style: Trust & Authority / academic. Brand red locked by client: #8a0117
   ========================================================================== */

:root {
  --crimson: #8a0117;
  --crimson-dark: #6b0112;
  --crimson-tint: #faf3f4;
  --ink: #1d2129;
  --ink-soft: #4b5563;
  --ink-faint: #5a6472;
  --paper: #ffffff;
  --paper-tint: #f7f8fa;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(29, 33, 41, 0.08);
  --shadow-md: 0 6px 24px rgba(29, 33, 41, 0.10);
  --font-head: "Crimson Pro", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", -apple-system, "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); font-weight: 700; letter-spacing: -0.01em; }
h1 em { font-style: italic; color: var(--crimson); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; margin-bottom: 0.75rem; }
h3 { font-size: 1.35rem; font-weight: 600; }

.kicker {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 0.5rem;
}
.kicker-light { color: #f2b8c0; }

.lead, .section-lead { font-size: 1.125rem; color: var(--ink-soft); max-width: 62ch; }
.section-lead { margin-bottom: 2rem; }
.section-lead-light { color: rgba(255, 255, 255, 0.85); max-width: 46ch; margin-bottom: 1.5rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 150ms ease;
  min-height: 44px;
}
.btn:active { transform: scale(0.98); }
.btn-lg { padding: 0.9rem 1.8rem; font-size: 1.0625rem; }

.btn-primary { background: var(--crimson); color: #fff; }
.btn-primary:hover { background: var(--crimson-dark); }

.btn-ghost { background: transparent; color: var(--crimson); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--crimson); background: var(--crimson-tint); }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

a { color: var(--crimson); }
a:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 3px solid var(--crimson);
  outline-offset: 2px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}
.brand img { width: 34px; height: 34px; }
.site-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
}
.site-nav a:hover { color: var(--crimson); border-bottom-color: var(--crimson); }
.header-cta { white-space: nowrap; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 0.6rem;
}

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, var(--crimson-tint) 0%, transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-tint) 100%);
  border-bottom: 1px solid var(--border);
  padding: 4.5rem 0 4rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}
.hero-copy .lead { margin: 1.25rem 0 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.25rem; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 2rem;
  justify-content: start;
}
.stat dd {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--crimson);
  font-variant-numeric: tabular-nums;
}
.stat dt { font-size: 0.8125rem; color: var(--ink-faint); order: 1; }
.stat { display: flex; flex-direction: column; }

.hero-photo { position: relative; }
.hero-photo > img:first-child {
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  object-fit: cover;
  /* photo is much taller than the 4:5 frame; anchor to the top so the head is never cropped */
  object-position: top;
  aspect-ratio: 4 / 5;
  width: 100%;
}
.hero-laurel {
  position: absolute;
  bottom: -26px;
  left: -26px;
  width: 110px;
  height: 110px;
  background: #fff;
  border-radius: 50%;
  padding: 14px;
  box-shadow: var(--shadow-md);
}

/* ---------- sections ---------- */
.section { padding: 4.5rem 0; }
.section-tint { background: var(--paper-tint); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- videos ---------- */
.video-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin: 2rem 0 2.5rem;
}
/* both cards flex so the tall video can match the wide video's height exactly */
.video-card { display: flex; flex-direction: column; }
.video-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow-sm);
}
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-9x16 { aspect-ratio: 9 / 16; }
/* height comes from the row (set by the 16:9 video); width follows from the 9:16 ratio */
.video-tall .video-frame { flex: 1 1 0; width: auto; align-self: center; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade { position: absolute; inset: 0; display: block; }
.video-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--crimson);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  transition: transform 200ms ease, background-color 200ms ease;
}
.video-play svg { margin-left: 3px; }
.video-facade:hover .video-play { background: var(--crimson-dark); transform: translate(-50%, -50%) scale(1.07); }
.video-card figcaption {
  font-size: 0.9rem;
  color: var(--ink-faint);
  margin-top: 0.6rem;
  text-align: center;
}

/* ---------- testimonial quotes ---------- */
.reviews-link { text-align: center; }
.reviews-cta { margin-top: 2.5rem; }

/* gold dark enough to hit 3:1 non-text contrast on white (WCAG 1.4.11) */
.stars { display: flex; gap: 3px; color: #c47512; }
.stars svg { width: 19px; height: 19px; }
.quote-card:has(.stars)::before { display: none; }

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.quote-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: box-shadow 200ms ease, transform 200ms ease;
}
.quote-card::before {
  content: "";
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: var(--crimson);
}
.quote-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.quote-card blockquote { color: var(--ink-soft); font-size: 0.98rem; }
.quote-card blockquote::before { content: "\201C"; font-family: var(--font-head); font-size: 1.6rem; color: var(--crimson); line-height: 0; margin-right: 2px; }
.quote-card figcaption {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.badge {
  background: var(--crimson-tint);
  color: var(--crimson);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- subjects ---------- */
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.rates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.rate-tile {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.rate-amount {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--crimson);
}
.rate-unit {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-faint);
}
.rate-detail {
  font-size: 0.9375rem;
  color: var(--ink-soft);
}
.rates-grid-single { grid-template-columns: minmax(0, 340px); margin-top: 1rem; }

/* ---------- SAT pricing cards ---------- */
.pricing-sub { margin-top: 2.5rem; }
.pricing-sub:first-of-type { margin-top: 1rem; }
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
  margin: 2rem 0 0.5rem;
}
.price-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-featured {
  border: 2px solid var(--crimson);
  box-shadow: var(--shadow-md);
  padding-top: 2.25rem;
}
.price-flag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--crimson);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
}
.price-card h4 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.price-amount {
  font-family: var(--font-head);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--crimson);
  font-variant-numeric: tabular-nums;
}
.price-note {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
}
.price-desc { font-size: 0.97rem; color: var(--ink-soft); margin-bottom: 1rem; }
.price-includes { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.2rem; }
.price-card ul { list-style: none; }
.price-card li {
  padding: 0.45rem 0 0.45rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  font-size: 0.97rem;
  color: var(--ink-soft);
}
.price-card li:last-child { border-bottom: none; }
.price-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--crimson);
  opacity: 0.75;
}
.subject-card, .policy-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.subject-card h3, .policy-card h3 { color: var(--crimson); margin-bottom: 0.25rem; }
.subject-sub {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
}
.subject-card ul, .policy-card ul { list-style: none; }
.subject-card li, .policy-card li {
  padding: 0.45rem 0 0.45rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
  font-size: 0.97rem;
  color: var(--ink-soft);
}
.subject-card li:last-child, .policy-card li:last-child { border-bottom: none; }
.subject-card li::before, .policy-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--crimson);
  opacity: 0.75;
}

/* ---------- approach steps ---------- */
.steps {
  list-style: none;
  margin-top: 2.5rem;
  display: grid;
  gap: 2rem;
  max-width: 780px;
}
.step { display: flex; gap: 1.5rem; align-items: flex-start; }
.step-num {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--crimson);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.step h3 { margin-bottom: 0.35rem; }
.step p { color: var(--ink-soft); }

/* ---------- qualifications (dark band) ---------- */
.section-dark {
  background: linear-gradient(160deg, var(--crimson) 0%, var(--crimson-dark) 100%);
  color: #fff;
}
.section-dark h2 { color: #fff; }
.quals-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
}
.qual-list { list-style: none; display: grid; gap: 0.6rem; }
.qual-list li {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 0.8rem 1.1rem;
  font-size: 1rem;
}
.qual-list strong {
  font-family: var(--font-head);
  font-size: 1.25rem;
  margin-right: 0.4rem;
  font-variant-numeric: tabular-nums;
}
.quals-btn { margin-top: 1rem; }

/* ---------- contact ---------- */
.contact-cta { text-align: center; }
.contact-cta .section-lead { margin-left: auto; margin-right: auto; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.8);
  padding: 2.5rem 0;
  font-size: 0.95rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-brand img { filter: brightness(0) invert(1); opacity: 0.9; }
.footer-brand strong { color: #fff; }
.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-nav a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }

/* ---------- about page ---------- */
.about-hero { padding: 4.5rem 0; }
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: center;
}
.about-photo img { border-radius: 14px; box-shadow: var(--shadow-md); }
.about-body p { margin-bottom: 1.1rem; color: var(--ink-soft); font-size: 1.1rem; }
.about-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- motion safety: JS hides [data-animate] before revealing; never on paper ---------- */
@media print {
  [data-animate] { opacity: 1 !important; transform: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .quals-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 420px; }
  .card-grid-3, .rates-grid, .price-grid { grid-template-columns: 1fr; }
  .rates-grid-single { grid-template-columns: minmax(0, 340px); }
  .video-grid { grid-template-columns: 1fr; }
  /* stacked layout: size the tall video by its ratio again, not by the row */
  .video-card { display: block; }
  .video-tall .video-frame { width: min(100%, 260px); margin: 0 auto; }
  .stat-row { grid-template-columns: repeat(3, auto); gap: 1.25rem; }
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
    box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; margin-left: auto; }
  .header-cta { display: none; }
  .section { padding: 3rem 0; }
  .hero { padding: 3rem 0; }
  .step { gap: 1rem; }
  .step-num { width: 44px; height: 44px; font-size: 1.25rem; }
}
