/* Cognitive Futures Digital Libraries — Shared Styles
   Light elegant theme · Gamazine grain · Multi-page
   Startup behind CHIKARA AI
*/

:root {
  --ink: #0a0806;
  --ink-d: #050402;
  --ink-l: #1a1410;
  --cream: #faf4e8;
  --vellum: #f0e6cc;
  --pale: #fdf9ef;
  --paper: #f7f0e0;
  --amber: #c9973a;
  --amber-d: #9e6f1f;
  --amber-l: #e8c56a;
  --amber-p: #f0d990;
  --crimson: #8b1a1a;
  --forest: #1a3a2a;
  --forest-l: #2a5a3a;
  --charcoal: #2c2c2c;
  --charcoal-l: #3a3a3a;
  --muted: #6b5e4e;
  --ltxt: #4a3f32;
  --border: rgba(201, 151, 58, 0.22);
  --shadow: 0 4px 28px rgba(10, 8, 6, 0.08);
  --radius: 2px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--cream);
}

body {
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--ink);
  line-height: 1.75;
  background: var(--cream);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Gamazine grain (subtle noise overlay) ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.55;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  line-height: 1.15;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 0.6em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 1.4em 0 0.5em; }
h2 em { color: var(--amber-d); font-style: italic; }
h3 { font-size: 1.35rem; font-weight: 400; margin: 1em 0 0.4em; color: var(--ink-l); }
h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber-d);
  margin: 1.2em 0 0.5em;
}

p { margin-bottom: 0.9em; color: var(--ltxt); font-size: 1.05rem; }
p.lead {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink-l);
  line-height: 1.65;
  max-width: 38em;
}

a { color: var(--amber-d); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--amber); }

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 244, 232, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  height: 58px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}
.nav-brand-text {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber-d);
  line-height: 1.25;
}
.nav-brand-text span {
  display: block;
  font-size: 0.48rem;
  color: var(--muted);
  letter-spacing: 0.18em;
}

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
}
.nav-links a {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 14px;
  height: 58px;
  display: flex;
  align-items: center;
  border-right: 0.5px solid var(--border);
  transition: color 0.2s;
}
.nav-links a:first-child { border-left: 0.5px solid var(--border); }
.nav-links a:hover,
.nav-links a.active { color: var(--amber-d); }

.nav-cta {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--forest);
  color: var(--amber-l);
  border: 0.5px solid rgba(201, 151, 58, 0.3);
  padding: 8px 16px;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--forest-l); color: var(--amber-l); }

/* Mobile nav */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--amber-d);
  transition: 0.3s;
}
.mob-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 2000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.mob-menu.open { display: flex; }
.mob-menu a {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 18px 40px;
  border-bottom: 0.5px solid var(--border);
  text-decoration: none;
  width: 100%;
  text-align: center;
}
.mob-menu a:hover { color: var(--amber-d); }
.mob-close {
  position: absolute;
  top: 18px;
  right: 22px;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--amber-d);
  cursor: pointer;
  text-transform: uppercase;
  background: none;
  border: none;
}

/* ── Layout helpers ── */
.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 5vw;
}
.wide { max-width: 1100px; }

section {
  padding: 4.5rem 0;
  position: relative;
}

/* ── Hero / Cover ── */
.hero {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 5vw 4rem;
  position: relative;
  background: linear-gradient(180deg, var(--pale) 0%, var(--cream) 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 720px; }
.hero-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--amber-d);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--amber-d);
}
.hero h1 {
  color: var(--ink);
  margin-bottom: 0.35em;
}
.hero h1 em { color: var(--amber-d); font-style: italic; }
.hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-style: italic;
  color: var(--amber-d);
  margin-bottom: 1.4rem;
}
.hero-desc {
  font-size: 1.08rem;
  color: var(--ltxt);
  max-width: 36em;
  margin-bottom: 1.8rem;
  line-height: 1.8;
}
.hero-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 12px 22px;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--forest);
  color: var(--amber-l);
  border-color: rgba(201, 151, 58, 0.25);
}
.btn-primary:hover { background: var(--forest-l); color: var(--amber-l); }
.btn-ghost {
  background: transparent;
  color: var(--amber-d);
  border-color: var(--amber-d);
}
.btn-ghost:hover { background: rgba(201, 151, 58, 0.08); }

