/* Smile Again - homepage styles */

/* Font definitions */
@font-face {
    font-display: swap;
    font-family: "flowtext";
    font-style: normal;
    font-weight: normal;
    src:
        url("../fonts/poppins-western.woff2") format("woff2"),
        url("../fonts/poppins-western.woff") format("woff");
}

@font-face {
    font-display: swap;
    font-family: "flowtext";
    font-style: normal;
    font-weight: bold;
    src:
        url("../fonts/poppins-western-bold.woff2") format("woff2"),
        url("../fonts/poppins-western-bold.woff") format("woff");
}

/* Custom Properties - 2025 Design System */
:root {
    /* Modern color palette with better contrast */
    --spirit: #8b5cf6; /* Lighter purple for better contrast */
    --energy: #10b981; /* Emerald - healing energy */
    --wisdom: #06b6d4; /* Lighter cyan for readability */
    --earth: #ef4444; /* Brighter red */
    --cosmos: #1e293b; /* Dark blue - infinite space */
    --light: #ffffff;
    --mist: #f8fafc;
    --shadow: #64748b;
    --text: #1e293b;
    --text-soft: #475569;
    --border-light: #e2e8f0;
    
    /* Gradients for energy flow */
    --gradient-spirit: linear-gradient(135deg, var(--spirit) 0%, var(--energy) 100%);
    --gradient-cosmos: linear-gradient(135deg, var(--cosmos) 0%, var(--wisdom) 100%);
    --gradient-earth: linear-gradient(135deg, var(--earth) 0%, var(--energy) 100%);
    --gradient-mist: linear-gradient(180deg, rgba(248,250,252,0) 0%, rgba(248,250,252,0.8) 100%);
    
    /* Shadows - subtle depth */
    --shadow-sm: 0 1px 2px rgba(30, 41, 59, 0.04);
    --shadow-md: 0 4px 12px rgba(30, 41, 59, 0.08);
    --shadow-lg: 0 8px 24px rgba(30, 41, 59, 0.12);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.2);
    
    /* Spacing system */
    --space: clamp(1rem, 2vw, 1.5rem);
    --gap: calc(var(--space) * 1.5);
    --section-padding: clamp(3rem, 8vw, 6rem);
    
    /* Typography - responsive sizing */
    --text-base: clamp(1rem, 1rem + 0.5vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.125rem + 0.5vw, 1.375rem);
    --text-xl: clamp(1.5rem, 1.5rem + 1vw, 2rem);
    --text-2xl: clamp(2rem, 2rem + 1.5vw, 3rem);
    --text-3xl: clamp(2.5rem, 2.5rem + 2vw, 4rem);
    
    /* Layout constraints - improved for reading comfort */
    --max-width: 64rem; /* Reduced from 78rem for better readability */
    --content-width: 44rem;
    --reading-width: 38rem; /* New: optimal for paragraph text */
    
    /* Animation timing */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode palette with HIGH CONTRAST */
@media (prefers-color-scheme: dark) {
    :root {
        --light: #0f172a;
        --mist: #1e293b;
        --text: #ffffff; /* WHITE text for dark mode */
        --text-soft: #cbd5e1;
        --border-light: #334155;
        --spirit: #ffffff; /* WHITE logo for maximum contrast */
        --wisdom: #22d3ee; /* Cyan for smile */
        --energy: #22d3ee; /* Cyan for consistency */
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
        --shadow-glow: 0 0 40px rgba(255, 255, 255, 0.1);
    }
}

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

