/* Ahmed Amir — single-page personal site. Tokens come from Brand Book v8.
 *
 * Layout rules (Musab, 2026-09-21): every section is centred — eyebrow, title, gold rule,
 * lead paragraph — with one spacing scale for the whole page; cards share one size and one
 * radius; logos sit on identical white plates. Sections alternate cream / white / dark.
 *
 * Type rules (Musab, 2026-09-21, "minimal like a top Shopify theme"): one modular type scale,
 * typeface Zain (Boutros, OFL; ships 400 + 700 only), headings 700, body 400, small caps labels 400; no drop shadows, no halos,
 * no floating chips — 1px hairlines and whitespace do the work. Every distance is a multiple
 * of 8px taken from the scale below.
 *
 * Gold on cream fails WCAG (2.3:1), so text on light backgrounds uses --gold-ink (4.5:1);
 * the brand gold is kept for accents and for text on dark. */
:root {
  --cream: #f7f6f1;
  --white: #ffffff;
  --ink: #0d0f12;
  --ink-2: #14171c;
  --gold: #c89f32;
  --gold-ink: #8a6d1f;
  --line-light: #e6e2d7;
  --line-dark: #262a31;
  --muted-light: #5f5f5f;
  --muted-dark: #b3b3b3;
  --wrap: 1120px;
  --measure: 640px;
  --radius: 8px;
  --radius-sm: 4px;
  /* 8px scale */
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --gap: var(--s3);
  --section: var(--s7);
  --font: 'Zain', 'Segoe UI', Tahoma, Arial, sans-serif;
  /* type scale */
  --t-xs: .72rem; --t-sm: .875rem; --t-md: 1rem; --t-lg: 1.125rem;
  --t-h3: 1.125rem;
  --t-h2: clamp(1.5rem, 2.4vw, 2.125rem);
  --t-h1: clamp(2rem, 4vw, 3rem);
  --w-body: 400; --w-label: 400; --w-head: 700; --w-btn: 700;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--font); font-weight: var(--w-body); font-size: var(--t-md); background: var(--cream); color: var(--ink); line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: var(--w-head); }
h1 { font-size: var(--t-h1); line-height: 1.15; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s3); }
section { padding: var(--section) 0; }
.cream { background: var(--cream); color: var(--ink); }
.white { background: var(--white); color: var(--ink); }
.dark { background: var(--ink); color: var(--cream); }
.muted { color: var(--muted-light); }
.dark .muted { color: var(--muted-dark); }

/* small-caps labels: one size, one weight, one tracking */
.eyebrow, .tag, .kicker { font-size: var(--t-xs); letter-spacing: .16em; font-weight: var(--w-label); text-transform: uppercase; line-height: 1.4; }
.eyebrow, .tag { color: var(--gold-ink); }
.dark .eyebrow, .dark .tag { color: var(--gold); }
.kicker { color: var(--muted-light); }
.roleline { font-size: var(--t-md); font-weight: var(--w-label); color: var(--gold-ink); }
.dark .roleline { color: var(--gold); }

