/*
 * ═══════════════════════════════════════════════════════════════════════════
 * PSCA & CO. — ABOUT PAGE STYLES  v1.0
 * ───────────────────────────────────────────────────────────────────────────
 * Sections:
 *   1. Page Hero (non-carousel — static editorial header)
 *   2. Firm Story (intro text + pull-quote)
 *   3. Milestones Timeline
 *   4. Practice Profile (numbers)
 *   5. Leadership Overview (founding partners teaser)
 *   6. Quality & Credentials (AQMM, Peer Review, ICAI)
 *   7. Values
 * ═══════════════════════════════════════════════════════════════════════════
 */


/* ═══════════════════════════════════════════════════════════════════════════
   SHARED PAGE HERO — reused across all interior pages
═══════════════════════════════════════════════════════════════════════════ */

.page-hero {
  background: var(--color-surface-page);
  /* [P1] was calc(nav-height + section-sm): body already offsets for the fixed nav
     via padding-top; adding nav-height again created a ~132px dead gap above the
     breadcrumb on all interior pages. Only the editorial breathing room belongs here. */
  padding-top: var(--space-section-sm);
  padding-bottom: var(--space-section-sm);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border-subtle);
}

/* Faint warm glow top-right — retains editorial depth */
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, transparent 40%, rgba(184, 146, 30, 0.05) 100%);
  pointer-events: none;
}

/* ── Two-column hero layout: editorial content left + TOC navigator right ── */
.page-hero__layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: var(--space-20);
  align-items: start;
}

/* Gold left border treatment */
.page-hero__content {
  position: relative;
  z-index: 1;
  border-left: 4px solid var(--color-gold);
  padding-left: var(--space-8);
}

/* ── "On This Page" navigator ─────────────────────────────────────────────
   Typographic only — no borders, no backgrounds.
   Active section tracked via IntersectionObserver in global.js.
───────────────────────────────────────────────────────────────────────── */
.page-hero__toc {
  padding-top: var(--space-12); /* drops baseline to below breadcrumb + overline */
  position: relative;
  z-index: 1;
}

.page-hero__toc-label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-caption-size);
  font-weight: var(--text-label-weight);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-3);
}

.page-hero__toc-rule {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--color-gold);
  margin-bottom: var(--space-5);
}

.page-hero__toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.page-hero__toc-link {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-body-sm-size);
  font-weight: 400;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-2) 0;
  line-height: 1.4;
  transition: color var(--transition-fast);
}

.page-hero__toc-link:hover {
  color: var(--color-navy);
}

/* Active: colour shifts to gold, weight tightens — no indicator border needed */
.page-hero__toc-link.is-active {
  color: var(--color-gold);
  font-weight: 500;
}

/* ── Scroll offset — compensates for fixed nav + ticker on anchor jumps ── */
.story-section,
.timeline-section,
.quality-section,
.values-section,
.services-intro,
.services-full,
.team-section {
  scroll-margin-top: calc(var(--nav-height) + var(--banner-height) + var(--space-8));
}

/* ── Hide TOC on tablet/mobile — too narrow to share horizontal space ── */
@media (max-width: 960px) {
  .page-hero__layout {
    grid-template-columns: 1fr;
  }
  .page-hero__toc {
    display: none;
  }
}

.page-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-caption-size);
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  text-transform: uppercase;
}

.page-hero__breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.page-hero__breadcrumb a:hover { color: var(--color-gold); }

.page-hero__breadcrumb-sep {
  color: var(--color-gold);
  font-size: 0.55rem;
}

.page-hero__overline {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-label-size);
  font-weight: var(--text-label-weight);
  letter-spacing: var(--text-label-ls);
  text-transform: var(--text-label-transform);
  color: var(--color-gold);
  margin-bottom: var(--space-4);
}

.page-hero__heading {
  font-family: var(--font-serif);
  font-size: var(--text-h1-size);
  font-weight: var(--text-h1-weight);
  line-height: var(--text-h1-lh);
  letter-spacing: var(--text-h1-ls);
  color: var(--color-navy);
  max-width: 640px;
  margin-bottom: var(--space-6);
}

.page-hero__heading em {
  font-style: italic;
  font-weight: 300;
  color: var(--color-navy-mid);
}

.page-hero__rule {
  display: block;
  width: 48px;
  height: 2px;
  background: var(--color-gold);
  margin-bottom: var(--space-6);
}

.page-hero__sub {
  font-family: var(--font-sans);
  font-size: var(--text-body-lg-size);
  font-weight: var(--text-body-weight); /* [P2] was 300; DM Sans weight-discipline min is 400 */
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 560px;
}

/* [P2] Mobile: reduce content indent so gold border + padding don't eat too
   much of the available viewport width on narrow screens. */
@media (max-width: 600px) {
  .page-hero__content {
    padding-left: var(--space-5); /* 20px vs 32px on desktop */
    border-left-width: 3px;
  }
  .page-hero__sub {
    font-size: var(--text-body-size); /* step down one level on mobile */
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   1. FIRM STORY
═══════════════════════════════════════════════════════════════════════════ */

.story-section {
  padding-block: var(--space-section);
  background: var(--color-surface-page);
}

.story-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-20);
  align-items: start;
}

.story-body p {
  font-family: var(--font-sans);
  font-size: var(--text-body-lg-size);
  line-height: var(--text-body-lg-lh);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

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

/* Pull quote */
.pull-quote {
  border-left: 3px solid var(--color-gold);
  padding-left: var(--space-8);
  margin-top: var(--space-10);
}

.pull-quote__text {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 400;
  line-height: 1.4;
  font-style: italic;
  color: var(--color-navy);
}

.pull-quote__attr {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-body-sm-size);
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  margin-top: var(--space-4);
}

