/* Home hero: marketing preview using the shared UI token stack. */

.home-hero {
  --home-hero-surface-glass: color-mix(in srgb, var(--ui-surface-raised) 92%, transparent);
  --home-hero-stage-bg: linear-gradient(180deg, var(--ui-surface-raised), var(--ui-surface-muted));
  --home-hero-block-info: var(--ui-color-action-muted);
  --home-hero-block-warning: var(--ui-primitive-warning-50);
  --home-hero-block-success: var(--ui-primitive-success-50);
  --home-hero-block-accent: color-mix(in srgb, var(--ui-color-action-muted) 70%, var(--ui-surface-raised));

  position: relative;
}

.home-hero__title {
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 700;
}

.home-hero__subtitle {
  font-size: 1.125rem;
  color: var(--ui-text-secondary);
}

.home-hero__highlights li {
  display: flex;
  align-items: center;
  margin-bottom: var(--ui-space-2);
  color: var(--ui-text-primary);
}

.home-hero__highlight-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--ui-radius-pill);
  background: var(--ui-color-action);
  margin-right: 10px;
}

.home-hero__builder-stage,
.home-hero__student-stage {
  position: relative;
  min-height: 360px;
  padding: var(--ui-space-4);
  overflow: hidden;
  border-radius: var(--ui-radius-lg);
  background: var(--home-hero-stage-bg);
  box-shadow: var(--ui-shadow-md);
}

.home-hero__builder-stack {
  position: absolute;
  inset: 16px 220px 16px 16px;
  display: grid;
  grid-template-rows: repeat(5, minmax(40px, 1fr));
  gap: 10px;
}

.home-hero__builder-block,
.home-hero__student-card {
  border: 1px solid var(--ui-border-subtle);
  border-radius: var(--ui-radius-md);
  background: var(--ui-surface-raised);
  color: var(--ui-text-primary);
  box-shadow: var(--ui-shadow-sm);
  transform: translateY(20px);
  opacity: 0;
}

.home-hero__builder-block {
  padding: 10px 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  animation: home-hero-block-in var(--ui-home-hero-block-animation);
}

.home-hero__builder-block--video {
  background: var(--home-hero-block-info);
}

.home-hero__builder-block--quiz {
  background: var(--home-hero-block-warning);
}

.home-hero__builder-block--code {
  background: var(--home-hero-block-success);
}

.home-hero__builder-block--doc,
.home-hero__student-card--motiv {
  background: var(--home-hero-block-accent);
}

.home-hero__builder-block[data-block="text"] { animation-delay: var(--ui-home-hero-block-delay-1); }
.home-hero__builder-block[data-block="video"] { animation-delay: var(--ui-home-hero-block-delay-2); }
.home-hero__builder-block[data-block="quiz"] { animation-delay: var(--ui-home-hero-block-delay-3); }
.home-hero__builder-block[data-block="code"] { animation-delay: var(--ui-home-hero-block-delay-4); }
.home-hero__builder-block[data-block="doc"] { animation-delay: var(--ui-home-hero-block-delay-5); }

@keyframes home-hero-block-in {
  0% { transform: translateY(24px) scale(0.98); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.home-hero__assistant-mock,
.home-hero__student-mock {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ui-border-subtle);
  border-radius: var(--ui-radius-lg);
  background: var(--home-hero-surface-glass);
  box-shadow: var(--ui-shadow-md);
}

.home-hero__assistant-mock {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 200px;
  height: calc(100% - 36px);
}

.home-hero__assistant-header,
.home-hero__student-header {
  padding: 8px;
  border-bottom: 1px solid var(--ui-border-subtle);
}

.home-hero__assistant-tabs,
.home-hero__student-tabs,
.home-hero__student-stats {
  display: flex;
  gap: 6px;
}

.home-hero__student-stats {
  gap: 12px;
  margin-bottom: 8px;
}

.home-hero__assistant-tab,
.home-hero__student-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--ui-radius-sm);
  background: var(--ui-surface-muted);
  color: var(--ui-text-primary);
  cursor: default;
  user-select: none;
}

