/* ==========================================================================
   WW Housing Development LLC — about.css
   About page only. Shared components (.page-hero, .section-header, .check,
   .mark-underline, .btn, contact, footer) live in global.css.

   MOBILE FIRST: base rules target the smallest viewport; min-width queries
   enhance for larger screens (handbook §12).
   ========================================================================== */

/* ==========================================================================
   The firm — copy on the left, a stacked visual group on the right
   ========================================================================== */
.firm__inner {
  display: grid;
  gap: var(--space-2xl);
}

.firm__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
}

.firm__prose {
  margin: 0;
  color: var(--clr-muted);
  font-size: var(--fs-400);
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   Mission / Vision / Approach switcher
   A real ARIA tablist driven by js/about.js. Panels two and three carry the
   hidden attribute in the markup, so without JavaScript the first panel still
   shows rather than all three stacking.
   -------------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: var(--space-2xs);
  width: 100%;
  padding: var(--space-2xs);
  border-radius: var(--radius-pill);
  background-color: rgba(15, 42, 68, 0.07);
}

.tabs__btn {
  flex: 1;
  min-width: 0;
  padding: var(--space-sm) var(--space-xs);
  border: 0;
  border-radius: var(--radius-pill);
  background-color: transparent;
  color: var(--clr-muted);
  font-family: inherit;
  font-size: var(--fs-200);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: background-color var(--t-base) var(--ease-out),
    color var(--t-base) var(--ease-out);
}

.tabs__btn:hover {
  color: var(--clr-primary);
}

.tabs__btn[aria-selected="true"] {
  background-color: var(--clr-surface-alt);
  color: var(--clr-primary);
  box-shadow: 0 2px 10px rgba(10, 30, 50, 0.1);
}

.firm__panel {
  margin: 0;
  color: var(--clr-muted);
  font-size: var(--fs-300);
  line-height: 1.75;
}

.firm__panel[hidden] {
  display: none;
}

.firm__features {
  display: grid;
  gap: var(--space-lg);
  width: 100%;
}

/* --------------------------------------------------------------------------
   Closing row
   -------------------------------------------------------------------------- */
.firm__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-lg);
  width: 100%;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--clr-line);
}

.firm__call {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: inherit;
  text-decoration: none;
}

.firm__call-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border-radius: var(--radius-md);
  background-color: var(--clr-accent-light);
  color: var(--clr-primary);
  transition: background-color var(--t-base) var(--ease-out);
}

.firm__call:hover .firm__call-icon,
.firm__call:focus-visible .firm__call-icon {
  background-color: var(--clr-accent);
}

.firm__call-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

.firm__call-label {
  display: block;
  color: var(--clr-primary);
  font-size: var(--fs-300);
  font-weight: var(--fw-bold);
  line-height: 1.3;
}

.firm__call-value {
  display: block;
  color: var(--clr-muted);
  font-size: var(--fs-300);
}

/* --------------------------------------------------------------------------
   Visual group: photograph, overlapping stat card, circular badge
   Stacked in normal flow on small screens; the pieces only overlap once
   there is room for them to at 64em.
   -------------------------------------------------------------------------- */
.firm__visual {
  position: relative;
}

.firm__photo {
  display: block;
  aspect-ratio: 4 / 5;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: rgba(15, 42, 68, 0.08);
}

.firm__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* .firm__stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  width: calc(100% - var(--space-xl));
  margin: calc(var(--space-2xl) * -1) auto 0;
  padding: var(--space-lg);
  border: 1px solid var(--clr-line);
  border-radius: var(--radius-lg);
  background-color: var(--clr-surface-alt);
  box-shadow: 0 18px 40px rgba(10, 30, 50, 0.12);
  text-align: center;
} */

.firm__stat-figure {
  font-size: clamp(2rem, 7vw, 2.75rem);
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--clr-primary);
}

.firm__stat-label {
  color: var(--clr-muted);
  font-size: var(--fs-300);
  line-height: 1.5;
}

.firm__stat-note {
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--clr-line);
  color: var(--clr-accent);
  font-size: var(--fs-200);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Rotating ring of text. SVG textPath is what puts type on a circle; the
   monogram sits in the middle as ordinary markup. */
.firm__badge {
  position: absolute;
  left: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background-color: var(--clr-primary);
}

.firm__badge-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: badge-spin 28s linear infinite;
}