/* Base document styles */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: flowtext, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text);
    background: var(--light);
    background-image: 
        radial-gradient(ellipse at top, rgba(139, 92, 246, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
    overflow-x: hidden;
    position: relative;
    opacity: 0;
    animation: body-fade-in 0.6s ease-out 0.1s forwards;
}

@keyframes body-fade-in {
    to { opacity: 1; }
}

/* Dynamic background with energy particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.02) 0%, transparent 60%);
    animation: energy-flow 30s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes energy-flow {
    0%, 100% { transform: scale(1) rotate(0deg); }
    33% { transform: scale(1.1) rotate(120deg); }
    66% { transform: scale(0.9) rotate(-120deg); }
}

/* Links styling */
a {
    color: var(--spirit);
    text-decoration: none;
    transition: var(--transition);
}

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

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

/* Header links override */
header a {
    color: inherit;
    text-decoration: none;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

@media (prefers-color-scheme: dark) {
    header {
        background: rgba(15, 23, 42, 0.95);
        border-bottom-color: rgba(167, 139, 250, 0.2);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
}

header > div {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem var(--gap);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo area - NEW INTEGRATED DESIGN */
.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: visible; /* Allow logo rays to extend beyond */
}

.logo-svg {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    transition: var(--transition);
    overflow: visible; /* Critical for ray overflow */
}

/* Add glow effect to logo in dark mode */
@media (prefers-color-scheme: dark) {
    .logo-svg {
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.2));
    }
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

header h1 {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.1;
}

header p {
    font-size: 0.875rem;
    color: var(--text-soft);
    margin: 0;
    line-height: 1.2;
}

/* Navigation */
nav {
    display: flex;
    gap: 0.5rem;
}

nav a {
    padding: 0.5rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.2s ease;
}

nav a::before {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.25rem;
    height: 2px;
    border-radius: 2px;
    background: var(--spirit);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

nav a:hover,
nav a:focus-visible {
    color: var(--spirit);
    text-decoration: none;
}

nav a:hover::before,
nav a:focus-visible::before {
    transform: scaleX(1);
}

/* Mobile menu toggle */
button[aria-label="Menu"] {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

button[aria-label="Menu"] span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    transition: var(--transition);
}

/* Ensure logo has minimum space */
.logo-section {
    min-width: 200px;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    button[aria-label="Menu"] {
        display: block;
    }

    /* Hamburger animation */
    button[aria-label="Menu"].active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    button[aria-label="Menu"].active span:nth-child(2) {
        opacity: 0;
    }

    button[aria-label="Menu"].active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--light);
        flex-direction: column;
        align-items: center;
        padding: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        border-top: 1px solid rgba(139, 92, 246, 0.1);
    }

    nav.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    nav a {
        display: inline-block;
        width: auto;
        text-align: center;
        margin: 0.25rem 0;
    }

    @media (prefers-color-scheme: dark) {
        nav {
            background: var(--mist);
            border-top-color: rgba(167, 139, 250, 0.2);
        }
    }
}



/* Main content */
main {
    margin-top: 4rem;
}

/* Hero section with immersive design */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: var(--section-padding) var(--gap);
}

#hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: rotate-slow 30s linear infinite;
}

@keyframes rotate-slow {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

#hero > div {
    max-width: var(--content-width);
    text-align: center;
    position: relative;
    z-index: 1;
}

#hero h2 {
    font-size: var(--text-3xl);
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: var(--gradient-spirit);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    animation: fade-in-up 1s ease-out;
    position: relative;
}

#hero h2::before,
#hero h2::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-spirit);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
}

#hero h2:hover::before {
    animation: glitch-1 0.3s ease-in-out;
}

#hero h2:hover::after {
    animation: glitch-2 0.3s ease-in-out 0.1s;
}

@keyframes glitch-1 {
    0%, 100% { opacity: 0; }
    33% { opacity: 0.6; transform: translateX(-2px) translateY(2px); filter: hue-rotate(90deg); }
    66% { opacity: 0.6; transform: translateX(2px) translateY(-2px); filter: hue-rotate(-90deg); }
}

@keyframes glitch-2 {
    0%, 100% { opacity: 0; }
    33% { opacity: 0.6; transform: translateX(2px) translateY(2px); filter: hue-rotate(-90deg); }
    66% { opacity: 0.6; transform: translateX(-2px) translateY(-2px); filter: hue-rotate(90deg); }
}

#hero p {
    font-size: var(--text-lg);
    color: var(--text-soft);
    margin-bottom: 2rem;
    animation: fade-in-up 1s ease-out 0.2s both;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Action buttons */
#hero ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fade-in-up 1s ease-out 0.4s both;
}

#hero a {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

#hero a:first-child {
    background: var(--gradient-spirit);
    color: var(--light);
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
}

