/* =============================================================
   KAIVANT Score · site.css
   Global stylesheet for kaivantscore.com
   Source of truth: organisation.html (most complete page)
   Session: 2026-06-15
   ============================================================= */

/* =============================================================
   1. DESIGN TOKENS
   ============================================================= */
:root {
  --wine-0: #2d0a0a;
  --wine-1: #3d1212;
  --wine-2: #4e1c1c;
  --wine-3: #5e2424;
  --wine-4: #6e2e28;
  --cream-0: #fff8e8;
  --cream-1: #f0e8d8;
  --cream-2: #d8c8b0;
  --cream-3: #b59f82;
  --cream-4: #826e54;
  --paper:   #f3ecd9;
  --ink:     #1a1410;
  --rule:    rgba(240,220,200,0.14);
  --rule-strong: rgba(240,220,200,0.28);
  --gold:    #c89545;
  --leaf:    #8aa17a;
  --warn:    #c46a4a;
  --wine-ink: #1a0c0c;
  --gold-dark: #9b6e1a;
  --rule-light: rgba(26,12,12,0.12);
  --rule-light-strong: rgba(26,12,12,0.24);
}

/* =============================================================
   2. RESET + BASE
   ============================================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  background: var(--wine-1);
  overflow-x: hidden;
  color: var(--cream-1);
  font-family: 'Onest', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
body { min-height: 100vh; }

/* =============================================================
   3. ATOMS
   ============================================================= */
.wm {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.20em;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}
.wm .ai { font-style: italic; margin-left: -0.02em; }
.wm::after {
  content: '®';
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-style: normal; font-weight: 500;
  font-size: 0.45em; letter-spacing: 0;
  vertical-align: 0.85em; margin-left: 0.18em;
  color: currentColor; opacity: 0.7;
}
.cap {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  text-transform: uppercase; letter-spacing: 0.28em;
  font-size: 10px;
  color: var(--cream-3);
}
em { color: var(--cream-0); font-style: italic; }
strong { color: var(--cream-0); font-weight: 500; }

/* =============================================================
   4. FIXED BACKGROUND
   ============================================================= */
.page-bg {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; overflow: hidden;
  will-change: transform;
}
.page-bg img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}

/* =============================================================
   5. TOP BAR
   ============================================================= */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 40px;
  background: rgba(10,6,6,0.95);
  border-bottom: 1px solid var(--rule);
}
.topbar .brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
  color: var(--cream-2);
}
.topbar .brand:hover { text-decoration: none; color: var(--cream-0); }
.topbar .brand-logo { height: 34px; width: auto; display: block; }
.topbar .brand-score {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
  padding-left: 2px;
}
.topbar nav {
  display: flex; align-items: center; gap: 28px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.topbar nav a { color: var(--cream-3); text-decoration: none; transition: color 0.15s; }
.topbar nav a:hover { color: var(--cream-0); }
.topbar nav a.active { color: var(--cream-0); }
.topbar nav a.navstack, .mobile-nav a.navstack { line-height: 1.05; text-align: center; }
.topbar nav .cta-soon { opacity: 0.55; pointer-events: none; cursor: default; }
.topbar nav .soon-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-left: 4px; vertical-align: middle;
}
.topbar .cta-mini {
  margin-left: 8px; padding: 8px 14px;
  border: 1px solid var(--rule-strong); border-radius: 999px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cream-1); text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.topbar .cta-mini:hover { background: rgba(240,220,200,0.06); border-color: var(--cream-2); }
.nav-disabled { opacity: 0.35 !important; pointer-events: none !important; cursor: default !important; }

/* =============================================================
   6. HAMBURGER BUTTON
   ============================================================= */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  z-index: 200;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--cream-2);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, width 0.25s ease;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =============================================================
   7. MOBILE NAV OVERLAY
   ============================================================= */
