/*
 * The home page (/), rebuilt at /home-next/ (owner brief 2026-11-30, Job 2)
 * and switched to / on 2026-12-01 (site/snippets/pages/home.php). Linked in the head by the page
 * snippet only, so no other page meets these rules. Every selector names a
 * class of its own (prefix hn-) or sits under one. Tokens only, no
 * !important. Layer templates: after the shared blocks and the A1 rules.
 *
 * The industry switch: html[data-ind] is set by ind-early.js before the
 * first paint, so the rules keyed on it (the door moved first, the page
 * line) never shift the page on load; a chip the visitor presses changes
 * them at once (input, not a shift).
 */

@layer templates {
  /* ---------- the section's call: the sentence, then the button or link ---------- */
  .hn-ask {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-2) var(--space-3);
    margin-top: var(--space-6);
    text-align: center;
  }

  .hn-ask__lead {
    margin: 0;
    font-weight: 500;
  }

  .hn-ask__go {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-2) var(--space-4);
  }

  .hn-ask__alt {
    color: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  .hn-after {
    max-width: var(--measure);
    margin: var(--space-4) auto 0;
    text-align: center;
  }

  .hn-after p {
    margin: 0;
  }

  /* ---------- 2. four equal doors: one column on phones, two by two from 48rem ----------
     (final home pass 1.1, 2026-11-30: four in one row read poorly on desktop). Every row
     the height of the tallest door (grid-auto-rows 1fr), so all four are equal; a chip's
     door still moves first (order, below) and keeps its "Sounds like you" tag. */
  .hn-doors__list {
    display: grid;
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  @media (min-width: 48rem) {
    .hn-doors__list {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      grid-auto-rows: 1fr;
      gap: var(--space-5);
    }
  }

  .hn-door {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-5) var(--space-4);
    border: var(--border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    color: var(--color-ink);
  }

  .hn-door__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-2);
    min-height: 3.25rem;
  }

  .hn-door__art {
    flex: none;
    fill: none;
    stroke: var(--color-ink);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .hn-door__art .hn-art__fill {
    fill: var(--color-brand);
  }

  .hn-door__tag {
    padding: 0.25rem 0.625rem;
    border: var(--border);
    border-radius: var(--radius-pill);
    background: var(--color-brand);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
  }

  .hn-door__eyebrow {
    margin: var(--space-1) 0 0;
  }

  .hn-door__title {
    margin: 0;
    font-size: var(--step-2);
    line-height: var(--leading-heading);
  }

  .hn-door__text {
    margin: 0;
  }

  .hn-door__go {
    margin-top: auto;
    padding-top: var(--space-3);
  }

  .hn-door__go .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hn-door__more {
    margin: 0;
    font-size: 0.9375rem;
  }

  .hn-door__more a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  /* a pressed chip moves its door to the front (input, not a shift) */
  html[data-ind="nanny-agency"] .hn-door[data-hn-fit~="nanny-agency"],
  html[data-ind="household-staffing"] .hn-door[data-hn-fit~="household-staffing"],
  html[data-ind="childcare-center"] .hn-door[data-hn-fit~="childcare-center"],
  html[data-ind="play-cafe"] .hn-door[data-hn-fit~="play-cafe"],
  html[data-ind="therapist"] .hn-door[data-hn-fit~="therapist"],
  html[data-ind="doula"] .hn-door[data-hn-fit~="doula"],
  html[data-ind="midwife"] .hn-door[data-hn-fit~="midwife"],
  html[data-ind="healthcare-practice"] .hn-door[data-hn-fit~="healthcare-practice"],
  html[data-ind="med-spa"] .hn-door[data-hn-fit~="med-spa"],
  html[data-ind="holistic-wellness"] .hn-door[data-hn-fit~="holistic-wellness"],
  html[data-ind="coach"] .hn-door[data-hn-fit~="coach"],
  html[data-ind="nonprofit"] .hn-door[data-hn-fit~="nonprofit"],
  html[data-ind="ecommerce"] .hn-door[data-hn-fit~="ecommerce"] {
    order: -1;
    background: var(--color-mint-pale);
  }

  /* a kind of business with its own place under the four doors (owner's answers,
     2026-11-30: household staffing agencies), a door's look across the full width */
  .hn-side {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding: var(--space-4) var(--space-4);
    border: var(--border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    color: var(--color-ink);
  }

  @media (min-width: 48rem) {
    .hn-side {
      margin-top: var(--space-5);
    }
  }

  .hn-side__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
  }

  .hn-side__title {
    margin: 0;
    font-size: var(--step-2);
    line-height: var(--leading-heading);
  }

  .hn-side__title a,
  .hn-side__text a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  .hn-side__text {
    margin: 0;
  }

  html[data-ind="household-staffing"] .hn-side[data-hn-fit~="household-staffing"] {
    background: var(--color-mint-pale);
  }

  .hn-switch {
    margin-top: var(--space-6);
  }

  .hn-switch .indswitch {
    margin-inline: auto;
  }

  /* the active industry's page line: its space is kept, so a chip never moves the page */
  .hn-indline {
    min-height: 1.5em;
    margin: var(--space-2) 0 0;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    visibility: hidden;
  }

  html[data-ind]:not([data-ind=""]) .hn-indline {
    visibility: visible;
  }

  .hn-indline__link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  /* ---------- 3. the searches: six cards, three across from 64rem ---------- */
  .hn-searches .points--searches {
    max-width: none;
  }

  @media (min-width: 64rem) {
    .hn-searches .points--searches .points__list {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: var(--space-6) var(--space-5);
    }
  }

  .hn-searches .points__item {
    display: flex;
    flex-direction: column;
  }

  .hn-searches .points__body {
    display: flex;
    flex: 1;
    flex-direction: column;
  }

  .hn-searches .points__more {
    margin-top: auto;
    padding-top: var(--space-2);
  }

  /* phones: one column, the photos at 3:2 so six cards stay short */
  @media (max-width: 39.9375rem) {
    .hn-searches .points--searches .points__list {
      grid-template-columns: minmax(0, 1fr);
      gap: var(--space-5);
    }

    .hn-searches .points--searches .points__photo {
      aspect-ratio: 3 / 2;
    }

    .hn-searches .points__query {
      padding: 0.625rem var(--space-3);
      border-radius: var(--radius-pill);
      font-size: var(--step--1);
    }
  }

  /* ---------- 5. the map: the hint, the bar, the note ---------- */
  .hn-map .hn-map__hint {
    margin: var(--space-4) 0 var(--space-2);
    visibility: hidden;
  }

  .hn-map .is-tabbed .hn-map__hint {
    visibility: visible;
  }

  .hn-map .hn-map__progress {
    max-width: 18rem;
    margin-bottom: var(--space-2);
  }

  .hn-map__note {
    margin: var(--space-4) 0 0;
    color: var(--color-on-ink-text);
    font-size: 0.9375rem;
  }

  .hn-map__note a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  /* ---------- 6. In short beside the plain list ---------- */
  .hn-short {
    display: grid;
    gap: var(--space-6);
  }

  @media (min-width: 64rem) {
    .hn-short {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      align-items: start;
      gap: var(--space-7);
    }
  }

  .hn-short .inshort {
    max-width: none;
  }

  .hn-short__box .hn-ask {
    justify-content: flex-start;
    margin-top: var(--space-3);
    text-align: left;
  }

  .hn-short__title {
    margin: 0 0 var(--space-3);
    font-size: var(--step-3);
  }

  .hn-short__items ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .hn-short__items li {
    padding-block: var(--space-2);
    border-top: var(--border);
  }

  .hn-short__items li:last-child {
    border-bottom: var(--border);
  }

  .hn-short__items a,
  .hn-short__more a {
    color: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  .hn-short__more p {
    margin: var(--space-3) 0 0;
  }

  /* ---------- 7. why: the three outcomes as one plain row ---------- */
  .hn-imagetext .imagetext__body ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
    margin: var(--space-4) 0;
    padding: 0;
    list-style: none;
  }

  .hn-imagetext .imagetext__body li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 500;
  }

  .hn-imagetext .imagetext__body li::before {
    content: "";
    flex: none;
    width: 0.625rem;
    height: 0.625rem;
    border: var(--border);
    border-radius: 50%;
    background: var(--color-brand);
  }

  /* ---------- 8. proof: four tiles, two by two from 48rem, equal ---------- */
  .hn-tiles {
    display: grid;
    gap: var(--space-5) var(--space-4);
    margin: var(--space-6) 0 0;
    padding: 0;
    list-style: none;
  }

  @media (min-width: 48rem) {
    .hn-tiles {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  .hn-tiles > li {
    display: flex;
    flex-direction: column;
  }

  .hn-tiles > li > :last-child {
    flex: 1;
  }

  /* the kinds the tiles do not show, each with its study as the site's study card
     (final home pass 1.5, owner's answers): the tiles' grid, three across from 64rem */
  .hn-kinds {
    margin: var(--space-6) 0 0;
  }

  .hn-kinds__title {
    margin: 0;
    font-size: var(--step-title);
    text-align: center;
  }

  .hn-kinds .hn-tiles {
    grid-auto-rows: 1fr;
    margin-top: var(--space-4);
  }

  @media (min-width: 64rem) {
    .hn-tiles--kinds {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  .hn-quote {
    max-width: 48rem;
    margin: var(--space-7) auto 0;
    text-align: center;
  }

  .hn-quote .quote {
    margin: 0;
  }

  .hn-quote .quote__text {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--step-2);
    font-weight: var(--weight-heading);
    line-height: var(--leading-heading);
  }

  .hn-quote .quote__by {
    margin-top: var(--space-3);
    font-size: 0.9375rem;
    font-weight: 500;
  }

  .hn-quote .quote__by a,
  .hn-after a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  /* ---------- round 2: each door's study, the redesign line, the problem's routing line ---------- */
  .hn-door__text a,
  .hn-door__proof a,
  .hn-doors__note a,
  .hn-route a {
    color: inherit;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  .hn-door__proof {
    margin: 0;
    font-size: 0.9375rem;
  }

  .hn-doors__note {
    max-width: 48rem;
    margin: var(--space-5) auto 0;
    padding: var(--space-3) var(--space-4);
    border: var(--border);
    border-radius: var(--radius-sm);
    background: var(--color-butter);
    text-align: center;
  }

  .hn-route {
    max-width: 48rem;
    margin: 0 auto var(--space-5);
    padding: var(--space-3) var(--space-4);
    border: var(--border);
    border-radius: var(--radius-sm);
    background: var(--color-paper);
    text-align: center;
  }

  /* ---------- 12. the closing band: the wash every other page closes on, not the home wash ---------- */
  .template-home .cta-band.section--gradient {
    background: var(--gradient-wash);
  }
}

/* In-page links (owner checks, 2026-11-30): a jump to #expand, #in-short or
   #work passes sections that have not rendered yet (site.css and
   motion-tiers.css skip rendering from the third section on), and the
   problem scene's real height is far above its estimate, so the target
   moved away after the jump. home-next.js adds .hn-rendered on the click of
   an in-page link, or on arriving with one, before the browser scrolls. */
@layer templates {
  main.hn-rendered > .section {
    content-visibility: visible;
  }
}

/* The home hero's lead paragraph is the page's LCP element (Lighthouse,
   2026-12-01: 3.0 s, perf 87 against the floor of 90). Like the H1 and the
   hero image (motion-core.css, fx:enter) it only lifts and never fades, so
   its first paint is not held back by the entrance; the same rule the long
   service pages have (motion-tiers.css, review fixes 9.2), whose selector
   needs a .block-indswitch section this page does not render. */
@layer motion {
  @media screen and (prefers-reduced-motion: no-preference) {
    html[data-fx~="enter"] main:has(.indswitch) .hero-enter > .hero__lead {
      animation-name: motion-lift;
    }
  }
}