/* Sidebar stats / highlights */
.story-aside {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.story-aside__item {
  border-top: 1px solid var(--color-border-subtle);
  padding-top: var(--space-6);
}

.story-aside__value {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--color-navy);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}

.story-aside__value em {
  color: var(--color-gold);
  font-style: normal;
}

.story-aside__label {
  font-family: var(--font-sans);
  font-size: var(--text-body-sm-size);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .story-layout {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  .story-aside {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

@media (max-width: 520px) {
  .story-aside { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   2. MILESTONES TIMELINE
═══════════════════════════════════════════════════════════════════════════ */

.timeline-section {
  padding-block: var(--space-section);
  background: var(--color-surface-muted);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.timeline {
  position: relative;
  margin-top: var(--space-component);
}

/* Vertical rule */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--color-rule-gold) 8%,
    var(--color-rule-gold) 92%,
    transparent
  );
  transform: translateX(-50%);
}

.timeline__item {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 0 var(--space-6);
  margin-bottom: var(--space-12);
  align-items: start;
}

.timeline__item:last-child { margin-bottom: 0; }

/* Even items: content on right */
.timeline__item:nth-child(even) .timeline__content {
  grid-column: 3;
  grid-row: 1;
}
.timeline__item:nth-child(even) .timeline__year-col {
  grid-column: 2;
  grid-row: 1;
}
.timeline__item:nth-child(even) .timeline__spacer {
  grid-column: 1;
  grid-row: 1;
}

/* Odd items: content on left */
.timeline__item:nth-child(odd) .timeline__content {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
}
.timeline__item:nth-child(odd) .timeline__year-col {
  grid-column: 2;
  grid-row: 1;
}
.timeline__item:nth-child(odd) .timeline__spacer {
  grid-column: 3;
  grid-row: 1;
}

.timeline__year-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.timeline__dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  border: 3px solid var(--color-surface-muted);
  box-shadow: 0 0 0 1px var(--color-gold);
  flex-shrink: 0;
  margin-top: var(--space-1);
}

.timeline__year {
  font-family: var(--font-sans);
  font-size: var(--text-label-size);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-gold-deep);
  white-space: nowrap;
}

.timeline__content {}

.timeline__event {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.timeline__desc {
  font-family: var(--font-sans);
  font-size: var(--text-body-sm-size);
  line-height: var(--text-body-sm-lh);
  color: var(--color-text-secondary);
}

/* Mobile: single column */
@media (max-width: 700px) {
  .timeline::before { left: 16px; transform: none; }

  .timeline__item {
    grid-template-columns: 40px 1fr;
    gap: 0 var(--space-4);
  }

  .timeline__item:nth-child(odd) .timeline__content,
  .timeline__item:nth-child(even) .timeline__content {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
  }
  .timeline__item:nth-child(odd) .timeline__year-col,
  .timeline__item:nth-child(even) .timeline__year-col {
    grid-column: 1;
    grid-row: 1;
  }
  .timeline__item:nth-child(odd) .timeline__spacer,
  .timeline__item:nth-child(even) .timeline__spacer {
    display: none;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   3. QUALITY & CREDENTIALS
═══════════════════════════════════════════════════════════════════════════ */

.quality-section {
  padding-block: var(--space-section);
  background: var(--color-surface-dark);
  color: var(--color-text-inverse);
}

.quality-section .section-heading { color: var(--color-text-inverse); }
.quality-section .overline { color: var(--color-gold); }
.quality-section .section-sub { color: var(--color-on-dark-muted); } /* [P2] was 0.6 raw; token ~5:1 WCAG AA */

.quality-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-component);
}

.quality-card {
  border: 1px solid var(--color-on-dark-rule); /* [P2] was rgba raw; token */
  border-radius: var(--radius-md);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: border-color var(--transition-base);
}

.quality-card:hover {
  border-color: var(--color-gold-a40); /* [P2] was rgba raw; token */
}

.quality-card__icon {
  width: 48px;
  height: 48px;
  color: var(--color-gold);
}

.quality-card__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quality-card__title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-text-inverse);
  line-height: 1.25;
}

.quality-card__desc {
  font-family: var(--font-sans);
  font-size: var(--text-body-sm-size);
  line-height: 1.7;
  color: var(--color-on-dark-muted); /* [P2] was rgba raw; token ~5:1 WCAG AA */
  flex: 1;
}

/* AQMM level badge */
.quality-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-caption-size);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-navy-dark);
  background: var(--color-gold);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  width: fit-content;
}

@media (max-width: 900px) {
  .quality-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .quality-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   4. FIRM VALUES
═══════════════════════════════════════════════════════════════════════════ */

.values-section {
  padding-block: var(--space-section);
  background: var(--color-surface-page);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  margin-top: var(--space-component);
}

.value-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.value-item__number {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  color: var(--color-gold-pale);
  letter-spacing: -0.02em;
}

.value-item__title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-navy);
  line-height: 1.2;
}

.value-item__rule {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--color-gold);
}

.value-item__desc {
  font-family: var(--font-sans);
  font-size: var(--text-body-sm-size);
  line-height: 1.7;
  color: var(--color-text-secondary);
}

@media (max-width: 900px) {
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .values-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   SCROLL REVEAL (same as index)
═══════════════════════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-reveal), transform var(--transition-reveal);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-group .reveal:nth-child(1) { transition-delay: 0ms; }
.reveal-group .reveal:nth-child(2) { transition-delay: 80ms; }
.reveal-group .reveal:nth-child(3) { transition-delay: 160ms; }
.reveal-group .reveal:nth-child(4) { transition-delay: 240ms; }
.reveal-group .reveal:nth-child(5) { transition-delay: 320ms; }
.reveal-group .reveal:nth-child(6) { transition-delay: 400ms; }
