/* ============================================================
   Cornerhouse Impact Media — cornerhousemedia.co.za
   Charcoal ground · Poppins · blue-violet gradient system
   ============================================================ */

:root {
  --ground: #0D0D0F;
  --ground-2: #0A0A0C;
  --panel: #14141A;
  --panel-violet: #1B1533;
  --line: rgba(246, 247, 250, 0.10);
  --line-strong: rgba(246, 247, 250, 0.18);
  --ink: #F6F7FA;
  --ink-soft: #B9BCCB;
  --ink-muted: #9A9DB0;
  --ink-dim: #63657A;
  --violet: #BE5AFF;
  --violet-soft: #C9A3FF;
  --blue: #0344FF;
  --lilac: #ECE8FA;
  --lilac-ink: #15151F;
  --lilac-body: #3D3D52;
  --lilac-dim: #6B6B82;
  --grad: linear-gradient(70deg, #3134EE 0%, #6E4BF5 55%, #A55CF6 100%);
  --grad-text: linear-gradient(70deg, #4356F5 0%, #7C5CF6 50%, #C77DF6 100%);
  --radius: 18px;
  --gutter: clamp(20px, 4.5vw, 64px);
  --measure: 66ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
a { color: var(--violet); text-decoration: none; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wrap { max-width: 1440px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 13, 15, 0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); flex: none; }
.brand img { width: 28px; height: 28px; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.1; }
.brand-sub { display: block; font-size: 7.5px; font-weight: 600; letter-spacing: 0.24em; color: var(--ink-muted); }
.nav-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
  display: inline-flex; align-items: center; height: 36px; padding: 0 15px;
  border-radius: 999px; background: rgba(246, 247, 250, 0.08);
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; color: var(--ink);
  transition: background 140ms ease, color 140ms ease;
}
.nav-links a:hover { background: rgba(246, 247, 250, 0.16); }
.nav-links a[aria-current="page"] { background: var(--ink); color: var(--lilac-ink); }
.nav-links a.nav-cta { background: var(--grad); color: #FFFFFF; }
.nav-toggle {
  display: none; border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  width: 42px; height: 42px; border-radius: 10px; cursor: pointer; align-items: center; justify-content: center;
}

/* ---------- Sections ---------- */
.section { padding-top: clamp(64px, 8vw, 110px); padding-bottom: clamp(56px, 7vw, 100px); }
.section + .section, .bordered { border-top: 1px solid var(--line); }
.kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; color: var(--violet); text-transform: uppercase; }
.section-head { display: flex; gap: clamp(24px, 5vw, 80px); align-items: flex-start; margin-bottom: clamp(34px, 4vw, 56px); }
.section-head .kicker { width: 200px; flex: none; padding-top: 12px; }
.section-head h2 { font-size: clamp(27px, 3.4vw, 46px); font-weight: 700; line-height: 1.05; letter-spacing: -0.035em; max-width: 860px; }
.lede { color: var(--ink-muted); max-width: var(--measure); margin-top: 18px; font-size: clamp(14.5px, 1.2vw, 16px); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(70px, 9vw, 130px); padding-bottom: clamp(60px, 7vw, 100px); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 560px at 50% 0%, rgba(110, 75, 245, 0.2), transparent 68%),
    radial-gradient(700px 420px at 88% 92%, rgba(255, 142, 97, 0.09), transparent 70%);
}
.hero > .wrap { position: relative; }
.hero-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; color: var(--ink-muted); margin-bottom: clamp(24px, 3vw, 42px); }
.hero-meta b { color: var(--ink); font-weight: 600; }
.hero-meta .dot { width: 3px; height: 3px; border-radius: 999px; background: #55566A; }
.hero h1 { font-size: clamp(34px, 5.6vw, 78px); font-weight: 800; line-height: 0.98; letter-spacing: -0.045em; max-width: 1180px; }
.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-top: clamp(28px, 4vw, 54px); }
.hero-foot p { font-size: clamp(15px, 1.4vw, 19px); line-height: 1.6; color: var(--ink-soft); max-width: 560px; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 30px; border-radius: 999px;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-grad { background: var(--grad); color: #FFFFFF; }
.btn-grad:hover { color: #FFFFFF; box-shadow: 0 10px 30px rgba(110, 75, 245, 0.35); }
.btn-light { background: var(--ink); color: var(--lilac-ink); }
.btn-light:hover { color: var(--lilac-ink); }
.btn-ghost { border: 1px solid rgba(246, 247, 250, 0.24); color: var(--ink); }
.btn-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; font-size: 13px; font-weight: 500;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 16px; color: var(--ink);
}
.chip-muted { color: var(--ink-soft); border-color: var(--line); }
.chip-violet { color: var(--violet-soft); border-color: rgba(190, 90, 255, 0.42); font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: 9px; }

/* ---------- Image bands ---------- */
.img-band { position: relative; overflow: hidden; }
.img-band img { width: 100%; height: clamp(320px, 40vw, 620px); object-fit: cover; }
.img-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,13,15,0.45) 0%, rgba(13,13,15,0) 38%, rgba(13,13,15,0.55) 100%); }
.img-band figcaption {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 26px; z-index: 2;
  font-size: 12px; font-weight: 500; letter-spacing: 0.1em; color: #C6C8D4; text-transform: uppercase;
}
figure { margin: 0; }