.mobile-nav {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  background: rgba(10,6,6,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 64px 0 40px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.mobile-nav.open { opacity: 1; pointer-events: all; }
.mobile-nav-close {
  position: absolute; top: 16px; right: 18px;
  background: none; border: none; cursor: pointer;
  color: var(--cream-3); font-size: 22px; line-height: 1;
  padding: 6px 10px;
  transition: color 0.15s;
}
.mobile-nav-close:hover { color: var(--cream-0); }
.mobile-nav a {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--cream-3); text-decoration: none;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  width: 220px; text-align: center;
  transition: color 0.15s;
}
.mobile-nav a:first-child { border-top: 1px solid var(--rule); }
.mobile-nav a:hover { color: var(--cream-0); }
.mobile-nav .nav-portal-link {
  margin-top: 24px;
  color: var(--cream-2) !important;
  border-top: none !important;
  border-bottom: none !important;
  font-size: 10px !important;
  letter-spacing: 0.2em !important;
  opacity: 0.7;
}
.mobile-nav .nav-portal-link:hover { opacity: 1; }

/* =============================================================
   8. LAYOUT CONTAINERS
   ============================================================= */
main { padding-top: 80px; }
section { position: relative; }
.wrap        { max-width: 1240px; margin: 0 auto; padding: 0 56px; }
.wrap-tight  { max-width: 1080px; margin: 0 auto; padding: 0 56px; }
.wrap-narrow { max-width:  880px; margin: 0 auto; padding: 0 56px; }

/* =============================================================
   9. SECTION MARKER + TITLE
   ============================================================= */
.section-marker {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px;
}
.section-marker .roman {
  font-family: 'Inter', sans-serif;
  font-style: italic; font-weight: 500;
  font-size: 28px; color: var(--cream-2); line-height: 1;
}
.section-marker .rule { flex: 1; height: 1px; background: var(--rule); }
.section-marker .cap { color: var(--cream-3); }

.section-title {
  font-family: 'Onest', sans-serif;
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.04;
  color: var(--cream-0);
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin-bottom: 24px;
  max-width: none;
}
.section-title em { font-style: italic; color: var(--cream-0); }

/* =============================================================
   10. BUTTONS
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 30px;
  font-family: 'Onest', sans-serif;
  font-size: 16px; letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  border: 1px solid var(--cream-1);
  color: var(--cream-1); background: transparent; cursor: pointer;
}
.btn:hover { background: var(--cream-1); color: var(--wine-1); }
.btn .arrow { font-family: 'Inter', sans-serif; font-style: italic; font-size: 18px; line-height: 1; }
.btn-primary { background: var(--cream-1); color: var(--wine-1); }
.btn-primary:hover { background: var(--cream-0); color: var(--wine-0); }
.btn-secondary { border: 1px solid var(--gold); color: var(--gold); background: transparent; }
.btn-secondary:hover { background: rgba(200,149,69,0.08); border-color: var(--gold); }
.btn-ghost { border-color: var(--rule-strong); color: var(--cream-2); }
.btn-ghost:hover { background: rgba(240,220,200,0.06); color: var(--cream-0); border-color: var(--cream-2); }

/* =============================================================
   11. PAGE HERO
   ============================================================= */
.page-hero {
  padding: 140px 0 100px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  background: rgba(30,8,8,0.55);
  overflow: hidden;
}
.page-hero .bg-grad {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(10,6,6,0.55) 0%, transparent 30%, transparent 70%, rgba(10,6,6,0.6) 100%);
}
.page-hero .wrap-tight { position: relative; z-index: 2; }
.page-hero .kicker { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.page-hero h1 {
  font-family: 'Onest', sans-serif; font-weight: 500;
  font-size: clamp(40px, 5.5vw, 78px); line-height: 1.0;
  color: var(--cream-0); letter-spacing: -0.015em;
  text-wrap: balance; max-width: 22ch; margin-bottom: 24px;
  text-shadow: 0 1px 18px rgba(0,0,0,0.45);
}
.page-hero h1 em { font-style: italic; color: var(--gold); }
.page-hero .sub {
  font-family: 'Inter', sans-serif; font-style: italic;
  font-size: clamp(18px, 1.8vw, 22px); line-height: 1.5;
  color: var(--cream-1); max-width: 60ch; margin-bottom: 40px;
}
.page-hero .sub em { color: var(--cream-0); font-style: normal; }
.page-hero .meta-row {
  display: flex; align-items: center; gap: 32px;
  padding-top: 32px; border-top: 1px solid var(--rule);
}
.page-hero .meta-row .item { display: flex; flex-direction: column; gap: 4px; }
.page-hero .meta-row .lbl {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--cream-3);
}
.page-hero .meta-row .val {
  font-family: 'Inter', sans-serif; font-style: italic;
  font-size: 15px; color: var(--cream-1);
}
.page-hero .meta-row .sep { width: 1px; height: 36px; background: var(--rule); }

