/* ==========================================================================
   MONKEYFACE LEARNING — UNIFIED MINIMAL + BRAND-POP DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --surface-subtle: #F3EFEA;
  --ink: #141416;
  --muted: #5A5A66;
  --line: #E2DDD5;
  --border-strong: #141416;
  --accent: #FF6B35;
  --accent-hover: #F25A24;
  --accent-soft: #FFF1EB;
  --whatsapp: #25D366;
  --whatsapp-hover: #1EBE5B;
  --gold: #D97706;
  --gold-soft: #FFF7E0;
  --green: #188038;
  --green-soft: #E8F5E9;
  --error: #C62828;
  --error-bg: #FCE8E6;
  --shadow-pop: 2px 2px 0px #141416;
  --shadow-card: 2px 2px 0px rgba(20, 20, 22, 0.08);
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', SFMono-Regular, Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.wrap {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.brand__logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  flex-wrap: wrap;
}

.nav__link {
  padding: 4px 2px;
  transition: color 0.15s ease;
}

.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.nav__link[aria-current="page"] {
  border-bottom: 2px solid var(--accent);
}

/* Typography */
h1, h2 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 2.75rem);
  line-height: 1.14;
}

h2 {
  font-size: 1.55rem;
  line-height: 1.22;
}

h3 {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
}

.lead {
  font-size: 1.03rem;
  color: var(--muted);
  max-width: 60ch;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

/* Eyebrow & Badges */
.code-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--ink);
  white-space: nowrap;
}

h2 .code-badge,
h3 .code-badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  vertical-align: middle;
  margin-left: 6px;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-soft);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}

.stars {
  color: var(--gold);
  letter-spacing: 0.04em;
}

/* Buttons & Links */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border-strong);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.btn--sm {
  min-height: 36px;
  padding: 6px 13px;
  font-size: 0.82rem;
}

.btn--primary {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: var(--shadow-pop);
}

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--border-strong);
}

.btn--dark {
  background: var(--ink);
  color: #FFFFFF;
  box-shadow: var(--shadow-pop);
}

.btn--dark:hover {
  background: #27272B;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--border-strong);
}

.btn--whatsapp {
  background: var(--whatsapp);
  color: #FFFFFF;
  box-shadow: var(--shadow-pop);
}

.btn--whatsapp:hover {
  background: var(--whatsapp-hover);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--border-strong);
}

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
}

.btn--ghost:hover {
  background: var(--surface-subtle);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--border-strong);
}

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px var(--border-strong);
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.text-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 1px;
  transition: color 0.12s ease;
}

.text-link:hover {
  color: var(--accent);
}

/* Sections & Cards */
.hero {
  padding: 48px 0 36px;
}

.hero__title {
  margin-bottom: 14px;
}

.hero__lead {
  margin-bottom: 22px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.trust-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--muted);
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
}

.section {
  padding: 40px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.section-sub {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 4px;
}

.card {
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

/* Clean Subject Rows */
.clean-list {
  list-style: none;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 16px;
}

.subject-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.subject-row:last-child {
  border-bottom: none;
}

.subject-row__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.subject-row__title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.94rem;
  font-weight: 700;
}

.subject-row__desc {
  font-size: 0.83rem;
  color: var(--muted);
}

.subjects-compact-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.subject-compact-item {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  padding: 9px 12px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: default;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.subject-compact-item:hover,
.subject-compact-item:focus-visible {
  border-color: var(--accent);
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-pop);
  z-index: 20;
}

.subject-compact-item[data-quote]::after {
  content: attr(data-quote);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 260px;
  background: var(--ink);
  color: #FFFFFF;
  border: 1.5px solid var(--border-strong);
  border-radius: 10px;
  padding: 8px 11px;
  font-family: var(--serif);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.4;
  white-space: pre-line;
  text-align: center;
  box-shadow: 3px 3px 0px rgba(20, 20, 22, 0.22);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 30;
}

.subject-compact-item[data-quote]::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--ink) transparent transparent transparent;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 30;
}

.subject-compact-item[data-quote]:hover::after,
.subject-compact-item[data-quote]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.subject-compact-item[data-quote]:hover::before,
.subject-compact-item[data-quote]:focus-visible::before {
  opacity: 1;
  visibility: visible;
}

.subjects-compact-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Teacher Mini Cards */
.tutor-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.avatar-badge {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: var(--accent-soft);
  box-shadow: 1.5px 1.5px 0px var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.avatar-badge--alt {
  background: var(--surface-subtle);
}

.tutor-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  object-fit: cover;
  background: var(--surface);
  box-shadow: 1.5px 1.5px 0px var(--border-strong);
  flex-shrink: 0;
}

.tutor-meta {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Review Cards */
.review-quote {
  font-family: var(--serif);
  font-size: 0.98rem;
  color: var(--ink) !important;
  line-height: 1.5;
  margin-bottom: 10px;
}

.review-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 600;
}

.reviews-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.page-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.page-btn:hover:not(:disabled) {
  background: var(--surface-subtle);
}

.page-btn.active {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 1.5px 1.5px 0px var(--border-strong);
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* FAQ Accordion (<details>) */
.faq-list {
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  padding: 15px 18px;
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 18px 15px;
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.55;
}

.faq-answer a {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--accent);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  margin-top: 12px;
  font-size: 0.83rem;
  color: var(--muted);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-nap {
  font-size: 0.78rem;
  line-height: 1.6;
}

.footer-nap a {
  color: var(--ink);
  font-weight: 600;
}

/* Subpage Header Title Block */
.page-intro {
  padding: 32px 0 20px;
}

.page-intro h1 {
  margin-bottom: 8px;
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .subjects-compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero {
    padding: 36px 0 28px;
  }
  .section {
    padding: 32px 0;
  }
  .subject-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .nav {
    gap: 12px;
    font-size: 0.84rem;
  }
}
