/* ==========================================================================
   Majlis Energy — site stylesheet
   Monochrome institutional system: black page heroes, light serif display
   type, hairline rules and a restrained brand accent taken from the logo.
   ========================================================================== */

:root {
  --black: #0a0a0a;
  --black-2: #141414;
  --black-3: #1d1d1c;
  --white: #ffffff;
  --paper: #f4f2ee;
  --ink: #0f0f0f;
  --text: #3a3936;
  --muted: #64625d;
  --line: #dcd9d2;
  --line-dark: rgba(255, 255, 255, 0.16);
  --on-dark: #f5f5f2;
  --on-dark-muted: #a9a8a3;
  --blue: #1f6fd1;
  --red: #e5412d;
  --accent: linear-gradient(90deg, #1f6fd1 0%, #e5412d 100%);

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --max: 1320px;
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 76px;
  --section: clamp(80px, 11vw, 160px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
picture,
svg,
canvas { display: block; max-width: 100%; }

img { height: auto; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; }

p { margin: 0 0 1.25rem; }

ul,
ol { margin: 0; padding: 0; list-style: none; }

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.08;
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2.6rem, 6.2vw, 5.75rem); line-height: 1.02; }
h2 { font-size: clamp(2rem, 4.2vw, 3.6rem); }
h3 { font-size: clamp(1.35rem, 1.8vw, 1.65rem); line-height: 1.2; letter-spacing: -0.01em; }
h4 { font-family: var(--sans); font-size: 1rem; font-weight: 600; letter-spacing: 0; }

h1 em,
h2 em { font-style: italic; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

::selection { background: var(--ink); color: var(--white); }

.container {
  width: min(var(--max), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 20px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
}

.skip-link:focus { top: 16px; }

main:focus { outline: none; }

/* Legacy fragment targets from the previous site (see README). */
.anchor-alias { display: block; position: relative; top: calc(-1 * var(--header-h)); }

/* ---------- Type helpers ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 28px;
  height: 2px;
  background: var(--accent);
}

.eyebrow.plain::before { display: none; }

.lead {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  font-weight: 300;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.body-copy p { color: var(--text); font-size: 1.0625rem; }
.body-copy p:last-child { margin-bottom: 0; }

/* ---------- Links & buttons ---------- */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
}

.cta-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.cta-icon svg { width: 16px; height: 16px; }

.cta .cta-label {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: background-size 0.35s var(--ease);
  padding-bottom: 2px;
}

.cta:hover .cta-label { background-size: 100% 1px; }
.cta:hover .cta-icon { background: var(--ink); color: var(--white); border-color: var(--ink); }
.on-dark .cta:hover .cta-icon,
.site-footer .cta:hover .cta-icon { background: var(--white); color: var(--ink); border-color: var(--white); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 14px 28px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.button svg { width: 16px; height: 16px; }
.button:hover { background: transparent; color: var(--ink); }

.button.ghost { background: transparent; color: var(--ink); }
.button.ghost:hover { background: var(--ink); color: var(--white); }

.on-dark .button { background: var(--white); border-color: var(--white); color: var(--ink); }
.on-dark .button:hover { background: transparent; color: var(--white); }
.on-dark .button.ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.5); }
.on-dark .button.ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--white);
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.menu-open {
  background: rgba(10, 10, 10, 0.94);
  border-bottom-color: var(--line-dark);
}

/* Blur only while closed: backdrop-filter would trap the fixed mobile menu inside the header. */
.site-header.is-scrolled:not(.menu-open) {
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.brand img { width: 40px; height: auto; }

.brand-name {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-name span { font-weight: 300; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 40px);
}

.site-nav ul { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 36px); }

.site-nav ul a {
  position: relative;
  display: inline-block;
  padding: 10px 0;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.25s var(--ease);
}

.site-nav ul a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.site-nav ul a:hover,
.site-nav ul a[aria-current="page"] { color: var(--white); }