/* =============================================================
   12. FRAMEWORK SECTION
   ============================================================= */
.framework-section {
  padding: 100px 0;
  border-bottom: 1px solid var(--rule);
}
.framework-section.alt {
  background: radial-gradient(ellipse 60% 50% at 80% 50%, rgba(78,30,26,0.2), transparent 70%);
}
.framework-section .content-grid {
  margin-top: 48px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: start;
}
.framework-section .content-grid.single {
  grid-template-columns: 1fr; max-width: 72ch;
}
.framework-section .content-grid p {
  font-family: 'Inter', sans-serif; font-size: 19px;
  line-height: 1.7; color: var(--cream-2); margin-top: 0.7em;
}
.framework-section .content-grid p:first-child { margin-top: 0; }
.framework-section .content-grid p em { color: var(--cream-0); font-style: italic; }
.framework-section .content-grid p strong { color: var(--cream-0); font-weight: 500; }

/* =============================================================
   13. LIGHT SECTION MODIFIER (.ls)
   ============================================================= */
.ls { background: rgba(243,232,214,0.70) !important; border-top: 1px solid var(--rule-light) !important; }
.ls em { color: var(--wine-1) !important; }
.ls strong { color: var(--wine-ink) !important; }
.ls .section-marker .roman { color: var(--wine-2); }
.ls .section-marker .rule { background: var(--rule-light); }
.ls .section-marker .cap { color: var(--wine-4); }
.ls .section-title { color: var(--wine-ink); }
.ls .section-title em { color: var(--wine-ink) !important; }
.ls .cap { color: var(--wine-4); }
.ls .btn { border-color: rgba(26,12,12,0.4); color: var(--wine-ink); }
.ls .btn:hover { background: var(--wine-ink); color: var(--paper); border-color: var(--wine-ink); }
.ls .btn-primary { background: var(--wine-ink); color: var(--paper); border-color: var(--wine-ink); }
.ls .btn-primary:hover { background: var(--wine-0); color: var(--cream-1); }
.ls .btn-secondary { border-color: var(--gold-dark); color: var(--gold-dark); background: transparent; }
.ls .btn-secondary:hover { background: rgba(155,110,26,0.08); }
.ls .btn-ghost { border-color: var(--rule-light-strong); color: var(--wine-1); }
.ls .btn-ghost:hover { background: rgba(26,12,12,0.05); color: var(--wine-ink); border-color: rgba(26,12,12,0.4); }
.ls p, .ls .d, .ls .desc, .ls .dim-def,
.ls .framework-section .content-grid p {
  font-family: 'Inter', sans-serif !important;
  font-size: 17px !important; line-height: 1.78 !important;
  font-weight: 400 !important; letter-spacing: 0 !important;
  color: var(--wine-1) !important;
}
.ls p em, .ls .framework-section .content-grid p em { color: var(--gold-dark) !important; font-style: italic; }
.ls p strong, .ls .framework-section .content-grid p strong { color: var(--wine-ink) !important; font-weight: 600; }

/* =============================================================
   14. DIM GRID + DIM CARD
   ============================================================= */
.dim-grid {
  margin-top: 40px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.dim-card {
  padding: 28px 24px 24px;
  border: 1px solid var(--rule-light);
  background: rgba(26,12,12,0.025);
  display: flex; flex-direction: column; gap: 10px;
}
.dim-card .dim-abbr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--wine-4);
}
.dim-card h3 {
  font-family: 'Onest', sans-serif; font-weight: 500;
  font-size: 22px; color: var(--wine-ink); line-height: 1.1; margin: 0;
  letter-spacing: -0.005em;
}
.dim-card .dim-def {
  font-family: 'Inter', sans-serif;
  font-size: 15px !important; line-height: 1.7 !important;
  color: var(--wine-1) !important; margin: 0;
}

