/* ─────────────────────────────────────────────────────────────────────────
   home.twig — surface-scoped styles
   Loaded via {% block head_extra %} on the home route only.
   Tokens consumed from tokens.css; no literal hex/px/font values here.
   ───────────────────────────────────────────────────────────────────────── */

/* ─── Hero ──────────────────────────────────────────────────────────────── */

.home-hero {
  padding-block: var(--space-md) var(--space-xl);
  text-align: left;
  max-width: 70ch;
}

.home-hero__headline {
  font-family: var(--font-sans);
  font-size: var(--type-display-size);
  font-weight: var(--type-display-weight);
  line-height: var(--type-display-line);
  letter-spacing: var(--type-display-track);
  color: var(--color-text);
  margin: 0 0 var(--space-md);
  text-wrap: balance;
}

.home-hero__subtitle {
  font-family: var(--font-sans);
  font-size: 1.125rem;            /* 18px — one step up from body */
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-soft);
  max-width: 60ch;
  margin: 0 0 var(--space-lg);
  text-wrap: pretty;
}

.home-hero__ctas {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  align-items: center;
}

/* Ghost button — paired with the primary sky-action CTA. The accent's
   rarity is the point (One Voice Rule), so the secondary CTA stays neutral. */
.home-hero__ghost,
a.home-hero__ghost {
  display: inline-flex;
  align-items: center;
  background-color: transparent;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  padding: 0.5625rem 1.125rem;    /* matches Bulma button height */
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  transition: background-color 0.15s var(--ease-out-quart),
              border-color    0.15s var(--ease-out-quart),
              color           0.15s var(--ease-out-quart);
}
.home-hero__ghost:hover,
a.home-hero__ghost:hover {
  background-color: var(--color-sky-action-soft);
  color: var(--color-sky-action-deep);
  border-color: var(--color-border-strong);
}
.home-hero__ghost:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Display weight steps up in dark mode to compensate for the perceived
   weight loss of light-on-dark type. Pairs with the body 380 step in tokens.css. */
:root[data-theme="dark"] .home-hero__headline {
  font-weight: 650;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-hero__headline {
    font-weight: 650;
  }
}

/* ─── Stats bar ─────────────────────────────────────────────────────────── */

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-block: var(--space-xl) var(--space-2xl);
  border-top: var(--border-hairline);
  border-bottom: var(--border-hairline);
}

.home-stats__cell {
  padding: var(--space-md) var(--space-lg);
  border-right: var(--border-hairline);
}
.home-stats__cell:last-child {
  border-right: none;
}

.home-stats__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin: 0 0 var(--space-3xs);
}

.home-stats__label {
  font-family: var(--font-sans);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  line-height: var(--type-label-line);
  color: var(--color-text-soft);
  margin: 0;
}

@media (max-width: 768px) {
  .home-stats {
    grid-template-columns: 1fr;
  }
  .home-stats__cell {
    padding: var(--space-sm) 0;
    border-right: none;
    border-bottom: var(--border-hairline);
  }
  .home-stats__cell:last-child {
    border-bottom: none;
  }
}

/* ─── Bottom CTA section ────────────────────────────────────────────────── */

.home-cta {
  margin-top: var(--space-3xl);
  padding-block: var(--space-2xl);
  border-top: var(--border-hairline);
  text-align: left;
  max-width: 70ch;
}

.home-cta__headline {
  font-family: var(--font-sans);
  font-size: var(--type-headline-size);
  font-weight: var(--type-headline-weight);
  line-height: var(--type-headline-line);
  letter-spacing: var(--type-headline-track);
  color: var(--color-text);
  margin: 0 0 var(--space-xs);
  text-wrap: balance;
}

.home-cta__subtitle {
  font-family: var(--font-sans);
  font-size: 1.0625rem;            /* 17px */
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-soft);
  max-width: 60ch;
  margin: 0 0 var(--space-md);
  text-wrap: pretty;
}