.site-nav ul a:hover::after,
.site-nav ul a[aria-current="page"]::after { transform: scaleX(1); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  font-size: 0.875rem;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav-cta:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

.menu-toggle {
  position: relative;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.menu-icon { position: relative; width: 26px; height: 10px; }

.menu-icon span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}

.menu-icon span:first-child { top: 0; }
.menu-icon span:last-child { top: 8.5px; }

.menu-open .menu-icon span:first-child { top: 4.25px; transform: rotate(45deg); }
.menu-open .menu-icon span:last-child { top: 4.25px; transform: rotate(-45deg); }

.menu-meta { display: none; }

@media (max-width: 959px) {
  .js .menu-toggle { display: inline-flex; }

  .js .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 40px;
    padding: calc(var(--header-h) + 32px) var(--gutter) 40px;
    background: var(--black);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
  }

  .js .menu-open .site-nav {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.35s var(--ease), visibility 0s;
  }

  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }

  .js .site-nav ul li { border-bottom: 1px solid var(--line-dark); }

  .js .site-nav ul a {
    display: block;
    padding: 18px 0;
    font-family: var(--serif);
    font-size: clamp(1.9rem, 7vw, 2.6rem);
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--white);
  }

  .js .site-nav ul a::after { display: none; }
  .js .site-nav ul a[aria-current="page"] { color: var(--on-dark-muted); }

  .js .nav-cta { align-self: flex-start; min-height: 52px; padding: 12px 26px; font-size: 1rem; }

  .js .menu-meta {
    display: block;
    color: var(--on-dark-muted);
    font-size: 0.875rem;
  }

  .js .menu-meta a { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }

  /* Without JavaScript the navigation simply wraps below the brand. */
  html:not(.js) .header-inner { flex-wrap: wrap; padding: 12px 0; }
  html:not(.js) .site-nav { flex-wrap: wrap; gap: 8px 20px; }
  html:not(.js) .site-nav ul { flex-wrap: wrap; gap: 4px 18px; }
}

html.menu-locked { overflow: hidden; }

/* ---------- Page heroes ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.92) 0%, rgba(10, 10, 10, 0.55) 45%, rgba(10, 10, 10, 0) 80%),
    linear-gradient(0deg, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0) 35%);
  pointer-events: none;
}

.hero-home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.hero-home .hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 64px) 0 72px;
}

.hero .eyebrow { color: var(--on-dark-muted); }

.hero h1 { max-width: 15.5ch; }

.hero h1 em { font-style: italic; color: var(--white); }

.hero-subtitle {
  max-width: 34rem;
  margin: 32px 0 44px;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.hero-foot {
  border-top: 1px solid var(--line-dark);
}

.hero-foot .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.hero-foot .tagline { display: flex; flex-wrap: wrap; gap: 6px 32px; }

.scroll-cue { display: inline-flex; align-items: center; gap: 14px; }

.scroll-cue::after {
  content: "";
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
  animation: cue 2.4s var(--ease) infinite;
  transform-origin: top;
}

@keyframes cue {
  0% { transform: scaleY(0); }
  60% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

.hero-page { padding: calc(var(--header-h) + clamp(72px, 12vw, 150px)) 0 clamp(72px, 9vw, 120px); }

.hero-page h1 { max-width: 17ch; font-size: clamp(2.5rem, 5.6vw, 5rem); }

.hero-page .hero-intro {
  max-width: 40rem;
  margin: 36px 0 0;
  font-size: clamp(1.0625rem, 1.4vw, 1.2rem);
  color: rgba(255, 255, 255, 0.78);
}

.hero-page::after {
  background: linear-gradient(90deg, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.6) 50%, rgba(10, 10, 10, 0.1) 100%);
}

/* ---------- Sections ---------- */

.section { padding: var(--section) 0; }
.section.tight { padding: clamp(64px, 8vw, 110px) 0; }

.paper { background: var(--paper); }

