/* ======================================================
   BASE STYLES
   Typography, text, links, block defaults
   ====================================================== */

/* ======================
   BODY
   ====================== */

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: #E5E7EB;
  background-color: var(--veil-night);
}
/* ======================
   HEADINGS
   ====================== */

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text-heading);
  letter-spacing: 0.05em;
  margin: 0 0 0.75em;
}

h4, h5, h6 {
  font-family: var(--font-ui);
  color: var(--text-heading);
  letter-spacing: 0.02em;
  margin: 0 0 0.6em;
}

/* Size normalization (Blocksy-safe) */
h1 { font-size: clamp(2.2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* ======================
   TEXT ELEMENTS
   ====================== */

p {
  margin: 0 0 1.25em;
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

blockquote {
  margin: 1.75em 0;
  padding-left: 1.25em;
  border-left: 3px solid var(--veil-violet);
  color: var(--text-muted);
}

/* ======================
   LINKS
   ====================== */

a {
  color: var(--text-link);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.15em;
  transition: color .2s ease, text-shadow .2s ease;
}

a:hover,
a:focus-visible {
  color: var(--text-link-hover);
}

/* ======================
   LISTS
   ====================== */

ul, ol {
  margin: 0 0 1.25em 1.25em;
}

li {
  margin-bottom: 0.4em;
}

/* ======================
   MEDIA
   ====================== */

img,
video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* ======================
   CODE
   ====================== */

pre,
code {
  font-family: monospace;
  font-size: 0.95rem;
  background: rgba(255,255,255,.05);
  padding: .2em .4em;
  border-radius: 4px;
}
/* =====================================
   GLOBAL DARK THEME TEXT SAFETY
   ===================================== */

body {
  color: #E6E4F2;
}

.ct-container,
.ct-section,
.ct-content,
.ct-text,
.lv-home-hero,
.lv-home-books,
.lv-events,
.lv-behind-scenes {
  color: #E6E4F2;
}

p,
li,
span {
  color: inherit;
}
/* =====================================
   FORCE TEXT COLOR INSIDE VEIL SECTIONS
   ===================================== */

.lv-ink-wrap,
.lv-obs-wrap {
  color: #E6E4F2;
}

.lv-ink-wrap *,
.lv-obs-wrap * {
  color: inherit;
}
#books {
  text-align: center;
}
/* ===============================
   GLOBAL TYPOGRAPHY SCALE
   =============================== */

/* Base font size for entire site */
html {
  font-size: 17px; /* default is usually 16px */
}

/* Ensure body inherits cleanly */
body {
  font-size: 1rem;
  line-height: 1.65;
}
html {
  font-size: 18px;
}
/* Long-form content */
p,
li,
.pmpro,
.ff-el-group,
.pb-field {
  font-size: 1.05rem;
}
/* =====================================================
   BLOCKSY — GLOBAL INLINE LINK STYLING
   Excludes header nav, footer nav, buttons
===================================================== */

.entry-content a:not(.button):not(.wp-block-button__link):not(.veil-btn),
.ct-content a:not(.button):not(.wp-block-button__link):not(.veil-btn) {
  color: #0A58CA; /* accessible blue */
  text-decoration-line: underline;
  text-decoration-color: #0A58CA;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}

/* All states */
.entry-content a:not(.button):not(.wp-block-button__link):not(.veil-btn),
.entry-content a:not(.button):not(.wp-block-button__link):not(.veil-btn):visited,
.entry-content a:not(.button):not(.wp-block-button__link):not(.veil-btn):hover,
.entry-content a:not(.button):not(.wp-block-button__link):not(.veil-btn):focus,
.entry-content a:not(.button):not(.wp-block-button__link):not(.veil-btn):active {
  color: #0A58CA;
  text-decoration-line: underline;
}
.ct-header a,
.ct-footer a {
  text-decoration: none !important;
}
/* =====================================================
   VEIL-CRIMSON LINKS — LEGAL & SUPPORT PAGES
===================================================== */

/* Body class based (recommended) */
body.page-legal .entry-content a,
body.page-support .entry-content a,
body.page-privacy-policy .entry-content a,
body.page-terms-and-conditions .entry-content a {
  color: #8B0000; /* Veil-Crimson */
  text-decoration-color: #8B0000;
}

/* Slug-based fallback (covers /legal/* and /support) */
body[class*="legal"] .entry-content a,
body[class*="support"] .entry-content a {
  color: #8B0000;
  text-decoration-color: #8B0000;
}
.entry-content a:hover,
.entry-content a:focus {
  text-decoration-thickness: 3px;
}
/* ===============================
   GLOBAL TEXT LINK STYLING
   Excludes navigation + buttons
================================ */

a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link)
  :not(.menu a)
{
  color: #0A58CA; /* strong accessible blue */
  text-decoration-line: underline;
  text-decoration-color: #0A58CA;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}

/* ===============================
   GLOBAL TEXT LINK STYLING
   (non-buttons)
================================ */

a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link),
a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link):visited,
a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link):hover,
a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link):focus,
a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link):active {
  color: #0A58CA;
  text-decoration-line: underline;
  text-decoration-color: #0A58CA;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}

/* ================================
   REMOVE STYLING FROM MENUS
================================ */

.menu a,
.nav-menu a,
.ct-header a,
.ct-footer a {
  text-decoration: none;
}
/* Optional: stronger hover/focus */
a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link):hover,
a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link):focus {
  text-decoration-thickness: 3px;
}
/* Explicitly exclude navigation */
.nav-menu a,
.main-navigation a,
.blocksy-header a,
.ct-header a,
.ct-footer a {
  text-decoration: none;
}
/* =====================================================
   CONTAIN GLOBAL OVERRIDES
===================================================== */