/* ---------- Stat rules (editorial rows) ---------- */
.stat-rules { display: flex; flex-direction: column; }
.stat-rule { display: flex; align-items: baseline; gap: clamp(18px, 3vw, 40px); border-top: 1px solid var(--line-strong); padding: clamp(20px, 2.6vw, 30px) 0; }
.stat-rule:last-child { border-bottom: 1px solid var(--line-strong); }
.stat-rule .num { width: clamp(150px, 18vw, 260px); flex: none; font-size: clamp(38px, 4.8vw, 68px); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }
.stat-rule .label { width: clamp(140px, 20vw, 300px); flex: none; font-size: clamp(16px, 1.5vw, 21px); font-weight: 600; letter-spacing: -0.02em; }
.stat-rule p { flex: 1; font-size: 15px; color: var(--ink-muted); max-width: 520px; }

/* ---------- Stat grid ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stat-cell { border-top: 1px solid var(--line-strong); padding-top: 22px; }
.stat-cell .num { font-size: clamp(34px, 3.2vw, 46px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.stat-cell p { font-size: 13.5px; color: var(--ink-muted); margin-top: 10px; }
.source { font-size: 11.5px; color: var(--ink-dim); margin-top: 26px; }

/* ---------- Work / gallery grids ---------- */
.gallery-row { display: flex; gap: 22px; margin-bottom: 22px; }
.gallery-row:last-child { margin-bottom: 0; }
.gallery-item { flex: 1; min-width: 0; }
.gallery-item.wide { flex: 1.6; }
.gallery-item img { width: 100%; height: clamp(220px, 24vw, 460px); object-fit: cover; border-radius: 4px; }
.gallery-row.short .gallery-item img { height: clamp(190px, 20vw, 320px); }
.gallery-cap { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding-top: 16px; }
.gallery-cap h3 { font-size: clamp(17px, 1.5vw, 22px); font-weight: 700; letter-spacing: -0.02em; }
.gallery-cap p { font-size: 13.5px; color: var(--ink-muted); margin-top: 4px; }
.gallery-cap .tag { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; color: var(--ink-dim); padding-top: 6px; white-space: nowrap; }

/* ---------- Cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-pad { padding: 28px; }
.card h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.card p { font-size: 13.5px; line-height: 1.62; color: var(--ink-muted); }
.card .meta { font-size: 12px; color: var(--ink-dim); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.product-card { display: flex; }
.product-card > img { width: 300px; flex: none; object-fit: cover; }
.product-card .card-pad { display: flex; flex-direction: column; gap: 10px; }
.product-card .kicker { font-size: 10px; letter-spacing: 0.16em; }

/* ---------- Feature bands ---------- */
.feature-band { position: relative; border-radius: 20px; overflow: hidden; margin-bottom: 22px; }
.feature-band > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-band .scrim { position: absolute; inset: 0; }
.feature-band .content { position: relative; display: flex; gap: 50px; padding: clamp(28px, 4vw, 54px) clamp(22px, 3.6vw, 50px); }
.feature-band h3 { font-size: clamp(26px, 2.8vw, 38px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.feature-band p { font-size: 14.5px; color: var(--ink-soft); }
.mini-stats { display: flex; flex-wrap: wrap; gap: 24px 44px; margin-top: 26px; }
.mini-stats .num { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.mini-stats p { font-size: 11.5px; color: var(--ink-muted); margin-top: 3px; }
.side-imgs { flex: 1; display: flex; align-items: flex-end; justify-content: flex-end; gap: 16px; min-width: 0; }
.side-imgs img { border-radius: 12px; border: 1px solid rgba(246, 247, 250, 0.2); object-fit: cover; }

/* ---------- Lilac sections ---------- */
.lilac { background: var(--lilac); color: var(--lilac-ink); }
.lilac .kicker { color: #6E4BF5; }
.lilac p { color: var(--lilac-body); }
.lilac .card { background: #FFFFFF; border: none; }
.lilac .card p { color: var(--lilac-body); }
.lilac .source, .lilac .gallery-cap p, .lilac figcaption { color: var(--lilac-dim); }
.lilac a { color: #6E4BF5; }
.lilac a:hover { color: var(--lilac-ink); }

/* ---------- Journey steps ---------- */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.step { border-top: 2px solid #6E4BF5; padding-top: 20px; }
.step .n { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; color: var(--violet); }
.step h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; }
.step p { font-size: 13.5px; color: var(--ink-muted); margin-top: 8px; }

/* ---------- List rows ---------- */
.list-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(30px, 5vw, 80px); }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line-strong); padding: 20px 0; font-size: clamp(16px, 1.5vw, 20px); font-weight: 600; letter-spacing: -0.02em; }
.list-row span:last-child { font-size: 13px; color: var(--ink-muted); font-weight: 500; text-align: right; }
.lilac .list-row { border-color: rgba(21, 21, 31, 0.15); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-top: 1px solid var(--line); padding-top: clamp(80px, 9vw, 150px); padding-bottom: clamp(76px, 9vw, 140px); }
.cta-band .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.cta-band .scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,13,15,0.88) 0%, rgba(13,13,15,0.62) 55%, rgba(13,13,15,0.3) 100%), linear-gradient(0deg, rgba(13,13,15,0.9) 0%, rgba(13,13,15,0.25) 45%, rgba(13,13,15,0.55) 100%); }
.cta-band .glow { position: absolute; inset: 0; background: radial-gradient(900px 520px at 50% 90%, rgba(110, 75, 245, 0.3), transparent 68%); }
.cta-band .wrap { position: relative; }
.cta-band h2 { font-size: clamp(36px, 6vw, 86px); font-weight: 800; line-height: 0.97; letter-spacing: -0.045em; max-width: 1080px; }
.cta-band .btn-row { margin-top: 34px; }

