/**
 * Bellingham Integrative Massage - Custom Styles
 * Lesbian Autumn Palette (Plum & Sage)
 * CSS custom property overrides for Pico.css
 */

/* ============================================================================
   COLOR OVERRIDES - Lesbian Autumn (Plum & Sage)
   LIGHT MODE (default and explicit)
   ============================================================================ */

:root,
:root:not([data-theme="dark"]),
[data-theme="light"] {
  /* Primary color (Plum) - override Pico's blue */
  --pico-primary: #7d5e75;
  --pico-primary-background: #7d5e75;
  --pico-primary-border: #6b5669;
  --pico-primary-underline: rgba(125, 94, 117, 0.5);
  --pico-primary-hover: #6b5669;
  --pico-primary-hover-background: #6b5669;
  --pico-primary-hover-border: #594858;
  --pico-primary-focus: rgba(125, 94, 117, 0.25);
  --pico-primary-inverse: #ffffff;

  /* Secondary color (Sage) */
  --pico-secondary: #6b7c5e;
  --pico-secondary-background: #6b7c5e;
  --pico-secondary-border: #5a6b4d;
  --pico-secondary-hover: #5a6b4d;
  --pico-secondary-hover-background: #5a6b4d;
  --pico-secondary-focus: rgba(107, 124, 94, 0.25);
  --pico-secondary-inverse: #ffffff;

  /* Background colors (warm neutrals) */
  --pico-background-color: #faf8f5;
  --pico-color: #2d2828;
  --footer-background-color: #3d3038;

  /* Card/contrast colors */
  --pico-card-background-color: #ffffff;
  --pico-card-border-color: #e5e2de;

  /* Typography colors */
  --pico-h1-color: #4a3f45;
  --pico-h2-color: #4a3f45;
  --pico-h3-color: #4a3f45;
  --pico-h4-color: #4a3f45;
  --pico-h5-color: #4a3f45;
  --pico-h6-color: #4a3f45;

  /* Muted/secondary text */
  --pico-muted-color: #6b6666;
  --pico-muted-border-color: #e5e2de;

  /* Border radius */
  --pico-border-radius: 0.5rem;
}

/* ============================================================================
   DARK MODE COLOR OVERRIDES
   ============================================================================ */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]),
  [data-theme="dark"] {
    /* Primary (lighter mauve for dark mode) */
    --pico-primary: #b396a5;
    --pico-primary-background: #b396a5;
    --pico-primary-border: #c3b1cf;
    --pico-primary-hover: #c3b1cf;
    --pico-primary-hover-background: #c3b1cf;
    --pico-primary-focus: rgba(179, 150, 165, 0.25);
    --pico-primary-inverse: #1f1d1d;

    /* Secondary (lighter sage for dark mode) */
    --pico-secondary: #9aab8e;
    --pico-secondary-background: #9aab8e;
    --pico-secondary-border: #8a9b7a;
    --pico-secondary-hover: #8a9b7a;
    --pico-secondary-hover-background: #8a9b7a;
    --pico-secondary-focus: rgba(154, 171, 142, 0.25);
    --pico-secondary-inverse: #1f1d1d;

    /* Dark backgrounds */
    --pico-background-color: #1f1d1d;
    --pico-color: #e8e6e3;
    --footer-background-color: #17151a;

    --pico-card-background-color: #2d2a2a;
    --pico-card-border-color: #3d3a3a;

    /* Dark typography */
    --pico-h1-color: #d4cdd1;
    --pico-h2-color: #d4cdd1;
    --pico-h3-color: #d4cdd1;
    --pico-h4-color: #d4cdd1;
    --pico-h5-color: #d4cdd1;
    --pico-h6-color: #d4cdd1;

    --pico-muted-color: #b5b0ad;
    --pico-muted-border-color: #3d3a3a;
  }
}

/* Force dark mode when data-theme="dark" regardless of system preference */
:root[data-theme="dark"] {
  /* Primary (lighter mauve for dark mode) */
  --pico-primary: #b396a5;
  --pico-primary-background: #b396a5;
  --pico-primary-border: #c3b1cf;
  --pico-primary-hover: #c3b1cf;
  --pico-primary-hover-background: #c3b1cf;
  --pico-primary-focus: rgba(179, 150, 165, 0.25);
  --pico-primary-inverse: #1f1d1d;

  /* Secondary (lighter sage for dark mode) */
  --pico-secondary: #9aab8e;
  --pico-secondary-background: #9aab8e;
  --pico-secondary-border: #8a9b7a;
  --pico-secondary-hover: #8a9b7a;
  --pico-secondary-hover-background: #8a9b7a;
  --pico-secondary-focus: rgba(154, 171, 142, 0.25);
  --pico-secondary-inverse: #1f1d1d;

  /* Dark backgrounds */
  --pico-background-color: #1f1d1d;
  --pico-color: #e8e6e3;
  --footer-background-color: #17151a;

  --pico-card-background-color: #2d2a2a;
  --pico-card-border-color: #3d3a3a;

  /* Dark typography */
  --pico-h1-color: #d4cdd1;
  --pico-h2-color: #d4cdd1;
  --pico-h3-color: #d4cdd1;
  --pico-h4-color: #d4cdd1;
  --pico-h5-color: #d4cdd1;
  --pico-h6-color: #d4cdd1;

  --pico-muted-color: #b5b0ad;
  --pico-muted-border-color: #3d3a3a;
}


