/*
Theme Name: Lawrence Psychedelic Society
Theme URI: https://consciouskansas.org
Author: Lawrence Psychedelic Society
Author URI: https://consciouskansas.org
Description: Custom theme for the Lawrence Psychedelic Society website.
Version: 2.0.0
Requires at least: 6.3
Tested up to: 6.4.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lps
Tags: one-page, custom-background, featured-images
*/

/* === LOCAL FONTS (self-hosted) === */
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/dm-serif-display-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


@font-face {
  font-family: 'DM Serif Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/dm-serif-display-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/instrument-sans-regular-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


@font-face {
  font-family: 'Instrument Sans';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/instrument-sans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* === DESIGN TOKENS === */
:root {
  --cream: #FAF6F1;
  --cream-deep: #F0ECE5;
  --ink: #171520;
  --ink-mid: #33303D;
  --ink-soft: #4D495C;
  --ink-faint: #908A9E;
  --accent: #0051BA;
  --accent-dark: #0049A9;
  /* AAA-safe variant (7.73:1 on cream) for small text */
  --accent-light: #0051BA;
  --accent-glow: rgba(0, 81, 186, 0.1);
  --teal: #3A9E8F;
  --plum: #9B4D96;
  --sky: #4A8BA8;
  --teal-dark: #175750;
  --plum-dark: #6f2f6b;
  --sky-dark: #1e4d5e;
  --secondary: #C1001F;
  --secondary-dark: #A00019;
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: auto;
}

html.js {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* === ACCESSIBILITY: Keep fallback focus, trim only when :focus-visible exists === */
*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* === SKIP LINK === */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* === NAV === */
nav.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(250, 246, 241, 0.85);
  border-bottom: 1px solid rgba(23, 21, 32, 0.05);
}

/* Offset fixed nav when WP admin bar is present */
.admin-bar nav.site-nav {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar nav.site-nav {
    top: 46px;
  }
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}

.nav-brand .brand-accent {
  color: var(--accent-dark);
}

.nav-menu {
  list-style: none;
  /* Inherited by child <li> — no separate rule needed */
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-menu a {
  color: var(--ink-mid);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
}

.nav-menu a:hover {
  color: var(--accent-dark);
  background: var(--accent-glow);
}

.nav-menu a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(23, 21, 32, 0.12);
  background: #fff;
  color: var(--ink);
  font-size: 0.82rem;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
}

.nav-brand:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* === BUTTONS === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  border-radius: 60px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.btn-primary:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 3px;
  background: var(--accent-light);
}

.btn-light {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.88rem 1.5rem;
  border-radius: 60px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: color 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.btn-light.filled {
  background: var(--accent);
  color: #fff;
}

.btn-light.filled:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.btn-light.filled:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 3px;
  background: var(--accent-light);
}

.btn-light.outline {
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid rgba(23, 21, 32, 0.15);
}

.btn-light.outline:hover {
  border-color: var(--accent-dark);
  color: var(--accent-dark);
  transform: translateY(-2px);
}

.btn-light.outline:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 3px;
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

/* === GHOST BUTTON === */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  border-radius: 60px;
  background: transparent;
  color: var(--accent-dark);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
  cursor: pointer;
  min-height: 44px;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.btn-ghost:hover {
  background: var(--accent-glow);
  border-color: var(--accent-dark);
  color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.btn-ghost:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  background: var(--accent-glow);
  border-color: var(--accent-dark);
  color: var(--accent-dark);
}

/* === SECTIONS (shared base) === */
section {
  padding: 6rem 2.5rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.sec-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  /* AAA contrast for small text */
  margin-bottom: 0.5rem;
}

.sec-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.sec-title em {
  font-style: italic;
  color: var(--accent-dark);
}

.sec-desc {
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 3rem;
  font-weight: 400;
}

/* === FOOTER === */
footer.site-footer {
  border-top: 1px solid rgba(23, 21, 32, 0.05);
  padding: 2.5rem;
  background: var(--cream);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.footer-brand span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin-top: 0.15rem;
  font-weight: 400;
}

.footer-org {
  font-size: 0.68rem;
  color: var(--ink-soft);
  font-style: italic;
}

.footer-right {
  text-align: right;
}

.footer-right a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.78rem;
  padding: 0.75rem 0.5rem;
  /* Ensure 44px touch target */
  min-height: 44px;
  /* WCAG AAA: 44x44px minimum */
  display: inline-flex;
  align-items: center;
  transition: color 0.3s;
}

.footer-right a:hover {
  color: var(--accent-dark);
}

/* AAA contrast for small text */
.footer-right a:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 2px;
  color: var(--accent-dark);
}

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(23, 21, 32, 0.04);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* WordPress core convention alias (Fix 7) */
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.content-shell {
  padding: 6rem 2.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.content-article {
  margin-bottom: 3rem;
}

.content-link {
  text-decoration: none;
  color: var(--ink);
}

/* === ANIMATIONS === */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
}

/* Above-the-fold hero content must never be hidden —
   reveal animation is for below-fold sections only. */
.js .hero .reveal,
.js .hero-text .reveal {
  opacity: 1;
  transform: none;
}

.reveal.vis {
  opacity: 1;
  transform: none;
}

/* Anchor-navigated sections: show content immediately so
   fragment links (#about, #register, etc.) never land on invisible text. */
:target .reveal,
:target.reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

/* === RESPONSIVE (shared) === */
@media (max-width: 768px) {
  section {
    padding: 4rem 1.5rem;
  }

  .content-shell {
    padding: 4rem 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-right {
    text-align: center;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }

  .site-nav.js-nav .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding-top: 0.45rem;
  }

  .site-nav.js-nav.is-open .nav-menu {
    display: flex;
  }

  .nav-inner {
    flex-wrap: wrap;
  }

  .nav-menu a {
    display: block;
    min-height: 44px;
    padding: 0.75rem 0.7rem;
  }
}

/* === ACCESSIBILITY: Reduced Motion === */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === ADMIN BAR FIX === */
/* Fixes contrast failure in audit for logged-in users */
#wpadminbar .ab-top-secondary .ab-item .ab-label.awaiting-mod {
  color: #f0f0f1 !important;
  /* WP Admin Bar Text Color */
  background-color: transparent !important;
}

#wpadminbar .ab-top-secondary .ab-item .ab-label.awaiting-mod.count-0 {
  color: #f0f0f1 !important;
  /* Ensure 0 count is visible */
}