#hero a:last-child {
    border: 2px solid var(--spirit);
    color: var(--spirit);
    background: rgba(139, 92, 246, 0.05);
}

#hero a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

#hero a:first-child:hover {
    border-color: var(--spirit);
}

#hero a:last-child:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* Sections */
section {
    padding: var(--section-padding) var(--gap);
    position: relative;
}

section > * {
    max-width: var(--max-width);
    margin: 0 auto;
}

section h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-spirit);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

section h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--spirit);
}

section p {
    color: var(--text-soft);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    max-width: var(--reading-width);
    margin-left: auto;
    margin-right: auto;
}

/* Cards with hover effects */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.cards > div {
    background: var(--mist);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cards > div:nth-child(1) { animation: float 6s ease-in-out infinite; }
.cards > div:nth-child(2) { animation: float 6s ease-in-out 2s infinite; }
.cards > div:nth-child(3) { animation: float 6s ease-in-out 4s infinite; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.cards > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-spirit);
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.cards > div:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    animation-play-state: paused;
}

.cards > div:hover::before {
    transform: translateX(0);
}

/* About section with alternating layout */
#about {
    background: var(--mist);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.about-item {
    padding: 2rem;
    background: var(--light);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    background-image: 
        radial-gradient(circle at 100% 50%, rgba(139, 92, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 0% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
}

@media (prefers-color-scheme: dark) {
    .about-item {
        background-image: 
            radial-gradient(circle at 100% 50%, rgba(167, 139, 250, 0.05) 0%, transparent 50%),
            radial-gradient(circle at 0% 50%, rgba(52, 211, 153, 0.05) 0%, transparent 50%);
    }
}

.about-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-spirit);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s;
}

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

.about-item:hover::before {
    transform: scaleY(1);
}

.about-item:hover::after {
    opacity: 0.2;
    transform: rotate(15deg) scale(1.1);
}

.about-item::after {
    content: '';
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    opacity: 0.1;
    background-repeat: no-repeat;
    background-size: contain;
    transition: all 0.3s ease;
}

.about-item:nth-child(1)::after {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%238b5cf6"><path d="M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z"/></svg>');
}

.about-item:nth-child(2)::after {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%238b5cf6"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>');
}

.about-item:nth-child(3)::after {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%238b5cf6"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></svg>');
}

.about-content h3 {
    margin-bottom: 1rem;
    text-align: center;
}

.about-content p {
    text-align: left;
}

/* Services with icon animations */
#services ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    list-style: none;
    margin-top: 2rem;
}

#services li {
    padding: 1.5rem;
    background: var(--light);
    border-radius: 0.5rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    padding-left: 3.5rem;
}

#services li::before {
    content: '✦';
    position: absolute;
    left: 1.5rem;
    top: 1.5rem;
    color: var(--energy);
    font-size: 1.25rem;
    animation: spin 4s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#services li a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--energy);
    text-underline-offset: 0.25em;
}

#services li a::after {
    content: '\00a0→';
    color: var(--energy);
}

#services li a:focus-visible {
    outline: 2px solid var(--energy);
    outline-offset: 4px;
}

#services li:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    background: var(--mist);
    border-color: rgba(139, 92, 246, 0.2);
}

/* Testimonials Section - NEW */
section:has(> h2:first-child + p + article) {
    background: var(--mist);
}

section > p + article {
    margin-top: 2rem;
}

section article {
    background: var(--light);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    border: 2px solid transparent;
    background-image: 
        linear-gradient(var(--light), var(--light)),
        linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-slow);
    overflow: hidden;
    position: relative;
}

section article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-spirit);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s ease;
}

section article[open] {
    box-shadow: var(--shadow-lg);
    background-image: 
        linear-gradient(var(--light), var(--light)),
        linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    transform: translateY(-2px);
}

section article[open]::before {
    transform: scaleY(1);
}

section article details {
    border: none;
}

section article summary {
    padding: 1.75rem 1.75rem 1.75rem 4rem;
    cursor: pointer;
    font-weight: 600;
    font-size: var(--text-lg);
    color: var(--text);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: var(--transition);
    position: relative;
    background: linear-gradient(135deg, transparent 0%, rgba(139, 92, 246, 0.02) 100%);
}

