/* Inner-page polish: tighter rhythm, card grids instead of long text rows, and image-backed intros.
   Loaded last on the about, services and service-chapter pages. Copy and colour tokens are untouched. */

/* ---- Rhythm: the old overlap that justified the tall gaps no longer exists. ---- */
.detail-about, .accounting-intro { padding-block: clamp(80px, 7vw, 120px) clamp(80px, 7vw, 120px); }
.detail-scope, .accounting-scope,
.detail-benefits, .accounting-benefits,
.detail-process, .accounting-process,
.service-offer, .service-method,
.story-who, .story-expertise, .story-values, .story-team { padding-block: clamp(80px, 7vw, 125px); }
.detail-closing, .accounting-closing, .service-invite, .story-closing { padding-block: clamp(70px, 6vw, 105px); }

.detail-about h2, .detail-scope h2, .detail-benefits h2, .detail-process h2,
.accounting-intro h2, .accounting-scope h2, .accounting-benefits h2, .accounting-process h2 {
  font-size: clamp(38px, 3.6vw, 56px);
}
.service-section-intro h2 { font-size: clamp(40px, 4vw, 62px); }
.story-section-heading h2, .story-heading-split h2, .story-purpose-heading h2,
.story-values-heading h2, .story-team h2 { font-size: clamp(36px, 3.5vw, 54px); }
.detail-benefits-head, .accounting-benefits-head, .service-section-intro, .story-heading-split {
  margin-bottom: clamp(44px, 4.5vw, 70px);
}
.detail-process-head, .accounting-process-head { margin-bottom: clamp(44px, 4.5vw, 70px); }
.story-values-heading { margin-bottom: clamp(44px, 4.5vw, 70px); }

/* ---- Editorial splits: heading and body together in the reading column, image opposite. ---- */
.editorial-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(48px, 7vw, 120px);
}
.editorial-split-copy { min-width: 0; }
.editorial-split :is(.story-team-copy, .detail-about-copy, .accounting-intro-copy) {
  margin-top: clamp(22px, 2.5vw, 36px);
  padding: 0;
  border: 0;
}
.editorial-split :is(.story-team-copy, .detail-about-copy, .accounting-intro-copy) p { max-width: 68ch; }
.editorial-split .editorial-split-media { width: 100%; margin: 0; aspect-ratio: 4 / 3; }

.polish-figure {
  position: relative;
  margin: clamp(32px, 3.5vw, 52px) 0 0;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: var(--plum-deep);
}
.polish-figure::after {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(250, 247, 242, .45);
  content: '';
  pointer-events: none;
}
.polish-figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.detail-about-grid, .accounting-intro-grid { align-items: center; }

/* ---- Scope: heading across the top, services as a card grid. ---- */
.detail-scope-grid, .accounting-scope-grid { grid-template-columns: 1fr; gap: clamp(36px, 4vw, 60px); }
.detail-scope-heading, .accounting-scope-heading {
  position: static;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.detail-scope-heading h2, .accounting-scope-heading h2 { flex: 1 1 560px; }
.detail-scope-heading > .detail-kicker, .accounting-scope-heading > .accounting-kicker { flex: 0 0 100%; }
.detail-scope-heading > span, .accounting-scope-heading > span { margin: 0; font-size: clamp(48px, 5vw, 80px); }
.detail-scope-list, .accounting-scope-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border-bottom: 0;
}
.accounting-scope-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-scope-row, .accounting-scope-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 30px 34px;
  border: 1px solid var(--scope-rule, rgba(250, 247, 242, .25));
  border-top-width: 1px;
  position: relative;
  background: rgba(127, 127, 127, .06);
  transition: background .3s ease, transform .3s ease;
}
.detail-scope-row:hover, .accounting-scope-row:hover { background: rgba(127, 127, 127, .14); transform: translateY(-3px); }
.detail-scope-row > .polish-num, .accounting-scope-number {
  position: absolute;
  inset-block-start: 24px;
  left: 26px;
  right: auto;
  padding: 3px 12px;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-size: 14px;
}
.detail-scope-row h3, .accounting-scope-row h3 { font-size: clamp(22px, 1.8vw, 28px); }
.detail-scope-row p, .accounting-scope-row p { grid-column: auto; max-width: none; font-size: clamp(15px, 1.05vw, 17px); line-height: 1.9; }

