/*!
Theme Name: AutismandMe (Pristine Custom)
Author: Antigravity
Description: A bespoke, lightning-fast custom theme for AutismandMe with a clinical, warm, and simplistic aesthetic. Mobile-First architecture.
Version: 1.1.0
Text Domain: autismandme-theme
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Inter:wght@400;500;600&display=swap');

/* ==========================================================================
   CSS Variables (T.C.A. Premium Clinical Framework)
   ========================================================================== */
:root {
  /* Core Palette - Doktera Soft Aesthetic */
  --color-primary: #1C355E; /* Softer Navy */
  --color-primary-dark: #122543;
  --color-surface-alt: #F4F7FB; /* Very pale blue-grey */
  --color-text-light: #64748B; /* Slate 500 */
  --color-bg: #FAFCFE; /* Ultra soft off-white background */
  --color-surface: #FFFFFF; /* Pure White for Bento cards */
  
  /* Accents */
  --color-accent: #16A34A; /* Buy Green (from UI-UX-Pro-Max) */
  --color-accent-soft: #DCFCE7; /* Pale Green */
  
  /* Text */
  --color-text: #334155; /* Slate 700 */
  
  /* Utility */
  --color-border: rgba(0, 0, 0, 0.05); /* Ultra subtle border for glass/bento */
  
  /* Typography */
  --font-sans: 'Noto Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: 'Figtree', sans-serif; 
  
  /* Spacing (Density: 3 - highly spacious) */
  --space-xs: 0.75rem;
  --space-sm: 1.5rem;
  --space-md: 3rem;
  --space-lg: 6rem;
  --space-xl: 10rem;
  
  /* Layout */
  --max-width-reading: 800px; 
  --max-width-container: 1280px;
}

/* ==========================================================================
   Reset & Basics
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Base Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-primary); 
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
  text-wrap: balance; 
}

p {
  margin-bottom: 1.5rem;
  text-wrap: pretty; 
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.6;
}

/* ==========================================================================
   Mobile-First Typography Classes
   ========================================================================== */
.text-hero {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.text-h2 {
  font-size: 2rem;
}

.text-h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.text-body-large {
  font-size: 1.125rem;
  line-height: 1.6;
}

.text-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
  font-weight: 600;
  display: block;
  margin-bottom: 1rem;
}

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

/* Desktop Typography Scaling */
@media (min-width: 768px) {
  .text-hero {
    font-size: 4.5rem; /* Larger for Doktera immersive feel */
  }
  .text-h2 {
    font-size: 3.5rem;
  }
  .text-h3 {
    font-size: 1.75rem;
  }
  .text-body-large {
    font-size: 1.25rem;
    line-height: 1.8;
  }
  .text-eyebrow {
    font-size: 0.875rem;
  }
}

/* ==========================================================================
   Mobile-First Spacing Utilities
   ========================================================================== */
.py-hero {
  padding: 4rem 0;
}

.py-section {
  padding: 3rem 0;
}

.py-header {
  padding: 3rem 0;
}

.gap-responsive {
  gap: 2rem;
}

.mb-responsive {
  margin-bottom: 2rem;
}

/* Desktop Spacing Scaling */
@media (min-width: 768px) {
  .py-hero {
    padding: 8rem 0;
  }
  .py-section {
    padding: 6rem 0;
  }
  .py-header {
    padding: 6rem 0 4rem;
  }
  .gap-responsive {
    gap: 4rem;
  }
  .mb-responsive {
    margin-bottom: 4rem;
  }
}

/* ==========================================================================
   Layout Structures
   ========================================================================== */
.container {
  max-width: var(--max-width-container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-reading {
  max-width: var(--max-width-reading);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.grid-2-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .grid-2-col {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }
  .bento-span-2 {
    grid-column: span 2;
  }
}

.flex-col-responsive {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .flex-col-responsive {
    flex-direction: row;
    gap: 1rem;
  }
}

.mobile-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 768px) {
  .mobile-col {
    flex-direction: row;
    gap: 3rem;
  }
}

.hide-on-mobile {
  display: none !important;
}
@media (min-width: 768px) {
  .hide-on-mobile {
    display: inline-block !important;
  }
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

@media (min-width: 768px) {
  .site-header {
    padding: 1.5rem 0;
  }
  .site-logo {
    font-size: 1.5rem;
  }
}

.site-nav {
  display: none;
}

@media (min-width: 1025px) {
  .site-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
  }
  
  .site-nav a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.2s ease;
  }
  
  .site-nav a:not(.btn):hover {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-underline-offset: 4px;
  }
  
  .mobile-menu-toggle {
    display: none;
  }
}

