/* ============================================================
   ISL — The Institute of Spiritual Learning
   Shared site chrome: Omega Document design tokens, nav, footer,
   buttons and layout primitives used on every page.

   Load this BEFORE a page's own <style> block, so page-specific
   rules can still override where a page genuinely differs (the
   dark post-payment pages redefine body/section backgrounds, for
   instance). Load Google Fonts (Cormorant Garamond + Jost) via
   <link> in every page's own <head> — this file assumes they're
   already available and does not fetch them itself.
   ============================================================ */

:root {
  /* Omega Document palette — approved Groove Inc, Aug 2026 */
  --turquoise:      #2BACCC; /* Primary — large fills, icon, UI. NOT small text on white (2.67:1) */
  --turquoise-text: #208199; /* AA-safe darkened variant for links/small text on white (4.50:1) */
  --skyblue:        #54ACD9; /* Secondary — decorative fills; AA-safe as small text on charcoal (4.91:1) */
  --charcoal:       #343434; /* Ink — body text (12.45:1 on white) */
  --charcoal-soft:  #6b6b6b; /* body-safe soft ink for long-form secondary copy */
  --grey-support:   #979797; /* heading "supporting word" convention — large/bold headline use only */
  --lavender:       #BE81F7; /* Accent — decorative; AA-safe small text on charcoal (4.55:1) */
  --gold:           #F0B106; /* Accent — CTA use only, always paired with charcoal text (6.52:1) */
  --ring-cyan:      #3ED6ED; /* measured logo ring colour — icon fill only, never text */
  --line: #e7e7e7; --paper: #f5f6f7; --white: #ffffff;

  /* The Threshold Gradient — the site's one dark register, derived from the palette above */
  --tg-0: #2BACCC; --tg-25: #5E9DDB; --tg-50: #8E94EA; --tg-75: #866AB3; --tg-100: #424E60;

  /* Derived dark theme for post-payment pages (hue-preserved from the Threshold Gradient's
     tinted-charcoal endpoint, #424E60) — verified AA-safe for white/Gold/SkyBlue/Turquoise/Lavender text */
  --night: #171B21; --night-2: #212730;

  --max: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--charcoal); font-family: "Jost", Arial, sans-serif; font-weight: 300; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--turquoise-text); text-decoration: none; }
a:hover { color: var(--charcoal); }
h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 300; margin: 0; color: var(--charcoal); }
.latin { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.eyebrow { font-family: "Jost", Arial, sans-serif; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--turquoise-text); margin: 0 0 14px; display: block; }
.rule { border: none; border-top: 1px solid var(--line); margin: 0; }
.icon { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; }

/* Section layout primitives, reused across most pages */
section { padding: 80px 0; }
section.on-paper { background: var(--paper); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); }

