:root {
  --black: #000;
  --white: #fff;
  --muted: rgba(0, 0, 0, 0.5);
  --card-bg: #f9f9f9;
  --card-border: #e6e6e6;
  --outline: #9e9e9e;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
  line-height: 1.2;
}

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

main {
  padding: 0 16px 160px;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 123px;
}

.app-icon {
  width: 86px;
  height: 86px;
  border: 9.556px solid rgba(0, 0, 0, 0.08);
  border-radius: 20.574px;
  overflow: hidden;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-name {
  margin-top: 12px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 542px;
  margin-top: 30px;
  text-align: center;
}

.hero-copy h1 {
  font-size: clamp(40px, 8vw, 60px);
  letter-spacing: -0.04em;
}

.lead {
  margin-top: -12px; /* 20px gap between title and subtitle */
  font-size: clamp(18px, 4vw, 24px);
  letter-spacing: -0.04em;
  color: var(--muted);
}

.hero-note {
  max-width: 420px;
  margin-top: -12px; /* 20px below the download button */
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 242px;
  height: 64px;
  padding: 0 32px;
  border-radius: 300px;
  background: var(--black);
  color: var(--white);
  font-size: 24px;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.btn-primary svg {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: -3px; /* the Apple logo sits low in its box */
}

a.btn-primary:hover {
  background: #333;
}

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

/* Answer popup preview */
.answer-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  max-width: 485px;
  min-height: 294px;
  margin-top: 75px;
  padding: 34px 26px 26px;
  border-radius: 32px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--white);
}

.answer-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.answer-label {
  font-size: 20px;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.5);
}

.answer-text {
  font-size: clamp(20px, 5vw, 24px);
  letter-spacing: -0.04em;
}

.hints {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-system);
  font-weight: 510;
}

.hint {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hint kbd {
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.75);
  font-family: inherit;
  font-size: 14px;
}

.hint span {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Section headings ---------- */
.section-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 890px;
  margin: 0 auto;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(30px, 6vw, 40px);
  letter-spacing: -0.04em;
}

.section-heading .sub {
  font-size: clamp(18px, 4vw, 24px);
  letter-spacing: -0.04em;
  color: var(--muted);
}

/* ---------- Feature ---------- */
.feature {
  margin-top: 201px;
}

.mockup {
  position: relative;
  max-width: 1194px;
  margin: 14px auto 0;
}

.mockup img {
  width: 100%;
  height: auto;
}

/* Covers a strip of the screenshot, matching the Figma frame */
.mockup-mask {
  position: absolute;
  left: 61.04%;
  top: 11.18%;
  width: 28.37%;
  height: 1.74%;
  background: #0a0a0b;
}

/* ---------- Pricing ---------- */
.pricing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  margin-top: 201px;
}

.plans {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

.plan {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  padding: 48px 40px;
  border: 1.5px solid var(--card-border);
  border-radius: 24px;
  background: var(--card-bg);
}

.plan h3 {
  font-size: 32px;
  letter-spacing: -0.04em;
}

.plan-desc {
  min-height: 40px;
  margin-top: 12px;
  font-size: 17px;
  letter-spacing: -0.04em;
  color: var(--muted);
}

.plan-price {
  margin-top: 40px;
  font-size: 40px;
  letter-spacing: -0.04em;
}

.plan-meta {
  margin-top: 10px;
  margin-right: -20px; /* lets the line run into the side padding like the design */
  font-size: 17px;
  letter-spacing: -0.04em;
  color: var(--muted);
}

.plans-note {
  margin-top: 28px;
  text-align: center;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.btn-outline {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin-top: 28px;
  padding: 18px;
  border: 1.5px solid var(--outline);
  border-radius: 999px;
  background: transparent;
  color: var(--black);
  font-family: var(--font);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.04em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-outline:hover {
  background: rgba(0, 0, 0, 0.04);
}

@media (max-width: 600px) {
  .hero {
    padding-top: 64px;
  }

  .feature,
  .pricing {
    margin-top: 120px;
  }

  .plan {
    padding: 36px 28px;
  }

  .plan-meta {
    margin-right: 0;
  }
}

/* ---------- Teacher verification (section; popup built by verify.js) ---------- */
.verify-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  margin-top: 201px;
}

.verify-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 1000px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: verify-step;
}

.verify-steps li {
  counter-increment: verify-step;
  padding: 36px 32px;
  border: 1.5px solid var(--card-border);
  border-radius: 24px;
  background: var(--card-bg);
}

.verify-steps li::before {
  content: counter(verify-step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-size: 17px;
}

.verify-steps h3 {
  margin-top: 24px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.verify-steps p {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--muted);
}

button.btn-primary {
  border: 0;
  font-family: var(--font);
  font-weight: 700;
  cursor: pointer;
}

button.btn-primary:hover {
  background: #333;
}

/* Popup */
.verify {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 48px 44px 40px;
  border: 1.5px solid var(--card-border);
  border-radius: 28px;
  background: var(--white);
  color: var(--black);
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
}

.verify::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.verify[open] {
  animation: verify-in 0.2s ease;
}

@keyframes verify-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.verify-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  padding: 8px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.verify-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--black);
}

.verify-close svg {
  width: 24px;
  height: 24px;
}

.verify-status {
  display: none;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #1a9e45;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.verify.is-after-download .verify-status {
  display: inline-flex;
}

.verify-status svg {
  width: 20px;
  height: 20px;
}

