/* =================================================================
   CORE STYLESHEET - Multi-site Foundation
   Shared foundation for Braintelligence.ai + Sundial Coaching
   
   Default: Dark theme (Braintelligence)
   Override: styles-sundial.css sets light default for Sundial
   Toggle: Manual light/dark switch available on all sites
   
   TABLE OF CONTENTS:
   1.  Configuration      - Theme tokens, CSS variables
   2.  Foundation         - Resets, base elements
   3.  Accessibility      - Skip links, screen reader utilities
   4.  Layout             - Containers, wrappers, grid systems
   5.  Header & Nav       - Logo, navigation, mobile menu
   6.  Hero               - Hero section, profile image
   7.  Content            - Cards, sections, dividers, pricing
   8.  Buttons & Actions  - CTA styles, button variants
   9.  Testimonials       - Testimonial grid, quote boxes
   10. FAQ                - FAQ accordion/list
   11. Forms              - Newsletter, form inputs
   12. Booking            - Confirmation, booking summary
   13. Footer             - Footer content, certifications
   14. Interactive        - Theme toggle button
   15. Utilities          - Helper classes
   16. Responsive         - Mobile breakpoints
   17. Accessibility      - Print, reduced motion, focus
   ================================================================= */

/* ==================== 1. CONFIGURATION ==================== */
/* Theme tokens, brand colors, CSS variables */
:root {
  /* Light values */
  --bg-light: #fefdfb;
  --ink-light: #111827;
  --muted-light: #374151;
  --subtle-light: #4b5563;
  --card-light: #f9fafb;
  --line-light: #e5e7eb;
  --btn-light: #111827;
  --btnText-light: #ffffff;
  --btnAltBg-light: #ffffff;
  --btnAlt-light: #111827;
  --focus-light: #0f766e;
  
  /* Dark values */
  --bg-dark: #1A1A1A;
  --ink-dark: #f1f5f9;
  --muted-dark: #cbd5e1;
  --subtle-dark: #94a3b8;
  --card-dark: #1e293b;
  --line-dark: #334155;
  --btn-dark: #f1f5f9;
  --btnText-dark: #0f172a;
  --btnAltBg-dark: #1e293b;
  --btnAlt-dark: #f1f5f9;
  --focus-dark: #14b8a6;
  
  /* Brand colors */
  --yellow: #F7B718;
  --blue: #3b82f6;
  --teal: #0d9488;
  --purple: #8b5cf6;
  --red: #ef4444;
  --green: #10b981;
  
  /* CORE DEFAULT = DARK */
  --bg: var(--bg-dark);
  --ink: var(--ink-dark);
  --muted: var(--muted-dark);
  --subtle: var(--subtle-dark);
  --card: var(--card-dark);
  --line: var(--line-dark);
  --btn: var(--btn-dark);
  --btnText: var(--btnText-dark);
  --btnAltBg: var(--btnAltBg-dark);
  --btnAlt: var(--btnAlt-dark);
  --focus: var(--focus-dark);
  color-scheme: dark;
}

/* Manual toggle (button sets these) */
[data-theme="dark"] {
  --bg: var(--bg-dark);
  --ink: var(--ink-dark);
  --muted: var(--muted-dark);
  --subtle: var(--subtle-dark);
  --card: var(--card-dark);
  --line: var(--line-dark);
  --btn: var(--btn-dark);
  --btnText: var(--btnText-dark);
  --btnAltBg: var(--btnAltBg-dark);
  --btnAlt: var(--btnAlt-dark);
  --focus: var(--focus-dark);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: var(--bg-light);
  --ink: var(--ink-light);
  --muted: var(--muted-light);
  --subtle: var(--subtle-light);
  --card: var(--card-light);
  --line: var(--line-light);
  --btn: var(--btn-light);
  --btnText: var(--btnText-light);
  --btnAltBg: var(--btnAltBg-light);
  --btnAlt: var(--btnAlt-light);
  --focus: var(--focus-light);
  color-scheme: light;
}


/* ==================== 2. FOUNDATION ==================== */
/* Resets, base elements, typography */

/* Global */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: #1d4ed8;
  transition: color 0.2s;
}