/* Buttons */
.btn { font-family: "Jost", Arial, sans-serif; font-weight: 500; font-size: 0.92rem; padding: 14px 26px; display: inline-block; border-radius: 6px; border: 1.5px solid transparent; cursor: pointer; }
.btn-primary { background: var(--turquoise); color: var(--charcoal); }
.btn-primary:hover { background: #239bb8; color: var(--charcoal); }
.btn-ghost { border-color: var(--charcoal); color: var(--charcoal); background: none; }
.btn-ghost:hover { border-color: var(--turquoise-text); color: var(--turquoise-text); }
.btn-gold { background: var(--gold); color: var(--charcoal); }
.btn-gold:hover { background: #d99e05; color: var(--charcoal); }

/* ---- Logo mark (injected by site-nav.js into any [data-isl-logo] element) ---- */
.isl-icon-ring { color: var(--ring-cyan); }
.isl-icon-dot { fill: #092632; }

/* ---- Utility bar ---- */
.utility-bar { background: var(--charcoal); color: rgba(255,255,255,0.92); font-size: 0.82rem; }
.utility-bar .wrap { display: flex; justify-content: flex-end; gap: 28px; padding: 9px 32px; align-items: center; }
.utility-bar a { color: var(--skyblue); display: inline-flex; align-items: center; gap: 6px; }
.utility-bar a:hover { color: #fff; }
.utility-bar svg { width: 14px; height: 14px; }

/* ---- Primary nav ---- */
header.site-nav { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; position: relative; }
.wordmark { display: flex; align-items: center; gap: 12px; color: var(--charcoal); }
.wordmark .isl-icon { height: 38px; width: auto; }
.wordmark .isl-letters { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: 1.5rem; color: var(--charcoal); line-height: 1; }
.wordmark .tagline { font-family: "Jost", Arial, sans-serif; font-size: 0.58rem; font-weight: 500; line-height: 1.4; letter-spacing: 0.04em; text-transform: uppercase; }
.wordmark .tagline .l1 { color: var(--charcoal-soft); display: block; }
.wordmark .tagline .l2 { color: var(--turquoise-text); display: block; }

nav.primary-links { display: flex; align-items: center; gap: 2px; }
nav.primary-links > a, nav.primary-links .nav-item > a, nav.primary-links .nav-item > button {
  font-family: "Jost", Arial, sans-serif; font-size: 0.92rem; font-weight: 300; color: var(--charcoal);
  background: none; border: none; padding: 10px 15px; display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
}
nav.primary-links > a:hover, nav.primary-links .nav-item > a:hover, nav.primary-links .nav-item > button:hover { color: var(--turquoise-text); }
nav.primary-links .nav-item > button svg { width: 13px; height: 13px; transition: transform 0.15s ease; }
nav.primary-links .nav-item.open > button svg { transform: rotate(180deg); }
nav.primary-links .nav-item > button a { color: inherit; padding: 0 !important; }
nav.primary-links .nav-item > button:hover a { color: inherit; }
.nav-cta { font-family: "Jost", Arial, sans-serif; font-weight: 500; font-size: 0.9rem; background: var(--gold); color: var(--charcoal) !important; padding: 12px 24px !important; border-radius: 6px; }
.nav-cta:hover { background: #d99e05; color: var(--charcoal) !important; }

/* Auth-aware slot — filled by site-nav.js with "Sign In" or "My Courses" + "Sign Out" */
.nav-auth-slot { display: flex; align-items: center; gap: 4px; }
.nav-auth-slot a { padding: 10px 15px; font-size: 0.92rem; font-weight: 300; color: var(--charcoal); }
.nav-auth-slot a:hover { color: var(--turquoise-text); }
.nav-signout-btn { font-family: "Jost", Arial, sans-serif; font-size: 0.8rem; color: var(--charcoal-soft); background: none; border: none; cursor: pointer; padding: 10px 8px; }
.nav-signout-btn:hover { color: var(--turquoise-text); }

/* Desktop dropdown panels (Courses / Programs) */
.nav-item { position: relative; }
.nav-panel { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); min-width: 280px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 40px -18px rgba(20,20,20,0.28); padding: 10px; margin-top: 10px; z-index: 60; }
.nav-item.open .nav-panel { display: block; }
.nav-panel-inner { display: flex; flex-direction: column; }
.nav-panel-inner a { padding: 10px 14px !important; border-radius: 6px; font-size: 0.9rem !important; }
.nav-panel-inner a:hover { background: var(--paper); color: var(--turquoise-text); }

/* Hamburger + mobile menu — one shared pattern for every page */
.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; background: none; border: none; cursor: pointer; padding: 0; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--charcoal); transition: transform 0.2s ease, opacity 0.2s ease; margin: 0 auto; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; flex-direction: column; background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; }
.mobile-menu.open { display: flex; }
.mobile-menu a, .mobile-menu button { font-family: "Jost", Arial, sans-serif; font-size: 0.98rem; color: var(--charcoal); padding: 14px 32px; text-align: left; background: none; border: none; }
.mobile-menu .mobile-panel-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; cursor: pointer; }
.mobile-menu .mobile-panel { display: none; flex-direction: column; background: var(--paper); }
.mobile-menu .mobile-panel.open { display: flex; }
.mobile-menu .mobile-panel a { padding-left: 48px; font-size: 0.9rem; }
.mobile-menu .nav-cta { margin: 8px 32px; text-align: center; }

@media (max-width: 900px) {
  nav.primary-links.desktop-only { display: none; }
  .hamburger { display: flex; }
}
@media (min-width: 901px) {
  .mobile-menu { display: none !important; }
}

/* ---- Footer ---- */
footer.site-footer { padding: 44px 0 36px; border-top: 1px solid var(--line); }
.footer-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.footer-lockup .isl-icon { height: 30px; width: auto; }
.footer-lockup .isl-icon-ring { color: var(--turquoise); }
.footer-lockup .isl-letters { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: 1.3rem; color: var(--charcoal); }
.footer-lockup .full-tagline { font-family: "Jost", Arial, sans-serif; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--turquoise-text); padding-left: 14px; border-left: 1px solid var(--line); }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; color: var(--charcoal-soft); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--charcoal-soft); }
.footer-links a:hover { color: var(--turquoise-text); }