/* ---- Benefits and process: keep the cards, remove the dead height. ---- */
.detail-benefits-list article, .accounting-benefits-grid article { min-height: 0; }
.detail-benefits-list h3, .accounting-benefits-grid h3 { margin: 18px 0 12px; font-size: clamp(22px, 1.9vw, 30px); }
.detail-process-list article, .accounting-process-steps article, .service-method-step { min-height: 0; }
.detail-process-list h3, .accounting-process-steps h3, .service-method-step h3 { margin-block: 22px 14px; font-size: clamp(22px, 1.9vw, 30px); }
.accounting-process-steps article::before, .service-method-step::before { display: none; }
.accounting-process-steps article, .service-method-step {
  padding: 28px 28px 34px;
  border: 1px solid rgba(127, 127, 127, .4);
  border-top-width: 1px;
}
.accounting-process-steps, .service-method-steps { gap: 14px; }

/* ---- Services overview and About lists: card grids rather than a long ruled table. ---- */
.service-offer-list, .story-expertise-list, .story-values-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border-bottom: 0;
}
/* Keep the final item of any odd two-column card set from leaving a blank cell. */
.service-offer-list > :last-child:nth-child(odd),
.story-expertise-list > :last-child:nth-child(odd),
.story-values-list > :last-child:nth-child(odd),
.detail-scope-list > :last-child:nth-child(odd),
.detail-process-list > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.service-offer-row, .story-expertise-row, .story-value {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 30px 32px 36px;
  border: 1px solid rgba(38, 30, 45, .22);
  background: rgba(255, 255, 255, .45);
  transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
}
.service-offer-row:hover, .story-expertise-row:hover, .story-value:hover {
  padding-inline: 32px;
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(38, 30, 45, .1);
}
.service-offer-row h3 { max-width: none; font-size: clamp(26px, 2.3vw, 36px); }
.service-offer-row .service-row-copy { width: 100%; }
.story-expertise-row h3, .story-value h3 { font-size: clamp(22px, 1.9vw, 30px); }
.story-value p, .story-expertise-row p { max-width: none; }
.story-values-list > .story-value:last-child:nth-child(odd) {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.story-values-list > .story-value:last-child:nth-child(odd) > .polish-icon { grid-column: 1; grid-row: 1; }
.story-values-list > .story-value:last-child:nth-child(odd) > h3 { grid-column: 1; grid-row: 2; }
.story-values-list > .story-value:last-child:nth-child(odd) > p { grid-column: 2; grid-row: 2; }

/* ---- Hero sub-navigation and closing band get a little more presence. ---- */
.detail-closing h2, .accounting-closing h2, .service-invite h2 { font-size: clamp(38px, 4.2vw, 64px); }
.detail-faq, .accounting-faq, .service-faq { padding-block: clamp(70px, 6vw, 110px); }

@media (max-width: 1050px) {
  .accounting-scope-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .detail-scope-list, .accounting-scope-list,
  .service-offer-list, .story-expertise-list, .story-values-list { grid-template-columns: 1fr; gap: 10px; }
  .detail-scope-row, .accounting-scope-row,
  .service-offer-row, .story-expertise-row, .story-value { padding: 24px 22px 28px; }
  .story-values-list > .story-value:last-child:nth-child(odd) { display: flex; }
  .polish-figure { aspect-ratio: 4 / 3; }
  .detail-about, .accounting-intro { padding-block: 64px 72px; }
  .detail-scope, .accounting-scope, .detail-benefits, .accounting-benefits,
  .detail-process, .accounting-process, .service-offer, .service-method,
  .story-who, .story-expertise, .story-values, .story-team { padding-block: 64px 72px; }
  .detail-closing h2, .accounting-closing h2, .service-invite h2 { font-size: clamp(34px, 8vw, 46px); }
}

@media (prefers-reduced-motion: reduce) {
  .detail-scope-row, .accounting-scope-row, .service-offer-row, .story-expertise-row, .story-value { transition: none; }
  .detail-scope-row:hover, .accounting-scope-row:hover, .service-offer-row:hover,
  .story-expertise-row:hover, .story-value:hover { transform: none; }
}

/* ---- Custom icons: monochrome masks, so one file follows the card's text colour. ---- */
.polish-icon {
  display: block;
  flex: none;
  width: 56px;
  height: 56px;
  margin-bottom: 6px;
  background-color: var(--scope-accent, #607966);
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}
.polish-icon-lg { width: 72px; height: 72px; margin-bottom: 4px; background-color: #607966; }
.detail-benefits .polish-icon, .accounting-benefits .polish-icon { background-color: #607966; }
.accounting-scope .polish-icon { background-color: var(--sage); }
.story-expertise .polish-icon, .story-values .polish-icon { background-color: #607966; }
.detail-benefits-list article > .polish-num, .story-expertise-row > .polish-num, .story-value > .polish-num {
  position: absolute;
  inset-block-start: 24px;
  left: 26px;
  right: auto;
}
.detail-benefits-list article, .accounting-benefits-grid article { position: relative; }
.service-offer-row { position: relative; }
.service-offer-row .service-row-number { position: absolute; inset-block-start: 24px; left: 26px;
  right: auto; }
.story-expertise-row, .story-value { position: relative; }
.polish-figure-wide { aspect-ratio: 16 / 10; }

@media (max-width: 900px) {
  .editorial-split { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .editorial-split .editorial-split-media { aspect-ratio: 16 / 10; }
}

/* ---- Service heroes: one composition for all four. Copy on the right, photo full-height on
   the left fading into plum, and a link strip that sizes itself to however many links there are. ---- */
.detail-audit, .detail-investment, .detail-tax {
  --hero-bg: #261e2d; --hero-fg: #faf7f2; --hero-muted: #e0d8e1; --hero-kicker: #a5bbaa;
  --hero-button-bg: #faf7f2; --hero-button-fg: #261e2d;
}
.detail-hero, .accounting-hero { background: #261e2d; color: #faf7f2; }
.accounting-hero h1 { color: #faf7f2; }
.accounting-hero-lead { color: #e0d8e1; }
.accounting-hero .accounting-kicker { color: #a5bbaa; }
.accounting-hero .accounting-booking { background: #faf7f2; color: #261e2d; cursor: pointer; }

@media (min-width: 701px) {
  .detail-hero .detail-hero-photo, .accounting-hero .accounting-hero-photo,
  .detail-investment .detail-hero-photo, .detail-tax .detail-hero-photo {
    inset-block: 0;
    inset-inline: auto 0;
    width: 46%;
    border: 0;
    box-shadow: none;
  }
  .detail-hero .detail-hero-photo::after, .accounting-hero .accounting-hero-photo::after,
  .detail-investment .detail-hero-photo::after, .detail-tax .detail-hero-photo::after {
    display: block;
    background: linear-gradient(270deg, rgba(38, 30, 45, .92) 0%, rgba(38, 30, 45, .35) 28%, transparent 55%);
  }
  .detail-hero-inner, .accounting-hero-inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    grid-template-rows: minmax(470px, calc(100svh - 88px - 124px - 32px)) auto;
  }
  .detail-hero-copy, .accounting-hero-copy { padding-block: 56px 48px; }
  .detail-hero h1, .detail-investment .detail-hero h1, .detail-tax .detail-hero h1, .accounting-hero h1 {
    max-width: 640px;
    font-size: clamp(40px, 3.9vw, 58px);
  }
  .detail-hero-lead, .accounting-hero-lead { font-size: clamp(17px, 1.3vw, 20px); }
  .detail-hero-index, .accounting-hero-index {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    box-shadow: 0 0 0 100vmax #261e2d;
    clip-path: inset(0 -100vmax);
  }
  .detail-hero-index a, .accounting-hero-index a { min-height: 124px; }
}

@media (max-width: 700px) {
  .detail-hero-index a:last-child:nth-child(odd), .accounting-hero-index a:last-child:nth-child(odd) { grid-column: 1 / -1; border-inline-end: 0; }
}

/* Icon sources live here, not in inline styles: the production CSP blocks style attributes. */
.i-accounting-1 { --i: url(assets/icons/accounting-1.png); }
.i-accounting-2 { --i: url(assets/icons/accounting-2.png); }
.i-accounting-3 { --i: url(assets/icons/accounting-3.png); }
.i-accounting-4 { --i: url(assets/icons/accounting-4.png); }
.i-accounting-5 { --i: url(assets/icons/accounting-5.png); }
.i-accounting-6 { --i: url(assets/icons/accounting-6.png); }
.i-accounting-7 { --i: url(assets/icons/accounting-7.png); }
.i-accounting-8 { --i: url(assets/icons/accounting-8.png); }
.i-accounting-9 { --i: url(assets/icons/accounting-9.png); }
.i-audit-1 { --i: url(assets/icons/audit-1.png); }
.i-audit-2 { --i: url(assets/icons/audit-2.png); }
.i-audit-3 { --i: url(assets/icons/audit-3.png); }
.i-audit-4 { --i: url(assets/icons/audit-4.png); }
.i-benefit-audit-1 { --i: url(assets/icons/benefit-audit-1.png); }
.i-benefit-audit-2 { --i: url(assets/icons/benefit-audit-2.png); }
.i-benefit-audit-3 { --i: url(assets/icons/benefit-audit-3.png); }
.i-benefit-audit-4 { --i: url(assets/icons/benefit-audit-4.png); }
.i-benefit-investment-1 { --i: url(assets/icons/benefit-investment-1.png); }
.i-benefit-investment-2 { --i: url(assets/icons/benefit-investment-2.png); }
.i-benefit-investment-3 { --i: url(assets/icons/benefit-investment-3.png); }
.i-benefit-investment-4 { --i: url(assets/icons/benefit-investment-4.png); }
.i-benefit-tax-1 { --i: url(assets/icons/benefit-tax-1.png); }
.i-benefit-tax-2 { --i: url(assets/icons/benefit-tax-2.png); }
.i-benefit-tax-3 { --i: url(assets/icons/benefit-tax-3.png); }
.i-benefit-tax-4 { --i: url(assets/icons/benefit-tax-4.png); }
.i-investment-1 { --i: url(assets/icons/investment-1.png); }
.i-investment-10 { --i: url(assets/icons/investment-10.png); }
.i-investment-11 { --i: url(assets/icons/investment-11.png); }
.i-investment-2 { --i: url(assets/icons/investment-2.png); }
.i-investment-3 { --i: url(assets/icons/investment-3.png); }
.i-investment-4 { --i: url(assets/icons/investment-4.png); }
.i-investment-5 { --i: url(assets/icons/investment-5.png); }
.i-investment-6 { --i: url(assets/icons/investment-6.png); }
.i-investment-7 { --i: url(assets/icons/investment-7.png); }
.i-investment-8 { --i: url(assets/icons/investment-8.png); }
.i-investment-9 { --i: url(assets/icons/investment-9.png); }
.i-tax-1 { --i: url(assets/icons/tax-1.png); }
.i-tax-2 { --i: url(assets/icons/tax-2.png); }
.i-tax-3 { --i: url(assets/icons/tax-3.png); }
.i-tax-4 { --i: url(assets/icons/tax-4.png); }
.i-value-1 { --i: url(assets/icons/value-1.png); }
.i-value-2 { --i: url(assets/icons/value-2.png); }
.i-value-3 { --i: url(assets/icons/value-3.png); }
.i-value-4 { --i: url(assets/icons/value-4.png); }
.i-value-5 { --i: url(assets/icons/value-5.png); }