section article summary::-webkit-details-marker {
    display: none;
}

section article summary::before {
    content: '★';
    position: absolute;
    left: 1.75rem;
    top: 1.75rem;
    font-size: 1.25rem;
    color: var(--energy);
    transition: all 0.3s ease;
}

section article:nth-child(2) summary::before { content: '❤'; color: var(--earth); }
section article:nth-child(3) summary::before { content: '◆'; color: var(--wisdom); }
section article:nth-child(4) summary::before { content: '✦'; color: var(--spirit); }
section article:nth-child(5) summary::before { content: '♦'; color: var(--energy); }
section article:nth-child(6) summary::before { content: '◈'; color: var(--wisdom); }

section article summary::after {
    content: 'Read full story →';
    font-size: 0.875rem;
    color: var(--spirit);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background: rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

section article[open] summary::after {
    content: 'Close ↑';
    background: var(--gradient-spirit);
    color: var(--light);
    box-shadow: var(--shadow-md);
}

section article summary:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
}

section article summary:hover::before {
    transform: scale(1.1) rotate(15deg);
}

section article summary:hover::after {
    background: rgba(139, 92, 246, 0.15);
    transform: translateX(-2px);
}

section article[open] summary:hover::after {
    transform: translateY(-2px);
}

section article summary strong {
    display: block;
    margin-bottom: 0.5rem;
}

section article summary span {
    display: block;
    font-size: 0.95rem;
    color: var(--text-soft);
    font-weight: 400;
    line-height: 1.4;
    max-width: 90%;
}

section article blockquote {
    padding: 0 1.75rem 1.75rem 4rem;
    margin: 0;
    color: var(--text-soft);
    line-height: 1.8;
    animation: fade-in-slide 0.4s ease-out;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    padding-top: 1.5rem;
    background: transparent;
    box-shadow: none;
    font-size: var(--text-base);
    font-style: normal;
    text-align: left;
    max-width: 100%;
}

section article blockquote::before {
    display: none;
}

section article blockquote p {
    margin-bottom: 1rem;
    color: var(--text-soft);
}

section article blockquote p:last-of-type {
    margin-bottom: 1.5rem;
}

section article blockquote footer {
    font-style: normal;
    color: var(--text);
    font-weight: 600;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
}

section article blockquote footer::before {
    content: '— ';
    color: var(--spirit);
}

/* Enhanced focus states for accessibility */
section article summary:focus-visible {
    outline: 2px solid var(--spirit);
    outline-offset: 2px;
    background: rgba(139, 92, 246, 0.1);
}

/* Testimonial/Quote section */
blockquote {
    max-width: var(--reading-width);
    margin: 4rem auto;
    padding: 3rem;
    background: var(--mist);
    border-radius: 1rem;
    position: relative;
    text-align: center;
    font-size: var(--text-lg);
    font-style: italic;
    box-shadow: var(--shadow-md);
}

blockquote::before {
    content: '"';
    position: absolute;
    top: -1rem;
    left: 2rem;
    font-size: 6rem;
    color: var(--spirit);
    opacity: 0.2;
    font-family: serif;
}

blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 1rem;
    font-style: normal;
    color: var(--text);
    opacity: 0.8;
}

/* FAQ section with enhanced accordion */
#faq details {
    margin-bottom: 1.5rem;
    background: var(--light);
    border-radius: 1rem;
    border: 2px solid transparent;
    background-image: 
        linear-gradient(var(--light), var(--light)),
        linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-slow);
    overflow: hidden;
    position: relative;
}

#faq details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-spirit);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s ease;
}

#faq details[open] {
    box-shadow: var(--shadow-lg);
    background-image: 
        linear-gradient(var(--light), var(--light)),
        linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    transform: translateY(-2px);
}

#faq details[open]::before {
    transform: scaleY(1);
}

