/* ==========================================================================
   THE W-2 TRAP — Site Styles
   WCAG 2.1/2.2 AA Compliant
   ========================================================================== */

:root {
  --navy: #1a2332;
  --navy-light: #243044;
  --gold: #c9982e;
  --gold-light: #f5e6c4;
  --green: #2d8f4e;
  --red: #c0392b;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --text: #1a1a1a;
  --text-light: #4a4a4a;
  --border: #d4d4d4;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
  --radius: 8px;
  --max-width: 1100px;
  --transition: 0.2s ease;
}

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

/* Base */
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: underline; }
a:hover, a:focus { color: var(--gold); }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Skip Link (accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--navy);
  color: var(--white);
  padding: 12px 24px;
  z-index: 1000;
  font-weight: 700;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.nav-logo {
  color: var(--gold);
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
  letter-spacing: 1px;
}
.nav-logo:hover, .nav-logo:focus { color: var(--white); }

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: background var(--transition);
}
.nav-links a:hover,
.nav-links a:focus { background: var(--navy-light); color: var(--gold); }
.nav-links a[aria-current="page"] { border-bottom: 2px solid var(--gold); }

.nav-cta {
  background: var(--gold) !important;
  color: var(--navy) !important;
  font-weight: 700 !important;
  border-radius: var(--radius) !important;
}
.nav-cta:hover, .nav-cta:focus {
  background: var(--white) !important;
  color: var(--navy) !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    border-top: 1px solid var(--navy-light);
  }
  .nav-links.nav-open { display: flex; }
  .nav-links a { width: 100%; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  min-height: 48px;
  min-width: 48px;
  transition: all var(--transition);
  line-height: 1.2;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--navy);
  color: var(--gold);
  border-color: var(--gold);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--navy);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn-white:hover, .btn-white:focus {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-lg { padding: 18px 40px; font-size: 1.15rem; }

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, rgba(26,35,50,0.88) 0%, rgba(36,48,68,0.92) 100%),
              url('/images/hero-bg.jpg') center/cover no-repeat;
  color: var(--white);
  padding: 80px 24px;
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.6rem;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-text .hero-subtitle {
  color: var(--gold);
  font-size: 1.15rem;
  margin-bottom: 24px;
  font-weight: 500;
}

.hero-text .hero-tagline {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 32px;
  color: #ccc;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-cover {
  text-align: center;
}
.hero-cover img {
  max-height: 450px;
  width: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
  .hero { padding: 48px 24px; }
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-text h1 { font-size: 2rem; }
  .hero-buttons { justify-content: center; }
  .hero-cover { order: -1; }
  .hero-cover img { max-height: 320px; margin: 0 auto; }
}

/* ==========================================================================
   Announcement Banner (Hormozi pattern)
   ========================================================================== */
.announce-bar {
  background: var(--gold);
  text-align: center;
  padding: 8px 24px;
  font-size: 0.88rem;
  color: var(--navy);
}
.announce-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.announce-bar-cta {
  color: var(--navy) !important;
  font-weight: 700;
  text-decoration: none;
  padding: 4px 14px;
  background: var(--white);
  border-radius: 50px;
  font-size: 0.82rem;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  transition: background var(--transition);
}
.announce-bar-cta:hover { background: var(--navy); color: var(--white) !important; }

/* ==========================================================================
   Social Proof Strip (Hormozi-style stats bar)
   ========================================================================== */
.proof-strip {
  background: var(--gold);
  padding: 20px 24px;
}
.proof-strip-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.proof-stat {
  text-align: center;
  padding: 4px 12px;
}
.proof-stat-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}
.proof-stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}
@media (max-width: 600px) {
  .proof-strip-inner { gap: 8px; }
  .proof-stat-number { font-size: 1.2rem; }
  .proof-stat-label { font-size: 0.65rem; }
}

/* ==========================================================================
   Section Layouts
   ========================================================================== */
.section {
  padding: 72px 24px;
}
.section-alt { background: var(--off-white); }
.section-dark {
  background: var(--navy);
  color: var(--white);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header h2 {
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 12px;
}
.section-dark .section-header h2 { color: var(--gold); }
.section-header p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto;
}
.section-dark .section-header p { color: #bbb; }

/* ==========================================================================
   Feature Cards (Who It's For)
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: box-shadow var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-lg); }

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--navy);
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ==========================================================================
   What's Inside
   ========================================================================== */
.inside-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.inside-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
}

