:root {
  color-scheme: dark;
  --background: #090a16;
  --surface: #131629;
  --ink: #f5f4ff;
  --muted: #b5b9d0;
  --accent: #b9abff;
  --line: #2b2d45;
  --gutter: clamp(1.25rem, 4.4vw, 5rem);
  --ease-out: cubic-bezier(.2, .75, .25, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-block-start: 1.5rem;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

h1, h2, h3, p, figure, ol, ul { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
sup { line-height: 0; }

:focus-visible {
  outline: 2px solid #d3c8ff;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 5;
  inset: .75rem auto auto .75rem;
  padding: .65rem 1.1rem;
  background: var(--ink);
  color: var(--background);
  border-radius: .5rem;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.page-width {
  width: min(100% - 2 * var(--gutter), 83rem);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  min-height: 5.25rem;
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--line);
}

.wordmark, .nav-actions, .site-header nav, .demo-brand {
  display: flex;
  align-items: center;
}

.wordmark {
  gap: .55rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1;
}

.wordmark span span { color: #78acff; }
.wordmark img, .demo-brand img { object-fit: contain; }

.site-header nav {
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem clamp(.8rem, 2vw, 2rem);
  color: var(--muted);
}

.site-header nav a, .login {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: .9rem;
  font-weight: 600;
}

.site-header nav a:hover, .login:hover { color: var(--ink); }
.nav-actions { gap: clamp(.7rem, 2vw, 1.5rem); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: .7rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 700;
  text-align: center;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.button-nav {
  min-height: 2.75rem;
  padding: .5rem 1.05rem;
  font-size: .875rem;
  background: #191a30;
  border-color: #383b58;
}

.button-primary {
  color: #10122b;
  background: linear-gradient(115deg, #dfc9ff, #a0b8ff);
  box-shadow: 0 .5rem 1.75rem #7875ff33, inset 0 1px 0 #ffffffa0;
}

.button-primary:hover { box-shadow: 0 .5rem 2rem #8c8aff70, inset 0 1px 0 #fff; }

.button-secondary {
  background: #17192c;
  border-color: #414360;
}

.button-secondary:hover, .button-nav:hover {
  background-color: #262843;
  border-color: #77739e;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  border-bottom: 1px solid var(--line);
}

.hero-scene {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 25% 100%, #28153f, transparent 57%),
    radial-gradient(ellipse at 78% 52%, #202359, transparent 69%),
    linear-gradient(155deg, #090a16 20%, #100d25 78%, #12142b);
}

.hero-scene::before, .hero-scene::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-scene::before {
  inset: -15% -8%;
  background:
    radial-gradient(ellipse 33% 42% at 72% 52%, #574bd675, transparent),
    radial-gradient(ellipse 31% 24% at 82% 68%, #366dd657, transparent);
}

.hero-scene::after {
  inset: 28% -22% -48%;
  border-top: 1px solid #a1a2ff2c;
  border-radius: 50% 50% 0 0;
  background: linear-gradient(165deg, #817aff14, #2e1a4a12 58%, transparent);
  box-shadow: 0 -1.25rem 6rem #6554ea19;
  transform: translateY(18%) rotate(-10deg);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr);
  align-items: center;
  gap: clamp(1.75rem, 4vw, 5rem);
  min-height: clamp(36rem, 53vw, 49rem);
  padding-block: clamp(4rem, 7vw, 7.5rem);
}

.eyebrow {
  color: var(--accent);
  font-size: .82rem;
  font-weight: 750;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.hero-kicker::before {
  content: "";
  width: 1.45rem;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

.hero h1 {
  margin-top: 1.3rem;
  font-size: clamp(2.9rem, 4.65vw, 4.85rem);
  font-weight: 760;
  line-height: 1.015;
  letter-spacing: -.073em;
}

.hero h1 span {
  display: block;
  padding: 0 .075em .09em 0;
  color: #c0b9ff;
  background: linear-gradient(100deg, #e5c2ff, #aeaaff 55%, #8cc8ff);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  width: fit-content;
  max-width: 100%;
}

.hero-description {
  margin-top: 1.25rem;
  max-width: 38ch;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.45vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.85rem;
}

.hero-details {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.1rem;
  margin-top: 1.8rem;
  padding: 0;
  color: #c3c5dc;
  font-size: .875rem;
  list-style: none;
}

.hero-details li {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.hero-details li::before {
  content: "";
  inline-size: .38rem;
  block-size: .38rem;
  border-radius: 50%;
  background: #a99aff;
}

/* Laptop and worked example */
.demo { min-width: 0; container-type: inline-size; }

.demo-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .9rem 1rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #d7d2f1;
}

.demo-indicator {
  inline-size: .48rem;
  block-size: .48rem;
  border-radius: 50%;
  background: #ac96ff;
  box-shadow: 0 0 .8rem #b096ffb0;
}

.laptop-art {
  perspective: 80rem;
  padding: .25rem .85rem .55rem;
}

.laptop {
  transform: rotateX(4deg) rotateY(-8deg) rotateZ(-2deg);
  transform-origin: center bottom;
}

.laptop-lid {
  position: relative;
  padding: clamp(.55rem, 1.9cqw, .95rem) clamp(.46rem, 1.75cqw, .85rem) clamp(.48rem, 1.8cqw, .9rem);
  border: 1px solid #67668d;
  border-radius: clamp(.8rem, 3cqw, 1.5rem) clamp(.8rem, 3cqw, 1.5rem) .52rem .52rem;
  background: linear-gradient(135deg, #555576, #1c1f35 23%, #121525 68%, #575379);
  box-shadow: 0 0 3rem #6a5ed14a, 0 1.8rem 4rem #0303108f, inset 0 1px 1px #d6d4ff55;
}

.laptop-lid::before {
  content: "";
  position: absolute;
  inset: .25rem auto auto 50%;
  width: .25rem;
  height: .25rem;
  border-radius: 50%;
  background: #8789ae;
}

.laptop-screen {
  overflow: hidden;
  border-radius: clamp(.45rem, 1.65cqw, .9rem);
  border: 1px solid #111321;
  background: #14172b;
  font-size: clamp(.8125rem, 2.15cqw, .95rem);
  line-height: 1.38;
}

.demo-bar, .demo-workspace {
  padding: clamp(.65rem, 2.8cqw, 1.2rem);
}

.demo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .35rem .8rem;
  padding-block: clamp(.45rem, 2cqw, .85rem);
  background: #101225;
  border-bottom: 1px solid #30324d;
}

.demo-brand { gap: .3rem; font-weight: 750; }
.demo-topic { color: #c1c4df; }

.demo-workspace {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(.55rem, 2.25cqw, 1rem);
  background: linear-gradient(145deg, #1b1f3a, #15162a 58%, #201e40);
}

.demo-input, .demo-solution {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: clamp(.55rem, 2.25cqw, 1rem);
}

.demo-solution {
  align-content: space-between;
  padding: clamp(.55rem, 2.2cqw, 1rem);
  background: #27254b;
  border: 1px solid #534b88;
  border-radius: .7rem;
}

.demo-stage { min-width: 0; }
.demo-heading { font-size: inherit; font-weight: 700; }

.demo-paper {
  margin-top: .55rem;
  padding: clamp(.5rem, 3.15cqw, 1.2rem);
  color: #231e37;
  background: repeating-linear-gradient(0deg, #f3efff 0 1.24rem, #e2dcf5 1.24rem 1.3rem);
  border-radius: .55rem;
  box-shadow: 0 .4rem 1rem #0a0a2070;
}

.paper-label {
  display: block;
  margin-bottom: .5rem;
  color: #58437a;
  font-size: .75rem;
  font-weight: 750;
}

.equation {
  font-family: "Cambria Math", Cambria, Georgia, serif;
  font-size: 1.1em;
  line-height: 1.25;
}

.demo-paper .equation {
  margin-bottom: .22rem;
  font-size: clamp(1rem, 4.15cqw, 1.7rem);
}

.stage-analysis {
  padding: clamp(.5rem, 2cqw, .8rem);
  border: 1px solid #42456b;
  border-radius: .6rem;
  background: #171a32;
}

.stage-analysis p { margin-top: .25rem; color: #c4c7e3; }

.demo-steps {
  display: grid;
  gap: clamp(.5rem, 2.5cqw, 1rem);
  margin-top: .75rem;
  padding: 0;
  list-style: none;
}

.demo-steps li { display: flex; align-items: flex-start; gap: .5rem; }
.demo-steps li > div { min-width: 0; }

.demo-steps li > span {
  display: grid;
  flex: 0 0 1.25rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: #f6ecff;
  background: #514986;
  font-size: .75rem;
}

.demo-steps .equation { margin-top: .2rem; color: #dedcff; }

.demo-answer {
  padding: clamp(.45rem, 1.8cqw, .75rem);
  border: 1px solid #8d81db;
  border-radius: .5rem;
  background: linear-gradient(110deg, #443b7c, #39386c);
}

.demo-answer .demo-heading { color: #e3dbff; }

.demo-answer .equation {
  margin-top: .16rem;
  font-size: clamp(1rem, 3.85cqw, 1.55rem);
}

.laptop-base {
  position: relative;
  height: clamp(.6rem, 2.65cqw, 1.2rem);
  width: 108%;
  margin: -1px 0 0 -4%;
  border-radius: 21% 21% 50% 50% / 60% 60% 100% 100%;
  background: linear-gradient(180deg, #9f9cbb 0, #646583 22%, #31354e 65%, #1a1b2e);
  box-shadow: 0 .95rem 2rem #03030cc9;
}

.laptop-base::before {
  content: "";
  position: absolute;
  inset: 0 41% auto;
  height: 39%;
  border-radius: 0 0 .75rem .75rem;
  background: #35364f;
}

.demo-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.1rem;
  gap: .45rem .8rem;
  padding: 0;
  color: #b8b9d6;
  font-size: .8125rem;
  list-style: none;
}

.demo-progress li { display: flex; align-items: center; gap: .4rem; }

.demo-progress li::before {
  content: "";
  inline-size: .35rem;
  block-size: .35rem;
  border-radius: 50%;
  background: #8e86c1;
}

.demo-progress .is-current { color: #f5eeff; }

.demo-progress .is-current::before {
  background: #d3bcff;
  box-shadow: 0 0 .7rem #bba2ff;
}

/* Walkthrough and feature sections */
.workflow {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(2rem, 8vw, 8rem);
  padding-block: clamp(4.25rem, 9vw, 8.5rem);
}

.workflow-intro {
  position: sticky;
  top: 3rem;
}

.workflow h2, .features h2, .about h2 {
  margin-top: .7rem;
  font-size: clamp(2.35rem, 4.5vw, 4.25rem);
  font-weight: 720;
  line-height: 1.06;
  letter-spacing: -.06em;
  text-wrap: balance;
}

.workflow-intro > p:not(.eyebrow), .about-panel > p:not(.eyebrow) {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 1.0625rem;
  max-width: 42ch;
}

.workflow-intro .button, .about-panel .button { margin-top: 1.45rem; }

.workflow-steps {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.workflow-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(.85rem, 2.25vw, 1.75rem);
  align-items: start;
  padding-block: clamp(1.4rem, 3.6vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.step-number {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid #4c427d;
  border-radius: .7rem;
  background: #211d3a;
  color: #d5c5ff;
  font-size: 1rem;
  font-weight: 700;
}

.workflow-step h3, .feature-panel h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  font-weight: 720;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.workflow-step p, .feature-panel > p:not(.eyebrow) {
  margin-top: .6rem;
  max-width: 50ch;
  color: var(--muted);
}

.features { padding-bottom: clamp(4rem, 8vw, 7.5rem); }
.section-intro { margin-bottom: clamp(1.45rem, 3vw, 2.75rem); }

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(.75rem, 2vw, 1.75rem);
}

.feature-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.45rem, 4vw, 3.5rem);
  border: 1px solid #3d3d5b;
  border-radius: 1.45rem;
  background-color: var(--surface);
}

.feature-panel h3 {
  margin-top: .65rem;
  font-size: clamp(1.7rem, 3vw, 2.75rem);
  letter-spacing: -.055em;
  text-wrap: balance;
}

.curriculum {
  background-image:
    radial-gradient(ellipse at 94% 2%, #5841877d, transparent 56%),
    linear-gradient(155deg, #1d1b36, #111327 75%);
}

.languages {
  background-image:
    radial-gradient(ellipse at 97% 95%, #365fa264, transparent 61%),
    linear-gradient(150deg, #18213a, #14172b 80%);
}

.subject-tags, .language-examples {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: auto;
  padding: 1.45rem 0 0;
  list-style: none;
}

.subject-tags li, .language-examples li {
  border: 1px solid #45476b;
  border-radius: .7rem;
  color: #e3e0f6;
  background: #20213d;
  font-size: .875rem;
}

.subject-tags li {
  padding: .42rem .72rem;
  border-radius: 999px;
}

.language-examples li {
  padding: .5rem .65rem;
  background: #191f38;
}

.language-examples li span {
  display: block;
  color: #b2c5ff;
  font-size: .75rem;
  font-weight: 700;
}

.about { padding-bottom: clamp(3.5rem, 7vw, 6.5rem); }

.about-panel {
  display: grid;
  justify-items: center;
  padding: clamp(2.5rem, 8vw, 7rem) clamp(1.1rem, 5.5vw, 4.75rem);
  border: 1px solid #414164;
  border-radius: 1.65rem;
  text-align: center;
  background:
    radial-gradient(ellipse 55% 125% at 17% 115%, #3d2461, transparent),
    radial-gradient(ellipse 65% 120% at 89% -20%, #35427c, transparent),
    #15162b;
}

.about-panel h2 { max-width: 20ch; }
.about-panel > p:not(.eyebrow) { max-width: 53ch; }

.site-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
}

.site-footer strong { color: var(--ink); }
.site-footer p + p { margin-top: .25rem; }

/* Motion is opt-in through the browser preference and leaves the full example readable. */
@media (prefers-reduced-motion: no-preference) {
  .hero-scene::after { animation: light-sweep 4.2s var(--ease-out) both; }

  .demo.is-playing .laptop-art {
    animation: laptop-float 6s ease-in-out infinite;
  }

  .demo.is-playing .demo-stage {
    transition: opacity .35s ease, transform .35s var(--ease-out);
  }

  .demo.is-playing .demo-stage:not(.is-visible) {
    opacity: 0;
    transform: translateY(.3rem);
  }

  .is-revealed { animation: reveal .65s var(--ease-out) both; }
  .is-revealed:focus-within { animation: none; }

  @supports (animation-timeline: scroll()) {
    .hero-scene::before {
      animation: light-parallax linear both;
      animation-timeline: scroll(root block);
      animation-range: 0px 45rem;
    }
  }
}

@keyframes light-sweep {
  from { opacity: .38; transform: translateY(28%) rotate(-7deg); }
  to { opacity: 1; transform: translateY(18%) rotate(-10deg); }
}

@keyframes light-parallax { to { transform: translateY(10%); } }

@keyframes laptop-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-.5rem); }
}

@keyframes reveal {
  from { opacity: .75; transform: translateY(.65rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 66rem) {
  .hero-layout { gap: clamp(1.6rem, 3vw, 2.75rem); }
  .hero h1 { font-size: clamp(2.75rem, 4.65vw, 4.35rem); }
}

@media (max-width: 57rem) {
  .site-header { gap: .25rem 1rem; padding-block: .65rem .35rem; }
  .site-header nav { order: 1; flex-basis: 100%; justify-content: flex-start; }
  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.6rem;
    min-height: 0;
    padding-block: clamp(3rem, 8vw, 5rem) 2.5rem;
  }
  .hero h1 { font-size: clamp(2.9rem, 8vw, 4.85rem); max-width: 14ch; }
  .hero-description { max-width: 44ch; }
  .demo { width: min(100%, 41rem); margin-inline: auto; }
}

@media (max-width: 43rem) {
  .workflow, .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .workflow-intro { position: static; }
  .site-footer { flex-direction: column; }
}

@media (max-width: 31rem) {
  .site-header nav { gap: .1rem .75rem; }
  .site-header nav a { font-size: .8125rem; }
  .site-header .wordmark { font-size: 1.35rem; }
  .wordmark img { width: 1.7rem; height: auto; }
  .nav-actions { gap: .6rem; }
  .nav-actions .button { padding-inline: .72rem; }
  .hero h1 { max-width: none; font-size: clamp(2rem, 8.7vw, 3.45rem); }
  .hero-actions { margin-top: 1.4rem; }
  .hero-details { margin-top: 1.25rem; }
  .laptop { transform: none; }
  .laptop-art { padding-inline: .55rem; }
  .demo-label { margin-left: .55rem; }
  .demo-steps li { gap: .35rem; }
}

@media (max-width: 23rem) {
  .site-header { column-gap: .55rem; }
  .site-header .wordmark { gap: .4rem; font-size: 1.22rem; }
  .site-header nav { justify-content: space-between; gap: .3rem; }
  .site-header nav a { font-size: .75rem; }
  .nav-actions { gap: .45rem; }
  .hero-actions .button { padding-inline: .7rem; }
}

@container (max-width: 22rem) {
  .demo-workspace { grid-template-columns: minmax(0, 1fr); }
  .demo-workspace, .demo-bar { padding-inline: .55rem; }
  .demo-input { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}

@media (forced-colors: active) {
  .hero h1 span {
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}