#faq summary {
    padding: 1.75rem 1.75rem 1.75rem 4rem;
    cursor: pointer;
    font-weight: 600;
    font-size: var(--text-lg);
    color: var(--text);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    position: relative;
    background: linear-gradient(135deg, transparent 0%, rgba(139, 92, 246, 0.02) 100%);
}

#faq summary::-webkit-details-marker {
    display: none;
}

/* Question icons - using highly compatible symbols */
#faq details:nth-child(2) summary::before {
    content: '●';
    color: var(--energy);
}

#faq details:nth-child(3) summary::before {
    content: '▲';
    color: var(--wisdom);
}

#faq details:nth-child(4) summary::before {
    content: '◆';
    color: var(--earth);
}

#faq details:nth-child(5) summary::before {
    content: '✦';
    color: var(--spirit);
}

#faq details:nth-child(6) summary::before {
    content: '♦';
    color: var(--energy);
}

#faq details:nth-child(7) summary::before {
    content: '◈';
    color: var(--wisdom);
}

#faq details:nth-child(8) summary::before {
    content: '★';
    color: var(--spirit);
}

#faq summary::before {
    position: absolute;
    left: 1.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

#faq summary::after {
    content: '+';
    font-size: 1.75rem;
    color: var(--spirit);
    font-weight: 700;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#faq details[open] summary::after {
    transform: rotate(45deg);
    background: var(--gradient-spirit);
    color: var(--light);
    box-shadow: var(--shadow-md);
}

#faq summary:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
}

#faq summary:hover::before {
    transform: translateY(-50%) scale(1.1);
}

#faq summary:hover::after {
    background: rgba(139, 92, 246, 0.15);
    transform: scale(1.05);
}

#faq details[open] summary:hover::after {
    transform: rotate(45deg) scale(1.05);
}

#faq details p {
    padding: 0 1.75rem 1.75rem 4rem;
    color: var(--text-soft);
    line-height: 1.7;
    animation: fade-in-slide 0.4s ease-out;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    margin-top: 0.5rem;
    padding-top: 1.5rem;
}

