/* ============================================================
   IMPACT Learning Hub — homepage and shared page furniture
   Depends on style.css (tokens) and layout.css (header/footer)
   ------------------------------------------------------------
   The .photo-slot rules that used to live here are gone —
   media.css owns the image layer now, and having both files
   style the same element was the reason slot backgrounds and
   borders behaved differently from page to page.
   ============================================================ */

/* ============================================================
   Hero — full-bleed, photographic, dark scrim
   ============================================================ */
.hero{ padding-block: 40px 8px; }

.hero-in{
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-full{
  display: flex;
  align-items: center;
  min-height: clamp(440px, 68vh, 640px);
  padding-block: clamp(56px, 8vw, 88px);
  color: #fff;
}
/* Scrim: heavier on the left where the copy sits, so the
   headline holds contrast whatever photograph is uploaded. */
.hero-full::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(10,18,44,.92) 0%, rgba(10,18,44,.74) 42%, rgba(10,18,44,.28) 100%);
}
.hero-full .hero-in{ display: block; width: 100%; }
.hero-full .hero-copy{ max-width: 46rem; }
.hero-full .hero-copy h1{ color: #fff; max-width: 20ch; }
.hero-full .hero-lede{ color: rgba(255,255,255,.92); }
.hero-full .eyebrow{ color: rgba(255,255,255,.72); }
.hero-full .eyebrow::after{ background: rgba(255,255,255,.3); }
.hero-full .btn.ghost{ color: #fff; border-color: rgba(255,255,255,.8); }
.hero-full .btn.ghost:hover{ background: rgba(255,255,255,.14); border-color: #fff; color: #fff; }

.hero-copy h1{ margin-bottom: 0; }
.hero-lede{
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 54ch;
  margin-top: 18px;
  line-height: 1.6;
}
.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* Credential line under the hero actions — registration and
   location, stated plainly. */
.hero-cred{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.22);
  font-size: var(--step--1);
  color: rgba(255,255,255,.78);
}
.hero-cred b{ color: #fff; font-weight: 600; }

@media (max-width: 980px){
  .hero-in{ grid-template-columns: 1fr; }
  .hero-full{ min-height: clamp(400px, 60vh, 540px); }
  .hero-full::before{
    background: linear-gradient(180deg, rgba(10,18,44,.62) 0%, rgba(10,18,44,.9) 100%);
  }
}

/* ============================================================
   Division grid
   ============================================================ */
.hub-intro{ margin: -4px 0 20px; color: var(--ink-soft); max-width: 62ch; }
.hub-intro a{ font-weight: 600; }
.hub-link{ margin: 22px 0 0; }

/* Five divisions, so the grid is set to land on five across at
   full width rather than auto-fitting to four and leaving one
   card stranded on its own row. */
.division-grid{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
@media (max-width: 1100px){ .division-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px){  .division-grid{ grid-template-columns: repeat(2, 1fr); } }
.division-card{
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: var(--border);
  border-top: 3px solid var(--stone-deep);
  border-radius: var(--radius);
  padding: 22px 20px;
  color: var(--ink);
  transition: border-color .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.division-card:hover{
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--lift-1);
}
.division-card .dot{
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block; margin-bottom: 14px; flex: none;
}
.division-card h3{
  font-size: var(--step-1);
  font-family: var(--font-body);
  font-weight: 700;
  margin-bottom: 7px;
}
.division-card p{
  font-size: var(--step--1);
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
  max-width: none;
}
.division-card .more{
  margin-top: 16px;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--blue);
}

.division-card.data{ border-top-color: var(--div-data); }
.division-card.tech{ border-top-color: var(--div-tech); }
.division-card.lab{  border-top-color: var(--div-lab); }
.division-card.agri{ border-top-color: var(--div-agri); }
.division-card.lang{ border-top-color: var(--div-lang); }
.division-card.hub{  border-top-color: var(--div-hub); }
.division-card.data .dot{ background: var(--div-data); }
.division-card.tech .dot{ background: var(--div-tech); }
.division-card.lab .dot{  background: var(--div-lab); }
.division-card.agri .dot{ background: var(--div-agri); }
.division-card.lang .dot{ background: var(--div-lang); }
.division-card.hub .dot{  background: var(--div-hub); }

.division-card.data:hover{ border-color: var(--div-data); }
.division-card.tech:hover{ border-color: var(--div-tech); }
.division-card.lab:hover{  border-color: var(--div-lab); }
.division-card.agri:hover{ border-color: var(--div-agri); }
.division-card.lang:hover{ border-color: var(--div-lang); }

/* ============================================================
   Course cards
   ============================================================ */
.course-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 22px;
}
.course-card{
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.course-card:hover{
  border-color: var(--stone-deep);
  box-shadow: var(--lift-1);
  transform: translateY(-2px);
  text-decoration: none;
}
.course-card-body{
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.course-cat{
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.course-cat i{ width: 7px; height: 7px; border-radius: 50%; flex: none; }
.course-card h4{
  font-size: var(--step-1);
  line-height: 1.3;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.course-card .by{ color: var(--ink-soft); font-size: var(--step--1); }
.course-card .foot{
  margin-top: auto;
  padding-top: 14px;
  border-top: var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.course-card .price{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.course-card .price.free{ color: var(--green); }
.course-card .lvl{ font-size: var(--step--1); color: var(--ink-faint); }

/* ============================================================
   What we offer — numbered steps, institutional
   ============================================================ */
.step-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--stone);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.step-item{ background: var(--surface); padding: 24px 22px; }
.step-item .n{
  display: block;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.step-item h3{ font-size: var(--step-1); font-family: var(--font-body); font-weight: 700; margin-bottom: 6px; }
.step-item p{ font-size: var(--step--1); color: var(--ink-soft); margin: 0; max-width: none; }

/* ============================================================
   Live class callout
   ============================================================ */
.callout{
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}
.callout-date{
  text-align: center;
  line-height: 1.05;
  font-family: var(--font-display);
  padding-right: 24px;
  border-right: var(--border);
}
.callout-date b{ display: block; font-size: 2.2rem; font-weight: 700; }
.callout-date span{ font-size: var(--step--1); color: var(--ink-soft); font-family: var(--font-body); }
.callout-body h3{ font-size: var(--step-1); margin-bottom: 4px; font-family: var(--font-body); font-weight: 700; }
.callout-body p{ margin: 0; font-size: var(--step--1); color: var(--ink-soft); }

/* ============================================================
   Teach banner
   ============================================================ */
.banner{
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
}
.banner-copy h2{ margin-bottom: 0; }
.banner-copy p{ color: var(--ink-soft); margin: 14px 0 22px; }
.banner-list{ margin: 0 0 24px; display: grid; gap: 8px; }
.banner-list li{
  position: relative;
  padding-left: 22px;
  font-size: var(--step--1);
  color: var(--ink-mid);
}
.banner-list li::before{
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 10px; height: 2px;
  background: var(--amber);
}

/* ============================================================
   Browse / catalogue controls (learning-hub + division pages)
   ============================================================ */
.browse-hero{
  background: var(--paper-deep);
  border-bottom: var(--border);
  padding-block: clamp(28px, 5vw, 48px);
}
.browse-hero h1{ font-size: var(--step-4); margin-bottom: 8px; }
.browse-hero .muted{ max-width: 60ch; margin: 0; }

.div-crumb{
  font-size: var(--step--1);
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.div-crumb a{ color: var(--ink-soft); font-weight: 600; }
.div-crumb a:hover{ color: var(--blue); }

.browse-controls{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.browse-controls input[type=search]{ flex: 1 1 280px; min-width: 0; }
.browse-controls select{ flex: 0 1 200px; }

.filter-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.chip{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 15px;
  border: 1.5px solid var(--stone-deep);
  border-radius: 99px;
  background: var(--surface);
  color: var(--ink-mid);
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease);
}
.chip:hover{ border-color: var(--ink-soft); color: var(--ink); }
.chip i{ width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chip[aria-pressed="true"]{
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.result-count{
  font-size: var(--step--1);
  color: var(--ink-faint);
  margin: 0 0 18px;
}

.browse-empty{
  text-align: center;
  padding: clamp(32px, 6vw, 56px) 20px;
  border: 1px dashed var(--stone-deep);
  border-radius: var(--radius);
  background: var(--surface);
}
.browse-empty h3{ font-size: var(--step-2); margin-bottom: 6px; }
.browse-empty p{ margin: 0 auto 18px; color: var(--ink-soft); max-width: 44ch; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px){
  .banner{ grid-template-columns: 1fr; }
  .banner .photo-slot{ order: -1; }
}
@media (max-width: 640px){
  .callout{ grid-template-columns: 1fr; text-align: left; }
  .callout-date{
    text-align: left;
    padding-right: 0;
    padding-bottom: 14px;
    border-right: 0;
    border-bottom: var(--border);
  }
}

/* ---------- compact course cards on phones ----------
   Stacked full-width cards made the homepage about eight
   screens long on a 390px phone, most of it thumbnail. Below
   560px the card turns horizontal: small image on the left,
   everything else on the right. Same information, roughly a
   quarter of the height. */
@media (max-width: 560px){
  .course-grid{ grid-template-columns: 1fr; gap: 12px; }

  /* The matching .photo-slot sizing lives in media.css, which
     owns every slot on the site — overriding it from here loses
     on load order. */
  .course-card{
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    align-items: stretch;
  }
  .course-card-body{ padding: 12px 14px; gap: 4px; min-width: 0; }
  .course-card h4{ font-size: var(--step-0); }
  .course-card .by{ font-size: var(--step--2); }
  .course-card .foot{ padding-top: 10px; }
  .course-card .price{ font-size: var(--step-0); }
  .course-card .lvl{ font-size: var(--step--2); }

  /* Skeletons must match, or the grid jumps when data lands. */
  .course-card .photo-slot:only-child{ min-height: 112px; }
}

/* Two-up division cards even on small phones — they are short
   enough, and five stacked cards is a lot of scrolling. */
@media (max-width: 460px){
  .division-grid{ grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .division-card{ padding: 16px 14px; }
  .division-card p{ font-size: var(--step--2); }
  .division-card .more{ font-size: var(--step--2); margin-top: 12px; }
}

@media (max-width: 760px){
  .trust-strip{ gap: 10px 24px; }
  .trust-item{ font-size: var(--step--2); }
  .trust-item b{ font-size: var(--step-0); }
  .step-grid{ grid-template-columns: 1fr; }
  .step-item{ padding: 18px 16px; }
}

/* ============================================================
   Subject tutorials teaser (homepage)
   Hidden by JS until the taxonomy has subjects in it.
   ============================================================ */
.tut-teaser{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  gap: 20px 32px;
  align-items: center;
}
.tut-teaser h2{ font-size: var(--step-2); margin-bottom: 6px; }
.tut-teaser p{ margin: 0; font-size: var(--step--1); }
.tut-teaser .btn{ flex: none; }

.tut-teaser-subjects{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.subject-pill{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1.5px solid var(--stone-deep);
  border-radius: 99px;
  background: var(--paper);
  color: var(--ink-mid);
  font-size: var(--step--1);
  font-weight: 600;
  transition: border-color .15s var(--ease), color .15s var(--ease), background-color .15s var(--ease);
}
.subject-pill:hover{
  border-color: var(--ink-soft);
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
}
.subject-pill i{ width: 8px; height: 8px; border-radius: 50%; flex: none; }

@media (max-width: 900px){
  .tut-teaser{ grid-template-columns: 1fr; gap: 16px; }
  .tut-teaser .btn{ justify-self: start; }
}
