/**
 * Shared design system for therapair.com.au marketing pages.
 * Modern UX/UI: accessibility (focus, touch targets), reduced motion, readability.
 */
:root {
    --therapair-primary-blue: #3b82f6;
    --therapair-light-blue: #60a5fa;
    --therapair-lighter-blue: #93c5fd;
    --therapair-primary-hover: #2563eb;
    --therapair-primary-dark: #1d4ed8;
    --therapair-black: #000000;
    --therapair-warm-beige: #F9FAFD;
    --therapair-dark-grey: #4A5568;
    --therapair-primary: var(--therapair-primary-blue);
    --therapair-secondary: var(--therapair-light-blue);
    --therapair-accent: var(--therapair-lighter-blue);
    --therapair-background: var(--therapair-warm-beige);
    --therapair-surface: #ffffff;
    --therapair-charcoal: var(--therapair-black);
    --therapair-gray: var(--therapair-dark-grey);
    --therapair-success: #10B981;
    --therapair-gradient-start: var(--therapair-lighter-blue);
    --therapair-gradient-end: var(--therapair-primary-blue);
    /* UX: focus ring for keyboard/screen-reader users (WCAG 2.4.7) */
    --focus-ring: 2px solid var(--therapair-primary);
    --focus-offset: 2px;
    /* Readability: comfortable line length */
    --content-max-width: 65ch;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--therapair-background);
    color: var(--therapair-charcoal);
    line-height: 1.6;
}
h1, h2, h3, h4, h5, h6 { font-weight: 600; }

