/*
Theme Name: Chef Business Training
Theme URI: https://chefbusinesstraining.com
Author: Benjamin Kelly
Author URI: https://chefbusinesstraining.com
Description: Custom theme for Chef Business Training — private dinner business coaching for chefs.
Version: 3.2.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cbt-theme
*/

/* ===================================================
   DESIGN SYSTEM: CSS CUSTOM PROPERTIES
   =================================================== */

:root {
  /* Colors: Light Backgrounds */
  --bg-white: #FFFFFF;
  --bg-off: #F8FAFC;
  --bg-subtle: #F1F5F9;

  /* Colors: Dark Surfaces */
  --dark-primary: #0F172A;
  --dark-secondary: #1E293B;

  /* Colors: Accent (Coral) */
  --accent: #C4432B;
  --accent-hover: #A3371F;
  --accent-light: #FEF2F0;
  --accent-border: #FECACA;

  /* Colors: Text */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-faint: #94A3B8;
  --text-on-dark: #F8FAFC;
  --text-on-accent: #FFFFFF;

  /* Colors: Borders & Dividers */
  --border: #E2E8F0;
  --divider: #CBD5E1;

  /* Status Colors */
  --success: #15803D;
  --error: #DC2626;
  --warning: #D97706;
  --info: #2563EB;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10);
  --shadow-accent: 0 4px 14px rgba(196, 67, 43, 0.25);

  /* Border Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Spacing (4px base grid) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-48: 12rem;
  --space-64: 16rem;
  --space-80: 20rem;
  --space-96: 24rem;

  /* Typography: Font Families */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-ease: 250ms ease-out;
}

/* ===================================================
   RESET & BASE STYLES
   =================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

h2 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
}

h5, h6 {
  font-size: 1rem;
  font-weight: 600;
}

/* Paragraph */

p {
  margin-bottom: var(--space-4);
  max-width: 64ch;
}

p:last-child {
  margin-bottom: 0;
}

/* Links */

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-smooth);
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Lists */

ul, ol {
  margin-bottom: var(--space-4);
  margin-left: var(--space-8);
}

li {
  margin-bottom: var(--space-2);
}

/* Code */

code {
  font-family: 'Courier New', monospace;
  font-size: 0.875em;
  background-color: var(--bg-subtle);
  padding: 0.15em 0.3em;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

pre {
  background-color: var(--dark-primary);
  color: var(--text-on-dark);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--space-4);
  font-size: 0.875rem;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Blockquote */

blockquote {
  border-left: 4px solid var(--accent);
  padding-left: var(--space-4);
  margin-left: 0;
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
  font-style: italic;
}

/* Horizontal Rule */

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-8) 0;
}

/* Images */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin-bottom: var(--space-8);
}

figcaption {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: var(--space-2);
}

/* Tables */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-8);
}

th {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
}

td {
  border: 1px solid var(--border);
  padding: var(--space-3) var(--space-4);
}

/* ===================================================
   BUTTONS
   =================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-smooth);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
}

/* Nav CTA button — larger padding so text never clips */
.site-nav .btn-primary {
  padding: 0.625rem 1.375rem;
  font-size: 0.9375rem;
  min-height: 42px;
  line-height: 1.4;
  white-space: nowrap;
}

/* Primary Button */

