/* HeartBuild tiling content. Load after checkup.css.
   Content sections carry the class "content" (instead of the old :not(.hero):not(.tiling-intro):not(#contact) chain). */

#home.tiling-page {
  --t-accent: var(--red, #8a2222);
  --t-ink: var(--ink, #2e2626);
  --t-muted: var(--muted, #665757);
  --t-line: var(--line, #ded8dc);
  --t-soft: #f7f4f6;
  --t-head: Syne, Montserrat, Arial, sans-serif;

  /* ---------- Hero add-on ---------- */
  .hero-phone { margin: .9rem 0 0; font-size: 1rem; }
  .hero-phone a { font-weight: 700; color: inherit; text-underline-offset: .2em; }

  /* ---------- Trust strip under the hero ---------- */
  .trust-wrap { margin-block: 1.5rem; }
  .trust-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--t-line);
    border-radius: 14px;
    overflow: hidden;
  }
  .trust-strip li {
    padding: 1rem 1.25rem;
    border-left: 1px solid var(--t-line);
    font-size: .92rem;
    line-height: 1.45;
    color: var(--t-muted);
  }
  .trust-strip li:first-child { border-left: 0; }
  .trust-strip strong { display: block; font-size: 1rem; color: var(--t-ink); }

  /* ---------- Content sections ---------- */
  > .section.content {
    padding: clamp(2.75rem, 5vw, 4.75rem) 0;
    background: var(--bg, #e6e3e8);
    color: var(--t-ink);
    scroll-margin-top: 5rem;

    &.proof { background: var(--t-soft); }

    > .container { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

    .section-head { align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.75rem; }

    h2 {
      max-width: 25ch;
      margin: 0 0 1.75rem;
      font-family: var(--t-head);
      font-size: clamp(1.8rem, 3.3vw, 2.8rem);
      font-weight: 800;
      line-height: 1.16;
      letter-spacing: -.025em;
      color: var(--t-ink);
      text-wrap: balance;
    }
    .section-head h2 { margin-bottom: 0; }

    h3 {
      margin: 2rem 0 .8rem;
      font-family: var(--t-head);
      font-size: clamp(1.25rem, 2vw, 1.6rem);
      line-height: 1.3;
      color: var(--t-ink);
    }
    > .container > h3 { margin-top: 2rem; }

    p {
      max-width: 76ch;
      margin: 0 0 1.15rem;
      font-size: 1rem;
      line-height: 1.8;
      color: var(--t-muted);
      text-wrap: pretty;
    }
    > .container > p:first-of-type { font-size: 1.075rem; color: var(--t-ink); }
    > .container > p:last-child { margin-bottom: 0; }
    strong { color: var(--t-ink); }
    p a:not(.button) { color: var(--t-accent); text-underline-offset: .2em; }

    /* Cards: services and "why us" */
    .service-list, .proof-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1.25rem;
      margin: 1.75rem 0 2.25rem;
    }
    .service, .proof-item {
      min-width: 0;
      padding: clamp(1.35rem, 2.5vw, 2rem);
      background: #fff;
      border: 1px solid var(--t-line);
      border-top: 3px solid var(--t-accent);
      border-radius: 14px;
    }
    :is(.service, .proof-item) h3 { margin-top: 0; }
    :is(.service, .proof-item) p { font-size: .95rem; line-height: 1.75; margin-bottom: 0; }

    /* "What affects your quote" list */
    > .container > ul { max-width: 82ch; margin: 1.5rem 0 1.75rem; padding: 0; list-style: none; }
    > .container > ul > li {
      position: relative;
      margin: 0;
      padding: 1rem 0 1rem 1.6rem;
      border-bottom: 1px solid var(--t-line);
      color: var(--t-muted);
      line-height: 1.7;
    }
    > .container > ul > li::before {
      content: '';
      position: absolute;
      top: 1.6rem;
      left: 0;
      width: .45rem;
      height: .45rem;
      background: var(--t-accent);
      border-radius: 50%;
    }

    /* Process: five real steps, laid out 3 + 2 so there is no empty slot */
    .steps {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 20px;
      max-width: none;
      margin: 28px 0 0;
      padding: 0;
      list-style: none;
      counter-reset: step;

      li {
        grid-column: span 2;
        position: relative;
        min-width: 0;
        margin: 0;
        padding: 88px 26px 28px;
        background: #fff;
        border: 1px solid var(--t-line);
        border-radius: 16px;
        color: var(--t-muted);
        font-size: 1rem;
        line-height: 1.75;
        counter-increment: step;

        &:nth-child(n+4) { grid-column: span 3; }
        &::before {
          content: counter(step, decimal-leading-zero);
          position: absolute;
          top: 24px;
          left: 26px;
          width: 44px;
          height: 44px;
          border-radius: 12px;
          background: var(--t-accent);
          color: #fff;
          font-size: 15px;
          font-weight: 800;
          line-height: 44px;
          text-align: center;
        }
        strong {
          display: block;
          margin: 0 0 .6rem;
          font-family: var(--t-head);
          font-size: 1.35rem;
          line-height: 1.3;
          color: var(--t-ink);
        }
      }
    }

    /* FAQ */
    .faq {
      max-width: 900px;
      margin: .75rem 0;
      padding: 0;
      border: 1px solid var(--t-line);
      border-radius: 12px;
      background: #fff;
      overflow: hidden;

      summary {
        padding: 1.25rem 1.5rem;
        color: var(--t-ink);
        font-weight: 700;
        line-height: 1.5;
        cursor: pointer;
        &::marker { color: var(--t-accent); }
      }
      &[open] { border-color: var(--t-accent); }
      &[open] summary { background: var(--t-soft); }
      p { margin: 0; padding: 1rem 1.5rem 1.4rem; font-size: .975rem; }
    }

    /* Projects */
    .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
    .work {
      min-width: 0;
      margin: 0;
      border: 1px solid var(--t-line);
      border-radius: 14px;
      overflow: hidden;
      background: #fff;
      figcaption { padding: 1.5rem; }
      p { font-size: .95rem; margin: .5rem 0 .85rem; }
      img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
    }

    /* Mid-page call to action (used inside two sections) */
    .cta-band {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 1rem 2rem;
      margin-top: 2.25rem;
      padding: 1.5rem 1.75rem;
      background: var(--t-accent);
      border-radius: 14px;

      p {
        margin: 0;
        max-width: 34ch;
        font-family: var(--t-head);
        font-size: 1.2rem;
        font-weight: 700;
        line-height: 1.35;
        color: #fff;
      }
      .cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
      .button { background: #fff; color: var(--t-accent); }
      .cta-phone { color: #fff; font-weight: 700; text-underline-offset: .2em; }
    }

    .text-link { text-underline-offset: .2em; }
    .button { max-width: 100%; white-space: normal; text-align: center; }
    :is(a, summary):focus-visible { outline: 3px solid var(--t-accent); outline-offset: 4px; }
    .cta-band :is(a):focus-visible { outline-color: #fff; }
  }
}

@media (max-width: 960px) {
  #home.tiling-page > .section.content .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #home.tiling-page > .section.content .steps li,
  #home.tiling-page > .section.content .steps li:nth-child(n+4) { grid-column: auto; }
  #home.tiling-page > .section.content .steps li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 850px) {
  #home.tiling-page > .section.content .service-list,
  #home.tiling-page > .section.content .proof-grid { grid-template-columns: 1fr; }
  #home.tiling-page .trust-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #home.tiling-page .trust-strip li:nth-child(odd) { border-left: 0; }
  #home.tiling-page .trust-strip li:nth-child(n+3) { border-top: 1px solid var(--t-line); }
}
@media (max-width: 600px) {
  #home.tiling-page > .section.content > .container { width: calc(100% - 36px); }
  #home.tiling-page > .section.content h2 { max-width: none; }
  #home.tiling-page > .section.content .work-grid { grid-template-columns: 1fr; }
  #home.tiling-page > .section.content .steps { grid-template-columns: 1fr; gap: 16px; }
  #home.tiling-page > .section.content .steps li { padding: 82px 22px 24px; }
  #home.tiling-page > .section.content .steps li::before { left: 22px; top: 22px; }
  #home.tiling-page > .section.content .faq summary { padding: 1.1rem; }
  #home.tiling-page > .section.content .faq p { padding: .9rem 1.1rem 1.2rem; }
  #home.tiling-page > .section.content .cta-band { padding: 1.25rem; }
  #home.tiling-page > .section.content .cta-band .button { width: 100%; }
  #home.tiling-page .trust-strip li { padding: .85rem 1rem; }
}