/* ============================================================================
   CUSTOM COMPONENT STYLES
   ============================================================================ */

/* Hero section on homepage */
.hero {
  text-align: center;
  padding: 5rem 2rem;
  margin-bottom: 3rem;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Optional: Add overlay for better text readability on background image */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 248, 245, 0.85); /* Semi-transparent overlay */
  z-index: 0;
}

/* Ensure text sits above overlay */
.hero > * {
  position: relative;
  z-index: 1;
}

.hero hgroup {
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero hgroup p {
  font-size: 1.25rem;
  color: var(--pico-muted-color);
  margin: 0;
}

.hero .lead {
  font-size: 1.1rem;
  max-width: 40rem;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Dark mode overlay adjustment */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero::before,
  [data-theme="dark"] .hero::before {
    background: rgba(31, 29, 29, 0.85);
  }
}

.or-text {
  display: inline-block;
  margin-left: 1rem;
  color: var(--pico-muted-color);
}

.or-text a {
  color: var(--pico-color);
  text-decoration: none;
  font-weight: 600;
}

/* Service cards */
article h3 {
  margin-top: 0;
}

article p:last-of-type {
  margin-bottom: 0.5rem;
}

/* Reviews section */
.reviews-section {
  padding: 2rem 0;
}

.reviews-section blockquote {
  border-left: 3px solid var(--pico-primary);
  padding-left: 1.5rem;
  margin: 0;
  font-style: italic;
}

.reviews-section blockquote p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.reviews-section blockquote footer {
  font-style: normal;
  font-weight: 600;
  color: var(--pico-muted-color);
  margin-top: 0.5rem;
}

/* CTA section */
.cta-section {
  text-align: center;
  padding: 3rem 0;
  margin: 3rem 0;
  background: var(--pico-card-background-color);
  border-radius: var(--pico-border-radius);
  border: 1px solid var(--pico-card-border-color);
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section p {
  margin-bottom: 1.5rem;
}

/* Footer styles */
footer.container-fluid {
  background: var(--pico-card-background-color);
  border-top: 1px solid var(--pico-card-border-color);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

footer.container-fluid h3 {
  margin-top: 0;
}

footer.container-fluid iframe {
  border-radius: var(--pico-border-radius);
  margin-top: 1rem;
}

.inclusive-practice {
  text-align: center;
  padding: 2rem 0 1rem;
}

.inclusive-practice h4 {
  margin-bottom: 0.5rem;
}

.copyright {
  text-align: center;
  color: var(--pico-muted-color);
  margin-top: 2rem;
}

/* Navigation adjustments */
nav.container-fluid {
  background: var(--pico-card-background-color);
  border-bottom: 1px solid var(--pico-card-border-color);
}

nav.container-fluid strong {
  color: var(--pico-h1-color);
}

/* Navigation Schedule button */
nav .schedule-btn {
  margin-left: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}

/* Mobile menu toggle button (hamburger) */
.mobile-menu-toggle {
  display: none; /* Hidden on desktop */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  flex-direction: column;
  gap: 0.25rem;
  width: 2.5rem;
  height: 2.5rem;
  justify-content: center;
  align-items: center;
}

.mobile-menu-toggle span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background-color: var(--pico-color);
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Hamburger animation when menu is open */
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive navigation */
@media (max-width: 768px) {
  /* Show hamburger button on mobile */
  .mobile-menu-toggle {
    display: flex;
  }

  /* Hide main nav menu by default on mobile */
  nav.container-fluid #nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--pico-card-background-color);
    border-top: 1px solid var(--pico-card-border-color);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  /* Show menu when open */
  nav.container-fluid #nav-menu.open {
    display: flex;
  }

  /* Stack menu items vertically */
  nav.container-fluid #nav-menu li {
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
  }

  /* Full-width Schedule button on mobile */
  nav .schedule-btn {
    margin-left: 0;
    margin-top: 0.5rem;
    display: block;
    width: 100%;
  }

  /* Make nav container relative for absolute positioning */
  nav.container-fluid {
    position: relative;
    flex-wrap: wrap;
  }
}

/* Footer */
#footer {
  --pico-primary: #b396a5;
  --pico-primary-background: #b396a5;
  --pico-primary-border: #c3b1cf;
  --pico-primary-underline: rgba(179, 150, 165, 0.5);
  --pico-primary-hover: #c3b1cf;
  --pico-primary-hover-background: #c3b1cf;
  --pico-primary-focus: rgba(179, 150, 165, 0.25);
  --pico-primary-inverse: #1f1d1d;
}


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

@media print {
  nav,
  footer iframe,
  [role="button"] {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