.on-dark { background: var(--black); color: var(--on-dark); }
.on-dark .eyebrow { color: var(--on-dark-muted); }
.on-dark .body-copy p,
.on-dark .section-intro { color: var(--on-dark-muted); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 88px);
}

.section-head h2 { max-width: 16ch; }

.section-head.stacked { grid-template-columns: minmax(0, 1fr); }
.section-head.stacked h2 { max-width: 20ch; }

.section-intro {
  max-width: 34rem;
  margin: 0;
  color: var(--text);
  font-size: 1.0625rem;
}

.section-head .cta { justify-self: end; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px clamp(40px, 7vw, 120px);
}

.split > :first-child h2 { max-width: 12ch; }

/* ---------- Intro + stats ---------- */

.intro-copy .lead { margin-bottom: 40px; }
.intro-copy .cta { margin-top: 16px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(64px, 9vw, 128px);
  border-top: 1px solid var(--ink);
}

.stat {
  padding: 32px 32px 0 0;
}

.stat + .stat { padding-left: 32px; border-left: 1px solid var(--line); }

.stat-value {
  display: block;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 5.25rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat p { margin: 0; color: var(--muted); font-size: 0.9375rem; max-width: 22ch; }

/* ---------- Numbered feature grid (Why Majlis) ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 64px);
}

.feature {
  padding: 32px 0 56px;
  border-top: 1px solid var(--line);
}

.on-dark .feature { border-top-color: var(--line-dark); }

.feature .num,
.num {
  display: block;
  margin-bottom: 40px;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.on-dark .num { color: var(--on-dark-muted); }

.feature h3 { margin-bottom: 16px; }
.feature p { margin: 0; color: var(--text); max-width: 34ch; }
.on-dark .feature p { color: var(--on-dark-muted); }

/* ---------- Process (How we work) ---------- */

.process {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  counter-reset: step;
}

.process li {
  position: relative;
  padding: 44px 24px 0 0;
}

.process li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-dark);
}

.process li::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--black);
  border: 1px solid var(--white);
}

.process li:first-child::after { background: var(--white); }

.process .num { margin-bottom: 18px; }
.process h3 { margin-bottom: 14px; font-size: 1.3rem; }
.process p { margin: 0; color: var(--on-dark-muted); font-size: 0.9375rem; }

.audience {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px 48px;
  margin-top: clamp(64px, 8vw, 112px);
  padding-top: 36px;
  border-top: 1px solid var(--line-dark);
}

.audience p:last-child {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 300;
  line-height: 1.35;
  color: var(--on-dark);
}

/* ---------- Services ---------- */

.service-list { border-top: 1px solid var(--ink); }

.service-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 5fr) minmax(0, 6fr);
  gap: 24px clamp(24px, 4vw, 64px);
  padding: clamp(36px, 4.5vw, 56px) 0;
  border-bottom: 1px solid var(--line);
}

.service-row .num { margin: 8px 0 0; }

.service-row h3 { font-size: clamp(1.75rem, 2.8vw, 2.5rem); margin-bottom: 18px; }
.service-row .service-summary { margin: 0; color: var(--text); font-size: 1.0625rem; max-width: 30rem; }

.bullets li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.bullets li:first-child { padding-top: 0; }
.bullets li:first-child::before { top: 12px; }
.bullets li:last-child { border-bottom: 0; }

.bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  width: 12px;
  height: 1px;
  background: var(--ink);
}

.disclaimer {
  margin: 20px 0 0;
  padding: 16px 20px;
  border-left: 2px solid var(--ink);
  background: rgba(15, 15, 15, 0.04);
  color: var(--text);
  font-size: 0.9375rem;
  font-style: italic;
}

.section-foot { margin-top: clamp(40px, 5vw, 64px); }

/* ---------- Focus (image + list) ---------- */

.figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--black);
}

.figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(0.86);
  transform: scale(1.04);
  transition: transform 1.6s var(--ease);
}

.figure.is-visible img { transform: scale(1); }