/* centred section header: eyebrow · title · hairline gold rule · lead */
.sh { text-align: center; max-width: 720px; margin: 0 auto var(--s5); display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.sh h2::after { content: ''; display: block; width: 40px; height: 2px; background: var(--gold); margin: var(--s2) auto 0; }
.sh .lead { font-size: var(--t-lg); line-height: 1.7; color: var(--muted-light); max-width: var(--measure); }
.dark .sh .lead { color: var(--muted-dark); }

.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--gold); color: var(--ink); padding: 8px 12px; border-radius: var(--radius-sm); z-index: 50; font-weight: var(--w-label); }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* header — light, one hairline, plain text links */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-light); color: var(--ink); }
.top-in { display: flex; align-items: center; gap: var(--s3); height: 64px; }
.top .brand { text-decoration: none; color: var(--ink); font-size: var(--t-sm); font-weight: var(--w-head); letter-spacing: .14em; white-space: nowrap; }
.top nav { display: flex; gap: var(--s3); flex: 1; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a { text-decoration: none; padding: var(--s1) 0; font-size: var(--t-sm); font-weight: var(--w-label); white-space: nowrap; color: var(--muted-light); border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.top nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* buttons — one height, one radius, medium weight */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); background: var(--ink); color: var(--white); font-weight: var(--w-btn); font-size: var(--t-sm); letter-spacing: .02em; text-decoration: none; padding: 0 var(--s3); height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--ink); transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--ink-2); }
.dark .btn { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.dark .btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.ghost:hover { background: rgba(13, 15, 18, .04); filter: none; }
.dark .btn.ghost { background: transparent; color: var(--cream); border-color: var(--line-dark); }
.dark .btn.ghost:hover { border-color: var(--cream); }
.btn.small { height: 36px; padding: 0 var(--s2); font-size: var(--t-xs); letter-spacing: .06em; }
.btn.large { height: 56px; padding: 0 var(--s4); font-size: var(--t-md); }
.cta { display: flex; gap: var(--s2); flex-wrap: wrap; }

/* v5 hero (2026-09-23) — the portrait bleeds off the page edge instead of sitting in a
 * column, so the first screen reads as one image rather than two boxes. The section stays
 * white because the studio backdrop is white: that is what makes the cut-out disappear. */
.hero { position: relative; background: var(--white); padding: 0; overflow: hidden; border-bottom: 1px solid var(--line-light); display: flex; align-items: center; min-height: min(88vh, 820px); }
.hero-visual { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(52%, 700px); display: flex; align-items: flex-end; justify-content: flex-end; pointer-events: none; }
.portrait { height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom center; -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 100%); mask-image: linear-gradient(to bottom, #000 86%, transparent 100%); }
.hero-grid { position: relative; z-index: 1; display: flex; justify-content: flex-start; width: 100%; padding-block: var(--s6); }
.hero-copy { display: flex; flex-direction: column; gap: var(--s2); width: min(560px, 100%); }
.hero-copy h1 { margin-top: var(--s1); }
.hook { font-size: var(--t-lg); color: var(--muted-light); max-width: 520px; line-height: 1.7; }
.pills { display: flex; gap: var(--s1); flex-wrap: wrap; margin-top: var(--s1); }
.pill { border: 1px solid var(--line-light); border-radius: var(--radius-sm); padding: 4px 12px; font-size: var(--t-xs); font-weight: var(--w-label); letter-spacing: .04em; color: var(--muted-light); }
.cta { margin-top: var(--s2); }

/* v5 proof bar — counted figures + the real logos, straight under the hero. */
.proof { background: var(--cream); padding: var(--s5) 0; border-bottom: 1px solid var(--line-light); }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); text-align: center; }
.stats li { display: flex; flex-direction: column; gap: 2px; padding-inline: var(--s2); border-inline-start: 1px solid var(--line-light); }
.stats li:first-child { border-inline-start: 0; }
.stat-n { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: var(--w-head); line-height: 1.1; color: var(--ink); letter-spacing: .02em; }
.stat-l { font-size: var(--t-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--muted-light); }
.stat-note { font-size: var(--t-xs); letter-spacing: 0; text-transform: none; color: var(--muted-light); opacity: .8; margin-top: 2px; }
.strip { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line-light); display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.strip-note { font-size: var(--t-xs); letter-spacing: .16em; text-transform: uppercase; color: var(--muted-light); }
.strip-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s5); }
.strip-logos .logo { height: 40px; width: auto; max-width: 140px; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.strip-logos .logo:hover { filter: none; opacity: 1; }

/* v5 podcast — a dark stage: artwork on one side, platforms as icon rows on the other. */
.pod-stage { display: grid; grid-template-columns: 300px 1fr; gap: var(--s5); align-items: center; margin-bottom: var(--s5); }
.pod .pod-logo { width: 100%; max-width: none; padding: var(--s4); }
.pod-copy { display: flex; flex-direction: column; gap: var(--s2); align-items: flex-start; }
.pod-copy .goal { color: var(--muted-dark); }
.plats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s1); width: 100%; margin-top: var(--s1); }
.plat { display: flex; align-items: center; gap: var(--s2); text-decoration: none; padding: 10px var(--s2); border: 1px solid var(--line-dark); border-radius: var(--radius-sm); color: var(--cream); font-size: var(--t-sm); transition: border-color .15s, background .15s; }
.plat:hover { border-color: var(--gold); background: rgba(200, 159, 50, .08); }
.plat-ic { display: flex; color: var(--gold); flex: none; }
.plat-l { flex: 1; }
.plat-go { color: var(--muted-dark); font-size: var(--t-xs); }
.plats > :last-child:nth-child(odd) { grid-column: 1 / -1; }