/* ─── Section header (heading + see-all link, hairline below) ──────────── */

.home-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-block: var(--space-2xl) var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: var(--border-hairline);
}

.home-section-header__title {
  font-family: var(--font-sans);
  font-size: var(--type-title-size);
  font-weight: var(--type-title-weight);
  line-height: var(--type-title-line);
  letter-spacing: var(--type-title-track);
  color: var(--color-text);
  margin: 0;
  text-wrap: balance;
}

.home-section-header__action {
  font-family: var(--font-sans);
  font-size: var(--type-label-size);
  font-weight: var(--type-label-weight);
  color: var(--color-sky-action-deep);
  text-decoration: none;
  transition: color 0.15s var(--ease-out-quart);
}
.home-section-header__action:hover {
  color: var(--color-sky-action);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.home-section-header__action:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* ─── Featured Courses card ────────────────────────────────────────────── */
/* Flat hairline-bordered, no shadow, no rounded card-footer chrome.
   Title is the link; entire card is not wrap-linked (a11y). */

.home-course-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--color-surface-elevated);
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s var(--ease-out-quart);
}
.home-course-card:hover {
  border-color: var(--color-border-strong);
}

.home-course-card__figure {
  margin: 0;                    /* Bulma .image is a <figure>; reset margin */
  border-bottom: var(--border-hairline);
}

.home-course-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-md);
  gap: var(--space-2xs);
}

.home-course-card__title {
  font-family: var(--font-sans);
  font-size: var(--type-title-size);
  font-weight: var(--type-title-weight);
  line-height: var(--type-title-line);
  letter-spacing: var(--type-title-track);
  margin: 0;
  text-wrap: balance;
}
.home-course-card__title a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.15s var(--ease-out-quart);
}
.home-course-card__title a:hover {
  color: var(--color-sky-action-deep);
}
.home-course-card__title a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

.home-course-card__desc {
  font-family: var(--font-sans);
  font-size: 0.9375rem;          /* 15px — slightly smaller than body */
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-soft);
  margin: 0;
  text-wrap: pretty;
  flex: 1;
}

.home-course-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3xs) var(--space-2xs);
  margin-top: var(--space-2xs);
}

.home-course-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--color-sky-action-soft);
  color: var(--color-sky-action-deep);
  font-family: var(--font-sans);
  font-size: var(--type-caption-size);
  font-weight: 500;
  line-height: 1.5;
}
.home-course-card__tag--neutral {
  background-color: transparent;
  border: var(--border-hairline);
  color: var(--color-text-soft);
}
.home-course-card__tag--mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  background-color: transparent;
  border: var(--border-hairline);
  color: var(--color-text);
  letter-spacing: -0.01em;
}

/* ─── Value Props (numbered editorial 3-column with hairline tops) ─────── */

.home-vps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-block: var(--space-2xl);
}

.home-vps__col {
  display: flex;
  flex-direction: column;
  padding-top: var(--space-md);
  border-top: var(--border-hairline);
}

.home-vps__num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  font-size: var(--type-label-size);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  color: var(--color-text-soft);
  margin: 0 0 var(--space-sm);
}

.home-vps__title {
  font-family: var(--font-sans);
  font-size: var(--type-title-size);
  font-weight: var(--type-title-weight);
  line-height: var(--type-title-line);
  letter-spacing: var(--type-title-track);
  color: var(--color-text);
  margin: 0 0 var(--space-2xs);
  text-wrap: balance;
}

.home-vps__body {
  font-family: var(--font-sans);
  font-size: var(--type-body-size);
  font-weight: 400;
  line-height: var(--type-body-line);
  color: var(--color-text-soft);
  margin: 0;
  text-wrap: pretty;
}

@media (max-width: 768px) {
  .home-vps {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .home-vps__col {
    padding-top: var(--space-md);
    padding-bottom: var(--space-md);
  }
  .home-vps__col + .home-vps__col {
    border-top: var(--border-hairline);
  }
}
