/* ============================================================================
   HOME — the front page only
   ----------------------------------------------------------------------------
   ADDED IN 1.0.4. Loaded by front-page.php, so no other page requests it.

   Uses the existing tokens and breakpoints (620px, 1000px) and adds no colour,
   no font and no radius of its own. No raw hex values, no !important.
   ========================================================================= */

/* ---------------------------------------------------------------------------
   HERO
   Two columns from 1000px: copy left, image right. Below that the copy comes
   first and the image follows, so the headline and button are on the first
   screen of a phone.

   Copy, button and image are WordPress-managed (see template-parts/home/hero.php).
   The rules below style whatever blocks the editor puts in the Home page.
   ------------------------------------------------------------------------ */

.ll-hero {
  background: var(--ll-warm);
  border-bottom: 1px solid var(--ll-rule);
}

.ll-hero__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: center;
  padding-block: var(--sp-6) var(--sp-7);
}

.ll-hero__copy { min-width: 0; }
.ll-hero__copy > :first-child { margin-top: 0; }

.ll-hero__copy h1 {
  font-size: var(--fs-h1);
  line-height: 1.14;
  letter-spacing: -0.018em;
  max-width: 18ch;
  margin: 0 0 var(--sp-4);
}

.ll-hero__copy p {
  font-family: var(--ll-sans);
  font-size: var(--fs-dek);
  line-height: 1.55;
  color: var(--ll-ink-2);
  max-width: 46ch;
  margin: 0 0 var(--sp-5);
}
.ll-hero__copy p:last-child { margin-bottom: 0; }

/* The primary button, as the block editor's Button block. Same look as
   .ll-btn--primary, with a 48px target because this is the one action the
   hero exists for. */
.ll-hero__copy .wp-block-buttons { margin: var(--sp-5) 0 0; gap: var(--sp-3); }

.ll-hero__copy .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 24px;
  font-family: var(--ll-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  color: var(--ll-white);
  background: var(--ll-accent);
  border: 1px solid transparent;
  border-radius: var(--ll-radius);
  text-decoration: none;
}
.ll-hero__copy .wp-block-button__link:hover {
  background: var(--ll-accent-deep);
  color: var(--ll-white);
}

.ll-hero__media { margin: 0; min-width: 0; }

/* The image crops to a fixed ratio with object-fit, so any photo the editor
   picks fills the frame and the page never shifts while it loads. */
.ll-hero__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: var(--ll-hero-focus, 50% 50%);
}

/* 21:9. Not generated as an image size (see inc/images.php); it is a CSS ratio.
   Choosing a Featured Image that is 2:1 or wider makes hero.php add this
   modifier, and the banner then runs the full container width. */
.ll-hero--wide .ll-hero__copy { max-width: 46rem; }
.ll-hero--wide .ll-hero__img { aspect-ratio: 16 / 9; }

.ll-hero--no-image .ll-hero__copy { max-width: 46rem; }

@media (min-width: 620px) {
  .ll-hero__in { padding-block: var(--sp-7) var(--sp-8); }
  .ll-hero__img { aspect-ratio: 3 / 2; }
  .ll-hero--wide .ll-hero__img { aspect-ratio: 21 / 9; }
}

@media (min-width: 1000px) {
  .ll-hero__in {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--sp-9);
    padding-block: var(--sp-7);
  }
  /* 4:5 is the Instagram portrait ratio. The height cap keeps the button on the
     first screen of a small laptop; object-fit crops whatever is left over. */
  .ll-hero__img { aspect-ratio: 4 / 5; max-height: min(650px, 80vh); }

  /* A banner is too wide to sit beside the copy: stack it. */
  .ll-hero--wide .ll-hero__in,
  .ll-hero--no-image .ll-hero__in { grid-template-columns: minmax(0, 1fr); gap: var(--sp-7); }
  .ll-hero--wide .ll-hero__img { aspect-ratio: 21 / 9; }
}

/* ---------------------------------------------------------------------------
   EXPLORE BY TOPIC
   Six text-led cards. One column on a phone, two from 620px, three from
   1000px, so six cards always fill complete rows.
   ------------------------------------------------------------------------ */

.ll-topics { padding-top: var(--sp-7); }

.ll-topics__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-4);
}
.ll-topics__item { margin: 0; min-width: 0; }

.ll-topic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  align-content: center;
  gap: var(--sp-1) var(--sp-4);
  min-height: 72px;
  height: 100%;
  padding: var(--sp-4) var(--sp-5);
  background: var(--ll-white);
  border: 1px solid var(--ll-rule-2);
  color: var(--ll-ink);
  text-decoration: none;
}

.ll-topic__name {
  grid-column: 1;
  font-family: var(--ll-serif);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ll-ink);
  text-wrap: balance;
}

.ll-topic__desc {
  grid-column: 1;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--ll-muted);
}

.ll-topic__go {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--ll-sans);
  font-size: 18px;
  line-height: 1;
  color: var(--ll-accent);
}

/* Restrained hover, matching .ll-card: the name underlines, nothing moves. */
.ll-topic:hover { border-color: var(--ll-ink); }
.ll-topic:hover .ll-topic__name {
  text-decoration: underline;
  text-decoration-color: var(--ll-accent);
  text-underline-offset: 3px;
}
.ll-topic:hover .ll-topic__go { color: var(--ll-accent-deep); }

@media (min-width: 620px) {
  .ll-topics__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
}

@media (min-width: 1000px) {
  .ll-topics { padding-top: var(--sp-8); }
  .ll-topics__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ll-topic { min-height: 104px; }
  .ll-topic__name { font-size: 23px; }
}

/* ---------------------------------------------------------------------------
   START HERE — reserved position, printed only once the page is published
   ------------------------------------------------------------------------ */

.ll-starthere {
  background: var(--ll-accent-tint);
  margin-top: var(--sp-7);
}

.ll-starthere__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4) var(--sp-6);
  padding-block: var(--sp-6);
}

.ll-starthere__title {
  font-size: var(--fs-h2);
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin: 0;
}

.ll-starthere__desc {
  max-width: 52ch;
  margin: var(--sp-2) 0 0;
  color: var(--ll-ink-2);
}

.ll-starthere .ll-arrow { min-height: 44px; align-items: center; }

/* ---------------------------------------------------------------------------
   LATEST ARTICLES — the cards themselves are the theme's .ll-cards / .ll-card
   ------------------------------------------------------------------------ */

.ll-latest { padding-top: var(--sp-7); }

@media (min-width: 1000px) {
  .ll-latest { padding-top: var(--sp-8); }
}

/* Give the section link a comfortable tap target without moving the layout. */
.ll-latest .ll-sechead .ll-arrow { padding-block: 12px; margin-block: -12px; }