/* v6 podcast — studio band, then the real episode covers. */
.pod-shot { margin: 0 0 var(--s5); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; }
.pod-shot-img { width: 100%; height: auto; aspect-ratio: 16 / 7; object-fit: cover; }
.eps-head { margin: var(--s6) 0 var(--s3); text-align: center; display: flex; flex-direction: column; gap: var(--s1); align-items: center; }
.eps-head .kicker { color: var(--gold); }
.eps-note { font-size: var(--t-sm); color: var(--muted-dark); }
.eps { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); margin-bottom: var(--s5); }
.ep { width: calc((100% - 2 * var(--gap)) / 3); display: flex; flex-direction: column; background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--radius); overflow: hidden; text-align: center; transition: border-color .15s; }
.ep:hover { border-color: var(--gold); }
.ep-img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.ep-b { padding: var(--s3) var(--s2); display: flex; flex-direction: column; gap: var(--s1); flex: 1; }
.ep-n { font-size: var(--t-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.ep-t { font-size: var(--t-md); line-height: 1.5; }
.ep-g { font-size: var(--t-sm); color: var(--cream); margin-top: auto; padding-top: var(--s1); }
.ep-r { display: block; font-size: var(--t-xs); letter-spacing: .04em; color: var(--muted-dark); line-height: 1.5; }

/* v6 personal brand — the second approved portrait above the positioning line. */
.brand-shot { margin: 0 auto var(--s3); width: 240px; }
.brand-img { width: 100%; height: auto; -webkit-mask-image: linear-gradient(to bottom, #000 86%, transparent 100%); mask-image: linear-gradient(to bottom, #000 86%, transparent 100%); }

/* v5 scroll reveal — only ever applied by the inline script, so no-JS keeps everything visible. */
html.js .reveal { opacity: 0; transform: translateY(14px); }
html.js .reveal.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }

/* grids + cards: one size, one radius, hairline border, centred text, no shadow */
.grid { display: grid; gap: var(--gap); margin: 0; padding: 0; list-style: none; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.grid.narrow { max-width: 800px; margin: 0 auto; }
/* entity lists are flex so an odd last row stays centred instead of hugging one side */
.grid.entities { display: flex; flex-wrap: wrap; justify-content: center; }
.entities .card { width: calc((100% - 2 * var(--gap)) / 3); }
.card { --cpy: var(--s4); --cpx: var(--s3); background: var(--white); border: 1px solid var(--line-light); border-radius: var(--radius); padding: var(--cpy) var(--cpx); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s1); transition: border-color .15s; }
.card:hover { border-color: var(--ink); }
.dark .card { background: var(--ink-2); border-color: var(--line-dark); }
.dark .card:hover { border-color: var(--gold); }
.card p { font-size: var(--t-sm); color: var(--muted-light); line-height: 1.75; }
.dark .card p { color: var(--muted-dark); }
.card h3 { display: flex; align-items: center; justify-content: center; gap: var(--s1); flex-wrap: wrap; margin-top: 2px; }
.role { font-size: var(--t-xs); font-weight: var(--w-label); color: var(--gold-ink); border: 1px solid currentColor; border-radius: var(--radius-sm); padding: 0 8px; }
.ext { font-size: var(--t-sm); font-weight: var(--w-label); color: var(--gold-ink); margin-top: auto; padding-top: var(--s1); }
.number { font-size: 2rem; font-weight: var(--w-body); color: var(--gold-ink); line-height: 1; letter-spacing: .04em; }

/* v6 entity photo (2026-10-04) — the real operations shot is the card's header and bleeds to
 * its edges; the logo plate underneath lost its frame so the card is not a box inside a box. */
.eshot { align-self: stretch; margin: calc(-1 * var(--cpy)) calc(-1 * var(--cpx)) var(--s2); border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; overflow: hidden; background: var(--cream); }
.eshot-img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
/* a supplied key visual (not an operations shot) is shown whole at its own ratio */
.eshot-img.full { aspect-ratio: 1 / 1; object-fit: contain; background: var(--white); }

/* v7 daily operating figure on the entity card (source: owners' sheet, 2026-10-04) */
.metric { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 4px; }
.metric-n { font-size: var(--t-lg); font-weight: var(--w-head); color: var(--gold-ink); letter-spacing: .02em; line-height: 1; }
.metric-l { font-size: var(--t-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-light); }
.dark .metric-n { color: var(--gold); }
.dark .metric-l { color: var(--muted-dark); }

/* logo plate: identical area on every card, artwork centred and contained */
.plate { width: 100%; height: 88px; display: flex; align-items: center; justify-content: center; padding: 0 var(--s2); margin-bottom: var(--s1); }
.plate .logo { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.logo-text { font-weight: var(--w-head); font-size: var(--t-lg); letter-spacing: .06em; color: var(--ink); }
.pod-logo { width: 280px; max-width: 80%; padding: var(--s3) var(--s4); background: var(--white); border: 1px solid var(--line-light); border-radius: var(--radius); display: flex; justify-content: center; }
.pod-logo .logo { max-height: 140px; width: auto; }
.links { display: flex; gap: var(--s2); flex-wrap: wrap; justify-content: center; }

/* quotes — centred, hairline gold rule on top, medium weight */
.quote { text-align: center; font-size: clamp(1.125rem, 1.8vw, 1.375rem); line-height: 1.6; font-weight: var(--w-label); max-width: 720px; margin: var(--s5) auto 0; padding-top: var(--s3); position: relative; }
.quote::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 40px; height: 2px; background: var(--gold); }
.positioning { text-align: center; margin-top: var(--s5); }
.bigquote { font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.45; font-weight: var(--w-head); max-width: 800px; margin: var(--s2) auto 0; }
.goal { font-weight: var(--w-label); }

/* timeline — centred spine with gold markers */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 720px; position: relative; }
.timeline::before { content: ''; position: absolute; top: 0; bottom: 0; inset-inline-start: 46px; width: 1px; background: var(--line-light); }
.trow { display: grid; grid-template-columns: 92px 1fr; gap: var(--s3); align-items: center; padding: var(--s1) 0; }
.tmark { position: relative; display: flex; justify-content: center; }
.tnum { min-width: 48px; height: 48px; padding: 0 12px; white-space: nowrap; border-radius: 999px; background: var(--white); color: var(--gold-ink); border: 1px solid var(--gold); display: flex; align-items: center; justify-content: center; font-weight: var(--w-label); font-size: var(--t-sm); z-index: 1; }
.tcard { background: var(--white); border: 1px solid var(--line-light); border-radius: var(--radius); padding: var(--s3) var(--s3); }
.ttitle { font-size: var(--t-h3); margin-bottom: 4px; }
.tbody { font-size: var(--t-sm); color: var(--muted-light); line-height: 1.75; }

/* ecosystem map — hub above three spokes, all centred, hairline connectors */
.eco { display: flex; flex-direction: column; align-items: center; gap: 0; }
.eco-center { width: 224px; aspect-ratio: 1; border-radius: 50%; background: var(--ink-2); color: var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px solid var(--gold); padding: var(--s3); }
.eco-center span { font-size: var(--t-lg); font-weight: var(--w-head); letter-spacing: .1em; }
.eco-center small { font-size: var(--t-xs); letter-spacing: .16em; color: var(--gold); font-weight: var(--w-label); margin-top: var(--s1); text-transform: uppercase; }
.eco-nodes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); width: 100%; max-width: 960px; margin-top: var(--s5); position: relative; padding-top: var(--s5); }
.eco-nodes::before { content: ''; position: absolute; top: calc(-1 * var(--s5)); left: 50%; width: 1px; height: var(--s5); background: var(--gold); transform: translateX(-50%); }
.eco-nodes::after { content: ''; position: absolute; top: 0; left: 16.66%; right: 16.66%; height: 1px; background: var(--gold); }
.node { position: relative; background: var(--ink-2); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: var(--s3); text-align: center; }
.node::before { content: ''; position: absolute; top: calc(-1 * var(--s5)); left: 50%; width: 1px; height: var(--s5); background: var(--gold); transform: translateX(-50%); }
.node strong { display: block; font-size: var(--t-md); font-weight: var(--w-head); letter-spacing: .1em; }
.node small { display: block; font-size: var(--t-sm); color: var(--muted-dark); margin-top: var(--s1); line-height: 1.6; }