.figure figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 2px;
  padding: 28px;
  background: linear-gradient(0deg, rgba(10, 10, 10, 0.85), rgba(10, 10, 10, 0));
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.focus-list li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.focus-list li:first-child { border-top: 1px solid var(--ink); }

.focus-list .num { margin: 6px 0 0; }
.focus-list h3 { margin-bottom: 8px; }
.focus-list p { margin: 0; color: var(--text); }

/* ---------- Projects ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: clamp(28px, 3vw, 40px);
  background: var(--black);
  transition: background-color 0.4s var(--ease);
}

.project-card:hover { background: var(--black-2); }

.project-card .num { margin-bottom: 56px; }

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark);
}

.project-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.project-card h3 { margin-bottom: 14px; }
.project-card p:last-child { margin: 0; color: var(--on-dark-muted); font-size: 0.9375rem; }

.project-note {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 340px;
  padding: clamp(28px, 3vw, 40px);
  background: var(--black-3);
}

/* Four cards + note: the note fills the rest of the last row. */
.project-note { grid-column: span 2; }

.project-note p { margin: 0 0 24px; color: var(--on-dark-muted); font-size: 0.9375rem; }

/* ---------- People ---------- */

.people-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 48px clamp(16px, 2vw, 28px);
}

.person {
  position: relative;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}

/* Accent rule draws across the top border on hover. */
.person::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

.person:hover::before { transform: scaleX(1); }

.person h3 { margin-bottom: 6px; font-size: 1.35rem; }

.role {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--muted);
}

.person p:last-child { margin: 0; color: var(--text); font-size: 0.9375rem; }

.profile {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 32px clamp(40px, 7vw, 120px);
  padding: clamp(48px, 6vw, 80px) 0;
  border-top: 1px solid var(--ink);
}

.profile:last-child { padding-bottom: 0; }

.profile-side .role { margin-bottom: 8px; }
.profile-side h2 { font-size: clamp(2rem, 3.4vw, 3rem); }
.profile .lead { margin-bottom: 32px; }

/* ---------- Insights ---------- */

.featured {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0;
  background: var(--black);
  color: var(--on-dark);
}

.featured-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 460px;
  padding: clamp(32px, 4vw, 56px);
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 100% 100%, rgba(229, 65, 45, 0.28), transparent 60%),
    radial-gradient(80% 70% at 0% 0%, rgba(31, 111, 209, 0.3), transparent 60%),
    var(--black-2);
}

.featured-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 48px);
  pointer-events: none;
}

.featured-cover .cover-label {
  position: relative;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.featured-cover .cover-title {
  position: relative;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.2vw, 2.9rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.featured-body {
  padding: clamp(32px, 5vw, 72px);
  align-self: center;
}

.featured-body .eyebrow { color: var(--on-dark-muted); }
.featured-body h2 { margin-bottom: 18px; font-size: clamp(2rem, 3.6vw, 3.25rem); }

.featured-subtitle {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.35;
  color: var(--on-dark);
}

.byline {
  margin: 0 0 24px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.featured-body p:last-child { margin: 0; color: var(--on-dark-muted); max-width: 38rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter {
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.filter:hover { border-color: var(--ink); }
.paper .filter:not([aria-pressed="true"]) { background: var(--white); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 32px);
}

.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 360px;
  padding: 28px 28px 24px;
  border: 1px solid var(--line);
  background: var(--white);
  transition: border-color 0.3s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.paper .article-card { border-color: transparent; }

.article-card:hover {
  border-color: var(--ink);
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -32px rgba(0, 0, 0, 0.35);
}

.article-card[hidden] { display: none; }

.article-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 48px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-card h3 {
  margin-bottom: 16px;
  font-size: clamp(1.35rem, 1.7vw, 1.6rem);
}

/* Whole card is clickable through the title link. */
.article-card h3 a::after { content: ""; position: absolute; inset: 0; }
.article-card h3 a:focus-visible { outline: none; }
.article-card:has(h3 a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 4px; }

.article-card p { margin: 0 0 28px; color: var(--text); font-size: 0.9375rem; }

.article-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  font-weight: 500;
}

.article-foot .cta-icon { width: 36px; height: 36px; }
.article-card:hover .article-foot .cta-icon { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ---------- Timeline (About) ---------- */

.timeline { border-top: 1px solid var(--ink); }

.timeline li {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 12px clamp(24px, 5vw, 80px);
  align-items: baseline;
  padding: clamp(28px, 3.4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
}

.timeline .year {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.4vw, 3.75rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
}

.timeline p { margin: 0; font-size: 1.125rem; color: var(--text); max-width: 36rem; }

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.principles li {
  padding: clamp(28px, 3.4vw, 48px);
  background: var(--black);
}

.principles .num { margin-bottom: 64px; }

.principles p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  font-weight: 300;
  line-height: 1.25;
}

/* ---------- Engagement models ---------- */

.engagements { border-top: 1px solid var(--ink); }

.engagements li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease);
}

.engagements li:hover { padding-left: 12px; }

.engagements h3 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); }
.engagements .num { margin: 0; }

