:root {
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-light: #8a8a8a;
  --paper: #fbfaf6;
  --paper-2: #f4f1e8;
  --accent: #2c5fd8;
  --accent-soft: #c9d6f5;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
a { color: inherit; }

.container {
  background: var(--paper);
}

/* ---------- SCROLL REVEAL ---------- */
/* declared early so component transitions (same specificity, declared later) win on hover */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- NAV (overlays hero) ---------- */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  color: var(--paper);
}
.nav .logo {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav .logo .dot {
  width: 18px; height: 18px; background: var(--accent);
  border: 1.5px solid var(--paper);
  border-radius: 2px;
  transform: rotate(8deg);
}
.nav ul {
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: "Kalam", cursive;
  font-size: 20px;
  color: rgba(255,255,255,0.85);
}
.nav ul a { text-decoration: none; }
.nav ul a:hover { color: var(--paper); }
.nav .cta {
  font-family: "Kalam", cursive;
  font-size: 18px;
  border: 1.5px solid var(--paper);
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transform: rotate(-1deg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  height: 92vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}
.hero .photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  filter: saturate(0.85) contrast(1.05);
}
.hero .scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 45%, rgba(0,0,0,0.78) 100%);
}
.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 110px 56px 72px;
  text-align: center;
}
.hero .kicker {
  font-family: "Kalam", cursive;
  font-size: 24px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
}
.hero-ctas .btn {
  padding: 28px 64px;
  font-size: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-ctas .btn:hover {
  transform: scale(1.06) rotate(0);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.hero h1 {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 64px;
  line-height: 0.95;
  margin: 0;
  letter-spacing: 0.5px;
  text-align: center;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  background: var(--paper);
  padding: 0 14px;
  display: inline-block;
  transform: rotate(-1.5deg);
}
.hero-ctas {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-badge {
  display: inline-flex;
  background: var(--paper);
  border-radius: 12px;
  padding: 14px 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  transform: rotate(-1deg);
}
.hero-badge img {
  display: block;
  height: 72px;
  width: auto;
}
.contact-expand {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}
.contact-text {
  white-space: nowrap;
  transition: opacity 0.15s ease;
}
.contact-icons {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.contact-expand.open .contact-text { opacity: 0; }
.contact-expand.open .contact-icons { opacity: 1; pointer-events: auto; }
@media (hover: hover) {
  .contact-expand:hover { transform: scale(1.2) rotate(0); }
  .contact-expand:hover .contact-text { opacity: 0; }
  .contact-expand:hover .contact-icons { opacity: 1; pointer-events: auto; }
}
.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease;
}
.contact-icon svg {
  width: 36px;
  height: 36px;
}
.contact-icon:hover {
  transform: scale(1.3);
}
.contact-label {
  font-family: "Kalam", cursive;
  font-size: 32px;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--paper);
  border-radius: 999px;
  padding: 18px 48px;
  margin-top: 20px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  white-space: nowrap;
  display: inline-block;
}
.contact-label.visible {
  opacity: 1;
  transform: translateY(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-family: "Kalam", cursive;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transform: rotate(-0.6deg);
  transition: transform 0.15s ease;
}
.btn:hover { transform: rotate(0) translateY(-1px); }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.outline-light {
  background: transparent;
  color: var(--paper);
  border-color: var(--paper);
}
.btn.on-dark { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- STAT STRIP ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1.5px solid var(--ink);
}
.strip > div {
  padding: 22px 24px;
  border-right: 1.5px dashed var(--ink-light);
  font-family: "Kalam", cursive;
  font-size: 14px;
  color: var(--ink-soft);
}
.strip > div:last-child { border-right: none; }
.strip .num {
  font-family: "Caveat", cursive;
  font-size: 38px;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 72px 56px;
  border-bottom: 1.5px solid var(--ink);
}
.section.alt { background: var(--paper-2); }
.section-eyebrow {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.section-title {
  font-family: "Caveat", cursive;
  font-size: 52px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1;
}
.section-sub {
  font-family: "Kalam", cursive;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 0 22px;
  line-height: 1.55;
}

/* Subjects */
.subj-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.subj-card {
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  transform: rotate(-0.3deg);
  background-image: radial-gradient(circle, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 14px 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.subj-card:nth-child(2n) { transform: rotate(0.4deg); }
.subj-card:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.13); }
.subj-card:nth-child(1) { background-color: #fef5d9; }
.subj-card:nth-child(2) { background-color: #e8f5e9; }
.subj-card:nth-child(3) { background-color: #fce4ec; }
.subj-card:nth-child(4) { background-color: #fff3e0; }
.subj-card:nth-child(5) { background-color: #ede7f6; }
.subj-card:nth-child(6) { background-color: #e0f7fa; }
.subj-card:nth-child(7) { background-color: #e8eaf6; }
.subj-card:nth-child(8) { background-color: #fbe9e7; }
.subj-img-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
}
.subj-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.subj-card .glyph {
  position: absolute;
  bottom: 12px;
  left: 16px;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: 22px;
  background: var(--paper);
  z-index: 2;
}
.subj-info {
  padding: 16px 22px 22px;
}
.subj-card h4 {
  font-family: "Caveat", cursive;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 2px;
}
.subj-card .meta {
  font-family: "Kalam", cursive;
  color: var(--ink-light);
  font-size: 13px;
}

/* Tutors */
.tutors-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 28px;
  align-items: start;
}
.tutor-card {
  min-width: 0;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  transform: rotate(-0.3deg);
  background-image: radial-gradient(circle, rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 14px 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.tutor-card { cursor: pointer; }
.tutor-card:nth-child(2n) { transform: rotate(0.4deg); }
.tutor-card:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.10); }
.tutor-card:nth-child(1) { background-color: #e3f2fd; }
.tutor-card:nth-child(2) { background-color: #e8f5e9; }
.tutor-card:nth-child(3) { background-color: #fdeaea; }
.tutor-card:nth-child(4) { background-color: #fef5d9; }
.tutor-card .name {
  font-family: "Caveat", cursive;
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 8px;
}
.tutor-card .role {
  font-family: "Kalam", cursive;
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 14px;
}
.tutor-card .bio {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bio-more {
  align-self: flex-start;
  margin-top: 12px;
  font-family: "Kalam", cursive;
  font-size: 15px;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 4px 2px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.bio-more:hover { transform: translateY(-1px); opacity: 0.65; }

/* Bio modal */
.bio-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.bio-modal.open { opacity: 1; pointer-events: auto; }
.bio-modal-box {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 32px 28px 28px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
  transform: translateY(12px);
  transition: transform 0.2s ease;
}
.bio-modal.open .bio-modal-box { transform: translateY(0); }
.bio-modal-box .name {
  font-family: "Caveat", cursive;
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 6px;
}
.bio-modal-box .role {
  font-family: "Kalam", cursive;
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}
.bio-modal-box .bio {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0;
  white-space: pre-line;
}
.bio-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 4px 8px;
  cursor: pointer;
}
.bio-modal-close:hover { opacity: 0.6; }

/* Process */
.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 28px;
}
.step .stepnum {
  font-family: "Caveat", cursive;
  font-size: 60px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  border-bottom: 2px dashed var(--ink);
  padding-bottom: 6px;
  margin-bottom: 14px;
}
.step h4 {
  font-family: "Caveat", cursive;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
}
.step p {
  font-family: "Kalam", cursive;
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 10px;
  line-height: 1.55;
}

/* Final CTA */
.end-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 72px 56px;
  text-align: center;
}
.end-cta h3 {
  font-family: "Caveat", cursive;
  font-size: 60px;
  font-weight: 700;
  margin: 0 0 14px;
  line-height: 1;
}
.end-cta h3 em { font-style: normal; color: var(--accent); }
.end-cta p {
  font-family: "Kalam", cursive;
  color: rgba(255,255,255,0.78);
  margin: 0 auto 26px;
  max-width: 520px;
  font-size: 17px;
  line-height: 1.5;
}
.end-cta .row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
footer {
  background: var(--paper-2);
  padding: 40px 56px 30px;
  border-top: 1.5px solid var(--ink);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 30px;
  align-items: start;
  font-family: "Inter", sans-serif;
  font-size: 14px;
}
footer .brand {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
footer .brand .dot {
  width: 14px; height: 14px; background: var(--accent);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  transform: rotate(8deg);
}
footer .tag {
  font-family: "Kalam", cursive;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
  max-width: 280px;
}
footer h5 {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin: 0 0 10px;
  font-weight: 600;
}
footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
footer ul li a {
  text-decoration: none;
  color: var(--ink);
  font-family: "Kalam", cursive;
  font-size: 14px;
}
footer ul li a:hover { color: var(--accent); }

.legal {
  grid-column: 1 / -1;
  border-top: 1px dashed var(--ink-light);
  padding-top: 16px;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  font-family: "Kalam", cursive;
  font-size: 13px;
  color: var(--ink-light);
}

/* Responsive */
@media (max-width: 900px) {
  .hero { height: auto; min-height: 580px; }
  .hero-content { padding: 96px 28px 48px; }
  .hero h1 { font-size: 48px; }
  .hero-ctas { flex-direction: column; align-items: stretch; width: 100%; max-width: 320px; margin: 0 auto; }
  .hero-ctas .btn { width: 100%; justify-content: center; padding: 22px 24px; }
  .hero-badge { margin-top: 20px; }
  .contact-label {
    white-space: normal;
    overflow-wrap: normal;
    max-width: 90vw;
    font-size: 22px;
    padding: 14px 24px;
    border-radius: 18px;
    text-align: center;
    margin-bottom: 24px;
  }
  .nav { padding: 18px 24px; }
  .nav ul { display: none; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip > div:nth-child(2n) { border-right: none; }
  .strip > div { border-bottom: 1px dashed var(--ink-light); }
  .section { padding: 48px 24px; }
  .subj-grid { grid-template-columns: repeat(2, 1fr); }
  .tutors-row { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .end-cta { padding: 56px 24px; }
  .end-cta h3 { font-size: 44px; }
  footer { grid-template-columns: 1fr 1fr; padding: 30px 24px 20px; }
}

@media (max-width: 480px) {
  .nav { padding: 22px 16px; gap: 10px; }
  .nav .logo { font-size: 26px; gap: 6px; min-width: 0; }
  .nav .logo .dot { width: 14px; height: 14px; }
  .nav .cta { font-size: 14px; padding: 8px 14px; }
}

/* Vertical/portrait monitors: lay the tutors out as a 2x2 grid */
@media (orientation: portrait) and (min-width: 901px) {
  .tutors-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