/* Prevent centering / resets from leaking into layout systems */
.ct-header,
.ct-footer,
.ct-header *,
.ct-footer * {
  text-align: initial !important;
}

/* Restore default display behavior for nav structures */
.ct-header ul,
.ct-footer ul {
  margin: 0;
  padding: 0;
}

/* =====================================================
   GLOBAL FIX — RESTORE BLOCKSY NAV MENUS (ALL PAGES)
===================================================== */

/* Header navigation */
.ct-header nav ul,
.ct-header-menu nav ul,
.ct-header [class*="menu"] ul {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  list-style: none !important;
}

/* Footer navigation */
.ct-footer nav ul,
.ct-footer [class*="menu"] ul {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  list-style: none !important;
}

/* Menu items */
.ct-header nav li,
.ct-footer nav li {
  display: inline-flex !important;
}

/* Links */
.ct-header nav a,
.ct-footer nav a {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap;
}
/* Content links only */
.entry-content a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link) {
  color: #0A58CA;
  text-decoration: underline;
}
/* ==========================================
   WCAG-COMPLIANT CONTENT LINKS (LIGHT MODE)
========================================== */

.entry-content a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link) {
  color: #0A58CA; /* Accessible blue */
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}

/* Hover / focus — visible without relying on color */
.entry-content a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link):hover,
.entry-content a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link):focus {
  text-decoration-thickness: 3px;
}
/* ==========================================
   WCAG-COMPLIANT LINKS — DARK MODE
========================================== */

/* System dark mode */
@media (prefers-color-scheme: dark) {
  .entry-content a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link) {
    color: #8BB9FF; /* Light blue, passes contrast on dark bg */
    text-decoration-color: #8BB9FF;
  }
}

/* Blocksy dark mode toggle */
[data-color-mode="dark"] .entry-content a:not(.button):not(.btn):not(.veil-btn):not(.wp-block-button__link) {
  color: #8BB9FF;
  text-decoration-color: #8BB9FF;
}
/* ================================
   VEIL HEADING SYSTEM
   ================================ */

.veil-heading {
  font-weight: 700;
  letter-spacing: 0.06em;

  /* Core gradient (light → violet) */
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    #e6dcff 35%,
    #cbb7ff 65%,
    #b89aff 100%
  );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  /* Glow layers */
  text-shadow:
    0 0 4px rgba(255,255,255,0.9),
    0 0 10px rgba(210,190,255,0.85),
    0 0 18px rgba(180,140,255,0.7),
    0 0 36px rgba(140,90,255,0.6),
    0 0 60px rgba(120,60,255,0.45);
}

/* Optional subtle breathing glow */
.veil-heading--glow {
  animation: veil-glow 4s ease-in-out infinite alternate;
}

@keyframes veil-glow {
  from {
    text-shadow:
      0 0 6px rgba(200,180,255,0.6),
      0 0 18px rgba(150,100,255,0.5);
  }
  to {
    text-shadow:
      0 0 10px rgba(255,255,255,0.95),
      0 0 24px rgba(180,140,255,0.8),
      0 0 50px rgba(120,60,255,0.6);
  }
}

/* ================================
   VEIL HEADING VARIANTS
   ================================ */

.veil-heading {
  --veil-glow-1: rgba(210, 190, 255, 0.85);
  --veil-glow-2: rgba(180, 140, 255, 0.7);
  --veil-glow-3: rgba(120, 60, 255, 0.45);

  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(to bottom, #ffffff 0%, #e6dcff 35%, #cbb7ff 65%, #b89aff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  text-shadow:
    0 0 4px rgba(255,255,255,0.9),
    0 0 10px var(--veil-glow-1),
    0 0 18px var(--veil-glow-2),
    0 0 36px var(--veil-glow-3);
}

/* Awakening: blue-green */
.veil-heading-awakening {
  --veil-glow-1: rgba(80, 255, 220, 0.75);
  --veil-glow-2: rgba(40, 160, 255, 0.55);
  --veil-glow-3: rgba(20, 90, 180, 0.42);
}

/* Descent: crimson */
.veil-heading-descent {
  --veil-glow-1: rgba(227, 69, 112, 0.8);
  --veil-glow-2: rgba(150, 20, 55, 0.6);
  --veil-glow-3: rgba(90, 5, 30, 0.45);
}

/* Blood Moon: red + ember */
.veil-heading-bloodmoon {
  --veil-glow-1: rgba(255, 65, 95, 0.9);
  --veil-glow-2: rgba(170, 10, 38, 0.7);
  --veil-glow-3: rgba(255, 170, 90, 0.32);
}
.veil-heading-reactive {
  animation: veil-scroll-glow 4s ease-in-out infinite alternate;
}

@keyframes veil-scroll-glow {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.25);
  }
}
