/* Tutoring sample: navy hero, purple pills, pastel subject rows. */
:root {
  --primary: #5645d4;
  --primary-pressed: #4534b3;
  --navy: #0a1530;
  --navy-mid: #1a2a52;
  --canvas: #ffffff;
  --surface: #f6f5f4;
  --hairline: #e5e3df;
  --ink: #1a1a1a;
  --slate: #5d5b54;
  --steel: #787671;
  --on-dark: #ffffff;
  --peach: #ffe8d4;
  --mint: #d9f3e1;
  --lavender: #e6e0f5;
  --sky: #dcecfa;
  --yellow: #fef7d6;
  --pink: #ff64c8;
  --orange: #dd5b00;
  --green: #1aae39;
  --font: Inter, system-ui, -apple-system, sans-serif;
  --r: 12px;
  --pill: 999px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(86, 69, 212, 0.06), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 30%, rgba(255, 100, 200, 0.05), transparent 50%),
    var(--canvas);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.35em;
}
.eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.demo-notice {
  background: var(--surface);
  color: var(--slate);
  font-size: 13px;
  text-align: center;
  padding: 10px 16px;
  position: relative;
  z-index: 70;
}
.demo-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  margin-right: 8px;
  border-radius: var(--pill);
  background: var(--lavender);
  color: var(--primary);
  vertical-align: 1px;
}
.demo-notice a {
  color: var(--primary);
  text-decoration: underline;
  margin-left: 10px;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 18px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-purple { background: var(--primary); color: var(--on-dark); }
.btn-purple:hover { background: var(--primary-pressed); }
.btn-ghost {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.nav-logo {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.03em;
}
.nav-logo span { color: var(--primary); }
/* Always-on drawer toggle (minimal wordmark nav). */
.nav-toggle { display: flex; color: var(--ink); }
.nav .nav-toggle-bars span { background: var(--ink); }
.nav-drawer {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  border-top: 1px solid var(--hairline);
  background: var(--canvas);
}
.nav:has(details.nav-menu[open]) .nav-drawer { display: flex; }
.nav-drawer a {
  padding: 12px 0;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
}
.nav-drawer-cta {
  margin-top: 12px;
  border-bottom: none !important;
  text-align: center;
}

.hero {
  position: relative;
  background:
    radial-gradient(circle at 20% 30%, rgba(86, 69, 212, 0.35), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255, 100, 200, 0.25), transparent 35%),
    radial-gradient(circle at 70% 80%, rgba(245, 215, 94, 0.2), transparent 40%),
    linear-gradient(165deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--on-dark);
  padding: 88px 0 100px;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  letter-spacing: -0.04em;
  color: var(--on-dark);
  margin-bottom: 16px;
}
.hero .lead {
  margin: 0 auto;
  max-width: 34em;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}
.hero .btn-row { justify-content: center; }
.hero-dots { position: absolute; inset: 0; pointer-events: none; }
.dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  opacity: 0.9;
}
.d1 { left: 8%; top: 22%; background: var(--primary); animation: float 7s ease-in-out infinite; }
.d2 { left: 18%; top: 68%; background: var(--pink); width: 14px; height: 14px; animation: float 8s ease-in-out infinite 0.4s; }
.d3 { right: 12%; top: 28%; background: #f5d75e; animation: float 6.5s ease-in-out infinite 0.2s; }
.d4 { right: 22%; top: 72%; background: #2a9d99; width: 12px; height: 12px; animation: float 7.5s ease-in-out infinite 0.8s; }
.d5 { left: 42%; top: 18%; background: #ff64c8; width: 10px; height: 10px; animation: float 9s ease-in-out infinite; }
.d6 { left: 55%; bottom: 18%; background: var(--primary); width: 16px; height: 16px; animation: float 6s ease-in-out infinite 1s; }
.d7 { right: 40%; top: 55%; background: #dd5b00; width: 11px; height: 11px; animation: float 8.5s ease-in-out infinite 0.3s; }
.d8 { left: 28%; top: 40%; background: #dcecfa; width: 13px; height: 13px; animation: float 7.2s ease-in-out infinite 0.6s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.section-head { margin-bottom: 28px; max-width: 36em; }
.section-head h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
.section-head p { margin: 0; color: var(--slate); }

.subjects { padding: 72px 0 40px; }
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.pill {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--steel);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.pill.is-active {
  background: var(--ink);
  color: var(--on-dark);
  border-color: var(--ink);
}
.pill:hover:not(.is-active) { border-color: var(--steel); color: var(--ink); }

.subject-list { display: flex; flex-direction: column; gap: 10px; }
.subject-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r);
  box-shadow: 0 8px 24px rgba(10, 21, 48, 0.04);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.subject-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(10, 21, 48, 0.08);
}
.subject-row.is-hidden { display: none; }
.subject-row img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}
.subject-copy h3 { font-size: 1.05rem; margin-bottom: 4px; }
.subject-copy p { margin: 0; color: var(--slate); font-size: 0.95rem; }
.subject-meta {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}
.list-empty { color: var(--steel); padding: 24px 0; }

.how {
  padding: 56px 0 72px;
  background: var(--surface);
}
.tint-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tint {
  border-radius: 16px;
  padding: 28px 24px;
  border: 1px solid transparent;
}
.tint.peach { background: var(--peach); }
.tint.mint { background: var(--mint); }
.tint.lavender { background: var(--lavender); }
.tint-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: var(--slate);
}
.tint h3 { font-size: 1.2rem; }
.tint p { margin: 0; color: var(--slate); font-size: 0.95rem; }

.tutors { padding: 72px 0; }
.tutor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tutor-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(10, 21, 48, 0.05);
}
.tutor-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.tutor-body { padding: 18px 18px 22px; }
.tutor-body h3 { font-size: 1.1rem; margin-top: 8px; }
.tutor-body p { margin: 0; color: var(--slate); font-size: 0.92rem; }
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.tag-purple { background: var(--lavender); color: #391c57; }
.tag-orange { background: var(--peach); color: #793400; }
.tag-green { background: var(--mint); color: #0f5c22; }

.book {
  padding: 40px 0 96px;
  background:
    linear-gradient(180deg, var(--sky) 0%, var(--canvas) 45%);
}
.book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.book-copy h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
.book-copy > p { color: var(--slate); }
.book-points {
  margin: 20px 0;
  padding-left: 1.1em;
  color: var(--slate);
}
.book-points li { margin-bottom: 8px; }
.book-close {
  margin-top: 28px;
  font-weight: 600;
  color: var(--ink);
}
.book-form {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(10, 21, 48, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.book-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
}
.book-form input,
.book-form select {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  border: 1px solid #c8c4be;
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 44px;
  background: var(--canvas);
}
.book-form input:focus,
.book-form select:focus {
  outline: none;
  border: 2px solid var(--primary);
  padding: 9px 11px;
}
.form-note {
  margin: 0;
  min-height: 1.2em;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
}

.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 36px 0;
  font-size: 14px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { margin: 0; font-weight: 700; color: #fff; }
.footer p { margin: 0; }
.footer a { color: #fff; text-decoration: underline; font-weight: 600; }

.js-motion .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.06s);
}
.js-motion .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .tint-grid,
  .tutor-grid,
  .book-grid { grid-template-columns: 1fr; }
  .subject-row {
    grid-template-columns: 64px 1fr;
    gap: 12px;
  }
  .subject-meta {
    grid-column: 2;
    white-space: normal;
  }
  .subject-row img { width: 64px; height: 64px; }
  .hero { padding: 64px 0 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* --- Accessibility baseline (Web Interface Guidelines) --- */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 6px;
  transform: translateY(-200%);
}
.skip-link:focus { outline: none; }
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
[id] {
  scroll-margin-top: calc(5.5rem + env(safe-area-inset-top, 0px));
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.nav, .nav-min, .masthead, .bar {
  padding-left: max(0px, env(safe-area-inset-left, 0px));
  padding-right: max(0px, env(safe-area-inset-right, 0px));
}
.nav-drawer {
  overscroll-behavior: contain;
}

/* --- Web Interface Guidelines extras --- */
a, button, summary, input, select, textarea, label, [role="button"], [role="tab"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}
h1, h2, h3 { text-wrap: pretty; }
