/*
 * cognavis — global.css
 * Shared tokens, resets, nav, footer, buttons, typography, layout primitives
 * Version 2.0 | September 2026
 *
 * ARCHITECTURE RULES
 * ------------------
 * • All colours MUST be referenced via CSS custom properties defined in :root.
 *   Never write a hardcoded hex value outside this :root block.
 * • All page-specific styles live in their own CSS file (index.css, beliefs.css, etc.).
 * • global.css is the single source of truth for: tokens, reset, nav, footer,
 *   buttons, shared typography utilities, and shared components (pull-quote, divider).
 * • handout.css is a standalone scope — it does not share .section or .section-label
 *   with global.css. Use .handout-section and .handout-section-label there.
 */

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img  { display: block; max-width: 100%; }

/* ─── DESIGN TOKENS ──────────────────────────────────────────────────────── */
:root {
  /* ── Earth & Root ── */
  --cocoa:            #1A0905;
  --cocoa-60:         #493B37;
  --cocoa-40:         #776D6A;
  --cocoa-20:         #AFA9A7;
  --cocoa-10:         #DDD9D8;

  /* ── Light & Warmth ── */
  --linen:            #E3DFCE;
  --linen-light:      #EDEADD;
  --linen-50:         #F4F2E8;
  --cloud:            #F7F4ED;   /* PRIMARY PAGE BACKGROUND — always the default canvas */
  --white:            #FFFFFF;   /* High-contrast areas only — never the primary background */

  /* ── Sky & Trust ── */
  --slate:            #94B1C8;
  --slate-light:      #C9DCE8;
  --slate-bg:         #E9EFF3;
  --slate-50:         #F4F7F9;

  /* ── Heart & Healing ── */
  --burgundy:         #780813;
  --burg-bg:          #F5ECEC;
  --rose:             #CFAFA7;
  --rose-light:       #E9D8D5;

  /* ── Surface ── */
  --handout-page-bg:  #D6D3CB;   /* Background behind the handout page card */

  /* ── Radii ── */
  --r:                4px;
  --r-lg:             6px;

  /* ── Transitions ── */
  --t:                0.2s ease;
}

/* ─── BASE ───────────────────────────────────────────────────────────────── */
body {
  font-family: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.8;
  background: var(--cloud);
  color: var(--cocoa);
  -webkit-font-smoothing: antialiased;
}

/* ─── NAV ────────────────────────────────────────────────────────────────── */
nav {
  background: var(--cocoa);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-family: 'Montserrat Underline', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 22px;
  color: var(--linen-light);
  letter-spacing: 0;
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cocoa-20);
  text-decoration: none;
  transition: color var(--t);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--rose); }

.nav-cta {
  background: var(--slate);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 10px 22px;
  border-radius: var(--r);
  border: none;
  text-decoration: none;
  transition: background var(--t), color var(--t);
  cursor: pointer;
}
.nav-cta:hover { background: var(--slate-light); color: var(--cocoa); }

/* ─── HERO (shared across pages) ────────────────────────────────────────── */
.hero {
  background: var(--cocoa);
  padding: 80px 32px 72px;
  text-align: center;
}
.hero h1 {
  font-size: 44px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--linen-light);
  max-width: 600px;
  margin: 0 auto 20px;
}
.hero-sub {
  font-size: 20px;
  font-weight: 300;
  font-style: italic;
  color: var(--rose);
  max-width: 520px;
  margin: 0 auto;
}
.hero-label { color: var(--rose) !important; }

/* ─── LAYOUT PRIMITIVES ──────────────────────────────────────────────────── */
.section  { padding: 72px 32px; }
.inner    { max-width: 760px; margin: 0 auto; }

/* ─── TYPOGRAPHY UTILITIES ───────────────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cocoa-40);
  margin-bottom: 12px;
}
/* Modifier — centred section label (replaces inline style="text-align:center") */
.section-label--center { text-align: center; }

