/* Main page. Shares tokens, buttons and the brand mark with styles.css. */
.home { font-size: 16px; }
.home-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1280px; margin: 0 auto; padding: 20px 32px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  grid-template-areas: "copy auth" "scene auth";
  grid-template-rows: auto 1fr;
  column-gap: 72px;
  max-width: 1280px; margin: 0 auto; padding: 36px 32px 0;
}
.hero-copy { grid-area: copy; }
.hero h1 { margin: 0; max-width: 11.5em; font-size: clamp(42px, 5.2vw, 72px); line-height: 1.02; font-weight: 500; letter-spacing: -0.035em; text-wrap: balance; }
.hero h1 span { color: var(--accent); }
.hero-lede { max-width: 33em; margin: 24px 0 0; font-size: 19px; line-height: 1.5; color: var(--text-muted); text-wrap: pretty; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--text-muted); }
.hero-facts b { color: var(--text); font-weight: 600; }

/* The two characters, talking as they do in the lessons. */
.scene { grid-area: scene; position: relative; align-self: end; height: 440px; margin: 28px 0 0; overflow: hidden; }
.scene-person { position: absolute; bottom: -34px; width: 330px; height: 330px; object-fit: contain; }
.scene-student { left: -24px; }
.scene-professor { right: -16px; }
.scene-line {
  position: absolute; z-index: 1; max-width: 300px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-float); font-size: 16px; line-height: 1.35;
}
.scene-who { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.scene-line-student { top: 8px; left: 0; }
.scene-line-student .scene-who { color: #8a5a12; }
.scene-line-professor { top: 8px; right: 0; max-width: 300px; }
.scene-line-professor .scene-who { color: var(--mint-text); }

/* Account card */
.auth {
  grid-area: auth; align-self: start; position: sticky; top: 24px;
  padding: 10px 28px 24px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-float);
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 8px -18px 24px; padding: 4px; background: var(--canvas); border-radius: 14px; }
.auth-tab { height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--text-muted); font-size: 14px; font-weight: 500; cursor: pointer; }
.auth-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft); }
.auth h2 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 500; letter-spacing: -0.02em; }
.auth-sub { margin: 6px 0 20px; color: var(--text-muted); font-size: 15px; }
.field { margin-bottom: 16px; }
.field[hidden] { display: none; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.field input {
  width: 100%; height: 46px; padding: 0 14px; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid #c9cdd8; border-radius: var(--radius-control);
}
.field input::placeholder { color: #80859a; }
.field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field input[aria-invalid="true"] { border-color: #c5352a; }
.field-hint { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); }
.field-hint[hidden] { display: none; }
.field-error { margin: 6px 0 0; font-size: 13px; color: #b42318; }
.field-error[hidden] { display: none; }
.password { position: relative; }
.password input { padding-right: 68px; }
.password button { position: absolute; top: 5px; right: 5px; height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 500; cursor: pointer; }
.password button:hover { background: var(--canvas); }
.auth-forgot { display: block; margin: 8px 0 0 auto; padding: 2px; border: 0; background: none; color: var(--accent-strong); font-size: 13px; font-weight: 500; cursor: pointer; }
.auth-forgot[hidden], .auth-message[hidden], .auth-switch button[hidden] { display: none; }
.auth-message { margin: 0 0 12px; font-size: 14px; color: var(--mint-text); }
.auth-message.is-error { color: #b42318; }
.auth-submit { width: 100%; height: 48px; justify-content: center; margin-top: 4px; font-size: 15px; }
.auth-switch { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--text-muted); }
.auth-switch button { padding: 2px; border: 0; background: none; color: var(--accent-strong); font-weight: 500; cursor: pointer; }
.auth-switch button:hover { text-decoration: underline; }
.auth-preview { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12.5px; line-height: 1.45; color: var(--text-muted); text-align: center; }

/* Course path */
.path { max-width: 1280px; margin: 0 auto; padding: 72px 32px 40px; }
.path-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 72px; align-items: end; margin-bottom: 28px; }
.path-head h2 { margin: 0; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.1; font-weight: 500; letter-spacing: -0.025em; }
.path-head p { margin: 0; color: var(--text-muted); }
.path-grid { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 16px; align-items: start; }
.stage-card { padding: 22px 24px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.stage-card h3 { margin: 0; font-size: 19px; font-weight: 500; }
.stage-card > p { margin: 2px 0 12px; font-size: 14px; color: var(--text-muted); }
.stage-card ol { margin: 0; padding: 0; list-style: none; }
.stage-card li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--border); font-size: 15px; }
.stage-card li b { flex: none; width: 26px; font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--accent-strong); }
.home-foot { max-width: 1280px; margin: 0 auto; padding: 8px 32px 36px; font-size: 13px; color: var(--text-muted); }

@media (prefers-reduced-motion: no-preference) {
  .scene-line, .auth { animation: home-rise 0.5s var(--ease) both; }
  .scene-line-professor { animation-delay: 0.18s; }
  @keyframes home-rise { from { opacity: 0; transform: translateY(10px); } }
}

@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "auth" "scene"; column-gap: 0; padding-top: 20px; }
  .hero h1 { max-width: none; }
  .auth { position: static; width: 100%; max-width: 520px; margin-top: 28px; }
  .scene { max-width: 680px; margin-top: 36px; }
  .path-head { grid-template-columns: 1fr; gap: 10px; }
  .path-grid { grid-template-columns: 1fr; }
  .path { padding-top: 48px; }
}
@media (max-width: 640px) {
  .home-bar { padding: 14px 16px; }
  .hero { padding: 14px 16px 0; }
  .hero h1 { font-size: 42px; }
  .hero-lede { font-size: 17px; margin-top: 16px; }
  .auth { padding: 8px 18px 20px; }
  .auth-tabs { margin: 6px -10px 20px; }
  .scene { height: 372px; }
  .scene-person { width: 200px; height: 200px; bottom: -20px; }
  .scene-student { left: -24px; }
  .scene-professor { right: -22px; }
  .scene-line { font-size: 14px; max-width: 220px; padding: 9px 12px; }
  .scene-line-student { top: 0; left: 0; }
  .scene-line-professor { top: 72px; right: 0; max-width: 236px; }
  .path, .home-foot { padding-left: 16px; padding-right: 16px; }
}
