/* Moyo — static marketing site */
:root {
  --navy: #1e3a8a;
  --ice: #eff6ff;
  --gold: #fcd34d;
  --page-bg: #eff6ff;
  --text: #1f2937;
  --text-muted: #4b5563;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(30, 58, 138, 0.08);
  --shadow-hover: 0 8px 32px rgba(30, 58, 138, 0.12);
  --radius: 20px;
  --radius-sm: 16px;
  --focus-ring: 0 0 0 3px var(--gold), 0 0 0 5px var(--navy);
  --max-width: 72rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--page-bg);
}

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

a {
  color: var(--navy);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--navy);
  color: var(--ice);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-link:hover {
  text-decoration: none;
  opacity: 0.9;
}

.logo-link svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--navy);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  color: var(--navy);
}

.nav-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.nav-toggle[aria-expanded="false"] .icon-close {
  display: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-nav a {
  display: block;
  padding: 0.625rem 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.site-nav a:hover {
  background: var(--ice);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  background: var(--ice);
  color: var(--navy);
}

@media (max-width: 47.99rem) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 0.75rem 1.25rem 1rem;
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }
}

@media (min-width: 48rem) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block !important;
  }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
  }
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
}

.btn-primary:hover {
  text-decoration: none;
  color: var(--navy);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-secondary:hover {
  text-decoration: none;
  background: var(--ice);
}

/* Layout */
main {
  padding-bottom: 3rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3rem 0;
}

.section-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--navy);
  line-height: 1.25;
}

.section-lead {
  margin: 0 0 2rem;
  color: var(--text-muted);
  max-width: 42rem;
}

/* Hero */
.hero {
  padding: 2.5rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.hero-badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  background: var(--white);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  color: var(--navy);
  line-height: 1.15;
}

.hero-tagline {
  margin: 0 0 1.5rem;
  font-size: 1.25rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Phone mockup (CSS-only) */
.phone-mockup {
  margin: 0 auto;
  width: min(280px, 100%);
  aspect-ratio: 9 / 19;
  background: linear-gradient(145deg, #2d3748 0%, #1a202c 100%);
  border-radius: 2.25rem;
  padding: 0.65rem;
  box-shadow: var(--shadow-hover), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 0.65rem;
  left: 50%;
  transform: translateX(-50%);
  width: 35%;
  height: 1.25rem;
  background: #1a202c;
  border-radius: 0 0 0.75rem 0.75rem;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--ice);
  border-radius: 1.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 0.7rem;
}

.phone-status {
  padding: 1.75rem 0.75rem 0.35rem;
  display: flex;
  justify-content: space-between;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.65rem;
}

.phone-app-bar {
  padding: 0.5rem 0.75rem;
  background: var(--navy);
  color: var(--ice);
  font-weight: 700;
  text-align: center;
}

.phone-chat {
  flex: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
}

.chat-bubble {
  max-width: 85%;
  padding: 0.5rem 0.65rem;
  border-radius: 0.75rem;
  line-height: 1.4;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--gold);
  color: var(--navy);
  border-bottom-right-radius: 0.2rem;
}

.chat-bubble.ai {
  align-self: flex-start;
  background: var(--white);
  color: var(--text);
  box-shadow: var(--shadow);
  border-bottom-left-radius: 0.2rem;
}

.phone-input {
  margin: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--white);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.65rem;
  border: 1px solid rgba(30, 58, 138, 0.15);
}

/* Cards */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

.card-grid-3 {
  grid-template-columns: 1fr;
}

.card-grid-4 {
  grid-template-columns: 1fr;
}

@media (min-width: 40rem) {
  .card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  height: 100%;
}

.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  background: var(--ice);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  color: var(--navy);
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9875rem;
}

/* Built for teachers */
.teachers-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.teachers-panel ul {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.teachers-panel li {
  margin-bottom: 0.5rem;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 42rem;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}

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

.faq-item summary::after {
  content: "+";
  float: right;
  font-weight: 700;
}

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

.faq-item .faq-answer {
  padding: 0 1.25rem 1rem;
  color: var(--text-muted);
  border-top: 1px solid var(--ice);
  margin-top: 0;
  padding-top: 1rem;
}

/* Legal / prose pages */
.page-hero {
  padding: 2rem 0 1rem;
}

.page-hero h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.page-lead {
  margin: 0.75rem 0 0;
  max-width: 40rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.section--flush {
  padding-top: 0;
}

.legal-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 56rem) {
  .legal-layout {
    grid-template-columns: minmax(9.5rem, 11rem) minmax(0, 1fr);
    gap: 2rem;
  }
}

.policy-nav {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1rem 1.125rem;
  box-shadow: var(--shadow);
}

@media (min-width: 56rem) {
  .policy-nav {
    position: sticky;
    top: 5.5rem;
  }
}

.policy-nav-title {
  margin: 0 0 0.625rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy);
}

.policy-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

@media (max-width: 55.99rem) {
  .policy-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
}

.policy-nav a {
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
}

.policy-nav a:hover {
  color: var(--navy);
  text-decoration: underline;
}

.prose {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 2rem;
  box-shadow: var(--shadow);
  max-width: 48rem;
}

.prose--legal {
  max-width: none;
}

.prose h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.25rem;
  color: var(--navy);
  scroll-margin-top: 6rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.0625rem;
  color: var(--navy);
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose ul {
  padding-left: 1.25rem;
}

.prose dl {
  margin: 0;
}

.permission-list dt {
  font-weight: 700;
  color: var(--navy);
  margin-top: 1rem;
}

.permission-list dt:first-child {
  margin-top: 0;
}

.permission-list dd {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.to-confirm {
  background: #fef3c7;
  color: #92400e;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-weight: 600;
}

.last-updated {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

/* Contact */
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 32rem;
}

.contact-card a {
  font-weight: 700;
  font-size: 1.125rem;
}

/* 404 */
.error-page {
  text-align: center;
  padding: 4rem 1.25rem;
}

.error-page h1 {
  font-size: 4rem;
  margin: 0;
  color: var(--navy);
}

.error-page p {
  color: var(--text-muted);
  max-width: 28rem;
  margin: 1rem auto 2rem;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--ice);
  padding: 2.5rem 0 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
}

@media (min-width: 48rem) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--ice);
  text-decoration: none;
  font-weight: 700;
}

.footer-brand:hover {
  text-decoration: none;
  opacity: 0.95;
}

.footer-brand svg {
  width: 36px;
  height: 36px;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-nav a {
  color: var(--ice);
  text-decoration: none;
  font-weight: 600;
}

.footer-nav a:hover {
  text-decoration: underline;
  color: var(--gold);
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.9;
  width: 100%;
  text-align: center;
}

@media (min-width: 48rem) {
  .footer-copy {
    width: auto;
    text-align: right;
  }
}
