/* ============================================================
   Ngoli Capital — Stylesheet
   Brand: navy #172440 · gold #f8b001
   Type:  Cormorant Garamond (display) · Outfit (UI/labels)
   ============================================================ */

:root {
  /* Brand */
  --brand-navy: #172440;
  /* Ngoli main */
  --gold: #f8b001;
  /* Ngoli accent */

  /* Derived navy palette */
  --midnight: #0a1426;
  /* deeper than brand, used as page bg */
  --navy: #11203a;
  /* slightly lighter than brand, footer */
  --rule: #2a3759;
  /* visible navy rules */
  --rule-soft: #1d2a47;
  /* subtle navy rules */

  /* Type & supporting */
  --bone: #f3ecdd;
  /* warm cream — body on dark */
  --bone-dim: #c4bda9;
  /* secondary text */
  --bone-mute: #7d7a72;
  /* tertiary / colophon */
  --gold-deep: #c08800;
  /* less assertive gold for some borders */
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--midnight);
  color: var(--bone);
  font-family: 'Outfit', system-ui, sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle film grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 0.95 0 0 0 0 0.85 0 0 0 0.04 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  opacity: 0.55;
}

/* Atmospheric gold glow, top-right */
body::after {
  content: "";
  position: fixed;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vh;
  background: radial-gradient(ellipse at top right, rgba(248, 176, 1, 0.10), transparent 60%);
  pointer-events: none;
  z-index: 1;
}

::selection {
  background: var(--gold);
  color: var(--brand-navy);
}

.wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}

/* ------ Nav (persistent / sticky) ------ */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 18px 40px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    padding .35s ease,
    background-color .35s ease,
    backdrop-filter .35s ease,
    border-color .35s ease;
}

header.nav .nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 56px;
}

/* Scrolled state — translucent navy backdrop with blur */
header.nav.scrolled {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(10, 20, 38, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--rule-soft);
}

.mark {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.mark img {
  display: block;
  height: 100px;
  width: auto;
  transition: height .35s ease;
}

header.nav.scrolled .mark img {
  height: 40px;
}

header.nav nav.primary {
  display: flex;
  justify-content: center;
  gap: 36px;
}

header.nav nav.primary a {
  color: var(--bone-dim);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 300;
  transition: color .2s;
}

header.nav nav.primary a:hover {
  color: var(--gold);
}

header.nav .cta {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid var(--gold-deep);
  padding: 10px 20px;
  transition: background .25s, color .25s, border-color .25s;
}

header.nav .cta:hover {
  background: var(--gold);
  color: var(--brand-navy);
  border-color: var(--gold);
}

/* ------ Hero ------ */
.hero {
  padding: 100px 40px 96px;
  position: relative;
  border-bottom: 1px solid var(--rule-soft);
}

.hero::before {
  content: "";
  position: absolute;
  top: 60px;
  left: 40px;
  width: 56px;
  height: 1px;
  background: var(--gold);
}

.hero .kicker {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 36px;
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(56px, 8.4vw, 132px);
  line-height: 1.0;
  letter-spacing: -0.018em;
  color: var(--bone);
  margin-bottom: 56px;
  max-width: 1100px;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

.hero .meta-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  border-top: 1px solid var(--rule-soft);
  padding-top: 36px;
  align-items: start;
}

.hero .lede {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 22px;
  line-height: 1.45;
  color: var(--bone);
}

.hero .meta-cell {
  font-size: 13px;
  line-height: 1.55;
  color: var(--bone-mute);
}

.hero .meta-cell .label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 400;
}

.hero .meta-cell strong {
  display: block;
  color: var(--bone);
  font-weight: 300;
  margin-bottom: 4px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 19px;
}

/* ------ Sections ------ */
section {
  padding: 120px 0;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
}

/* Anchor link offset — keeps sticky nav from covering section tops */
section[id] {
  scroll-margin-top: 96px;
  padding: 120px 40px;
}

.section-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  margin-bottom: 80px;
  align-items: start;
}

.section-head .num {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 64px;
  color: var(--gold);
  line-height: 0.9;
}

.section-head .num .label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bone-mute);
  margin-top: 14px;
  font-weight: 400;
}

h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.012em;
  color: var(--bone);
  max-width: 950px;
}

h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

