/* =========================================================================
   Interior pages (About Us, Choosing an Attorney)
   Every block below maps 1:1 to a template part for the future WP theme.
   Global chrome lives in main.css; blocks shared with the front page
   (.section, .callout, .quote, .evaluation) live in components.css.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Page hero — the interior counterpart to the front page's photo hero.
   Deliberately photo-less: the front page owns the family portrait, and a
   second full-bleed image directly under the black nav would bury the H1.
   ------------------------------------------------------------------------- */

.page-hero {
  padding-block: clamp(2rem, 5.5vw, 4.5rem);
  border-bottom: 1px solid var(--color-rule);
  background: var(--color-bg-soft);

  .page-hero__inner {
    display: grid;
    justify-items: center;
    gap: clamp(0.75rem, 1.8vw, 1.25rem);
    text-align: center;
  }

  .page-hero__title {
    color: var(--color-heading);
    font-size: clamp(2rem, 4.7vw, 3.75rem);
    font-weight: 700;
  }

  /* A neutral mark under the H1 — enough to close the banner without
     introducing a colour the rest of the palette does not carry. */
  .page-hero__rule {
    width: 4.5rem;
    height: 0.25rem;
    border: 0;
    margin: 0;
    border-radius: var(--radius-pill);
    background: var(--color-mark);
  }

  .page-hero__lede {
    max-width: 46rem;
    color: var(--color-ink-soft);
    font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
    line-height: 1.7;
  }
}

/* -------------------------------------------------------------------------
   Bio — portrait beside the copy
   ------------------------------------------------------------------------- */

.bio {
  .bio__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(2rem, 4vw, 3.5rem);

    /* The portrait only earns a column of its own once the copy still has a
       comfortable measure beside it. */
    @media (min-width: 60rem) {
      grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
      align-items: start;
    }
  }

  .bio__aside {
    @media (min-width: 60rem) {
      position: sticky;
      top: 1.5rem;
    }
  }

  .bio__title {
    margin-bottom: 1.25rem;
    color: var(--color-black);
    font-size: clamp(1.75rem, 3.07vw, 2.625rem);
    font-weight: 700;
  }
}

.profile-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-white);

  /* 384×480 is the native size of the portrait; the ratio is declared so the
     card reserves its space before the image lands, and the max-width stops
     the browser upscaling past 1:1. */
  .profile-card__image {
    width: 100%;
    max-width: 24rem;
    aspect-ratio: 384 / 480;
    object-fit: cover;
  }

  .profile-card__body {
    display: grid;
    gap: 0.75rem;
    padding: clamp(1.25rem, 2.4vw, 1.75rem);
  }

  .profile-card__name {
    font-size: clamp(1.25rem, 1.9vw, 1.5rem);
    font-weight: 700;
  }

  .profile-card__list {
    display: grid;
    padding-top: 0.25rem;
    border-top: 1px solid var(--color-rule);
  }

  .profile-card__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-ink-soft);
    font-size: 1rem;

    svg {
      flex: none;
      width: 1.125rem;
      height: 1.125rem;
      color: var(--color-heading);
    }
  }

  .profile-card__link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--color-ink);
    word-break: break-word;
  }

  .profile-card__cta {
    margin-top: 0.5rem;
  }
}

/* -------------------------------------------------------------------------
   Credentials — practice areas, education, bar admissions, past positions
   ------------------------------------------------------------------------- */

.credentials {
  .credentials__title {
    margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
    color: var(--color-ink);
    font-family: var(--font-sans);
    font-size: clamp(1.75rem, 3.4vw, 2.75rem);
    font-weight: 700;
    text-align: center;
  }

  .credentials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: clamp(1.75rem, 3.5vw, 3rem);
  }
}