.verify h2 {
  font-size: clamp(28px, 5vw, 36px);
  letter-spacing: -0.04em;
}

.verify-intro {
  max-width: 480px;
  margin: 14px auto 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.verify-intro b {
  color: var(--black);
}

.verify-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
  margin-top: 32px;
  text-align: left;
}

.verify-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.verify-wide {
  grid-column: 1 / -1;
}

.verify-field small {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.verify-field small.is-error {
  color: #d93025;
}

/* Bot trap: off-screen, so only scripts that fill every field ever set it. */
.verify-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.verify-error {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #d93025;
}

.verify-field input:not([type="file"]),
.verify-field select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--black);
  font-family: var(--font-system);
  font-size: 16px;
  font-weight: 400;
}

.verify-field select:invalid {
  color: var(--muted);
}

.verify-field input:focus-visible,
.verify-field select:focus-visible,
.verify-file:focus-within {
  outline: 2px solid var(--black);
  outline-offset: 1px;
}

.verify-form.was-checked input:invalid,
.verify-form.was-checked select:invalid,
.verify-form.was-checked .verify-file:has(input:invalid) {
  border-color: #d93025;
}

/* File picker: the real input is invisible on top, so clicking anywhere opens it. */
.verify-file {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 14px 8px 8px;
  border: 1.5px dashed var(--outline);
  border-radius: 12px;
  cursor: pointer;
}

.verify-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.verify-file-button {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  font-size: 15px;
}

.verify-file-button svg {
  width: 18px;
  height: 18px;
}

.verify-file-name {
  overflow: hidden;
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
}

.verify-consent {
  padding: 16px 18px;
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg);
}

.verify-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
}

.verify-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--black);
}

.verify-form.was-checked .verify-check input:invalid + span {
  color: #d93025;
}

.verify-consent dl {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 0 28px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
}

.verify-consent dl div {
  display: grid;
  grid-template-columns: 8em 1fr;
  gap: 8px;
}

.verify-consent dt {
  font-weight: 700;
}

.verify-consent dd {
  margin: 0;
}

.verify-submit,
.verify-done-button {
  width: 100%;
  height: 56px;
  margin-top: 6px;
  font-size: 20px;
}

.verify-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.verify-done-icon {
  display: inline-flex;
  color: #1a9e45;
}

.verify-done-icon svg {
  width: 56px;
  height: 56px;
}

.verify-done-view h2 {
  margin-top: 12px;
}

.verify-done-view .verify-done-button {
  margin-top: 32px;
}

@media (max-width: 600px) {
  .verify-section {
    margin-top: 120px;
  }

  .verify-steps {
    grid-template-columns: 1fr;
  }

  .verify {
    padding: 44px 20px 28px;
  }

  .verify-form {
    grid-template-columns: 1fr;
  }

  .verify-consent dl {
    margin-left: 0;
  }

  .verify-consent dl div {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Typewriter ---------- */
.answer-text[data-typewriter] {
  min-height: 2.4em; /* keep two lines reserved while typing */
}

.tw-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.12em;
  background: currentColor;
  animation: tw-blink 1s steps(1) infinite;
}

@keyframes tw-blink {
  50% {
    opacity: 0;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 16px 48px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
}

.site-footer a {
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--muted);
  text-decoration: none;
}

.site-footer .copyright {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--black);
}

/* ---------- Pricing page ---------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 16px 0;
}

.header-download {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-size: 15px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.header-download:hover {
  background: #333;
}

.pricing-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  padding-top: 96px;
}

.pricing-page h1 {
  font-size: clamp(36px, 7vw, 56px);
  letter-spacing: -0.04em;
}

.plan-period {
  font-size: 17px;
  color: var(--muted);
}

.plan-features {
  margin: 28px 0 0;
  padding: 24px 0 0;
  border-top: 1.5px solid var(--card-border);
  list-style: none;
}

.plan-features li {
  position: relative;
  padding-left: 26px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: rgba(0, 0, 0, 0.75);
}

.plan-features li + li {
  margin-top: 10px;
}

.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--black);
}

.pricing-faq {
  width: 100%;
  max-width: 680px;
}

.pricing-faq h2 {
  font-size: clamp(24px, 5vw, 32px);
  letter-spacing: -0.04em;
  text-align: center;
}

.pricing-faq dl {
  margin: 32px 0 0;
}

.pricing-faq dt {
  margin-top: 24px;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.pricing-faq dd {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.75);
}

.pricing-faq a {
  color: var(--black);
}

@media (max-width: 600px) {
  .pricing-page {
    padding-top: 56px;
  }
}

/* ---------- Legal pages ---------- */
.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: 64px 16px 120px;
  font-weight: 400;
}

.legal-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.04em;
  color: var(--black);
  text-decoration: none;
}

.legal-home img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.legal h1 {
  margin-top: 56px;
  font-size: clamp(32px, 6vw, 40px);
  letter-spacing: -0.04em;
}

.legal-date {
  margin-top: 12px;
  font-size: 15px;
  color: var(--muted);
}

.legal h2 {
  margin-top: 40px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.legal p,
.legal li {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(0, 0, 0, 0.75);
}

.legal p {
  margin-top: 12px;
}

.legal ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.legal li + li {
  margin-top: 6px;
}

.legal strong {
  font-weight: 700;
  color: var(--black);
}

.legal a:not(.legal-home) {
  color: var(--black);
}