.inside-number {
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.inside-item h3 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--gold);
}
.inside-item p {
  font-size: 0.9rem;
  color: #bbb;
}

/* ==========================================================================
   Email Signup
   ========================================================================== */
.signup-section {
  background: linear-gradient(135deg, var(--navy) 0%, #0d1620 100%);
  color: var(--white);
  padding: 72px 24px;
  text-align: center;
}

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

.signup-container h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  color: var(--gold);
}

.signup-container p {
  margin-bottom: 28px;
  color: #ccc;
  font-size: 1.05rem;
}

.signup-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

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

.signup-form input[type="email"] {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  font-size: 1rem;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  min-height: 48px;
}
.signup-form input[type="email"]::placeholder { color: #999; }
.signup-form input[type="email"]:focus {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  background: rgba(255,255,255,0.15);
}

.signup-form button {
  padding: 14px 28px;
  background: var(--gold);
  color: var(--navy);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  min-height: 48px;
  min-width: 48px;
  white-space: nowrap;
  transition: all var(--transition);
}
.signup-form button:hover,
.signup-form button:focus {
  background: var(--white);
  border-color: var(--white);
}

@media (max-width: 500px) {
  .signup-form { flex-direction: column; }
}

/* Mailchimp form status messages */
.mc-status {
  margin-top: 12px;
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.4em;
}
.mc-success {
  color: var(--green);
  font-weight: 600;
}
.mc-error {
  color: var(--red);
  font-weight: 600;
}

/* Status inside free-chapter forms (dark text context) */
.free-chapter-form .mc-status {
  text-align: left;
  margin-top: 16px;
}

/* Status inside signup-section (light text on dark bg) */
.signup-section .mc-success { color: #4caf50; }
.signup-section .mc-error { color: #ff8a80; }

/* Disabled submit button */
button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ==========================================================================
   Testimonials / Social Proof
   ========================================================================== */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.proof-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.proof-stars { color: var(--gold); font-size: 1.2rem; margin-bottom: 12px; letter-spacing: 2px; }
.proof-text { font-style: italic; margin-bottom: 12px; color: var(--text-light); }
.proof-author { font-weight: 700; font-size: 0.9rem; }

/* ==========================================================================
   About Page
   ========================================================================== */
.about-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px;
}

.about-content h1 {
  font-size: 2.2rem;
  color: var(--navy);
  margin-bottom: 24px;
}

.about-content h2 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-top: 40px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 8px;
}

.about-content p {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 1.05rem;
}

.about-content ul {
  margin: 16px 0;
  padding-left: 24px;
}
.about-content li {
  margin-bottom: 8px;
  color: var(--text);
}

/* ==========================================================================
   Free Chapter Page
   ========================================================================== */
.free-chapter {
  max-width: 640px;
  margin: 0 auto;
  padding: 60px 24px;
  text-align: center;
}

.free-chapter h1 {
  font-size: 2.2rem;
  color: var(--navy);
  margin-bottom: 16px;
}

.free-chapter .lead {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 36px;
}

.free-chapter-form {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: left;
}

.free-chapter-form h2 {
  text-align: center;
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  min-height: 48px;
  transition: border-color var(--transition);
}
.form-group input:focus {
  border-color: var(--gold);
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.free-chapter-form button {
  width: 100%;
  padding: 16px;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  transition: all var(--transition);
}
.free-chapter-form button:hover,
.free-chapter-form button:focus {
  background: var(--navy);
  color: var(--gold);
}

.free-chapter-benefits {
  text-align: left;
  margin-top: 32px;
}
.free-chapter-benefits h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--navy);
}
.free-chapter-benefits ul {
  list-style: none;
  padding: 0;
}
.free-chapter-benefits li {
  padding: 6px 0 6px 28px;
  position: relative;
  color: var(--text-light);
}
.free-chapter-benefits li::before {
  content: "\2713";
  position: absolute;
  left: 4px;
  color: var(--green);
  font-weight: 700;
}

