/* ============ Meroë Group — Support · Advise · Innovate ============ */
:root {
  --paper: #F7F8FA;
  --paper-2: #EDEFF4;
  --ink: #22252B;
  --ink-soft: #5A5F6B;
  --line: #DCE0E8;
  --gold: #E3403C;       /* brand red — primary accent */
  --gold-deep: #C0292C;
  --nile: #2E4180;       /* brand navy */
  --nile-soft: #46599D;
  --brand-red: #E3403C;
  --brand-navy: #2E4180;
  --brand-yellow: #F2D411;
  --band: #232528;      /* charcoal hero/footer band — constant across themes */
  --band-2: #2B2D31;
  --band-ink: #F2F3F5;  /* text on band */
  --band-soft: #A6AAB3;
  --band-line: #3A3D42;
  --gold-on-band: #F2D411; /* brand yellow pops on charcoal */
  --card: #FFFFFF;
  --shadow: 0 1px 2px rgba(34,37,43,.05), 0 12px 32px -16px rgba(34,37,43,.18);
  --ok: #2E6B47;
  --warn: #A66A1E;
  --focus: #2E4180;
  --on-red: #FFFFFF;
  --on-navy: #FFFFFF;
  --red-hover: #C0292C;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17181B;
    --paper-2: #1F2126;
    --ink: #E9EBEF;
    --ink-soft: #A9AEB9;
    --line: #33363E;
    --gold: #F16B67;
    --gold-deep: #F58884;
    --nile: #8FA1E0;
    --nile-soft: #7C90D8;
    --brand-red: #F16B67;
    --brand-navy: #6E83D6;
    --brand-yellow: #F2D411;
    --band: #121316;
    --band-2: #1A1B1F;
    --band-line: #2E3138;
    --card: #1F2126;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -16px rgba(0,0,0,.6);
    --ok: #6FBE8F;
    --warn: #DBA353;
    --focus: #F2D411;
    --on-red: #1A0F0F;
    --on-navy: #12131A;
    --red-hover: #F58884;
  }
}
:root[data-theme="dark"] {
  --paper: #17181B;
  --paper-2: #1F2126;
  --ink: #E9EBEF;
  --ink-soft: #A9AEB9;
  --line: #33363E;
  --gold: #F16B67;
  --gold-deep: #F58884;
  --nile: #8FA1E0;
  --nile-soft: #7C90D8;
  --brand-red: #F16B67;
  --brand-navy: #6E83D6;
  --brand-yellow: #F2D411;
  --band: #121316;
  --band-2: #1A1B1F;
  --band-line: #2E3138;
  --card: #1F2126;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -16px rgba(0,0,0,.6);
  --ok: #6FBE8F;
  --warn: #DBA353;
  --focus: #F2D411;
  --on-red: #1A0F0F;
  --on-navy: #12131A;
  --red-hover: #F58884;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Quire Sans", "Quire Sans Pro", "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--nile); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:is(a,button,input,select,textarea):focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

h1, h2, h3, .display {
  font-family: "Quire Sans", "Quire Sans Pro", "Lato", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .005em;
  text-wrap: balance;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; max-width: 68ch; }
.lede { font-size: 1.14rem; color: var(--ink-soft); max-width: 62ch; }

.eyebrow {
  font-size: .74rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold-deep);
  display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 30px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-red) 0 33%, var(--brand-navy) 33% 66%, var(--brand-yellow) 66% 100%); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2.5rem); }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-tint { background: var(--paper-2); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--band);
  border-bottom: 1px solid var(--band-line);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: .7rem; color: var(--band-ink); }
.brand:hover { text-decoration: none; }
.brand svg { flex: 0 0 auto; }
.brand-name {
  font-family: "Quire Sans", "Quire Sans Pro", "Lato", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700; font-size: 1.18rem; letter-spacing: .09em;
}
.brand-name .accent { color: var(--gold-on-band); }
.brand-tag {
  display: block; font-family: "Quire Sans", "Quire Sans Pro", "Lato", sans-serif; font-size: .6rem;
  letter-spacing: .3em; text-transform: uppercase; color: var(--band-soft);
  margin-top: .1rem;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: .2rem; }