.btn-primary {
  background-color: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Primary Large Button (for hero CTAs) */

.btn-primary-lg {
  padding: var(--space-4) var(--space-8);
  font-size: 1rem;
  border-radius: var(--radius-lg);
  min-height: 48px;
}

/* Outline Button */

.btn-outline {
  background-color: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-outline:hover,
.btn-outline:focus {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-accent);
}

/* Outline Dark Button (for dark backgrounds) */

.btn-outline-dark {
  background-color: transparent;
  color: var(--text-on-dark);
  border-color: rgba(248, 250, 252, 0.3);
}

.btn-outline-dark:hover,
.btn-outline-dark:focus {
  border-color: var(--text-on-dark);
  background-color: rgba(248, 250, 252, 0.1);
}

/* Ghost Button */

.btn-ghost {
  background-color: transparent;
  color: var(--accent);
  border: none;
}

.btn-ghost:hover,
.btn-ghost:focus {
  background-color: var(--accent-light);
}

/* Button Block */

.btn-block {
  display: flex;
  width: 100%;
}

/* Button Disabled */

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===================================================
   CONTAINERS & LAYOUT
   =================================================== */

.container {
  width: 100%;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.container-narrow {
  max-width: 640px;
}

.container-wide {
  max-width: 1080px;
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

/* Section Padding */

section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

section.section-white {
  background-color: var(--bg-white);
}

section.section-off {
  background-color: var(--bg-off);
}

section.section-subtle {
  background-color: var(--bg-subtle);
}

section.section-dark {
  background-color: var(--dark-primary);
  color: var(--text-on-dark);
}

/* ===================================================
   SKIP NAVIGATION LINK
   =================================================== */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background-color: var(--accent);
  color: var(--text-on-accent);
  padding: var(--space-3) var(--space-4);
  z-index: 9999;
  text-decoration: none;
  border-radius: var(--radius-md);
}

.skip-link:focus {
  top: var(--space-4);
  left: var(--space-4);
}

/* ===================================================
   SITE HEADER
   =================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--dark-primary);
  color: var(--text-on-dark);
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
}

.site-logo {
  display: flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-on-dark);
  text-decoration: none;
  transition: opacity var(--transition-smooth);
}

.site-logo:hover {
  opacity: 0.8;
}

/* Text-only logo styling */
.site-logo {
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

/* Navigation */

.site-nav {
  display: none;
  flex-direction: column;
  gap: var(--space-4);
}

.site-nav a {
  color: var(--text-on-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-smooth);
  padding: var(--space-2) 0;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
}

/* Desktop Navigation */

@media (min-width: 768px) {
  .site-nav {
    display: flex;
    flex-direction: row;
    gap: var(--space-8);
  }

  .site-nav .btn-primary {
    margin-left: var(--space-4);
  }
}

/* Mobile Menu Button */

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: var(--text-on-dark);
  cursor: pointer;
  transition: opacity var(--transition-smooth);
}

.menu-toggle:hover {
  opacity: 0.8;
}

.menu-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

/* Mobile Navigation Overlay */

.mobile-nav {
  position: fixed;
  inset: 0;
  background-color: var(--dark-primary);
  z-index: 99;
  padding: var(--space-8) var(--space-4);
  display: none;
  flex-direction: column;
  gap: var(--space-8);
  overflow-y: auto;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  color: var(--text-on-dark);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
  transition: color var(--transition-smooth);
  padding: var(--space-2) 0;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--accent);
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none !important;
  }
}

/* ===================================================
   HERO SECTIONS
   =================================================== */

.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--dark-primary);
  color: var(--text-on-dark);
  overflow: hidden;
  padding: clamp(4rem, 12vw, 8rem) 0;
}

.hero.hero-with-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.80) 50%, rgba(15, 23, 42, 0.55) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: var(--space-6);
}

.hero h1 {
  margin-bottom: var(--space-6);
  color: var(--text-on-dark);
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-on-dark);
  margin-bottom: var(--space-8);
  opacity: 0.95;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 768px) {
  .hero-cta-group {
    flex-direction: row;
    justify-content: center;
  }
}

/* ===================================================
   EYEBROW BADGES
   =================================================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background-color: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===================================================
   CARDS
   =================================================== */

.card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  margin-bottom: var(--space-4);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.card-body {
  margin-bottom: var(--space-4);
}

.card-footer {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

/* ===================================================
   FORMS
   =================================================== */

form {
  margin-bottom: var(--space-8);
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='url'],
input[type='tel'],
input[type='number'],
input[type='search'],
input[type='date'],
input[type='time'],
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--bg-white);
  color: var(--text-primary);
  transition: all var(--transition-smooth);
  min-height: 44px;
}