a:hover {
  color: var(--teal);
}

a:focus,
button:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

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

/* ==================== 3. ACCESSIBILITY ==================== */
/* Skip links, screen reader utilities, focus states */

/* Accessibility */
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 9999;
  background: #111827 !important;
  color: #ffffff !important;
  padding: 8px 12px;
  border: 2px solid transparent;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
}

.skip:link,
.skip:visited,
.skip:hover,
.skip:active {
  color: #ffffff !important;
  background: #111827 !important;
}

.skip:focus {
  left: 16px;
  top: 16px;
  border-color: var(--focus);
}

/* ==================== 4. LAYOUT ==================== */
/* Containers, wrappers, grid systems */

/* Layout */
.wrap {
  max-width: 1080px;
  margin: auto;
  padding: 24px 16px 64px;
}

/* ==================== 5. HEADER & NAVIGATION ==================== */
/* Logo, site navigation, mobile menu toggle */

/* Sticky Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-content {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo {
  height: 50px;
  width: auto;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.site-nav a:hover {
  background: var(--card);
  color: var(--teal);
}

.site-nav a.active {
  background: var(--teal);
  color: white;
}

.menu-toggle {
  display: none;
  background: var(--btn);
  color: var(--btnText);
  border: 2px solid var(--btn);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.menu-toggle:hover {
  background: var(--teal);
  border-color: var(--teal);
}

@media (max-width: 768px) {
  .header-content {
    flex-wrap: wrap;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .site-nav {
    display: none;
    width: 100%;
  }
  
  .site-nav.active {
    display: block;
  }
  
  .site-nav ul {
    flex-direction: column;
    gap: 8px;
  }
}

/* ==================== 6. HERO ==================== */
/* Hero section, profile image, credentials */

/* Hero Section */
.hero {
  text-align: center;
  margin: 40px 0 60px;
}

.hero-content {
  display: grid;
  gap: 32px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero-content {
    grid-template-columns: 200px 1fr;
    text-align: left;
  }
}

.hero-image-wrapper {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  position: relative;
}

.hero-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid transparent;
  background-image: 
    linear-gradient(white, white),
    linear-gradient(135deg, var(--red), var(--yellow), var(--green), var(--blue), var(--purple));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  display: block;
}

[data-theme="dark"] .hero-image,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-image {
    background-image: 
      linear-gradient(#0f172a, #0f172a),
      linear-gradient(135deg, var(--red), var(--yellow), var(--green), var(--blue), var(--purple));
  }
}

.hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  margin: 0 0 12px;
  line-height: 1.2;
}

.hero-tagline {
  font-size: clamp(18px, 3vw, 22px);
  color: var(--teal);
  font-weight: 600;
  margin: 8px 0;
}

.hero p {
  margin: 12px 0;
  color: var(--subtle);
  font-size: 17px;
}

.hero em {
  color: var(--muted);
  font-style: italic;
  display: block;
  margin-top: 16px;
  font-size: 18px;
}

.credentials {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .credentials {
    justify-content: flex-start;
  }
}

.credential-badge {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* ==================== 7. CONTENT COMPONENTS ==================== */
/* Cards, sections, dividers, pricing, lists */

/* Cards with rainbow top border */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 40px 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  border-top: 6px solid transparent;
  background-image: 
    linear-gradient(var(--card), var(--card)),
    linear-gradient(90deg, var(--red), var(--yellow), var(--green), var(--blue), var(--purple));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.section {
  margin-top: 60px;
  scroll-margin-top: 100px;
}

.section-header {
  text-align: center;
  margin-bottom: 32px;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.3;
}

h3 {
  margin: 24px 0 12px;
  font-size: clamp(20px, 3vw, 24px);
  color: var(--ink);
}

h4 {
  margin: 20px 0 10px;
  font-size: 18px;
  color: var(--ink);
}

.muted {
  color: var(--muted);
}

.price {
  font-weight: 700;
  font-size: 20px;
  color: var(--teal);
  margin: 16px 0;
}

ul.clean {
  margin: 16px 0;
  padding-left: 24px;
}

ul.clean li {
  margin: 8px 0;
}

/* ==================== 8. BUTTONS & ACTIONS ==================== */
/* CTA styles, button variants, action groups */

/* Buttons */
.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 10px;
  background: var(--btn);
  color: var(--btnText);
  border: 2px solid var(--btn);
  font-weight: 700;
  font-size: 16px;
  transition: all 0.2s;
  cursor: pointer;
  text-align: center;
}