/* ==========================================================================
   Thank You Page
   ========================================================================== */
.thank-you {
  max-width: 600px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}

.thank-you h1 {
  font-size: 2.2rem;
  color: var(--green);
  margin-bottom: 16px;
}

.thank-you p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

/* ==========================================================================
   Blog
   ========================================================================== */
.blog-listing {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
}

.blog-listing h1 {
  font-size: 2.2rem;
  color: var(--navy);
  margin-bottom: 12px;
}

.blog-listing > p {
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.blog-list {
  list-style: none;
  padding: 0;
}

.blog-list li {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}
.blog-list li:first-child { padding-top: 0; }

.blog-list h2 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}
.blog-list h2 a {
  color: var(--navy);
  text-decoration: none;
}
.blog-list h2 a:hover,
.blog-list h2 a:focus { color: var(--gold); text-decoration: underline; }

.blog-list time {
  font-size: 0.85rem;
  color: var(--text-light);
}

.blog-list p {
  color: var(--text-light);
  margin-top: 8px;
}

/* Page Hero Image (Start Here, Calculator, About) */
.page-hero-image {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}
.page-hero-image img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* Blog Card Layout */
.blog-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.blog-card-image {
  flex-shrink: 0;
  width: 200px;
  border-radius: var(--radius);
  overflow: hidden;
}
.blog-card-image img {
  width: 200px;
  height: 120px;
  object-fit: cover;
  transition: transform var(--transition);
}
.blog-card-image:hover img { transform: scale(1.05); }
.blog-card-body { flex: 1; min-width: 0; }
@media (max-width: 600px) {
  .blog-card { flex-direction: column; }
  .blog-card-image { width: 100%; }
  .blog-card-image img { width: 100%; height: 180px; }
}

/* Blog Featured Image (in post) */
.blog-featured-image {
  margin-bottom: 28px;
  border-radius: var(--radius);
  overflow: hidden;
}
.blog-featured-image img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}
@media (max-width: 600px) {
  .blog-featured-image img { height: 200px; }
}

/* Blog Post */
.blog-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px;
}

.blog-header {
  margin-bottom: 36px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 24px;
}
.blog-header h1 {
  font-size: 2.2rem;
  color: var(--navy);
  line-height: 1.3;
}
.blog-date {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.blog-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-top: 8px;
}

.blog-body.prose h2 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-top: 36px;
  margin-bottom: 12px;
}

.blog-body.prose h3 {
  font-size: 1.2rem;
  color: var(--navy-light);
  margin-top: 28px;
  margin-bottom: 8px;
}

.blog-body.prose p {
  margin-bottom: 16px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.blog-body.prose ul, .blog-body.prose ol {
  margin: 16px 0;
  padding-left: 24px;
}
.blog-body.prose li { margin-bottom: 8px; }

.blog-body.prose strong { color: var(--navy); }

.blog-body.prose blockquote {
  border-left: 4px solid var(--gold);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--off-white);
  font-style: italic;
  color: var(--text-light);
}

/* Blog meta (date + reading time) */
.blog-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.blog-reading-time {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.85rem;
}
.blog-list-meta {
  display: flex;
  gap: 12px;
  align-items: center;
}
.blog-list-meta .blog-reading-time {
  font-size: 0.8rem;
}

/* Blog category tags */
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.blog-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(201,152,46,0.1);
  border: 1px solid rgba(201,152,46,0.25);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  text-transform: capitalize;
}
.blog-tag:hover { background: rgba(201,152,46,0.2); }

/* Blog filters */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.blog-filter {
  padding: 6px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  min-height: 36px;
  text-transform: capitalize;
}
.blog-filter:hover,
.blog-filter.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,152,46,0.08);
}

/* Inline mid-article CTA */
.blog-inline-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 24px 28px;
  border-radius: var(--radius);
  margin: 36px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.blog-inline-cta p {
  margin: 0;
  font-size: 0.95rem;
  flex: 1;
  min-width: 200px;
}
.blog-inline-cta .btn { white-space: nowrap; }