/* Critical layout/typography fallbacks when Tailwind CDN is blocked or fails */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.mx-auto { margin-left: auto; margin-right: auto; }
.pt-0 { padding-top: 0; }
.mt-0 { margin-top: 0; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-x-8 { column-gap: 2rem; }
.gap-y-2 { row-gap: 0.5rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1 1 0%; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.min-h-\[140px\] { min-height: 140px; }
.pb-4 { padding-bottom: 1rem; }
.border-b { border-bottom-width: 1px; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-bottom: 4rem; padding-top: 4rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; line-height: 1.2; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.hidden { display: none; }
.rounded-xl { border-radius: 0.75rem; }
.inline-block { display: inline-block; }
.w-full { width: 100%; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.grid { display: grid; }
.min-h-hero { min-height: 60vh; }
/* Header nav: same look when Tailwind unavailable */
.text-white\/90 { color: rgba(255, 255, 255, 0.9); }
.text-white\/90:hover { color: #fff; }
.hover\:text-white:hover { color: #fff; }
@media (min-width: 640px) {
    .sm\:text-5xl { font-size: 3rem; }
    .sm\:text-xl { font-size: 1.25rem; }
    .sm\:text-3xl { font-size: 1.875rem; }
    .sm\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .sm\:w-auto { width: auto; }
    .sm\:text-lg { font-size: 1.125rem; }
    .sm\:px-14 { padding-left: 3.5rem; padding-right: 3.5rem; }
}
@media (min-width: 1024px) {
    .lg\:text-6xl { font-size: 3.75rem; }
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 640px) {
    .sm\:col-span-2 { grid-column: span 2 / span 2; }
}
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:flex-row { flex-direction: row; }
    .md\:items-start { align-items: flex-start; }
    .md\:justify-between { justify-content: space-between; }
    .md\:gap-8 { gap: 2rem; }
    .md\:self-auto { align-self: flex-start; }
}
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.border-t { border-top-width: 1px; }
.border-gray-800 { border-color: #1f2937; }
.pt-8 { padding-top: 2rem; }
.pb-24 { padding-bottom: 6rem; }
.transition { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.text-gray-400 { color: #9ca3af; }
.rounded-full { border-radius: 9999px; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.self-center { align-self: center; }
.min-h-\[48px\] { min-height: 48px; }
.min-h-\[52px\] { min-height: 52px; }
.min-h-\[120px\] { min-height: 120px; }
.grid-cols-1 { grid-template-columns: 1fr; }
.bg-blue-900\/20 { background-color: rgba(30, 58, 138, 0.2); }
.text-blue-300 { color: #93c5fd; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

.hero-gradient {
    background: linear-gradient(135deg, var(--therapair-background) 0%, rgba(147, 197, 253, 0.15) 50%, rgba(96, 165, 250, 0.2) 100%);
}

/* Section layout (match homepage) */
.section-pad {
    padding-top: 4rem;
    padding-bottom: 4rem;
    padding-left: 1rem;
    padding-right: 1rem;
}
.section-inner {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}
.section-inner--wide {
    max-width: 42rem;
}
.section-title {
    margin-top: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}
.list-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}
.list-steps li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--therapair-gray);
}
.list-steps li span:first-child {
    color: var(--therapair-primary);
    font-weight: 600;
}
.faq-list { margin: 0; padding: 0; list-style: none; }
.faq-item { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(59, 130, 246, 0.12); }
.faq-item:last-child { border-bottom: none; }
.faq-item dt { font-weight: 600; font-size: 1rem; margin-bottom: 0.25rem; }
.faq-item dd { font-size: 0.875rem; color: var(--therapair-gray); margin: 0; }
.bg-alt { background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, var(--therapair-background) 100%); }

.btn-primary {
    background: linear-gradient(135deg, var(--therapair-gradient-start), var(--therapair-gradient-end));
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
    text-decoration: none;
    display: inline-block;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, var(--therapair-primary-blue), var(--therapair-primary-hover));
    color: white;
}
.btn-primary:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-offset);
}

.input-field {
    background: var(--therapair-surface);
    border: 2px solid rgba(59, 130, 246, 0.2);
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    width: 100%;
}
.input-field:focus,
.input-field:focus-visible {
    outline: none;
    border-color: var(--therapair-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.input-field:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.feature-card {
    background: var(--therapair-surface);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.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;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1.25rem;
    background: var(--therapair-primary);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    transition: top 0.2s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
    top: 1rem;
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Reduced motion: respect user preference (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
    .btn-primary,
    .btn-primary:hover,
    .floating-header-cta,
    .card-hover,
    .feature-card,
    .floating-header {
        transition: none;
    }
    .btn-primary:hover,
    .card-hover:hover {
        transform: none;
    }
}

/* Sticky header (shared with homepage) — blue bar, logo + CTAs */
.floating-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    padding: 12px 20px;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.floating-header.visible {
    transform: translateY(0);
    opacity: 1;
}
.floating-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.floating-header-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
}
.floating-header-cta {
    white-space: nowrap;
    font-size: 14px;
    padding: 10px 24px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    color: #2563eb;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
}
.floating-header-cta:hover {
    background: #fff;
    color: #1d4ed8;
}
.floating-header-cta:focus-visible,
.floating-header-nav-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}
.floating-header-nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.floating-header-nav-link:hover {
    color: #fff;
}
@media (max-width: 640px) {
    .floating-header-nav-link {
        padding: 0.5rem 0.25rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    .floating-header { padding: 10px 16px; }
    .floating-header-logo { height: 32px; max-width: 150px; }
    .floating-header-cta { font-size: 13px; padding: 8px 16px; }
    .floating-header-content { gap: 12px; }
}

/* Legacy simple header (kept for reference; prefer .floating-header) */
.site-header {
    background: rgba(255,255,255,0.95);
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    padding: 1rem 1.5rem;
}
.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.site-header-logo { height: 40px; width: auto; max-width: 200px; }
@media (max-width: 640px) {
    .site-header-logo { height: 32px; max-width: 150px; }
}

/* Full footer (same structure as homepage) */
.site-footer {
    background: #111827;
    color: #d1d5db;
    margin-top: 5rem;
}
.site-footer-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}
.site-footer-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .site-footer-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
.site-footer h3,
.site-footer h4 {
    color: #fff;
    font-weight: 500;
    margin-bottom: 1rem;
}
.site-footer h3 { font-weight: 600; }
.site-footer p,
.site-footer ul {
    font-size: 0.875rem;
    margin: 0 0 0.5rem 0;
}
.site-footer ul { list-style: none; padding: 0; }
.site-footer ul li { margin-bottom: 0.5rem; }
.site-footer a {
    color: #9ca3af;
    transition: color 0.2s;
}
.site-footer a:hover { color: #fff; }
.site-footer .text-gray-400 { color: #9ca3af; }
.site-footer .text-gray-500 { color: #6b7280; }
.site-footer .text-xs { font-size: 0.75rem; }
/* Footer nav (For therapists / For clients / For practices) */
.floating-header-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-footer-bottom {
    border-top: 1px solid #1f2937;
    padding-top: 2rem;
    padding-bottom: 6rem; /* Space so feedback widget doesn't cover footer */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .site-footer-bottom {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
}
.site-footer-bottom-row {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}
@media (min-width: 768px) {
    .site-footer-bottom-row {
        flex-direction: row;
        align-items: flex-start;
        width: auto;
        gap: 2rem;
    }
}
.site-footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    font-size: 0.875rem;
    font-weight: 500;
}
.site-footer-links-inline {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
}
.site-footer-links-inline a { color: #9ca3af; }
.site-footer-links-inline a:hover { color: #fff; }