.btn:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn.alt {
  background: var(--btnAltBg);
  color: var(--btnAlt);
  border-color: var(--btnAlt);
}

.btn.alt:hover {
  background: var(--btnAlt);
  color: var(--btnAltBg);
}

.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.btn-notify {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #111827;
  font-weight: 700;
}

.btn-notify:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 15px;
}

.hr {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 32px 0;
  border: none;
}

/* ==================== 9. TESTIMONIALS & QUOTES ==================== */
/* Testimonial grid, inline testimonial box */

/* Testimonials */
.testimonials {
  display: grid;
  gap: 24px;
  margin: 32px 0;
}

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

.testimonial {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid var(--teal);
}

.testimonial-text {
  font-style: italic;
  color: var(--subtle);
  margin: 0 0 12px;
}

.testimonial-author {
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
}

.testimonial-role {
  color: var(--muted);
  font-size: 14px;
}

/* Inline testimonial box (for booking confirmation, inspirational quotes) */
.testimonial-box {
  margin-top: 32px;
  padding: 16px;
  background: var(--card);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
}

.testimonial-box p {
  margin: 0;
  font-style: italic;
  color: var(--subtle);
}

/* ==================== 10. FAQ ==================== */
/* FAQ accordion/list */

/* FAQ */
.faq {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.faq-question {
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
  font-size: 17px;
}

.faq-answer {
  color: var(--subtle);
  margin: 0;
}

/* ==================== 11. FORMS & NEWSLETTER ==================== */
/* Newsletter signup, form inputs, no-dates CTA */

/* Newsletter Signup */
.newsletter {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: white;
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  margin: 48px 0;
}

.newsletter h3 {
  color: white;
  margin-top: 0;
}

.newsletter p {
  color: rgba(255, 255, 255, 0.9);
  margin: 12px 0 24px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
}

.newsletter-input,
.newsletter-form select {
  flex: 1;
  min-width: 200px;
  padding: 14px 16px;
  border: 2px solid white;
  border-radius: 10px;
  font-size: 16px;
  background: white;
  color: var(--ink);
}

.newsletter-input:focus,
.newsletter-form select:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.newsletter-submit {
  padding: 14px 32px;
  background: var(--yellow);
  color: #111827;
  border: 2px solid var(--yellow);
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 140px;
}

.newsletter-submit:hover {
  background: white;
  color: var(--teal);
  border-color: white;
  transform: translateY(-1px);
}

.no-dates {
  background: var(--card);
  border: 2px solid var(--teal);
  border-radius: 16px;
  padding: 32px 24px;
  margin: 24px 0;
}

.no-dates h3,
.no-dates h4 {
  color: var(--teal);
  margin-top: 0;
  text-align: center;
}

.no-dates p {
  margin: 12px 0;
  color: var(--ink);
  text-align: center;
}

.no-dates .newsletter-form {
  margin-top: 24px;
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.no-dates select,
.no-dates input {
  background: var(--bg);
  color: var(--ink);
  border: 2px solid var(--line);
}

.no-dates select:focus,
.no-dates input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* ==================== 12. BOOKING CONFIRMATION ==================== */
/* Transaction confirmation, booking summary */

.booking-summary {
  padding: 24px;
}

.booking-summary.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  border-top: 6px solid transparent;
  background-image: 
    linear-gradient(var(--card), var(--card)),
    linear-gradient(90deg, var(--red), var(--yellow), var(--green), var(--blue), var(--purple));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.confirmation-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

ul.booking-dates {
  margin: 16px 0;
  padding-left: 24px;
}

.booking-dates li {
  margin: 10px 0;
  font-weight: 500;
}

/* Booking page specific elements */
.booking-header {
  text-align: center;
  margin: 40px 0;
}

.calendar-actions {
  display: flex;
  margin-top: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.quote-block {
  margin-top: 32px;
  padding: 16px;
  background: var(--card);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
}

.quote-text {
  margin: 0;
  font-style: italic;
  color: var(--subtle);
}

/* ==================== 13. FOOTER ==================== */
/* Footer content, certifications, contact info */

footer {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.footer-content {
  display: grid;
  gap: 32px;
  margin-bottom: 32px;
}

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

.footer-about h3 {
  margin-top: 0;
  font-size: 20px;
}

.footer-contact h3 {
  margin-top: 0;
  font-size: 20px;
}

.contact-info {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.contact-info li {
  margin: 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-info a {
  color: var(--ink);
  text-decoration: none;
}

.contact-info a:hover {
  color: var(--teal);
  text-decoration: underline;
}

.certifications {
  margin-top: 32px;
  text-align: center;
}

.certifications h4 {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cert-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 40px;
  justify-content: center;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.cert-badge {
  height: 80px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  transition: transform 0.2s, filter 0.2s;
  filter: grayscale(20%);
}

.cert-badge:hover {
  transform: scale(1.1);
  filter: grayscale(0%);
}

@media (max-width: 768px) {
  .cert-badges {
    gap: 24px 20px;
  }
  
  .cert-badge {
    height: 60px;
    max-width: 140px;
  }
}

.footer-bottom {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  margin: 8px 0;
}

.footer-bottom a {
  color: var(--muted);
  text-decoration: underline;
}

.footer-bottom a:hover {
  color: var(--teal);
}

/* ==================== 14. INTERACTIVE ELEMENTS ==================== */
/* Theme toggle button */

.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: var(--ink);       /* NEW - dark solid */
	border: 2px solid var(--ink);  /* NEW - dark solid */
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
	background: var(--teal);      /* ADD THIS */
  border-color: var(--teal);    /* ADD THIS */
}

.theme-toggle:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.theme-toggle-icon {
  font-size: 24px;
	color: var(--bg);  /* ADD THIS - makes emoji white */
  transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-toggle-icon {
  transform: rotate(180deg);
}

[data-theme="dark"] .theme-toggle-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle-moon {
  display: inline;
}

[data-theme="light"] .theme-toggle-sun {
  display: inline;
}

[data-theme="light"] .theme-toggle-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle-sun {
    display: none;
  }
  :root:not([data-theme]) .theme-toggle-moon {
    display: inline;
  }
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle-sun {
    display: inline;
  }
  :root:not([data-theme]) .theme-toggle-moon {
    display: none;
  }
}

/* ==================== 15. UTILITIES ==================== */
/* Single-purpose helper classes */

/* Form field width constraints */
.field-narrow {
  max-width: 250px;
}

/* Spacing utilities */
.mt-16 {
  margin-top: 16px;
}

.mt-32 {
  margin-top: 32px;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ==================== 16. RESPONSIVE (MOBILE) ==================== */

/* Responsive refinements */
@media (max-width: 640px) {
  .wrap {
    padding: 16px 12px 48px;
  }
  
  .card {
    padding: 20px;
  }
  
  .grid {
    gap: 16px;
  }
  
  .newsletter {
    padding: 32px 20px;
  }
  
  .newsletter-form {
    flex-direction: column;
    align-items: stretch;
  }
  
  .newsletter-input,
  .newsletter-form select,
  .newsletter-submit {
    min-width: 100%;
  }
  
  .theme-toggle {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
}

/* ==================== 17. ACCESSIBILITY (MEDIA) ==================== */
/* Print styles, reduced motion, focus-visible */

/* Print Styles */
@media print {
  .site-header,
  .newsletter,
  .back-to-top,
  .theme-toggle,
  .btn {
    display: none;
  }
  
  .card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
}

/* Accessibility: Reduce 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;
  }
  
  .theme-toggle:hover .theme-toggle-icon {
    transform: none;
  }
  
  .card:hover {
    transform: none;
  }
}

@supports selector(:focus-visible) {
  a:focus,
  button:focus {
    outline: none;
  }
  
  a:focus-visible,
  button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }
}