.nav a {
  color: var(--band-soft); font-size: .88rem; font-weight: 500;
  padding: .45rem .7rem; border-radius: 4px;
}
.nav a:hover { color: var(--band-ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--gold-on-band); }
.nav .portal-link {
  border: 1px solid var(--band-line); color: var(--band-ink);
  margin-left: .5rem; padding: .45rem .95rem;
}
.nav .portal-link:hover { border-color: var(--gold-on-band); color: var(--gold-on-band); }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--band-line);
  color: var(--band-ink); font: inherit; padding: .4rem .8rem; border-radius: 4px; cursor: pointer;
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--band); border-bottom: 1px solid var(--band-line);
    flex-direction: column; align-items: stretch; padding: .8rem 1.2rem 1.2rem; gap: .1rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .7rem .5rem; font-size: 1rem; }
  .nav .portal-link { margin: .6rem 0 0; text-align: center; }
}

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--band) 0%, var(--band-2) 100%);
  color: var(--band-ink);
  position: relative; overflow: hidden;
}
.hero .wrap { position: relative; z-index: 1; padding-top: clamp(3.5rem, 9vw, 6.5rem); padding-bottom: clamp(3.5rem, 9vw, 6rem); }
.hero .eyebrow { color: var(--gold-on-band); }
.hero h1 { max-width: 17ch; color: var(--band-ink); }
.hero .lede { color: var(--band-soft); }
.hero-pyramids {
  position: absolute; right: -2%; bottom: 0; width: min(52%, 620px); opacity: .85;
  pointer-events: none;
}
.hero-inner-pyramids { display:none; }
@media (max-width: 760px) {
  .hero-pyramids { width: 90%; opacity: .25; }
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.page-hero {
  background: linear-gradient(180deg, var(--band) 0%, var(--band-2) 100%);
  color: var(--band-ink);
  border-bottom: 1px solid var(--band-line);
}
.page-hero .wrap { padding-top: clamp(2.6rem, 6vw, 4rem); padding-bottom: clamp(2.2rem, 5vw, 3.4rem); }
.page-hero .eyebrow { color: var(--gold-on-band); }
.page-hero h1 { color: var(--band-ink); }
.page-hero .lede { color: var(--band-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 .92rem/1 "Quire Sans", "Quire Sans Pro", "Lato", sans-serif; letter-spacing: .02em;
  padding: .85rem 1.5rem; border-radius: 4px; cursor: pointer;
  border: 1px solid transparent; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-gold { background: var(--brand-red); color: var(--on-red); }
.btn-gold:hover { background: var(--red-hover); color: var(--on-red); }
.btn-ghost { border-color: var(--band-line); color: var(--band-ink); background: transparent; }
.btn-ghost:hover { border-color: var(--gold-on-band); color: var(--gold-on-band); }
.btn-outline { border-color: var(--nile); color: var(--nile); background: transparent; }
.btn-outline:hover { background: var(--nile); border-color: var(--nile); color: var(--on-navy); }

/* ---------- pillars / cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 1.8rem 1.7rem; box-shadow: var(--shadow);
}
.card h3 { margin-top: .2rem; }
.card p:last-child { margin-bottom: 0; }
.pillar-num {
  font-family: "Quire Sans", "Quire Sans Pro", "Lato", "Helvetica Neue", Arial, sans-serif; font-weight: 600; font-size: 1rem; color: var(--gold-deep);
  border: 1px solid var(--line); width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.1rem;
}
.grid-3 > .card:nth-child(1) .pillar-num { color: var(--brand-red); border-color: var(--brand-red); }
.grid-3 > .card:nth-child(2) .pillar-num { color: var(--brand-navy); border-color: var(--brand-navy); }
.grid-3 > .card:nth-child(3) .pillar-num { color: var(--gold-deep); border-color: var(--brand-yellow); }

/* stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { border-left: 3px solid var(--brand-red); padding: .2rem 0 .2rem 1.1rem; }
.stat:nth-child(4n+2) { border-left-color: var(--brand-navy); }
.stat:nth-child(4n+3) { border-left-color: var(--brand-yellow); }
.stat:nth-child(4n+4) { border-left-color: var(--brand-red); }
.stat:nth-child(4n+1) { border-left-color: var(--brand-navy); }
.stat:first-child { border-left-color: var(--brand-red); }
.stat b {
  display: block; font-family: "Quire Sans", "Quire Sans Pro", "Lato", "Helvetica Neue", Arial, sans-serif; font-weight: 700;
  font-size: 2rem; color: var(--ink); font-variant-numeric: tabular-nums;
}
.stat span { font-size: .85rem; color: var(--ink-soft); }

/* ---------- services ---------- */
.svc { display: grid; grid-template-columns: 64px 1fr; gap: 1.4rem; padding: 2rem 0; }
.svc + .svc { border-top: 1px solid var(--line); }
.svc-num {
  font-family: "Quire Sans", "Quire Sans Pro", "Lato", "Helvetica Neue", Arial, sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--gold-deep);
  padding-top: .2rem;
}
.svc h3 { font-size: 1.45rem; }
.svc-sub { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.6rem; margin-top: 1.2rem; }
@media (max-width: 760px) { .svc-sub { grid-template-columns: 1fr; } .svc { grid-template-columns: 1fr; } .svc-num { padding: 0; } }
.svc-sub h4 { margin: 0 0 .3rem; font-size: 1rem; }
.svc-sub p { font-size: .93rem; color: var(--ink-soft); margin: 0; }

/* ---------- projects ---------- */
.proj-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.8rem; }
.chip {
  font: 500 .82rem/1 "Quire Sans", "Quire Sans Pro", "Lato", sans-serif; padding: .5rem .95rem; border-radius: 100px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); cursor: pointer;
}
.chip:hover { border-color: var(--gold); color: var(--gold-deep); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 980px) { .proj-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 660px) { .proj-grid { grid-template-columns: 1fr; } }
.proj {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 1.4rem 1.4rem 1.2rem; display: flex; flex-direction: column; gap: .55rem;
  box-shadow: var(--shadow);
}
.proj-cat { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.proj h3 { font-size: 1.08rem; font-family: "Quire Sans", "Quire Sans Pro", "Lato", sans-serif; font-weight: 600; line-height: 1.35; margin: 0; }
.proj-client { font-size: .88rem; color: var(--ink-soft); flex: 1; }
.proj-status { font-size: .78rem; font-weight: 600; }
.proj-status.done { color: var(--ok); }
.proj-status.now { color: var(--warn); }

/* ---------- insights ---------- */
.post { display: grid; grid-template-columns: 150px 1fr; gap: 1.6rem; padding: 1.9rem 0; }
.post + .post { border-top: 1px solid var(--line); }
@media (max-width: 700px) { .post { grid-template-columns: 1fr; gap: .4rem; } }
.post-meta { font-size: .8rem; color: var(--ink-soft); line-height: 1.5; }
.post-meta b { display: block; color: var(--gold-deep); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .72rem; }
.post h3 { margin-bottom: .35rem; }
.post p { color: var(--ink-soft); margin-bottom: .5rem; }
.post a.more { font-weight: 600; font-size: .9rem; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.3rem; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .85rem; font-weight: 600; }
.field .hint { font-size: .78rem; color: var(--ink-soft); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 4px; padding: .7rem .85rem;
}
.field textarea { min-height: 120px; resize: vertical; }
.radio-row { display: flex; gap: 1.4rem; padding: .35rem 0; }
.radio-row label { display: flex; align-items: center; gap: .45rem; font-weight: 500; font-size: .95rem; cursor: pointer; }
.form-note { font-size: .85rem; color: var(--ink-soft); }
.form-ok {
  display: none; border: 1px solid var(--ok); border-radius: 6px; color: var(--ok);
  padding: 1rem 1.2rem; margin-top: 1.2rem; font-weight: 500;
}
.form-ok.show { display: block; }

/* ---------- contact ---------- */
.contact-cols { display: grid; grid-template-columns: 340px 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 900px) { .contact-cols { grid-template-columns: 1fr; } }
.contact-list { display: flex; flex-direction: column; gap: 1.1rem; font-size: .95rem; }
.contact-list b { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: .15rem; }
.contact-list a { color: var(--ink); }
.socials { display: flex; gap: .6rem; margin-top: .4rem; }
.socials a {
  width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--ink-soft);
}
.socials a:hover { border-color: var(--gold); color: var(--gold-deep); text-decoration: none; }
.socials svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- portal ---------- */
.portal-note {
  border: 1px dashed var(--gold); background: var(--paper-2); border-radius: 6px;
  padding: .8rem 1.1rem; font-size: .88rem; color: var(--ink-soft); margin-bottom: 1.6rem;
}
.login-card { max-width: 420px; margin: 0 auto; }
.portal-dash { display: none; }
.portal-dash.show { display: block; }
.login-wrap.hide { display: none; }
.dash-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.dash-top h2 { margin: 0; }
.pill { font-size: .74rem; font-weight: 600; padding: .3rem .7rem; border-radius: 100px; letter-spacing: .04em; }
.pill.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.doc-row { display: flex; align-items: center; gap: .8rem; padding: .75rem .2rem; border-bottom: 1px solid var(--line); font-size: .92rem; }
.doc-row:last-child { border-bottom: none; }
.doc-row .grow { flex: 1; }
.doc-row .dim { color: var(--ink-soft); font-size: .8rem; font-variant-numeric: tabular-nums; }
.progress { height: 6px; background: var(--paper-2); border-radius: 100px; overflow: hidden; margin-top: .5rem; }
.progress i { display: block; height: 100%; background: var(--gold); border-radius: 100px; }
.comment { border-left: 2px solid var(--line); padding: .2rem 0 .2rem 1rem; margin-bottom: 1rem; font-size: .92rem; }
.comment b { font-size: .82rem; }
.comment .dim { color: var(--ink-soft); font-size: .78rem; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(180deg, var(--band) 0%, var(--band-2) 100%); color: var(--band-ink); text-align: center; }
.cta-band h2 { color: var(--band-ink); max-width: 24ch; margin-inline: auto; }
.cta-band p { color: var(--band-soft); margin-inline: auto; }
.cta-band .btn { margin-top: 1rem; }

/* ---------- footer ---------- */
.site-foot { background: var(--band); color: var(--band-soft); border-top: 1px solid var(--band-line); font-size: .88rem; }
.site-foot .wrap { padding: 3rem clamp(1.1rem, 4vw, 2.5rem) 2rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 2rem; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-grid { grid-template-columns: 1fr; } }
.site-foot h4 { color: var(--band-ink); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 .9rem; }
.site-foot a { color: var(--band-soft); }
.site-foot a:hover { color: var(--gold-on-band); }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.foot-base {
  border-top: 1px solid var(--band-line); margin-top: 2.2rem; padding-top: 1.4rem;
  display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: space-between; font-size: .8rem;
}
.site-foot .socials a { border-color: var(--band-line); color: var(--band-soft); }
.site-foot .socials a:hover { border-color: var(--gold-on-band); color: var(--gold-on-band); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* SPA pages */
.spa .page-view { display: none; }
.spa .page-view.current { display: block; }