/* Mobile Nav Overlay */
.mobile-nav {
  position: fixed;
  top: 60px; /* height of header approx */
  left: 0;
  width: 100%;
  height: calc(100vh - 60px);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  padding: 2rem;
  gap: 1.5rem;
  transform: translateX(-100%);
  transition: transform 0.3s ease-out;
  z-index: 90;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .mobile-nav {
    top: 73px;
    height: calc(100vh - 73px);
  }
}

body.menu-open .mobile-nav {
  transform: translateX(0);
}

body.menu-open {
  overflow: hidden; 
}

.mobile-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 1.25rem;
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

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

/* ==========================================================================
   Components
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #FFFFFF !important;
  padding: 0.875rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 1rem;
  border: 1px solid var(--color-primary);
  cursor: pointer;
  transition: all 0.3s ease-out;
  text-decoration: none;
  text-align: center;
  width: 100%;
}

@media (min-width: 768px) {
  .btn {
    width: auto;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
  }
}

.btn:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  box-shadow: 0 4px 20px rgba(201, 154, 69, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent) !important;
  border: 1px solid var(--color-accent);
}

.btn-outline:hover {
  background: rgba(201, 154, 69, 0.05);
  color: var(--color-primary) !important;
  border-color: var(--color-primary);
}

/* Background Utility Classes & Glassmorphism */
.bg-soft { background-color: var(--color-surface-alt); }
.bg-white { background-color: var(--color-surface); }
.bg-primary { 
  background-color: var(--color-primary); 
  color: #FFFFFF; 
}
.bg-primary h2, .bg-primary p { color: #FFFFFF; }

.glass-panel {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
}

/* Service / Bento Cards */
.service-card, .bento-card {
  display: block; 
  background: var(--color-surface);
  border: var(--color-border);
  border-radius: 24px; /* Sleek rounded corners */
  padding: 2.5rem 2rem;
  text-align: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: inherit;
  text-decoration: none;
  height: 100%;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .service-card, .bento-card {
    padding: 3rem 2.5rem;
  }
}

.service-card:hover, .bento-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  z-index: 10;
}

/* Accordion */
:root { interpolate-size: allow-keywords; }
.modern-accordion { max-width: 800px; margin: 0 auto; }
.accordion-item {
  background: #ffffff;
  border: 1px solid #EAEAEA;
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}
.accordion-item:hover {
  border-color: #B89B72;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.accordion-item[open] {
  border-color: var(--color-primary);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.accordion-header {
  padding: 1.25rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
}
@media (min-width: 768px) {
  .accordion-header {
    padding: 1.5rem 2rem;
    font-size: 1.25rem;
  }
}
.accordion-header::-webkit-details-marker { display: none; }
.accordion-header::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s ease;
  color: #B89B72;
  line-height: 1;
}
.accordion-item[open] .accordion-header::after {
  transform: rotate(45deg);
}
.accordion-inner {
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--color-text);
}
@media (min-width: 768px) {
  .accordion-inner {
    padding: 0 2rem 2rem 2rem;
  }
}

/* Booking Dialog */
#booking-dialog {
  margin: auto;
  padding: 0;
  border: none;
  border-radius: 12px;
  max-width: 600px;
  width: 95%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  background: white;
}
#booking-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.dialog-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  color: var(--color-text-light);
}
.tidycal-wrapper {
  padding: 1rem;
  height: 600px;
  overflow: hidden;
}
.tidycal-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Images */
.img-fluid {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Scroll Animations */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes fade-slide-up {
      from { opacity: 0; transform: translateY(40px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .animate-on-scroll {
      animation: fade-slide-up auto ease-out both;
      animation-timeline: view();
      animation-range: entry 0% cover 25%; 
    }
  }
}
.animate-on-scroll.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
