/* ==========================================================================
   Burj Trades — Reset, typography, layout primitives
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Ambient brand wash — keeps large dark areas from reading as flat black. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 620px at 82% -8%,  rgba(217, 154, 18, .16), transparent 62%),
    radial-gradient(760px 540px at 4% 104%, rgba(26, 74, 114, .14), transparent 64%);
}

/* Film grain, generated in-browser. Sharper than a bitmap and ~400 bytes. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .032;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, header, footer { position: relative; z-index: 2; }

/* ---- Headings ------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-head);
  letter-spacing: -.022em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: -.03em; }
h2 { font-size: var(--fs-h2); letter-spacing: -.026em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--c-gold); }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin-bottom: .45em; }

strong { font-weight: 650; color: var(--text); }
small { font-size: var(--fs-sm); }

hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 0;
}

::selection { background: rgba(248, 193, 41, .34); color: #fff; }

/* Numerals line up in tables, pricing and stats. */
.tnum, table, .stat__num { font-variant-numeric: tabular-nums; }

/* ---- Focus ---------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translate(-50%, -160%);
  z-index: 200;
  padding: 11px 20px;
  background: var(--c-gold);
  color: var(--on-accent);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: transform var(--t) var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); color: var(--on-accent); }

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 920px; }

.section { padding-block: var(--section); position: relative; }
.section--tight  { padding-block: calc(var(--section) * .62); }
.section--alt    { background: var(--bg-alt); }
.section--hairline { border-top: 1px solid var(--border); }

/* ---- Section heading block ------------------------------------------ */
.shead { margin-bottom: clamp(38px, 5vw, 62px); max-width: 740px; }
.shead--center { margin-inline: auto; text-align: center; }
.shead > p { color: var(--text-2); font-size: var(--fs-lead); margin-bottom: 0; }
.shead h2 { margin-bottom: .42em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 1.1em;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-gold));
}
.shead--center .eyebrow::after {
  content: '';
  width: 26px;
  height: 1px;
  background: linear-gradient(270deg, transparent, var(--c-gold));
}

/* ---- Grids ---------------------------------------------------------- */
.grid { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Auto-fitting track, for rows whose item count is not 2/3/4 (the five
   partner commitments, the six core values). Keeps a sane minimum width
   instead of squeezing five cards onto one line. */
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

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

/* Two-column split with an image on one side. */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.split--flip > :first-child { order: 2; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split--flip > :first-child { order: 0; }
}

/* ---- Text helpers --------------------------------------------------- */
.lead  { font-size: var(--fs-lead); color: var(--text-2); }
.muted { color: var(--text-2); }
.dim   { color: var(--text-3); }
.center { text-align: center; }
.measure { max-width: var(--maxw-text); }

.gtext {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- Scroll reveal --------------------------------------------------- */
/* Scroll reveal is opt-in on JavaScript being available.

   Without the .js gate, a failed or blocked script would leave every
   revealed section permanently at opacity:0 - invisible to readers, and
   invisible in the block editor, which does not run the theme's JS. The
   class is set by a one-line inline script in wp_head. */
.reveal { opacity: 1; transform: none; }

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}

/* ---- Reveal stagger -----------------------------------------------------
   The static build carried a data-delay attribute; block attributes do not
   survive editing in Gutenberg, so the stagger is a class instead. */
.js .reveal.rv-d1 { transition-delay: .06s; }
.js .reveal.rv-d2 { transition-delay: .12s; }
.js .reveal.rv-d3 { transition-delay: .18s; }
.js .reveal.rv-d4 { transition-delay: .24s; }
.js .reveal.rv-d5 { transition-delay: .30s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal[class*="rv-d"] { transition-delay: 0s; }
}
