/* Landing page only (index.html), loaded after styles.css.
   The hero stays dark in both themes: the headline palette only reads on
   near-black (brand guide, Colour). */

/* From 768px the header controls are absolutely positioned on the right
   (styles.css). The short brand plus XP bar sit on the left, kept clear of
   those controls, instead of centring under them. */
@media (min-width: 768px) {
  .home-header {
    justify-content: flex-start;
  }
  .home-header .header-title-group {
    align-items: flex-start;
    text-align: left;
    margin: 0;
    max-width: calc(100% - 440px);
    min-width: 160px;
  }
  .home-header #progress-bar {
    margin: 0;
  }
}

.home-header .header-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.home-hero {
  --hero-ink: #060607;
  --hero-ground: #1e1e22;
  --hero-chalk: #d6d6da;
  --hero-slate-light: #a3a3a3;
  --hero-yellow: #fec700;
  --hero-yellow-hover: #ffd23f;
  --hero-line-1: #fec700;
  --hero-line-2: #ff8100;
  --hero-photo-outline: #ffffff;
  --hero-accent: #fec700;
  --hero-accent-hover: #ffd23f;
  --hero-stroke: var(--hero-ink);
  --hero-title-shadow: 0 0.04em 0.12em rgba(6, 6, 7, 0.6);
  --hero-photo-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);

  width: 100%;
  margin: 0 0 24px;
  color: var(--hero-chalk);
  background:
    radial-gradient(ellipse 70% 55% at 50% 100%, rgba(214, 214, 218, 0.07), transparent 70%),
    linear-gradient(180deg, var(--hero-ink) 0%, var(--hero-ground) 100%);
}

/* Light theme: the hero follows the page. The bright headline palette only
   reads on near-black, so the lines switch to dark gold and dark orange
   (WCAG large text on #f4f4f5: 4.48:1 and 4.71:1) and lose the dark outline.
   The primary button keeps its yellow fill with ink text (12.91:1). */
html[data-theme-resolved="light"] .home-hero {
  --hero-chalk: #111113;
  --hero-slate-light: #52525b;
  --hero-line-1: #a16207;
  --hero-line-2: #c2410c;
  --hero-accent: #854d0e;
  --hero-accent-hover: #713f12;
  --hero-stroke: transparent;
  --hero-title-shadow: none;
  --hero-photo-shadow: 0 12px 32px rgba(17, 17, 19, 0.18);
  background:
    radial-gradient(ellipse 70% 55% at 50% 100%, rgba(254, 199, 0, 0.12), transparent 70%),
    linear-gradient(180deg, #fafafa 0%, #f4f4f5 100%);
  border-bottom: 1px solid #e4e4e7;
}

.home-hero .hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 48px;
  box-sizing: border-box;
}

.hero-copy,
.hero-profile {
  min-width: 0;
}

/* The title is sized from the copy column, not the viewport, so neither
   line breaks mid-word when the photo column takes part of the width. */
.hero-copy {
  container-type: inline-size;
}

.hero-title {
  margin: 0 0 20px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw + 0.5rem, 5.5rem);
  font-size: clamp(2rem, 12.5cqi, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  -webkit-text-stroke: 0.07em var(--hero-stroke);
  paint-order: stroke fill;
  text-shadow: var(--hero-title-shadow);
}

.hero-line {
  display: block;
}

.hero-line-1 { color: var(--hero-line-1); }
.hero-line-2 { color: var(--hero-line-2); }

.hero-welcome {
  margin: 0 0 12px;
  color: var(--hero-chalk);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.2vw + 0.5rem, 1.75rem);
  line-height: 1.25;
}

.hero-body {
  margin: 0 0 28px;
  max-width: 38rem;
  color: var(--hero-slate-light);
  font-size: 1.125rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: 12px 24px;
  box-sizing: border-box;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hero-cta-primary {
  background-color: var(--hero-yellow);
  color: var(--hero-ink);
  border: 1px solid var(--hero-yellow);
}

.hero-cta-primary:hover {
  background-color: var(--hero-yellow-hover);
  border-color: var(--hero-yellow-hover);
}

.hero-cta-secondary {
  background-color: transparent;
  color: var(--hero-chalk);
  border: 1px solid var(--hero-accent);
}

.hero-cta-secondary:hover {
  color: var(--hero-accent-hover);
  border-color: var(--hero-accent-hover);
}

.hero-cta:focus-visible {
  outline: 3px solid var(--hero-accent);
  outline-offset: 3px;
}

.hero-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-photo {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--hero-photo-outline);
  box-shadow: var(--hero-photo-shadow);
  box-sizing: border-box;
}

.hero-profile-name {
  margin: 16px 0 4px;
  color: var(--hero-chalk);
  font-weight: 700;
  font-size: 1.125rem;
}

.hero-profile-bio {
  margin: 0;
  max-width: 22rem;
  color: var(--hero-slate-light);
  font-size: 0.95rem;
}

.home-hero + .syllabus-section {
  margin-top: 0;
}

/* The profile moved into the hero, so the identity list spans the row. */
#identity .grid-container {
  grid-template-columns: 1fr;
}

@media (prefers-reduced-motion: reduce) {
  .hero-cta { transition: none; }
}

@media (min-width: 600px) {
  .home-hero .hero-inner {
    padding-top: 56px;
    padding-bottom: 64px;
  }
  .hero-photo {
    width: 200px;
    height: 200px;
  }
}

@media (min-width: 1024px) {
  .home-hero .hero-inner {
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: 48px;
    padding-top: 72px;
    padding-bottom: 80px;
  }
  .hero-photo {
    width: 240px;
    height: 240px;
  }
}