/* ── Cards / grids ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.card {
  background: var(--pale);
  border: 1px solid var(--border);
  padding: 1.8rem 1.6rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(10, 8, 6, 0.1);
}
.card h3 { margin-top: 0; font-size: 1.25rem; }
.card p { font-size: 0.98rem; margin-bottom: 0; }
.card .tag {
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber-d);
  margin-bottom: 0.6rem;
}

/* ── Rail accent (optional left stripe) ── */
.rail-page {
  position: relative;
}
.rail-page::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--amber), var(--crimson), var(--forest), var(--amber-d), var(--ink));
}

/* ── Section labels ── */
.section-label {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--amber-d);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.section-label::after {
  content: '';
  flex: 1;
  max-width: 48px;
  height: 1px;
  background: var(--border);
}

/* ── Pull quote ── */
.pull-quote {
  position: relative;
  padding: 1.8rem 1.6rem;
  border-left: 3px solid var(--amber);
  background: rgba(201, 151, 58, 0.06);
  margin: 2rem 0;
}
.pull-quote p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink-l);
  margin: 0;
  line-height: 1.65;
}

/* ── Founder / Witness ── */
.witness-block {
  background: var(--ink);
  color: var(--cream);
  padding: 3.5rem 5vw;
  margin: 3rem 0;
}
.witness-block h2 { color: var(--cream); }
.witness-block h2 em { color: var(--amber-l); }
.witness-block p { color: rgba(250, 244, 232, 0.78); }
.witness-q {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 1.6rem 0 0.5rem;
}
.witness-close {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(201, 151, 58, 0.2);
}
.witness-close .final {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--amber-l);
  margin-top: 0.8rem;
}

/* ── CTA band ── */
.cta-band {
  background: var(--forest);
  color: var(--cream);
  padding: 4rem 5vw;
  text-align: center;
}
.cta-band h2 { color: var(--cream); margin-bottom: 0.6em; }
.cta-band h2 em { color: var(--amber-l); }
.cta-band p { color: rgba(250, 244, 232, 0.8); max-width: 36em; margin: 0 auto 1.6rem; }
.cta-band .btn-primary {
  background: var(--amber);
  color: var(--ink);
  border-color: var(--amber);
}
.cta-band .btn-primary:hover { background: var(--amber-l); }
.cta-band .btn-ghost {
  color: var(--amber-l);
  border-color: rgba(232, 197, 106, 0.5);
}
.cta-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.cta-stat .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  color: var(--amber-l);
  line-height: 1;
}
.cta-stat .lbl {
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 244, 232, 0.5);
  margin-top: 0.25rem;
}

/* ── Footer ── */
footer {
  background: var(--ink-d);
  color: rgba(250, 244, 232, 0.55);
  padding: 3rem 5vw 2rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto 2rem;
}
.footer-brand {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.8rem;
}
.footer-brand span {
  display: block;
  font-size: 0.5rem;
  color: rgba(201, 151, 58, 0.4);
  margin-top: 0.3rem;
}
footer h4 {
  color: var(--amber-d);
  margin-top: 0;
  margin-bottom: 0.8rem;
}
footer a {
  display: block;
  color: rgba(250, 244, 232, 0.5);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
footer a:hover { color: var(--amber-l); }
.footer-bottom {
  border-top: 1px solid rgba(201, 151, 58, 0.12);
  padding-top: 1.2rem;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(201, 151, 58, 0.3);
}

/* ── Programme page specifics (light adaptation) ── */
.prog-hero {
  padding: 7rem 5vw 4rem;
  background: linear-gradient(165deg, var(--pale) 0%, var(--cream) 55%, #f5ecda 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.prog-hero h1 { max-width: 16em; margin-left: auto; margin-right: auto; }
.prog-hero .lead { margin-left: auto; margin-right: auto; }

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  background: var(--forest);
  padding: 2rem 5vw;
  text-align: center;
}
.stats-bar .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--cream);
  line-height: 1;
}
.stats-bar .lbl {
  font-family: 'Cinzel', serif;
  font-size: 0.48rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 244, 232, 0.5);
  margin-top: 0.3rem;
}

.price-card {
  background: var(--pale);
  border: 1px solid var(--border);
  padding: 2.2rem;
  max-width: 420px;
  margin: 2rem auto 0;
  box-shadow: var(--shadow);
}
.price-card .tier {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber-d);
  margin-bottom: 0.5rem;
}
.price-card .amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
}
.price-card .amount sup { font-size: 1.2rem; vertical-align: super; }
.price-card .note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.4rem 0 1.2rem;
}

/* ── Utility ── */
.hr {
  height: 1px;
  background: var(--border);
  margin: 1.8rem 0;
  border: none;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ── Responsive ── */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { text-align: center; }
}