/* ------ Mandate ------ */
.mandate-grid {
  display: grid;
  grid-template-columns: 240px 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.mandate-grid .anchor {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 19px;
  color: var(--gold);
  line-height: 1.4;
  border-top: 1px solid var(--gold-deep);
  padding-top: 18px;
}

.mandate-grid .copy {
  font-size: 17px;
  line-height: 1.7;
  color: var(--bone-dim);
}

.mandate-grid .copy p {
  margin-bottom: 1.1em;
}

.mandate-grid .copy p:first-of-type {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  line-height: 1.5;
  color: var(--bone);
  font-weight: 300;
  margin-bottom: 1em;
}

.mandate-grid .copy strong {
  color: var(--gold);
  font-weight: 400;
}

/* ------ Etymology ------ */
.etymology-table {
  width: 100%;
  border-collapse: collapse;
}

.etymology-table tr {
  border-top: 1px solid var(--rule-soft);
}

.etymology-table tr:last-child {
  border-bottom: 1px solid var(--rule-soft);
}

.etymology-table th {
  text-align: left;
  padding: 22px 24px 22px 0;
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  width: 30%;
  vertical-align: top;
}

.etymology-table td {
  padding: 22px 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 19px;
  line-height: 1.45;
  color: var(--bone);
  vertical-align: top;
}

/* ------ Practice ------ */
.practice {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule-soft);
}

.practice .row {
  padding: 48px 36px 48px 0;
  border-right: 1px solid var(--rule-soft);
  position: relative;
}

.practice .row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.practice .row:not(:first-child) {
  padding-left: 36px;
}

.practice .row:last-child {
  border-right: none;
  padding-right: 0;
}

.practice .num {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.practice h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  color: var(--bone);
  margin-bottom: 18px;
  letter-spacing: -0.005em;
}

.practice p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--bone-mute);
}

/* ------ Sectors ------ */
.sectors-rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule-soft);
}

.sectors-rail .cell {
  padding: 40px 24px 40px 0;
  border-right: 1px solid var(--rule-soft);
  position: relative;
}

.sectors-rail .cell:not(:first-child) {
  padding-left: 24px;
}

.sectors-rail .cell:last-child {
  border-right: none;
  padding-right: 0;
}

.sectors-rail .cell .idx {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  font-weight: 400;
}

.sectors-rail .cell .name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.15;
  color: var(--bone);
  letter-spacing: -0.005em;
}

.sectors-rail .cell .name em {
  font-style: italic;
  color: var(--gold);
  display: block;
  font-size: 13px;
  margin-top: 6px;
  letter-spacing: 0;
  font-weight: 300;
}

/* ------ Writing & Voice ------ */
.writing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.pub {
  border-top: 1px solid var(--rule-soft);
  padding-top: 36px;
}

.pub .meta {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  font-weight: 400;
}

.pub h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 38px;
  line-height: 1.05;
  color: var(--bone);
  margin-bottom: 16px;
  letter-spacing: -0.005em;
}

.pub h3 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

.pub p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--bone-dim);
  margin-bottom: 24px;
}

.pub .link {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-deep);
  padding-bottom: 6px;
  font-weight: 400;
  transition: border-color .2s;
}

.pub .link:hover {
  border-bottom-color: var(--gold);
}

/* ------ Footer ------ */
footer {
  padding: 96px 0 56px;
  background: var(--navy);
  position: relative;
  z-index: 2;
}

footer .signature {
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--rule);
  line-height: 0;
}

footer .signature img {
  display: block;
  height: clamp(96px, 10vw, 180px);
  width: auto;
}

footer .grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

footer h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 400;
}

footer .col {
  font-size: 14px;
  color: var(--bone-dim);
  line-height: 1.7;
}

footer .col p {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 17px;
  color: var(--bone);
  line-height: 1.5;
  max-width: 360px;
}

footer .col a {
  color: var(--bone-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  display: inline-block;
  transition: color .2s, border-color .2s;
}

footer .col a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold-deep);
}

footer .colophon {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-mute);
}

@media (max-width: 1000px) {
  .hero .meta-row {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 56px;
  }

  .mandate-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .practice {
    grid-template-columns: 1fr;
  }

  .practice .row {
    border-right: none;
    border-bottom: 1px solid var(--rule-soft);
    padding: 36px 0;
  }

  .practice .row:last-child {
    border-bottom: none;
  }

  .practice .row:not(:first-child) {
    padding-left: 0;
  }

  .sectors-rail {
    grid-template-columns: 1fr 1fr;
  }

  .sectors-rail .cell {
    padding: 28px 16px;
    border-right: 1px solid var(--rule-soft);
    border-bottom: 1px solid var(--rule-soft);
  }

  .sectors-rail .cell:nth-child(2n) {
    border-right: none;
  }

  .sectors-rail .cell:not(:first-child) {
    padding-left: 16px;
  }

  .writing-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  footer .grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  footer .colophon {
    flex-direction: column;
    gap: 12px;
    text-align: left;
  }

  header.nav {
    padding: 14px 24px;
  }

  header.nav .nav-inner {
    grid-template-columns: 1fr auto;
    gap: 20px;
  }

  header.nav nav.primary {
    display: none;
  }

  .mark img {
    height: 48px;
  }

  header.nav.scrolled .mark img {
    height: 36px;
  }
}