/* ---------- Contact bar & footer ---------- */
.contact-bar { border-top: 1px solid var(--line); }
.contact-bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; }
.contact-info { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--ink-muted); }
.contact-info a { color: var(--ink); font-weight: 600; }
.socials { display: flex; align-items: center; gap: 15px; }
.socials a { display: inline-flex; color: var(--ink-muted); }
.socials a:hover { color: var(--ink); }
.socials svg { fill: currentColor; }
.socials .stroke svg { fill: none; stroke: currentColor; }
.socials .handle { font-size: 12.5px; font-weight: 600; color: var(--ink-muted); }
.footer { border-top: 1px solid var(--line); }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 36px; padding-bottom: 40px; }
.footer .legal { font-size: 12px; color: var(--ink-dim); }
.footer .tagline { font-size: 13px; font-weight: 600; color: var(--ink-muted); }

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

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .stat-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-band .content { flex-direction: column; }
  .side-imgs { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; padding: 14px var(--gutter) 20px;
    background: rgba(13, 13, 15, 0.98); border-bottom: 1px solid var(--line);
  }
  .nav-links a { height: 46px; justify-content: center; }
  .nav.open .nav-links { display: flex; }
  .section-head { flex-direction: column; gap: 14px; }
  .section-head .kicker { width: auto; padding-top: 0; }
  .stat-rule { flex-wrap: wrap; }
  .stat-rule .label { width: auto; }
  .stat-rule p { flex-basis: 100%; }
  .gallery-row { flex-direction: column; }
  .gallery-item img, .gallery-row.short .gallery-item img { height: clamp(220px, 52vw, 340px); }
  .card-grid, .card-grid-2, .list-rows { grid-template-columns: 1fr; }
  .product-card { flex-direction: column; }
  .product-card > img { width: 100%; height: 210px; }
  .split { flex-direction: column; }
  .side-imgs img { width: 48% !important; height: auto !important; }
}
@media (max-width: 560px) {
  .stat-grid, .steps { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}

/* ---------- Capability lead column ---------- */
.cap-lead { width: 400px; flex: none; }
@media (max-width: 860px) { .cap-lead { width: 100%; } }

/* ---------- Client logo row ---------- */
.logo-row { display: flex; align-items: center; gap: 28px 44px; flex-wrap: wrap; }
.logo-row img { height: 26px; width: auto; opacity: 0.85; }
.logo-row .logo-text { font-size: 17px; font-weight: 700; letter-spacing: 0.01em; color: #9A9DB0; line-height: 1; }
@media (max-width: 640px) { .logo-row { gap: 20px 28px; } .logo-row img { height: 21px; } .logo-row .logo-text { font-size: 15px; } }

/* ---------- Misc ---------- */
.split { display: flex; gap: clamp(28px, 5vw, 70px); align-items: center; }
.split > * { flex: 1; min-width: 0; }
.quote-mark { font-size: clamp(56px, 7vw, 92px); font-weight: 800; line-height: 0.9; letter-spacing: -0.05em; }
.big-quote { font-size: clamp(30px, 4vw, 56px); font-weight: 700; line-height: 1.08; letter-spacing: -0.035em; max-width: 920px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--lilac-ink); padding: 10px 18px; border-radius: 0 0 10px 0; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 0; }