input[type='text']:focus,
input[type='email']:focus,
input[type='password']:focus,
input[type='url']:focus,
input[type='tel']:focus,
input[type='number']:focus,
input[type='search']:focus,
input[type='date']:focus,
input[type='time']:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input[type='checkbox'],
input[type='radio'] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent);
}

.form-group-checkbox,
.form-group-radio {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.form-group-checkbox label,
.form-group-radio label {
  margin-bottom: 0;
  font-weight: 500;
}

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: var(--space-2);
}

.form-success {
  background-color: rgba(21, 128, 61, 0.1);
  border: 1px solid var(--success);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  color: var(--success);
  margin-bottom: var(--space-4);
}

/* ===================================================
   BLOG SECTION
   =================================================== */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow-sm);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.post-thumbnail {
  width: 100%;
  height: 240px;
  background-color: var(--bg-off);
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-ease);
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-content {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-meta {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-3);
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.post-date {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.post-category {
  display: inline-block;
  background-color: var(--accent-light);
  color: var(--accent);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
  line-height: 1.4;
}

.post-excerpt {
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
  flex-grow: 1;
  line-height: 1.6;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.post-read-time {
  font-size: 0.875rem;
  color: var(--text-faint);
}

.post-card a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-smooth);
}

.post-card a:hover {
  color: var(--accent-hover);
}

/* ===================================================
   BLOG SINGLE POST STYLES
   =================================================== */

.entry-content {
  max-width: 800px;
  margin: 0 auto;
}

.entry-content h2 {
  margin-top: var(--space-12);
  margin-bottom: var(--space-6);
}

.entry-content h3 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.entry-content ul,
.entry-content ol {
  margin-left: var(--space-8);
  margin-bottom: var(--space-6);
}

.entry-content li {
  margin-bottom: var(--space-3);
}

.entry-content img {
  max-width: 100%;
  height: auto;
  margin: var(--space-8) 0;
  border-radius: var(--radius-lg);
}

.entry-content blockquote {
  margin: var(--space-8) 0;
  padding-left: var(--space-6);
  border-left-width: 4px;
}

.entry-header {
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border);
}

.entry-title {
  margin-bottom: var(--space-4);
}