/* =============================================================
   15. CTA BAND
   ============================================================= */
.cta-band {
  padding: 100px 0; border-bottom: 1px solid var(--rule);
  background: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(40,12,12,0.5), transparent 70%), rgba(30,8,8,0.55);
}
.cta-band .inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 48px; flex-wrap: wrap;
}
.cta-band .copy h2 {
  font-family: 'Onest', sans-serif; font-weight: 500;
  font-size: clamp(32px, 4vw, 52px); line-height: 1.05;
  color: var(--cream-0); letter-spacing: -0.01em;
  text-wrap: balance; max-width: 22ch; margin-bottom: 16px;
}
.cta-band .copy h2 em { font-style: italic; color: var(--gold); }
.cta-band .copy p {
  font-family: 'Inter', sans-serif; font-style: italic;
  font-size: 19px; color: var(--cream-2); max-width: 52ch;
}
.cta-band .actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* =============================================================
   16. FOOTER
   ============================================================= */
footer.site-foot {
  padding: 80px 0 50px;
  border-top: 1px solid var(--rule);
  background: rgba(0,0,0,0.4);
}
footer.site-foot .grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 56px;
}
footer.site-foot .brand-col { display: flex; flex-direction: column; gap: 18px; }
footer.site-foot .brand-col .stamp { display: flex; align-items: center; gap: 14px; }
footer.site-foot .brand-col .stamp .wm { font-size: 16px; letter-spacing: 0.22em; color: var(--cream-1); }
footer.site-foot .brand-icon { width: 140px; height: auto; display: block; flex-shrink: 0; }
footer.site-foot .brand-col .tag {
  font-family: 'Inter', sans-serif; font-weight: 300; font-style: normal;
  font-size: 11px; color: var(--cream-2); line-height: 1.65; max-width: 34ch;
}
footer.site-foot .brand-col .tag em { color: var(--cream-0); }
footer.site-foot .col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  font-style: normal; color: var(--cream-1); font-weight: 500; margin-bottom: 14px;
}
footer.site-foot .col ul { list-style: none; padding: 0; }
footer.site-foot .col li { font-family: 'Inter', sans-serif; font-weight: 300; font-size: 12px; line-height: 2.0; }
footer.site-foot .col a { color: var(--cream-2); text-decoration: none; transition: color 0.15s; }
footer.site-foot .col a:hover { color: var(--cream-0); }
footer.site-foot .col li em { font-style: italic; color: var(--cream-4); font-size: 12px; margin-left: 6px; }
footer.site-foot .meta {
  padding-top: 32px; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  font-family: 'Inter', sans-serif;
  font-weight: 300; font-size: 12px; letter-spacing: 0.08em;
  text-transform: none; font-style: normal; color: var(--cream-1);
}
footer.site-foot .meta .center {
  font-family: 'Inter', sans-serif; font-weight: 300; font-style: normal;
  text-transform: none; font-size: 12px; color: var(--cream-0); letter-spacing: 0.08em;
}
footer.site-foot .meta .center em { color: var(--cream-0); }

/* =============================================================
   17. RESPONSIVE BREAKPOINTS
   ============================================================= */
@media (max-width: 1100px) {
  .topbar nav { display: none !important; }
  .nav-toggle { display: flex !important; }
  .mobile-nav { display: flex !important; }
}

@media (max-width: 960px) {
  .wrap, .wrap-tight, .wrap-narrow { padding: 0 28px; }
  .topbar { padding: 16px 24px; }
  .topbar nav { display: none; }
  .topbar .cta-mini { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav { display: flex; }
  .page-hero { padding: 100px 0 60px; }
  .page-hero h1 { font-size: 40px; }
  .page-hero .meta-row { flex-wrap: wrap; gap: 16px; }
  .framework-section { padding: 60px 0; }
  .framework-section .content-grid { grid-template-columns: 1fr; gap: 32px; }
  .dim-grid { grid-template-columns: 1fr; }
  .cta-band .inner { flex-direction: column; gap: 32px; }
  footer.site-foot { padding: 60px 0 40px; }
  footer.site-foot .grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  footer.site-foot .meta { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 560px) {
  footer.site-foot .grid { grid-template-columns: 1fr; }
}
