/* ── Reset & base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-base);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Container ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ── Section wrapper ───────────────────────────────────────────── */
.section {
  padding-block: var(--section-pad-y);
}
.section--dark {
  background: var(--charcoal);
  color: var(--white);
}
.section--tinted {
  background: var(--off-white);
}
.section--green {
  background: var(--gobi-green);
  color: var(--white);
}

/* ── Typography utilities ──────────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  font-weight: 700;
}

.eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gobi-green);
  margin-bottom: var(--space-3);
}
.section--dark .eyebrow { color: var(--gobi-green); }

.section-title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.section-sub {
  font-size: var(--text-lg);
  color: var(--slate);
  max-width: 600px;
  line-height: var(--leading-body);
}
.section--dark .section-sub { color: #A0AEC0; }

.text-center { text-align: center; }
.text-center .section-sub { margin-inline: auto; }

.text-white { color: var(--white) !important; }
.text-green { color: var(--gobi-green) !important; }
.text-muted  { color: #A0AEC0; }

/* ── Grid helpers ──────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Reveal animation (JS adds .reveal class) ──────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--ease-reveal), transform var(--ease-reveal);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Focus ring ────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--gobi-green);
  outline-offset: 3px;
}

/* ── Visually hidden (a11y) ────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── 3+2 centred sector grid (5 items) ────────────────────────── */
.grid-sectors-5 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-6);
}
.grid-sectors-5 > *:nth-child(-n+3) { grid-column: span 2; }
.grid-sectors-5 > *:nth-child(4)    { grid-column: 2 / span 2; }
.grid-sectors-5 > *:nth-child(5)    { grid-column: 4 / span 2; }

@media (max-width: 1023px) {
  .grid-sectors-5 { grid-template-columns: repeat(4, 1fr); }
  .grid-sectors-5 > *:nth-child(-n+3) { grid-column: span 2; }
  .grid-sectors-5 > *:nth-child(4)    { grid-column: 1 / span 2; }
  .grid-sectors-5 > *:nth-child(5)    { grid-column: 3 / span 2; }
}
@media (max-width: 767px) {
  .grid-sectors-5 { grid-template-columns: 1fr 1fr; }
  .grid-sectors-5 > * { grid-column: span 1 !important; }
}
@media (max-width: 479px) {
  .grid-sectors-5 { grid-template-columns: 1fr; }
}

/* ── Responsive inline grids (used in what.html case study etc.) ── */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}
@media (max-width: 767px) {
  .grid-2-col { grid-template-columns: 1fr; gap: var(--space-8); }
}

/* ── Flag for unconfirmed content ──────────────────────────────── */
.placeholder-flag {
  display: inline-block;
  background: #FFF3CD;
  border: 1px dashed #D69E2E;
  color: #744210;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}