/* ---------- Contact / CTA band ---------- */

.contact-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.contact-band::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--accent);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px clamp(40px, 7vw, 120px);
  align-items: end;
}

.contact-grid h2 { font-size: clamp(2.6rem, 6vw, 5.5rem); line-height: 1.02; max-width: 11ch; }

.contact-grid .section-intro { margin-top: 32px; color: var(--on-dark-muted); }

.contact-details {
  display: grid;
  gap: 28px;
  padding-top: 32px;
  border-top: 1px solid var(--line-dark);
}

.contact-details .label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.contact-email svg { width: 22px; height: 22px; flex: none; transition: transform 0.3s var(--ease); }
.contact-email:hover svg { transform: translate(3px, -3px); }
.contact-email:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

.contact-details p { margin: 0; color: var(--on-dark-muted); }

.cta-band .container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.cta-band h2 { max-width: 16ch; }

/* ---------- Footer ---------- */

.site-footer {
  background: #000;
  color: var(--on-dark);
  padding: clamp(64px, 8vw, 104px) 0 32px;
  border-top: 1px solid var(--line-dark);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 2fr)) minmax(0, 3fr);
  gap: 48px 32px;
  padding-bottom: clamp(48px, 6vw, 80px);
}

.footer-statement {
  margin: 28px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  font-weight: 300;
  line-height: 1.25;
  max-width: 20ch;
}

.footer-col h2 {
  margin: 6px 0 20px;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.footer-col li a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9375rem;
  transition: color 0.2s var(--ease);
}

.footer-col li a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line-dark);
  color: var(--on-dark-muted);
  font-size: 0.8125rem;
}

.footer-bottom p { margin: 0; }

.footer-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--white);
}

.footer-bottom a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 404 ---------- */

