/* TODAcademy — Type on Data brand stylesheet.
   Hand-maintained (no build step on 20i). Tokens follow the Type on Data
   design system: navy anchor, teal action, lime highlight (never as text on
   white), purple as the academy accent. Montserrat throughout. */

:root {
  --navy: #16234F;
  --navy-700: #1E2F66;
  --navy-50: #F0F2F8;
  --teal: #16968D;
  --teal-700: #12827A;
  --lime: #BBD043;
  --purple: #530B63;
  --pink: #BB235E;
  --ink: #231F20;
  --grey-600: #5A5F6E;
  --grey-300: #C9CDD8;
  --grey-100: #EEF0F4;
  --surface: #FFFFFF;
  --radius: 8px;
  --radius-card: 12px;
  --shadow-md: 0 4px 16px rgba(22, 35, 79, 0.10);
  --shadow-lg: 0 10px 32px rgba(22, 35, 79, 0.14);
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.65;
}

h1, h2, h3, h4 {
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Eyebrow labels */
.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin-bottom: 0.75rem;
}

.on-navy .eyebrow { color: var(--lime); }

/* Block motif: three stepped squares from the logo's pixel dissolve. */
.blocks { display: inline-block; line-height: 0; }
.blocks span {
  display: inline-block;
  width: 14px;
  height: 14px;
}
.blocks span:nth-child(1) { background: var(--navy); }
.blocks span:nth-child(2) { background: var(--teal); transform: translateY(-7px); }
.blocks span:nth-child(3) { background: var(--lime); transform: translateY(-14px); }

/* Buttons */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 160ms var(--ease), transform 120ms var(--ease);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(22, 150, 141, 0.4); outline-offset: 2px; }

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

.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--grey-300);
}
.btn-outline:hover { background: var(--navy-50); }

.btn-block { display: block; width: 100%; text-align: center; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--grey-100);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand .academy { color: var(--purple); }
.brand img { height: 48px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.site-nav a { color: var(--navy); font-weight: 600; font-size: 0.95rem; }
.site-nav form { margin: 0; }
.site-nav button {
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--grey-600);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.site-nav button:hover { color: var(--navy); }

/* Sections */
.section { padding: 72px 0; }
.section-navy { background: var(--navy); color: #fff; }
.section-navy h1, .section-navy h2, .section-navy h3 { color: #fff; }
.section-tint { background: var(--navy-50); }

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--grey-100);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}
.card-accent { border-top: 4px solid var(--purple); }
.card h3 a { color: var(--navy); }

.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin: 2rem 0 0;
}

/* Progress bar */
.progress {
  height: 8px;
  background: var(--grey-100);
  border-radius: 999px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: 999px;
}
.progress-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--grey-600);
  margin-top: 0.4rem;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.badge-teal { background: rgba(22, 150, 141, 0.12); color: var(--teal-700); }
.badge-purple { background: rgba(83, 11, 99, 0.10); color: var(--purple); }
.badge-done { background: rgba(22, 150, 141, 0.12); color: var(--teal-700); }
.badge-navy { background: var(--navy-50); color: var(--navy); }

/* Flash messages */
.flash {
  border-left: 4px solid var(--teal);
  background: rgba(22, 150, 141, 0.08);
  color: var(--navy);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  font-weight: 600;
}

/* Forms */
.form-field { margin-bottom: 1.25rem; }
.form-field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="password"] {
  width: 100%;
  font: inherit;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.form-field input:focus {
  outline: 3px solid rgba(22, 150, 141, 0.3);
  border-color: var(--teal);
}
.form-error { color: var(--pink); font-size: 0.85rem; font-weight: 600; margin-top: 0.3rem; }

/* Auth card */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--navy);
  padding: 2rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
}
.auth-card .brand { font-size: 1.3rem; margin-bottom: 1.5rem; }
.auth-card .brand img { height: 56px; }
.auth-links { margin-top: 1.25rem; font-size: 0.9rem; }

/* Course page structure */
.module {
  border: 1px solid var(--grey-100);
  border-radius: var(--radius-card);
  margin-bottom: 1.25rem;
  overflow: hidden;
}
.module-head {
  background: var(--navy-50);
  padding: 1rem 1.4rem;
}
.module-head h3 { margin: 0; }
.module-head p { margin: 0.3rem 0 0; color: var(--grey-600); font-size: 0.92rem; }
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.4rem;
  border-top: 1px solid var(--grey-100);
}
.lesson-list .meta { color: var(--grey-600); font-size: 0.85rem; white-space: nowrap; }

/* Lesson player */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--navy);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.lesson-body { max-width: 760px; }
.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey-100);
}

/* Quiz */
.question {
  border: 1px solid var(--grey-100);
  border-radius: var(--radius-card);
  padding: 1.4rem;
  margin-bottom: 1.25rem;
}
.question h3 { margin-bottom: 0.9rem; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
}
.option:hover { background: var(--navy-50); }
.option input { margin-top: 0.35rem; accent-color: var(--teal); }
.option-correct { background: rgba(22, 150, 141, 0.10); }
.option-wrong { background: rgba(187, 35, 94, 0.08); }
.explanation {
  font-size: 0.9rem;
  color: var(--grey-600);
  border-left: 3px solid var(--grey-300);
  padding-left: 0.9rem;
  margin-top: 0.75rem;
}

/* Result banner */
.result-banner {
  border-radius: var(--radius-card);
  padding: 2rem;
  margin-bottom: 2rem;
  color: #fff;
  background: var(--navy);
}
.result-banner .score {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--lime);
  line-height: 1;
}

/* Landing hero */
.hero { padding: 96px 0; }
.hero .lead { font-size: 1.15rem; max-width: 620px; color: rgba(255, 255, 255, 0.85); }
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero .btn-primary { background: var(--lime); color: var(--navy); }
.hero .btn-primary:hover { background: #A9BC3A; }

.stat { text-align: left; }
.stat .figure { font-size: 2.6rem; font-weight: 800; color: var(--lime); line-height: 1; }
.stat .caption { color: rgba(255, 255, 255, 0.8); font-size: 0.95rem; margin-top: 0.4rem; }

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 2.5rem 0;
  margin-top: 96px;
  font-size: 0.9rem;
}
.site-footer a { color: #fff; }
.site-footer .inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .hero { padding: 64px 0; }
  .site-nav { gap: 0.9rem; }
  .lesson-nav { flex-direction: column; }
}