/* contact */
.contact-actions { display: flex; gap: var(--s2); justify-content: center; flex-wrap: wrap; }
.contact-sig { text-align: center; margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line-dark); display: flex; flex-direction: column; gap: 4px; }
.brand-name { color: var(--gold); font-weight: var(--w-head); letter-spacing: .16em; font-size: var(--t-md); }

.foot { background: var(--ink); color: #8b8b8b; border-top: 1px solid var(--line-dark); font-size: var(--t-xs); letter-spacing: .02em; }
.foot .wrap { display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; padding-top: var(--s3); padding-bottom: var(--s3); }
.nf { padding: 80px 24px; text-align: center; }

@media (max-width: 960px) {
  :root { --section: 80px; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: var(--s4); }
  .stats li:nth-child(odd) { border-inline-start: 0; }
  .strip-logos { gap: var(--s4); }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .entities .card { width: calc((100% - var(--gap)) / 2); }
  .ep { width: calc((100% - var(--gap)) / 2); }
}
@media (max-width: 860px) {
  .hero { display: block; min-height: 0; padding-top: var(--s4); }
  .hero-visual { position: static; width: 100%; justify-content: center; }
  .portrait { height: auto; width: min(340px, 68vw); object-fit: initial; }
  .hero-grid { padding-block: var(--s3) var(--s6); }
  .hero-copy { text-align: center; align-items: center; width: 100%; }
  .hook { max-width: var(--measure); }
  .cta, .pills { justify-content: center; }
  .pod-stage { grid-template-columns: 1fr; gap: var(--s4); justify-items: center; }
  .pod .pod-logo { max-width: 320px; }
  .pod-copy { align-items: center; text-align: center; }
}
@media (max-width: 720px) {
  .top .brand { display: none; }
  .top nav { justify-content: flex-start; gap: var(--s2); }
  .eco-nodes { grid-template-columns: 1fr; }
  .eco-nodes::after { display: none; }
  .node::before { display: none; }
  .eco-nodes .node:first-child::before { display: block; }
  .foot .wrap { flex-direction: column; text-align: center; }
}
@media (max-width: 540px) {
  :root { --section: 56px; --gap: var(--s2); }
  .sh { margin-bottom: var(--s4); }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .entities .card { width: 100%; }
  .ep { width: 100%; }
  .pod-shot-img { aspect-ratio: 4 / 3; }
  .card { --cpy: var(--s3); --cpx: var(--s2); }
  .trow { grid-template-columns: 80px 1fr; gap: var(--s2); }
  .timeline::before { inset-inline-start: 40px; }
  .tnum { min-width: 40px; height: 40px; padding: 0 10px; font-size: var(--t-xs); }
  .cta { width: 100%; }
  .cta .btn { flex: 1; }
  .plats { grid-template-columns: 1fr; }
  .strip-logos { gap: var(--s3); }
  .strip-logos .logo { height: 32px; max-width: 104px; }
  .btn.large { width: 100%; height: auto; flex-direction: column; gap: 0; line-height: 1.4; padding: var(--s2); }
  .btn.large span { font-size: var(--t-sm); word-break: break-all; }
  .portrait { width: min(320px, 76vw); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card, .btn, .top nav a, .strip-logos .logo, .plat { transition: none; } html.js .reveal { opacity: 1; transform: none; } }