/* Related posts */
.blog-related {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.blog-related h2 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 16px;
}
.blog-related-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}
.blog-related-list li { margin: 0; }
.blog-related-list a {
  display: block;
  padding: 16px 20px;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.blog-related-list a:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
}
.blog-related-list strong {
  display: block;
  color: var(--navy);
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.blog-related-list span {
  display: block;
  color: var(--text-light);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Sticky Buy Bar */
.sticky-buy-bar {
  position: fixed;
  bottom: -80px;
  left: 0;
  right: 0;
  z-index: 990;
  background: var(--navy);
  border-top: 2px solid var(--gold);
  padding: 12px 24px;
  transition: bottom 0.3s ease;
}
.sticky-buy-bar.visible { bottom: 0; }
.sticky-buy-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sticky-buy-text {
  color: var(--white);
  font-size: 0.9rem;
}
.sticky-buy-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .sticky-buy-text { display: none; }
  .sticky-buy-inner { justify-content: center; }
  .a11y-floating-btn { bottom: 72px; }
}

@media print {
  .sticky-buy-bar { display: none !important; }
}

.blog-cta {
  background: var(--off-white);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 36px 32px;
  margin-top: 48px;
  text-align: center;
}
.blog-cta h2 {
  color: var(--navy);
  margin-bottom: 12px;
}
.blog-cta p {
  margin-bottom: 24px;
  color: var(--text-light);
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.blog-nav {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.blog-nav a {
  font-weight: 600;
  color: var(--navy);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--navy);
  color: #ccc;
  padding: 48px 24px 24px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h2 {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col p { font-size: 0.9rem; line-height: 1.6; }
.footer-author { color: var(--gold); font-weight: 600; }

.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-col a:hover, .footer-col a:focus { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
}

/* ==========================================================================
   Comparison Table
   ========================================================================== */
.compare-table-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.compare-table th, .compare-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.compare-table th {
  background: var(--navy);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.compare-table th.compare-highlight {
  background: var(--gold);
  color: var(--navy);
}
.compare-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text);
}
.compare-table td.compare-highlight {
  background: rgba(201,152,46,0.06);
}
.compare-table tr:hover td { background: var(--off-white); }
.compare-table tr:hover td.compare-highlight { background: rgba(201,152,46,0.12); }
.compare-yes { color: var(--green); font-weight: 700; font-size: 1.1rem; }
.compare-no { color: var(--red); font-weight: 700; font-size: 1.1rem; }
.compare-partial { color: var(--gold); font-weight: 700; font-size: 1.1rem; }
.compare-table small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 400;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-list { display: grid; gap: 8px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  text-align: left;
  font-family: inherit;
  min-height: 44px;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--off-white); }
.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--gold);
  transition: transform 0.3s;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer p {
  padding: 0 20px 18px;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
}
.faq-answer a { color: var(--gold); }

/* ==========================================================================
   Exit-Intent Popup
   ========================================================================== */
.exit-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}
.exit-popup.visible { display: flex; }
.exit-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.exit-popup-content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 36px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}
.exit-popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-light);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.exit-popup-close:hover { color: var(--navy); }
.exit-popup-content h2 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 12px;
}
.exit-popup-content > p {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.6;
}
.exit-popup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.exit-popup-form input[type="email"] {
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  min-height: 48px;
  text-align: center;
}
.exit-popup-form input:focus {
  border-color: var(--gold);
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

@media print {
  .exit-popup, .announce-bar { display: none !important; }
}

/* ==========================================================================
   Language Toggle (nav)
   ========================================================================== */
.nav-util-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.2);
}

.lang-toggle {
  color: var(--white) !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 4px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}
.lang-toggle:hover,
.lang-toggle:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--gold);
  color: var(--gold) !important;
}

@media (max-width: 768px) {
  .nav-util-group {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.2);
  }
}

/* ==========================================================================
   Floating A11y Button
   ========================================================================== */
.a11y-floating-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 991;
  width: 48px;
  height: 48px;
  background: var(--navy);
  border: 2px solid var(--border);
  border-radius: 50%;
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-lg);
  padding: 0;
}
.a11y-floating-btn:hover,
.a11y-floating-btn:focus {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy);
  transform: scale(1.1);
}
.a11y-floating-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Footer A11y Button */
.a11y-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(201,152,46,0.1);
  border: 1px solid rgba(201,152,46,0.25);
  border-radius: 50px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  min-height: 44px;
}
.a11y-btn:hover { background: rgba(201,152,46,0.2); }
.a11y-btn svg { width: 16px; height: 16px; }