.credential {
  .credential__title {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-mark);
    color: var(--color-black);
    font-size: clamp(1.125rem, 1.6vw, 1.375rem);
    font-weight: 700;
  }

  .credential__list {
    display: grid;
  }

  .credential__item {
    padding-block: 0.7rem;
    border-bottom: 1px solid var(--color-rule);
    color: var(--color-ink-soft);
    font-size: 1rem;
    line-height: 1.5;

    &:last-child {
      border-bottom: 0;
    }
  }

  .credential__item-name {
    display: block;
    color: var(--color-ink);
    font-weight: 600;
  }
}

/* -------------------------------------------------------------------------
   Six characteristics of a good family law attorney
   ------------------------------------------------------------------------- */

.traits {
  .traits__title {
    margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
    color: var(--color-ink);
    font-family: var(--font-sans);
    font-size: clamp(1.75rem, 3.4vw, 2.75rem);
    font-weight: 700;
    text-align: center;
  }

  /* The intro is an optional slot. When one is present it takes over the gap
     above the cards, so the title tightens to it rather than double-spacing. */
  .traits__title:has(+ .traits__intro) {
    margin-bottom: 1rem;
  }

  .traits__intro {
    max-width: 46rem;
    margin: 0 auto clamp(1.75rem, 3.5vw, 2.75rem);
    color: var(--color-ink-soft);
    font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
    line-height: 1.7;
    text-align: center;
  }

  .traits__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2.2vw, 1.75rem);
    counter-reset: trait;

    @media (min-width: 56rem) {
      grid-template-columns: repeat(2, 1fr);
    }
  }
}

.trait {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: start;
  gap: 0.4rem clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1.25rem, 2.4vw, 2rem);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-white);
  counter-increment: trait;

  /* The numeral is decoration — the ordered list already carries the
     sequence — so it is drawn rather than written into the markup. */
  &::before {
    content: counter(trait, decimal-leading-zero);
    grid-row: 1 / span 2;
    align-self: start;
    margin-top: -0.1em;
    color: var(--color-mark);
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 2.8vw, 2.375rem);
    font-weight: 700;
    line-height: 1.1;
  }

  .trait__title {
    grid-column: 2;
    color: var(--color-black);
    font-size: clamp(1.1875rem, 1.9vw, 1.5rem);
    font-weight: 700;
    line-height: 1.3;
  }

  .trait__text {
    grid-column: 2;
    color: var(--color-ink-soft);
    font-size: clamp(1rem, 1.2vw, 1.0625rem);
    line-height: 1.7;
  }

  /* Under ~26rem the numeral column costs the copy more than it gives it, so
     the number tucks above the title and the text runs the full width. */
  @media (max-width: 26rem) {
    grid-template-columns: 1fr;

    &::before {
      grid-row: auto;
      grid-column: 1;
    }

    .trait__title,
    .trait__text {
      grid-column: 1;
    }
  }
}

/* -------------------------------------------------------------------------
   Offices
   ------------------------------------------------------------------------- */

.offices {
  .offices__title {
    margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem);
    color: var(--color-ink);
    font-family: var(--font-sans);
    font-size: clamp(1.75rem, 3.4vw, 2.75rem);
    font-weight: 700;
    text-align: center;
  }

  .offices__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
  }
}

.office {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-white);

  .office__title {
    color: var(--color-black);
    font-size: clamp(1.25rem, 2vw, 1.625rem);
    font-weight: 700;
  }

  .office__address {
    color: var(--color-ink-soft);
    font-size: 1.0625rem;
    font-style: normal;
    line-height: 1.6;
  }

  .office__list {
    display: grid;
    padding-top: 0.25rem;
    border-top: 1px solid var(--color-rule);
  }

  .office__item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-ink-soft);
    font-size: 1rem;

    svg {
      flex: none;
      width: 1.125rem;
      height: 1.125rem;
      color: var(--color-heading);
    }
  }

  .office__link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--color-ink);
    word-break: break-word;
  }

  .office__cta {
    justify-self: start;
    margin-top: 0.25rem;
  }
}