.section-h2 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--cocoa);
  margin-bottom: 12px;
}
.section-lead {
  font-size: 19px;
  font-weight: 300;
  font-style: italic;
  color: var(--cocoa-60);
  line-height: 1.65;
  margin-bottom: 40px;
}
.opener {
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  color: var(--cocoa-60);
  line-height: 1.65;
  margin-bottom: 28px;
}
.body-text {
  font-size: 18px;
  color: var(--cocoa-60);
  line-height: 1.85;
  margin-bottom: 20px;
}

/* ─── SHARED COMPONENTS ──────────────────────────────────────────────────── */

/* Pull quote */
.pull-quote {
  border-left: 3px solid var(--burgundy);
  background: var(--burg-bg);
  padding: 20px 28px;
  border-radius: 0 var(--r) var(--r) 0;
  font-style: italic;
  font-weight: 300;
  font-size: 19px;
  color: var(--cocoa);
  line-height: 1.7;
  margin: 36px 0;
}

/* Rose divider */
.rose-divider {
  width: 48px;
  height: 2px;
  background: var(--rose);
  border: none;
  margin: 64px auto;
}

/* Dark callout band */
.callout-dark {
  background: var(--cocoa);
  padding: 64px 32px;
  text-align: center;
}
.callout-dark-inner { max-width: 560px; margin: 0 auto; }
.callout-dark p {
  font-size: 22px;
  font-weight: 300;
  font-style: italic;
  color: var(--linen-light);
  line-height: 1.65;
  margin-bottom: 36px;
}

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--slate);
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  padding: 14px 32px;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background var(--t), color var(--t);
}
.btn-primary:hover { background: var(--slate-light); color: var(--cocoa); }

.btn-ghost {
  background: transparent;
  color: var(--rose);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  padding: 13px 32px;
  border-radius: var(--r);
  border: 2px solid var(--rose);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background var(--t), color var(--t);
}
.btn-ghost:hover { background: var(--rose); color: var(--cocoa); }

.btn-rose { background: var(--rose); color: var(--cocoa); }
.btn-rose:hover { background: var(--rose-light); color: var(--cocoa); }

/* Inline link */
.inline-link {
  color: var(--slate);
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.inline-link:hover { text-decoration: underline; }

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
footer { background: var(--cocoa); padding: 48px 32px 32px; }
.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-logo {
  font-family: 'Montserrat Underline', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 20px;
  color: var(--linen-light);
  letter-spacing: 0;
  margin-bottom: 6px;
}
.footer-tagline-text {
  font-size: 13px;
  font-style: italic;
  font-weight: 300;
  color: var(--rose);
  letter-spacing: 0.2em;
}
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cocoa-40);
  text-decoration: none;
  transition: color var(--t);
}
.footer-links a:hover { color: var(--rose); }
.footer-base {
  max-width: 760px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(221,217,216,.15);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-base span { font-size: 12px; color: var(--cocoa-40); }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  nav           { padding: 0 20px; }
  .nav-links    { display: none; }
  .hero h1      { font-size: 30px; }
  .hero         { padding: 60px 20px 56px; }
  .section      { padding: 56px 20px; }
  .footer-inner { flex-direction: column; }
}


/* ── Anchor icon badge ──────────────────────────────────────────────────────
   Container for the locked inline SVG anchor icons.
   Used in: anchors-grid (index.html), handout cg-strip (handout-*.html).
   Icon sizing is CSS-only — never alter the SVG viewBox.
*/
.anchor-icon-badge {
  width: 56px;
  height: 56px;
  background: var(--slate-bg);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}

/* Dark-context colour flip — apply .dark-ctx to any dark container */
.dark-ctx .anchor-icon-badge {
  background: rgba(237, 234, 221, 0.08);
}
.dark-ctx .anchor-icon-badge svg path,
.dark-ctx .anchor-icon-badge svg line  { stroke: #EDEADD !important; }
.dark-ctx .anchor-icon-badge svg circle { stroke: #EDEADD !important; fill: #1A0905; }
.dark-ctx .anchor-icon-badge svg circle[fill="#493B37"] { fill: #EDEADD !important; stroke: none !important; }