.not-found { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.not-found .container { padding: calc(var(--header-h) + 48px) 0 64px; }

/* ---------- Reveal on scroll ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: var(--delay, 0s);
  }

  .js [data-reveal].is-visible { opacity: 1; transform: none; }

  /* Hero content animates in on load without waiting for the scroll observer. */
  .js .hero [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    animation: rise 1s var(--ease) both;
    animation-delay: calc(var(--delay, 0s) + 0.1s);
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .process { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 56px; }
  .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 959px) {
  :root { --header-h: 68px; }

  .section-head,
  .split,
  .contact-grid,
  .featured,
  .profile { grid-template-columns: minmax(0, 1fr); }

  .section-head .cta { justify-self: start; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { margin-top: 32px; border-top: 1px solid var(--line); }

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

  .service-row { grid-template-columns: 56px minmax(0, 1fr); }
  .service-row .bullets,
  .service-row .service-detail { grid-column: 2; }

  .principles { grid-template-columns: minmax(0, 1fr); }
  .principles .num { margin-bottom: 28px; }

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

  .figure img { aspect-ratio: 16 / 10; }

  .featured-cover { min-height: 300px; }

}

@media (max-width: 639px) {
  body { font-size: 1rem; }

  .hero-home .hero-body { padding-bottom: 48px; }
  .hero-foot .container { min-height: 72px; }
  .scroll-cue { display: none; }

  .stat,
  .stat + .stat { padding: 24px 16px 0 0; }
  .stat:nth-child(even) { padding-left: 16px; }
  .stat-value { font-size: 2.75rem; margin-bottom: 10px; }
  .stat p { font-size: 0.875rem; }

  .feature-grid,
  .project-grid,
  .article-grid,
  .process { grid-template-columns: minmax(0, 1fr); }

  .people-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .person { padding: 24px 0; border-top-color: var(--line); }
  .person h3 { font-size: 1.25rem; }
  .person .role { margin-bottom: 10px; }

  .process { row-gap: 0; }
  .process li { padding: 0 0 40px 36px; }
  .process li::before { top: 6px; bottom: 0; left: 5px; right: auto; width: 1px; height: auto; }
  .process li::after { top: 1px; }
  .process li:last-child::before { display: none; }

  .service-row { grid-template-columns: minmax(0, 1fr); }
  .service-row .bullets,
  .service-row .service-detail { grid-column: auto; }

  .timeline li { grid-template-columns: minmax(0, 1fr); }

  .engagements li { grid-template-columns: 48px minmax(0, 1fr); }

  .project-card,
  .project-note { min-height: 0; grid-column: auto; }
  .project-card .num { margin-bottom: 32px; }

  .article-card { min-height: 0; }
  .article-meta { margin-bottom: 32px; }

  .footer-top { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .site-header,
  .hero-canvas,
  .menu-toggle,
  .scroll-cue { display: none !important; }
  .hero,
  .on-dark,
  .site-footer { background: none !important; color: #000 !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Insight article pages ---------- */

.hero-post h1 { max-width: 22ch; font-size: clamp(2.3rem, 4.8vw, 4.25rem); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 28px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.78);
}

.back-link svg { width: 16px; height: 16px; transform: rotate(180deg); transition: transform 0.3s var(--ease); }
.back-link:hover { color: var(--white); }
.back-link:hover svg { transform: rotate(180deg) translateX(4px); }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 48px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line-dark);
  color: var(--white);
  font-size: 0.9375rem;
}

.post-meta .label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.post-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 48px clamp(32px, 6vw, 96px);
}

.post-aside {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: start;
  display: grid;
  gap: 12px;
}

.prose {
  max-width: 44rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
}

.prose > :first-child { margin-top: 0; }

.prose h2 {
  margin: 2.6em 0 0.8em;
  padding-top: 0.9em;
  border-top: 1px solid var(--line);
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
  line-height: 1.15;
  color: var(--ink);
}

.prose h3 {
  margin: 2em 0 0.6em;
  font-size: clamp(1.3rem, 1.9vw, 1.55rem);
  color: var(--ink);
}

.prose p,
.prose ul,
.prose ol,
.prose table,
.prose figure { margin: 0 0 1.4em; }

.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.prose ul,
.prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.45em; padding-left: 0.2em; }
.prose li::marker { color: var(--muted); }

.prose blockquote {
  margin: 2em 0;
  padding-left: 24px;
  border-left: 2px solid var(--ink);
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--ink);
}

.prose figure { margin: 2.2em 0; }
.prose figure img { width: 100%; height: auto; background: var(--paper); }

.prose figcaption {
  margin-top: 12px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.prose th,
.prose td {
  min-width: 140px;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  border-bottom-color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.prose .references { font-size: 0.875rem; line-height: 1.6; overflow-wrap: anywhere; }

.post-cover { margin-top: 0; }

@media (max-width: 959px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .post-aside { position: static; grid-row: 2; display: flex; flex-wrap: wrap; gap: 8px 28px; padding-top: 32px; border-top: 1px solid var(--ink); }
}