/* ==========================================================================
   A11y Dialog Panel
   ========================================================================== */
.a11y-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  border: none;
  background: transparent;
  padding: 0;
  max-width: 100%;
  max-height: 100%;
}
.a11y-dialog::backdrop {
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.a11y-dialog-inner {
  position: absolute;
  right: 0;
  top: 0;
  width: 420px;
  max-width: 100%;
  height: 100%;
  background: var(--white);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 32px 24px;
  color: var(--text);
}
.a11y-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.a11y-dialog-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
}
.a11y-dialog-close {
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  border-radius: 50%;
}
.a11y-dialog-close:hover {
  background: var(--gold);
  color: var(--navy);
}

.a11y-control-group {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.a11y-control-group:last-child { border-bottom: none; }

.a11y-control-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  display: block;
}

/* Text Size Buttons */
.a11y-size-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.a11y-size-btn {
  padding: 8px 16px;
  min-height: 44px;
  min-width: 44px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-light);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border-radius: var(--radius);
  font-family: inherit;
}
.a11y-size-btn.active,
.a11y-size-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,152,46,0.08);
}

/* Toggle Switches */
.a11y-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}
.a11y-toggle-row span {
  font-size: 0.92rem;
  color: var(--text);
}
.a11y-toggle {
  width: 52px;
  height: 28px;
  min-width: 52px;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}
.a11y-toggle::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--text-light);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: all var(--transition);
}
.a11y-toggle[aria-checked="true"] {
  background: var(--gold);
  border-color: var(--gold);
}
.a11y-toggle[aria-checked="true"]::after {
  left: 26px;
  background: var(--navy);
}

/* Statement inside dialog */
.a11y-statement-block { margin-top: 8px; }
.a11y-statement-block h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 16px 0 6px;
  text-transform: uppercase;
}
.a11y-statement-block p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 8px;
}
.a11y-statement-block ul {
  list-style: none;
  padding: 0;
  margin-bottom: 10px;
}
.a11y-statement-block li {
  position: relative;
  padding-left: 14px;
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 3px;
}
.a11y-statement-block li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 4px;
  height: 4px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}
.a11y-statement-block a { color: var(--gold); text-decoration: underline; }

/* ==========================================================================
   Reading Guide
   ========================================================================== */
.reading-guide {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  height: 40px;
  background: rgba(201,152,46,0.08);
  border-top: 2px solid rgba(201,152,46,0.2);
  border-bottom: 2px solid rgba(201,152,46,0.2);
  pointer-events: none;
  z-index: 9998;
  transition: top 0.05s linear;
}
body.reading-guide-active .reading-guide { display: block; }

/* ==========================================================================
   Link Highlighting Mode
   ========================================================================== */