.home-hero__assistant-tab {
  width: 26px;
  height: 26px;
  font-size: 0.88rem;
}

.home-hero__student-tab {
  width: 28px;
  height: 28px;
  font-size: 1rem;
}

.home-hero__assistant-tab.is-active {
  background: var(--ui-color-action);
  color: var(--ui-text-inverse);
}

.home-hero__student-tab.is-active {
  background: var(--ui-color-success);
  color: var(--ui-text-inverse);
}

.home-hero__assistant-body,
.home-hero__student-body {
  padding: 10px;
  flex: 1;
  background: var(--ui-surface-raised);
}

.home-hero__assistant-screen,
.home-hero__student-screen {
  display: none;
}

.home-hero__assistant-screen.is-active,
.home-hero__student-screen.is-active {
  display: block;
}

.home-hero__typing {
  color: var(--ui-text-secondary);
  position: relative;
}

.home-hero__typing::after {
  content: "|";
  margin-left: 3px;
  color: var(--ui-color-action);
  animation: home-hero-cursor var(--ui-home-hero-cursor-animation);
}

@keyframes home-hero-cursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.home-hero__code-line,
.home-hero__doc-line,
.home-hero__calc-line {
  font-family: var(--ui-font-mono);
  font-size: 0.9rem;
  color: var(--ui-text-primary);
}

.home-hero__student-mock {
  position: relative;
  width: 100%;
  height: 100%;
}

.home-hero__student-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.home-hero__student-stat-number {
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.home-hero__student-stat-label,
.home-hero__student-card-subtitle {
  color: var(--ui-text-muted);
  font-size: 0.85rem;
}

.home-hero__student-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  height: 300px;
}

.home-hero__student-screen {
  height: 100%;
}

.home-hero__student-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  height: 100%;
}

.home-hero__student-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 0;
  padding: 12px;
  animation: home-hero-card-in var(--ui-home-hero-card-animation);
}

.home-hero__student-card + .home-hero__student-card {
  animation-delay: var(--ui-home-hero-card-delay);
}

.home-hero__student-card--motiv {
  justify-content: center;
  align-items: flex-start;
}

.home-hero__student-card-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.home-hero__student-card-heading {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 4px;
}

.home-hero__student-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--ui-text-primary);
}

.home-hero__student-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.home-hero__pill {
  border-radius: var(--ui-radius-pill);
  padding: 4px 10px;
  background: var(--ui-surface-muted);
  color: var(--ui-text-primary);
  font-weight: 600;
  font-size: 0.85rem;
}

.home-hero__progress {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: var(--ui-radius-pill);
  background: var(--ui-surface-muted);
}

.home-hero__progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: var(--ui-color-action);
  box-shadow: inset var(--ui-shadow-sm);
}

.home-hero__progress-bar--20 { width: 20%; }
.home-hero__progress-bar--40 { width: 40%; }
.home-hero__progress-bar--68 { width: 68%; }
.home-hero__progress-bar--warning { background: var(--ui-color-warning); }
.home-hero__progress-bar--success { background: var(--ui-color-success); }

@keyframes home-hero-card-in {
  0% { transform: translateY(24px) scale(0.98); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__builder-block,
  .home-hero__student-card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .home-hero__typing::after {
    animation: none;
  }
}

@media (max-width: 768px) {
  .home-hero__builder-stage,
  .home-hero__student-stage {
    min-height: 420px;
  }

  .home-hero__builder-stack {
    right: 16px;
    grid-template-rows: repeat(5, 1fr);
  }

  .home-hero__assistant-mock {
    position: absolute;
    bottom: 18px;
    top: auto;
    height: 160px;
    width: calc(100% - 36px);
  }

  .home-hero__student-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .home-hero__student-body {
    height: 360px;
  }
}