.firm__badge-ring text {
  fill: var(--clr-accent-light);
  font-family: var(--ff-body);
  font-size: 9px;
  font-weight: var(--fw-bold);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

@keyframes badge-spin {
  to {
    transform: rotate(360deg);
  }
}

.firm__badge-mark {
  position: relative;
  font-family: var(--ff-heading);
  font-size: var(--fs-300);
  font-weight: var(--fw-bold);
  color: var(--clr-surface);
}

/* ==========================================================================
   Leadership — one full-width row per principal
   ========================================================================== */
.leadership {
  /* White, so its curves come from the white copy of the artwork */
  --curve-image: url("../images/svg-backgrounds/curve-divider-white.svg");
  background-color: var(--clr-surface-alt);
}

/* Principal switcher. Wider than the mission/vision pills, and it wraps
   rather than squeezing two full names onto one line. */
.people__tabs {
  margin-bottom: var(--space-xl);
}

.people__tabs .tabs__btn {
  padding-block: var(--space-sm);
  white-space: normal;
  line-height: 1.3;
}

.bio {
  display: grid;
  gap: var(--space-lg);
}

.bio[hidden] {
  display: none;
}

.bio__photo {
  display: block;
  aspect-ratio: 4 / 5;
  max-width: 24rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: rgba(15, 42, 68, 0.08);
}

.bio__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio__body {
  min-width: 0;
}

.bio__name {
  margin: 0 0 var(--space-2xs);
  font-size: clamp(1.75rem, 5.5vw, 2.5rem);
  font-weight: var(--fw-bold);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.bio__role {
  margin: 0 0 var(--space-lg);
  color: var(--clr-muted);
  font-size: var(--fs-300);
  font-weight: var(--fw-semibold);
}

.bio__prose p {
  margin: 0 0 var(--space-md);
  color: var(--clr-muted);
  font-size: var(--fs-300);
  line-height: 1.75;
}

.bio__prose p:last-child {
  margin-bottom: 0;
}

/* Affiliation pairs — person-specific, rather than repeating the firm's
   switchboard details under both principals */
.bio__facts {
  display: grid;
  gap: var(--space-md);
  margin: var(--space-lg) 0 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--clr-line);
}

.bio__facts dt {
  margin-bottom: var(--space-2xs);
  color: var(--clr-muted);
  font-size: var(--fs-200);
  font-weight: var(--fw-semibold);
}

.bio__facts dd {
  margin: 0;
  color: var(--clr-primary);
  font-size: var(--fs-400);
  font-weight: var(--fw-bold);
  line-height: 1.4;
}

.bio__block {
  margin-top: var(--space-xl);
}

.bio__block h4 {
  margin: 0 0 var(--space-sm);
  font-size: var(--fs-500);
  font-weight: var(--fw-bold);
  color: var(--clr-primary);
}

.bio__block p {
  margin: 0 0 var(--space-md);
  color: var(--clr-muted);
  font-size: var(--fs-300);
  line-height: 1.7;
}

.bio__checks {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* ==========================================================================
   What sets us apart — copy on the left, stacked photographs on the right
   ========================================================================== */
.apart {
  background-color: var(--clr-surface);
}

.apart__inner {
  display: grid;
  gap: var(--space-2xl);
}

.apart__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
}

/* Rules above and below the list, as in the reference */
.apart__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  width: 100%;
  padding-block: var(--space-xl);
  border-top: 1px solid var(--clr-line);
  border-bottom: 1px solid var(--clr-line);
}

.apart__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-lg);
}

/* --------------------------------------------------------------------------
   Two photographs, the front one stepped down and across
   -------------------------------------------------------------------------- */
.apart__visual {
  position: relative;
  padding-bottom: 18%;
}

.apart__photo {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: rgba(15, 42, 68, 0.08);
}

.apart__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.apart__photo--back {
  width: 78%;
}

.apart__photo--front {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58%;
  /* Ring in the section colour, so the two photographs read as separate
     cards rather than one collaged block */
  border: 0.5rem solid var(--clr-surface);
}

/* Decorative brass wave. Pseudo-decoration, hidden from assistive tech. */
.apart__squiggle {
  position: absolute;
  top: 4%;
  right: 2%;
  width: clamp(3.5rem, 9vw, 5.5rem);
  height: auto;
  color: var(--clr-accent);
  opacity: 0.75;
  pointer-events: none;
}

/* ==========================================================================
   Larger screens — min-width only
   ========================================================================== */
@media (min-width: 48em) {
  .tabs__btn {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--fs-300);
  }

  .firm__features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-xl);
  }

  .bio {
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: start;
  }

  .bio__photo {
    max-width: none;
  }

  .bio__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apart__list {
    gap: var(--space-xl) var(--space-2xl);
  }
}

@media (min-width: 64em) {
  /* Copy left, visual group right */
  .firm__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--space-2xl);
    align-items: center;
  }

  /* The three pieces overlap only now that there is room for them to.
     padding-bottom keeps the badge inside the section. */
  .firm__visual {
    padding-bottom: var(--space-2xl);
  }

  .firm__photo {
    width: 82%;
  }

  .firm__stat {
    position: absolute;
    right: 0;
    top: 26%;
    width: 58%;
    margin: 0;
    text-align: left;
  }

  .firm__badge {
    left: 8%;
    width: 7.5rem;
    height: 7.5rem;
  }

  .firm__badge-ring text {
    font-size: 8px;
  }

  .bio {
    grid-template-columns: 20rem minmax(0, 1fr);
    gap: var(--space-2xl);
  }

  /* The bios run long, so the portrait travels with the text instead of
     leaving a tall empty column beneath itself. align-self: start is what
     lets the grid item stick rather than stretch. */
  .bio__media {
    position: sticky;
    top: calc(var(--nav-bar-height) + var(--space-lg));
    align-self: start;
  }

  .apart__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--space-2xl);
    align-items: center;
  }
}

/* ==========================================================================
   Reduced motion — no smooth scrolling inside the carousel
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .firm__badge-ring {
    animation: none;
  }
}

/* ==========================================================================
   Curve stacking

   A section's lower curve hangs down over the section beneath it. Both carry
   z-index: 1 from .curve-out, and where two sit side by side the later one
   wins on document order and paints its own ground straight over the curve
   reaching into it. So a run of solid sections counts down: each outranks the
   one it reaches into.
   ========================================================================== */
.firm {
  z-index: 3;
}

.leadership {
  z-index: 2;
}

.apart {
  z-index: 1;
}