body.highlight-links a:not(.btn):not(.nav-logo):not(.nav-cta):not(.lang-toggle) {
  background: rgba(201,152,46,0.15);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================================
   Reduce Motion (manual toggle)
   ========================================================================== */
body.reduce-motion,
body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* ==========================================================================
   High Contrast Mode
   ========================================================================== */
body.high-contrast {
  --navy: #000000;
  --navy-light: #1a1a1a;
  --gold: #ffd700;
  --gold-light: #fff8dc;
  --green: #00e676;
  --red: #ff5252;
  --white: #ffffff;
  --off-white: #f0f0f0;
  --text: #000000;
  --text-light: #1a1a1a;
  --border: #000000;
}

body.high-contrast .site-header {
  background: #000;
  border-bottom: 3px solid #ffd700;
}

body.high-contrast .hero {
  background: #000;
}

body.high-contrast .hero-text .hero-tagline {
  color: #fff;
}

body.high-contrast .section-dark {
  background: #000;
}
body.high-contrast .section-dark .section-header p,
body.high-contrast .inside-item p {
  color: #e0e0e0;
}

body.high-contrast .signup-section {
  background: #000;
}
body.high-contrast .signup-container p {
  color: #fff;
}

body.high-contrast .feature-card {
  border: 2px solid #000;
}

body.high-contrast .inside-item {
  border: 1px solid #ffd700;
}

body.high-contrast .proof-card {
  border: 2px solid #000;
}

body.high-contrast .nav-links a {
  color: #fff;
}

body.high-contrast .site-footer {
  background: #000;
  border-top: 3px solid #ffd700;
  color: #fff;
}
body.high-contrast .footer-col a {
  color: #fff;
}

body.high-contrast a:focus-visible {
  outline-color: #ffd700;
}

body.high-contrast .signup-form input[type="email"] {
  background: #1a1a1a;
  color: #fff;
  border-color: #ffd700;
}

body.high-contrast .a11y-floating-btn {
  background: #000;
  border-color: #ffd700;
  color: #ffd700;
}

body.high-contrast .a11y-dialog-inner {
  background: #1a1a1a;
  color: #fff;
  border-color: #ffd700;
}
body.high-contrast .a11y-toggle-row span,
body.high-contrast .a11y-statement-block p,
body.high-contrast .a11y-statement-block li {
  color: #e0e0e0;
}

@media (max-width: 480px) {
  .a11y-dialog-inner { width: 100%; }
  .a11y-floating-btn { width: 42px; height: 42px; bottom: 16px; left: 16px; }
}

/* ==========================================================================
   Utility
   ========================================================================== */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }

/* ==========================================================================
   WCAG 2.1/2.2 AA Enhancements
   ========================================================================== */

/* Screen reader only utility (WCAG 2.1 SC 1.3.1) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Appearance — WCAG 2.2 SC 2.4.11
   Minimum 2px outline, contrasting color, offset for visibility */
*:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Remove default outline for mouse users, keep for keyboard (WCAG 2.1 SC 2.4.7) */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Target Size — WCAG 2.2 SC 2.5.8 (minimum 24x24, aiming for 44x44) */
button, [type="submit"], [type="button"],
a.btn, .nav-links a, .nav-toggle {
  min-height: 44px;
  min-width: 44px;
}

/* Ensure inline links have adequate spacing for touch (WCAG 2.2 SC 2.5.8) */
.blog-body.prose a,
.about-content a,
.footer-col a {
  padding: 2px 0;
  display: inline;
}

/* Reduced Motion — WCAG 2.1 SC 2.3.3 */
@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;
  }
  html { scroll-behavior: auto; }
}

/* High Contrast / Forced Colors — WCAG 2.1 SC 1.4.11 */
@media (forced-colors: active) {
  .btn, .nav-cta, .signup-form button, .free-chapter-form button {
    border: 2px solid ButtonText;
  }
  .skip-link:focus {
    outline: 3px solid Highlight;
  }
  .feature-card, .proof-card, .inside-item {
    border: 1px solid CanvasText;
  }
  .nav-toggle-bar {
    background: ButtonText;
  }
}

/* Breadcrumb Navigation */
.breadcrumb {
  margin-bottom: 24px;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  padding: 0;
  font-size: 0.9rem;
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--text-light);
}
.breadcrumb a {
  color: var(--navy);
}
.breadcrumb [aria-current="page"] {
  color: var(--text-light);
  font-weight: 500;
}

/* Form validation visual feedback — WCAG 2.1 SC 3.3.1 Error Identification */
input:invalid:not(:placeholder-shown) {
  border-color: var(--red);
}
input:invalid:not(:placeholder-shown):focus {
  outline-color: var(--red);
}

/* Ensure sufficient contrast for placeholder text — WCAG 2.1 SC 1.4.3 */
::placeholder {
  color: #767676;
  opacity: 1;
}

/* Link underline on hover for non-button links — WCAG 2.1 SC 1.4.1 */
a:not(.btn):not(.nav-logo):not(.nav-cta):hover,
a:not(.btn):not(.nav-logo):not(.nav-cta):focus {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Ensure text spacing override doesn't break layout — WCAG 2.1 SC 1.4.12 */
body {
  word-spacing: normal;
  letter-spacing: normal;
}

/* Print */
@media print {
  .site-header, .site-footer, .nav-toggle, .skip-link { display: none; }
  body { max-width: 100%; color: #000; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
