/* ============================================================================
   design-v2.css — the redesign layer. Loaded AFTER site.css and only changes how
   things look; it carries no content. Remove the <link> to it and the site goes
   back to exactly how it was.

   Patterns taken from the consultancy sites reviewed (Kearney, Thoughtworks,
   Slalom, Infosys): image-led four-up tiles with a category label, alternating
   art and text blocks for products, plain-language menu labels, generous
   spacing, one primary button per view.
   ========================================================================== */

/* ---- Palette: deep green, warm brown ground, maroon accent ------------------
   Overrides the colour tokens in site.css, so every component picks it up. The
   old brass tokens (--gold-*) stay for small ornaments only.                    */
:root:not([data-theme='dark']) {
  --ink:    #1B1712;
  --ink-2:  #40382F;
  --ink-3:  #5D5348;
  --ink-4:  #685D50;

  --bg:        #F2EBE0;   /* warm sand */
  --bg-2:      #EADFCF;
  --bg-3:      #DECFBB;
  --surface:   #FBF8F3;
  --surface-2: #F6F0E6;

  --line:   #D9CCB8;
  --line-2: #C3B298;
  --line-3: #E8DDCC;

  --accent:      #5A1423;   /* very dark maroon: 11:1 on --bg */
  --accent-2:    #430F1A;
  --accent-soft: #F1E4E2;
  --accent-line: #D9B9BA;
  --accent-ink:  #FFFFFF;

  --brown: #6B4A33;

  --brand:     #0F2620;   /* deep green */
  --brand-2:   #1B3B31;
  --brand-ink: #F4F1E9;
  --brand-mut: #A9BAB1;

  --shadow-gold: 0 14px 40px -18px rgba(90, 20, 35, 0.40);
  --ring: 0 0 0 3px rgba(90, 20, 35, 0.28);
}
/* Logo mark: deep green plate with a champagne glyph, in both themes. */
.brand__mark, [data-theme='dark'] .brand__mark { background: var(--brand); color: #D9BF84; }
[data-theme='dark'] .brand__mark { background: #1B3B31; color: #E8D29C; }
[data-theme='dark'] {
  --accent:      #E58E9A;
  --accent-2:    #EDA7B0;
  --accent-soft: #261518;
  --accent-line: #4D2A30;
  --accent-ink:  #1A0B0E;
  --brown: #C9A98A;
  --shadow-gold: 0 14px 40px -18px rgba(229, 142, 154, 0.30);
  --ring: 0 0 0 3px rgba(229, 142, 154, 0.30);
}
/* Dark green contexts: anything that uses the accent colour there gets champagne, so no maroon text,
   icon or focus ring sits on dark green. Buttons keep their explicit maroon fill. */
.hero, .cta-band, .panel--brand, .route, .v2-section--dark {
  --accent: #D9BF84; --accent-2: #E8D29C; --accent-line: rgba(217, 191, 132, 0.38); --accent-soft: rgba(217, 191, 132, 0.10);
}
.panel--brand .btn--primary, .route .btn--primary { background: #6A1A2B; color: #fff; box-shadow: inset 0 0 0 1px rgba(236, 190, 197, 0.38); }
.panel--brand .btn--primary:hover, .route .btn--primary:hover { background: #7C2033; color: #fff; }
/* On the dark green bands the maroon is lifted so buttons and labels stay visible. */
.hero .eyebrow, .v2-section--dark .eyebrow, .cta-band .eyebrow { color: #D9BF84; }   /* champagne, not pink, on dark green */
.hero .btn--primary, .btn--onBrand, .cta-band .btn--primary { background: #6A1A2B; color: #fff; box-shadow: inset 0 0 0 1px rgba(236, 190, 197, 0.38); }
.hero .btn--primary:hover, .btn--onBrand:hover, .cta-band .btn--primary:hover { background: #7C2033; color: #fff; }

/* ---- Photo hero (opt-in with the hero--photo class) -----------------------
   Each page names its picture with a modifier class, e.g. hero--about.       */
.hero--photo {
  --hero-img: url('../img/photos/hero-kl-skyline.webp');
  --hero-pos: 4% 40%;
  background-image:
    linear-gradient(90deg, rgba(10, 28, 23, 0.96) 0%, rgba(10, 28, 23, 0.86) 46%, rgba(10, 28, 23, 0.40) 100%),
    var(--hero-img);
  background-size: cover; background-position: var(--hero-pos); background-repeat: no-repeat;
}
.hero--photo .hero__art, .hero--photo .hero__glow { display: none; }
.hero--photo { --hero-img-m: url('../img/photos/hero-kl-skyline-m.webp'); --hero-pos-m: 50% 40%; }
.hero--about      { --hero-img: url('../img/photos/banner-about.webp'); --hero-pos: 50% 55%; --hero-img-m: url('../img/photos/banner-about-m.webp'); --hero-pos-m: 50% 50%; }
.hero--valuation  { --hero-img: url('../img/photos/banner-valuation.webp'); --hero-pos: 50% 50%; --hero-img-m: url('../img/photos/banner-valuation-m.webp'); --hero-pos-m: 50% 50%; }
.hero--insights   { --hero-img: url('../img/photos/hero-kl-skyline.webp'); --hero-pos: 4% 40%; }
.hero--dealboard  { --hero-img: url('../img/photos/banner-dealboard.webp'); --hero-pos: 50% 40%; --hero-img-m: url('../img/photos/banner-dealboard-m.webp'); --hero-pos-m: 50% 40%; }

/* On a phone the text spans the whole width, so a photo behind it only shows as odd fragments. Instead the whole
   photo is shown as a picture above the text, fading into the green, and the text sits on plain green. */
@media (max-width: 40rem) {
  .hero--photo { background-image: none; padding-top: 0; }
  .hero--photo::before {
    content: ''; display: block; aspect-ratio: 16 / 9; margin-bottom: var(--s-8);
    background-image: linear-gradient(180deg, rgba(15, 38, 32, 0) 55%, var(--brand) 100%), var(--hero-img-m);
    background-size: cover; background-position: var(--hero-pos-m); background-repeat: no-repeat;
  }
}

/* ---- Service boxes: photo instead of line art ----------------------------- */
.svc__art--photo { padding: 0; background: var(--brand); }
.svc__art--photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---- Header: plainer labels need a little more presence ------------------- */
.site-header { backdrop-filter: saturate(1.2) blur(10px); }
.nav__link { position: relative; font-size: 0.92rem; font-weight: 560; color: var(--ink); padding: var(--s-2) 0.8rem; }
.nav__link::after {
  content: ''; position: absolute; left: 0.8rem; right: 0.8rem; bottom: 0.2rem; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease);
}
.nav__link:hover { background: transparent; color: var(--ink); }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }

@media (min-width: 64.01rem) and (max-width: 72rem) { .nav { gap: 0; } .nav__link { padding: var(--s-2) 0.5rem; } }

/* ---- Section rhythm ------------------------------------------------------- */
.v2-section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.v2-section--band { background: var(--bg-2); }
.v2-section--dark { background: var(--brand); color: var(--brand-ink); }
.v2-section--dark .section-head p { color: var(--brand-mut); }
.v2-section--dark h2 { color: var(--brand-ink); }
.v2-section--dark .eyebrow { color: var(--gold-2); }
.v2-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-6); margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.v2-head .section-head { margin-bottom: 0; }
.v2-link { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: var(--t-sm); color: var(--accent); text-decoration: none; white-space: nowrap; }
.v2-link::after { content: '\2192'; transition: transform var(--dur) var(--ease); }
.v2-link:hover::after { transform: translateX(4px); }
.v2-section--dark .v2-link { color: var(--gold-2); }

/* ---- Four-up tiles (insight pillars, tools) ------------------------------- */
.v2-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5); }
.v2-tile {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.v2-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent-line); }
.v2-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.v2-art {
  position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; color: var(--gold-2); overflow: hidden;
  background: linear-gradient(155deg, var(--brand-2), var(--brand) 70%);
}
.v2-art::before {
  content: ''; position: absolute; inset: 0; opacity: 0.7;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 30px);
}
.v2-art::after {
  content: ''; position: absolute; width: 14rem; height: 14rem; right: -5rem; top: -6rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 194, 126, 0.30), transparent 68%);
}
.v2-art svg { position: relative; z-index: 1; width: 4.25rem; height: 4.25rem; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.v2-art--b { background: linear-gradient(155deg, #1F3A32, #0E1613 75%); color: #BFD3C9; }
.v2-art--c { background: linear-gradient(155deg, #3A2E0C, #14110A 75%); }
.v2-art--d { background: linear-gradient(155deg, #26352F, #101A16 75%); color: #E5D5A3; }

/* Photo panels: the photo fills the panel, a green wash keeps the icon chip readable. */
.v2-art--photo { background: var(--brand); }
.v2-art__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v2-art--photo::before { background: linear-gradient(180deg, rgba(15, 38, 32, 0.05) 30%, rgba(15, 38, 32, 0.62)); opacity: 1; }
.v2-art--photo::after { display: none; }
.v2-art--photo svg { display: none; }   /* photos stand alone; no icon overlay */
.v2-tile__body { display: flex; flex-direction: column; gap: var(--s-2); flex: 1; padding: var(--s-5) var(--s-5) var(--s-6); }
.v2-tile__label { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.v2-tile__title { margin: 0; font-family: var(--font-display); font-size: var(--t-lg); line-height: 1.3; font-weight: 600; color: var(--ink); }
.v2-tile__text { margin: 0; font-size: var(--t-sm); line-height: 1.6; color: var(--ink-2); }
.v2-tile__more { margin-top: auto; padding-top: var(--s-3); font-size: var(--t-sm); font-weight: 600; color: var(--accent); }
.v2-tile__more::after { content: ' \2192'; }

/* ---- Alternating art and text blocks (tools and the deal board) ------------ */
.v2-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.v2-feature {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); overflow: hidden; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.v2-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent-line); }
.v2-feature:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.v2-feature .v2-art { aspect-ratio: auto; min-height: 15rem; }
.v2-feature .v2-art svg { width: 5.25rem; height: 5.25rem; stroke-width: 1.15; }
.v2-feature--flip .v2-art { order: 2; }
.v2-feature__body { display: flex; flex-direction: column; justify-content: center; gap: var(--s-3); padding: var(--s-6); }
.v2-feature__title { margin: 0; font-family: var(--font-display); font-size: var(--t-xl); line-height: 1.25; font-weight: 600; color: var(--ink); }
.v2-feature__text { margin: 0; font-size: var(--t-sm); line-height: 1.65; color: var(--ink-2); }
.v2-tag { display: inline-block; width: fit-content; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent); font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.04em; }

/* ---- Articles: a proper reading column with a contents column beside it ----
   Replaces the single narrow column with empty margins. The banner spans the
   full width, the text sits in a comfortable column, and a sticky "In this
   article" list (built by article-toc.js) fills the right-hand side.           */
.prose--article {
  max-width: 76rem; display: grid; grid-template-columns: minmax(0, 45rem) minmax(0, 15.5rem);
  column-gap: clamp(2rem, 5vw, 4.5rem); justify-content: center; align-items: start;
}
.prose--article > * { grid-column: 1; min-width: 0; }
.prose--article > .article-banner { grid-column: 1 / -1; }
.prose--article > .article-toc { grid-column: 2; grid-row: 2 / span 300; position: sticky; top: 6.25rem; align-self: start; }
.article-banner {
  display: block; width: 100%; height: clamp(11rem, 24vw, 18rem); object-fit: cover;
  border-radius: var(--radius-lg); margin: 0 0 var(--s-8); background: var(--brand);
}
.prose--article h1 { font-size: clamp(1.9rem, 1.6vw + 1.5rem, 2.6rem); line-height: 1.18; margin-bottom: var(--s-5); }
.prose--article .lead { font-size: var(--t-lg); line-height: 1.6; color: var(--ink-2); }
.prose--article h2 { margin-top: var(--s-12); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.prose--article p, .prose--article li { font-size: 1.0625rem; line-height: 1.75; }
.article-toc { padding-left: var(--s-5); border-left: 2px solid var(--accent-line); }
.article-toc__title { margin: 0 0 var(--s-3); font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.article-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.article-toc li { margin: 0; }
.article-toc a { display: block; font-size: var(--t-sm); line-height: 1.4; color: var(--ink-2); text-decoration: none; }
.article-toc a:hover, .article-toc a[aria-current='true'] { color: var(--accent); }
.article-toc a[aria-current='true'] { font-weight: 600; }
@media (max-width: 66rem) {
  .prose--article { display: block; max-width: 45rem; }
  .article-toc { display: none; }
}

/* ---- Insights index: wide column, a photo on every card ------------------- */
.prose--index { max-width: 62rem; }
.prose--index .insight-card { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: var(--s-6); align-items: center; padding: var(--s-6) 0; }
.prose--index .insight-card > a:first-child { display: block; }
.insight-card__img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--brand); }
.insight-card__text h3 { margin-top: 0; }
.prose--index .insight-group__title { padding-top: var(--s-6); border-top: 2px solid var(--ink); font-size: var(--t-2xl); }
@media (max-width: 40rem) {
  .prose--index .insight-card { grid-template-columns: 1fr; gap: var(--s-4); }
  .insight-card__img { aspect-ratio: 16 / 9; }
}

/* ---- Insights: topic bubbles, and the whole of KLCC in the banner ---------- */
.insight-pills { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-6) 0 var(--s-8); }
.insight-pill {
  appearance: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 0.6rem 1.25rem; font: inherit; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.insight-pill:hover { border-color: var(--ink-3); color: var(--ink); }
.insight-pill[aria-pressed='true'] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.insight-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prose--index .article-banner { height: clamp(15rem, 34vw, 24rem); object-position: 50% 14%; }
.insight-group[hidden] { display: none; }
.insight-pills + .insight-group, .prose--index .insight-group:first-of-type { margin-top: 0; }

/* ---- Deal Board listing page: calmer headings, left-aligned lists ---------------- */
.deal-main h1 { font-size: clamp(1.9rem, 1.6vw + 1.5rem, 2.6rem); line-height: 1.18; margin: var(--s-3) 0 var(--s-5); }
.deal-main h2 { margin: var(--s-10) 0 var(--s-3); font-size: var(--t-xl); }
.deal-main .lead { font-size: var(--t-lg); line-height: 1.6; color: var(--ink-2); }
.deal-steps li, .deal-post__side p { text-align: left !important; }

/* ---- About: a photo on top of each experience box ---------------------------- */
.card--photo { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card--photo .card__photo { display: block; width: 100%; height: 9.5rem; object-fit: cover; background: var(--brand); }
.card--photo .card__body { padding: var(--s-5) var(--s-6) var(--s-6); }
.card--photo h3 { margin-top: 0; }

/* ---- Equal-size boxes (About cards, valuation industry tiles) ---------------- */
.grid--3 { grid-auto-rows: 1fr; }
.val-tiles { grid-auto-rows: 1fr; }
.val-tiles .val-tile { display: flex; }
.val-tiles .val-tile span { flex: 1; width: 100%; min-height: 6.5rem; }
.val-tiles--2 .val-tile span { min-height: 4rem; }

/* ---- Footer: the long "Navigate" list in two columns ----------------------- */
@media (min-width: 64.01rem) { .footer__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 2.1fr) minmax(0, 1.1fr); } }
@media (max-width: 64rem) { .footer__grid > div:nth-child(2) { grid-column: 1 / -1; } }
.footer__list--split { display: block; column-count: 2; column-gap: var(--s-8); }
.footer__list--split li { break-inside: avoid; margin-bottom: var(--s-3); }
@media (max-width: 30rem) { .footer__list--split { column-count: 1; } }

/* ---- Footer quick links (pages with the short footer) ---------------------- */
.footer__quick { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); margin: 0 0 var(--s-5); padding: 0 0 var(--s-5); border-bottom: 1px solid var(--line); }
.footer__quick a { font-size: var(--t-sm); font-weight: 560; color: var(--ink-2); text-decoration: none; }
.footer__quick a:hover { color: var(--accent); }

/* ---- Responsive ------------------------------------------------------------ */
@media (max-width: 70rem) { .v2-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 56rem) { .v2-features { grid-template-columns: 1fr; } }
@media (max-width: 40rem) {
  .v2-tiles { grid-template-columns: 1fr; }
  .v2-feature { grid-template-columns: 1fr; }
  .v2-feature--flip .v2-art { order: 0; }
  .v2-feature .v2-art { min-height: 9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-tile, .v2-feature, .nav__link::after, .v2-link::after { transition: none; }
  .v2-tile:hover, .v2-feature:hover { transform: none; }
}