@keyframes fade-in-slide {
    from { 
        opacity: 0; 
        transform: translateY(-10px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* Enhanced focus states for accessibility */
#faq summary:focus-visible {
    outline: 2px solid var(--spirit);
    outline-offset: 2px;
    background: rgba(139, 92, 246, 0.1);
}

/* Contact form with modern styling */
form {
    max-width: var(--content-width);
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

fieldset {
    border: none;
    display: grid;
    gap: 1rem;
}

legend {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

label {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

/* Hide honeypot field */
label:has(input[name="gender"]) {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    background: var(--mist);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    background-clip: padding-box;
    appearance: none;
}

select {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23475569"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5rem;
    padding-right: 2.5rem;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    background: var(--light);
    color: var(--text);
    background-image: 
        linear-gradient(var(--light), var(--light)),
        var(--gradient-spirit);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border: 2px solid transparent;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

select:focus {
    background-image: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%238b5cf6"><path d="M7 10l5 5 5-5z"/></svg>'),
        linear-gradient(var(--light), var(--light)),
        var(--gradient-spirit);
    background-position: right 0.75rem center, 0 0, 0 0;
    background-size: 1.5rem, 100% 100%, 100% 100%;
    color: var(--text);
}

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

button[type="submit"] {
    padding: 1rem 2rem;
    background: var(--gradient-spirit);
    color: var(--light);
    border: none;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

button[type="submit"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

button[type="submit"]:active::after {
    width: 300px;
    height: 300px;
}

/* Footer - more specific selector to avoid affecting testimonial footers */
body > footer {
    background: var(--cosmos);
    color: var(--light);
    padding: 3rem var(--gap);
    text-align: center;
    margin-top: 6rem;
}

@media (prefers-color-scheme: dark) {
    body > footer {
        background: var(--mist);
        color: var(--text);
    }
}

body > footer a {
    color: var(--energy);
    text-decoration: none;
    transition: var(--transition);
}

body > footer a:hover {
    color: var(--wisdom);
    text-decoration: underline;
    opacity: 0.8;
}

/* Dynamic cursor effect - removed body cursor: none */
@media (pointer: fine) {
    .custom-cursor {
        cursor: none;
    }

    a, button, summary, input, textarea {
        cursor: pointer;
    }
}

/* Accessibility enhancements */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

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

    .cards > div {
        animation: none !important;
    }

    body::before {
        animation: none !important;
    }

    #hero::before {
        animation: none !important;
    }
}

/* Micro-interactions and details */
::selection {
    background: var(--spirit);
    color: var(--light);
}

/* Smooth scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--mist);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-spirit);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--spirit);
}

/* Loading animation for form submission */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading {
    background: linear-gradient(90deg, var(--mist) 25%, var(--light) 50%, var(--mist) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Tooltip effect for links */
a[target="_blank"]::after {
    content: ' ↗';
    font-size: 0.8em;
    opacity: 0.5;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Logo section */
    .logo-section {
gap: 0.75rem;
min-width: 180px;
    }

    .logo-svg {
width: 2rem;
height: 2rem;
    }

    header h1 {
font-size: clamp(1.1rem, 4vw, 1.5rem);
    }

    header p {
font-size: 0.8rem;
    }

    /* Layout adjustments */
    :root {
--section-padding: clamp(2rem, 6vw, 4rem);
    }

    #hero h2 {
font-size: clamp(2rem, 6vw, 2.5rem);
    }

    .cards {
gap: 1rem;
    }

    #services ul {
grid-template-columns: 1fr;
    }

    form {
padding: 0 1rem;
    }

    /* Testimonials - stack "Read full story" below */
    section article summary {
padding: 1.5rem;
display: flex;
flex-direction: column;
    }

    section article summary span {
font-size: 0.875rem;
max-width: 100%;
    }

    section article summary::after {
position: static;
align-self: flex-start;
margin-top: 1rem;
padding: 0.4rem 0.8rem;
font-size: 0.8rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    * {
        border-width: 2px !important;
    }

    button, a, input, textarea {
        border: 2px solid currentColor !important;
    }
}

/* Print styles */
@media print {
    header, footer, nav, button {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }

    a {
        text-decoration: underline;
    }
}



/* Mobile testimonial icon fix - prevents overlapping text */
@media (max-width: 768px) {
    /* Smaller icon on mobile */
    section article summary::before {
left: 0.75rem !important;
top: 1.5rem !important;
font-size: 1rem !important;
    }

    /* Adjust padding to accommodate smaller icon */
    section article summary {
padding-left: 2.5rem !important;
    }

    /* Adjust blockquote padding to match */
    section article blockquote {
padding-left: 2.5rem !important;
    }

    /* FAQ icons also get smaller on mobile */
    #faq summary::before {
left: 0.75rem !important;
font-size: 1rem !important;
    }

    #faq summary {
padding-left: 2.5rem !important;
    }

    #faq details p {
padding-left: 2.5rem !important;
    }
}

/* CSS Classes to replace inline styles */
.about-intro {
    text-align: center;
    max-width: var(--reading-width);
    margin: 0 auto 2rem;
    font-weight: 600;
    color: var(--spirit);
}

.services-intro {
    text-align: center;
    max-width: var(--reading-width);
    margin: 0 auto 2rem;
}

.services-outro {
    text-align: center;
    margin-top: 2rem;
    max-width: var(--reading-width);
    margin-left: auto;
    margin-right: auto;
}

.testimonials-intro {
    text-align: center;
    max-width: var(--reading-width);
    margin: 0 auto 2rem;
}

.contact-intro {
    text-align: center;
    margin-bottom: 2rem;
    max-width: var(--reading-width);
    margin-left: auto;
    margin-right: auto;
}

.contact-email {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-outro {
    text-align: center;
    margin-top: 2rem;
    max-width: var(--reading-width);
    margin-left: auto;
    margin-right: auto;
}

/* Thank-you message after the contact form is sent */
.paddme {
    max-width: var(--reading-width, 42rem);
    margin: 3rem auto;
    padding: 2.5rem 2rem;
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text);
    background: var(--mist);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.08);
    animation: thanks-fade-in 1.2s ease-out both;
}

.paddme:focus {
    outline: none;
}

@keyframes thanks-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .paddme { animation: none; }
}