.entry-meta {
  display: flex;
  gap: var(--space-6);
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.entry-meta span {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ===================================================
   LEAD MAGNET SECTION
   =================================================== */

.lead-magnet-block {
  background-color: var(--dark-primary);
  color: var(--text-on-dark);
  padding: clamp(3rem, 8vw, 6rem) var(--space-4);
  border-radius: var(--radius-lg);
  text-align: center;
}

.lead-magnet-block h2,
.lead-magnet-block h3 {
  color: var(--text-on-dark);
}

.lead-magnet-block p {
  color: var(--text-on-dark);
  opacity: 0.95;
  margin-bottom: var(--space-6);
}

.lead-magnet-cta {
  margin-top: var(--space-6);
}

/* ===================================================
   FOOTER
   =================================================== */

.site-footer {
  background-color: var(--dark-primary);
  color: var(--text-on-dark);
  padding: clamp(3rem, 8vw, 6rem) 0;
  border-top: 1px solid rgba(248, 250, 252, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-column h3 {
  color: var(--text-on-dark);
  margin-bottom: var(--space-4);
  font-size: 1rem;
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-column li {
  margin-bottom: var(--space-3);
}

.footer-column a {
  color: var(--text-on-dark);
  text-decoration: none;
  opacity: 0.8;
  transition: all var(--transition-smooth);
}

.footer-column a:hover {
  color: var(--accent);
  opacity: 1;
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(248, 250, 252, 0.1);
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: 0.875rem;
  opacity: 0.8;
}

.footer-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-size: 0.875rem;
}

/* ===================================================
   UTILITY CLASSES
   =================================================== */

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

.text-left {
  text-align: left;
}

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

.text-accent {
  color: var(--accent);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-faint {
  color: var(--text-faint);
}

.text-white {
  color: var(--text-on-dark);
}

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

.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.p-0 { padding: 0; }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.hidden {
  display: none !important;
}

.visible {
  visibility: visible;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-75 {
  opacity: 0.75;
}

/* ===================================================
   LANDING PAGE LAYOUT (NO NAV)
   =================================================== */

.page-landing .site-header {
  display: none;
}

.page-landing {
  display: flex;
  flex-direction: column;
}

.page-landing main {
  flex-grow: 1;
}

/* ===================================================
   RESPONSIVE BREAKPOINTS
   =================================================== */

/* Tablet: 768px */

@media (min-width: 768px) {
  body {
    font-size: 1.0625rem;
  }

  .container {
    max-width: 960px;
  }

  h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  section {
    padding: clamp(4rem, 8vw, 6rem) 0;
  }

  .hero {
    min-height: 600px;
    padding: clamp(5rem, 12vw, 8rem) 0;
  }
}

/* Desktop: 1024px */

@media (min-width: 1024px) {
  body {
    font-size: 1.125rem;
  }

  .container {
    max-width: 1080px;
  }

  h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
  }

  h2 {
    font-size: 2.25rem;
  }

  section {
    padding: clamp(5rem, 10vw, 8rem) 0;
  }

  .hero {
    min-height: 700px;
  }
}

/* Extra Large: 1280px */

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }

  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  body {
    font-size: 1.125rem;
    line-height: 1.75;
  }
}

/* ===================================================
   PRINT STYLES
   =================================================== */

@media print {
  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .site-header,
  .site-footer,
  .menu-toggle,
  .mobile-nav {
    display: none !important;
  }

  button,
  .btn {
    display: none !important;
  }

  p {
    orphans: 3;
    widows: 3;
  }

  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  img {
    page-break-inside: avoid;
  }

  pre {
    background: #f5f5f5;
    border: 1px solid #ccc;
  }
}

/* ===================================================
   ACCESSIBILITY
   =================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Note: prefers-color-scheme: dark intentionally omitted.
   This site uses deliberate dark/light sections by design.
   A system-level dark mode override would break the intended contrast. */

/* ===================================================
   WORDPRESS CORE CLASSES
   =================================================== */

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin-right: var(--space-4);
}

.alignright {
  float: right;
  margin-left: var(--space-4);
}

.clear {
  clear: both;
}

.wp-caption {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  padding: var(--space-2) 0 0;
}

.sticky {
  background-color: var(--bg-off);
  border: 1px solid var(--border);
  padding: var(--space-4);
  border-radius: var(--radius-md);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--radius-md);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-form {
  display: flex;
  gap: var(--space-2);
}

.search-form input[type='search'] {
  flex-grow: 1;
}

.widget {
  margin-bottom: var(--space-8);
}

.widget-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget li {
  margin-bottom: var(--space-2);
}

/* ===================================================
   END OF STYLESHEET
   =================================================== */

/* ===================================================
   ENHANCED ADDITIONS — CBT Theme v3 Premium Polish
   =================================================== */

/* ── Header: scrolled state ── */

.site-header.scrolled {
  box-shadow: 0 2px 24px rgba(15, 23, 42, 0.22);
  transition: box-shadow 200ms ease;
}

/* ── Nav link class (used in header.php) ── */

.nav-link {
  color: var(--text-on-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: var(--space-2) 0;
  transition: color var(--transition-smooth);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  text-decoration: none;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ── Mobile nav header row ── */

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid rgba(248, 250, 252, 0.1);
}

.mobile-nav-link {
  color: var(--text-on-dark);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
  padding: var(--space-3) 0;
  border-bottom: 1px solid rgba(248, 250, 252, 0.08);
  transition: color var(--transition-smooth);
  display: block;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--accent);
  text-decoration: none;
}

.mobile-nav-cta {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(248, 250, 252, 0.1);
}

/* ── Footer brand column ── */

.footer-brand {
  grid-column: 1 / -1;
}

@media (min-width: 1024px) {
  .footer-brand {
    grid-column: auto;
  }
}

.footer-logo {
  display: inline-block;
  margin-bottom: var(--space-4);
  font-size: 1.125rem;
  opacity: 0.95;
}

.footer-tagline {
  font-size: 0.9375rem;
  color: rgba(248, 250, 252, 0.65);
  line-height: 1.7;
  max-width: 28ch;
  margin-bottom: var(--space-6);
}

/* ── Footer social icons ── */

.footer-social {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: rgba(248, 250, 252, 0.08);
  color: rgba(248, 250, 252, 0.7);
  transition: all var(--transition-smooth);
  text-decoration: none;
}

.social-link:hover {
  background-color: var(--accent);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

/* ── Footer headings ── */

.footer-heading {
  color: var(--text-on-dark);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
}

/* ── Footer links list ── */

.footer-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links-list li {
  margin-bottom: var(--space-3);
}

.footer-links-list a {
  color: rgba(248, 250, 252, 0.7);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color var(--transition-smooth);
}

.footer-links-list a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ── Footer newsletter column ── */

.footer-newsletter .footer-newsletter-desc {
  font-size: 0.9375rem;
  color: rgba(248, 250, 252, 0.65);
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

.footer-form {
  margin-bottom: 0;
}

.footer-form-row {
  margin-bottom: var(--space-3);
}

.footer-form input[type='text'],
.footer-form input[type='email'] {
  background-color: rgba(248, 250, 252, 0.08);
  border-color: rgba(248, 250, 252, 0.15);
  color: var(--text-on-dark);
}

.footer-form input[type='text']::placeholder,
.footer-form input[type='email']::placeholder {
  color: rgba(248, 250, 252, 0.4);
}

.footer-form input:focus {
  background-color: rgba(248, 250, 252, 0.12);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 67, 43, 0.2);
}

.footer-form-message {
  font-size: 0.875rem;
  margin-top: var(--space-3);
}

/* ── Footer legal links ── */

.footer-legal {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-legal a {
  font-size: 0.875rem;
  color: rgba(248, 250, 252, 0.5);
  text-decoration: none;
  transition: color var(--transition-smooth);
}

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

/* ── Scroll-to-top button ── */

.scroll-to-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background-color: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-accent);
  transition: all var(--transition-smooth);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 67, 43, 0.4);
}

/* ── Scroll reveal animations ── */

/* Reveal animations — only animate when JS has confirmed IntersectionObserver support.
   Default state is fully visible so content is never hidden without JS.
   Uses clip-path instead of opacity so headings inside .reveal wrappers stay visible. */
.js-reveal-ready .reveal:not(.revealed) > :not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Headings inside unrevealed containers: animate transform only, never hide */
.js-reveal-ready .reveal:not(.revealed) > h1,
.js-reveal-ready .reveal:not(.revealed) > h2,
.js-reveal-ready .reveal:not(.revealed) > h3,
.js-reveal-ready .reveal:not(.revealed) > h4,
.js-reveal-ready .reveal:not(.revealed) > h5,
.js-reveal-ready .reveal:not(.revealed) > h6 {
  transform: translateY(12px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Once revealed, everything snaps to final state */
.js-reveal-ready .reveal.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

/* Eyebrow text above headings — also animate as part of reveal */
.js-reveal-ready .reveal:not(.revealed) > span {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Headings are ALWAYS fully visible — never opacity:0 */
h1, h2, h3, h4, h5, h6 {
  opacity: 1 !important;
}

/* Cards that are direct .reveal elements — animate the card itself */
.js-reveal-ready .card.reveal:not(.revealed) {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-reveal-ready .card.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal > *,
  .card.reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ── Form message states ── */

.form-success-msg {
  display: block;
  padding: var(--space-3) var(--space-4);
  background-color: rgba(21, 128, 61, 0.1);
  border: 1px solid var(--success);
  border-radius: var(--radius-md);
  color: var(--success);
  font-weight: 600;
  font-size: 0.9375rem;
}

.form-error-msg {
  display: block;
  padding: var(--space-3) var(--space-4);
  background-color: rgba(220, 38, 38, 0.08);
  border: 1px solid var(--error);
  border-radius: var(--radius-md);
  color: var(--error);
  font-weight: 600;
  font-size: 0.9375rem;
}

/* ── Dark section form inputs ── */

.section-dark input[type='text'],
.section-dark input[type='email'],
.section-dark textarea,
.section-dark select {
  background-color: rgba(248, 250, 252, 0.08);
  border-color: rgba(248, 250, 252, 0.15);
  color: var(--text-on-dark);
}

.section-dark input[type='text']::placeholder,
.section-dark input[type='email']::placeholder,
.section-dark textarea::placeholder {
  color: rgba(248, 250, 252, 0.4);
}

.section-dark label {
  color: rgba(248, 250, 252, 0.85);
}

/* ── Hero: left-aligned variant for inner pages ── */

@media (min-width: 768px) {
  .hero-content.hero-left {
    text-align: left;
    margin: 0;
  }

  .hero-content.hero-left .hero-cta-group {
    justify-content: flex-start;
  }
}

/* ── Waitlist form section ── */

#waitlist-form {
  margin-bottom: 0;
}

/* ── 404 page fixes ── */

.btn--primary {
  background-color: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
}

.btn--secondary {
  background-color: transparent;
  color: var(--text-on-dark);
  border-color: rgba(248, 250, 252, 0.3);
}

/* ── Index / fallback page ── */

.site-main {
  min-height: 60vh;
}

/* ── Mobile nav z-index fix ── */

.mobile-nav {
  z-index: 200;
}

/* ── Header logo image fix (no right margin in flex) ── */

.site-logo img {
  margin-right: 0;
}

/* ── Premium polish: About page credentials 2-col on desktop ── */

@media (min-width: 768px) {
  .about-credentials-grid {
    grid-template-columns: 280px 1fr;
    gap: var(--space-12);
    align-items: start;
  }
}

/* ── Premium polish: Contact page 2-col on desktop ── */

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1.2fr 1fr !important;
    gap: var(--space-10) !important;
  }
}

/* ── Premium polish: Focus ring for keyboard users ── */

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

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
  outline: none;
}

/* ── Premium polish: Selection color ── */

::selection {
  background-color: rgba(196, 67, 43, 0.15);
  color: var(--text-primary);
}

/* ── Premium polish: Smooth image loading ── */

img {
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img[loading="lazy"].loaded,
img[loading="lazy"][complete] {
  opacity: 1;
}

/* ── Premium polish: Lead magnet page form inputs ── */

#lead-magnet-form input[type='text'],
#lead-magnet-form input[type='email'] {
  background-color: rgba(248, 250, 252, 0.06);
  border-color: rgba(248, 250, 252, 0.18);
  color: var(--text-on-dark);
  font-size: 1rem;
  padding: var(--space-3) var(--space-4);
}

#lead-magnet-form input[type='text']::placeholder,
#lead-magnet-form input[type='email']::placeholder {
  color: rgba(248, 250, 252, 0.35);
}

#lead-magnet-form input:focus {
  background-color: rgba(248, 250, 252, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 67, 43, 0.2);
}

/* ── Premium polish: Card gradient on hover ── */

.card {
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(196, 67, 43, 0.02), transparent);
  opacity: 0;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

/* ── Premium polish: Smooth text rendering on dark backgrounds ── */

.section-dark,
.site-header,
.site-footer,
.hero {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Pagination ── */

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-smooth);
}

.page-numbers:hover,
.page-numbers.current {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
}

/* ── End of premium polish additions ── */

/* ===================================================
   PROOF GRID / YOUTUBE VIDEO GRID (v3.1.x additions)
   =================================================== */

.proof-tile {
  transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
}

.proof-tile:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cbt-video-card {
  transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
}

.cbt-video-card:hover,
.cbt-video-card:focus {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cbt-video-card h3 {
  font-family: var(--font-heading);
}

