/* ============================================
   Restorative Intensive Mental Health Services
   Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --emerald-900: #064E3B;
    --emerald-800: #065F46;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10B981;
    --emerald-100: #D1FAE5;
    --emerald-50:  #ECFDF5;

    --amber-600:   #D97706;
    --amber-500:   #F59E0B;
    --amber-100:   #FEF3C7;

    --cream:       #F5F0E8;
    --cream-light: #FAF7F2;
    --cream-dark:  #E8E0D0;

    --stone-900:   #1C1917;
    --stone-800:   #292524;
    --stone-700:   #44403C;
    --stone-600:   #57534E;
    --stone-500:   #78716C;
    --stone-400:   #A8A29E;
    --stone-300:   #D6D3D1;
    --stone-200:   #E7E5E4;
    --stone-100:   #F5F5F4;
    --stone-50:    #FAFAF9;

    --white: #FFFFFF;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body:    'Inter', system-ui, sans-serif;

    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg:  0 12px 32px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04);
    --shadow-xl:  0 20px 48px rgba(0,0,0,0.12);

    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --radius-xl:  28px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--stone-800);
    background-color: var(--cream);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a {
    color: var(--emerald-700);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--emerald-600); }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--stone-900);
    font-weight: 700;
}

/* --- Utility --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--emerald-900);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    z-index: 9999;
    font-size: 0.875rem;
}
.skip-link:focus {
    top: 16px;
    color: var(--white);
}

/* --- Section shared --- */
.section {
    padding: 96px 0;
}
.section-alt {
    background-color: var(--cream-dark);
}
.section-eyebrow {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--emerald-700);
    margin-bottom: 12px;
}
.section-heading {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    margin-bottom: 20px;
    color: var(--stone-900);
}
.section-lead {
    font-size: 1.125rem;
    color: var(--stone-600);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.8;
}
.section-header {
    margin-bottom: 64px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--emerald-700);
    color: var(--white);
    border-color: var(--emerald-700);
}
.btn-primary:hover {
    background: var(--emerald-800);
    border-color: var(--emerald-800);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
    color: var(--white);
}
.btn-full { width: 100%; }

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(245, 240, 232, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cream-dark);
    transition: box-shadow var(--transition);
}
.site-header.scrolled {
    box-shadow: var(--shadow-sm);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--stone-900);
}
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.logo-primary {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--emerald-900);
}
.logo-secondary {
    font-size: 0.7rem;
    color: var(--stone-500);
    letter-spacing: 0.04em;
}
.logo-icon { flex-shrink: 0; }

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}
.main-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--stone-700);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.main-nav a:hover {
    color: var(--emerald-700);
    background: var(--emerald-50);
}
.nav-cta {
    background: var(--emerald-700) !important;
    color: var(--white) !important;
    font-weight: 600 !important;
    margin-left: 8px;
}
.nav-cta:hover {
    background: var(--emerald-800) !important;
    color: var(--white) !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--stone-700);
}

/* --- Hero --- */
.hero {
    padding-top: 72px;
    background: linear-gradient(135deg, var(--emerald-900) 0%, var(--emerald-800) 50%, #075E45 100%);
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-content { color: var(--white); }
.hero-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--emerald-100);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hero-eyebrow::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 2px;
    background: var(--amber-500);
}
.hero-headline {
    font-size: clamp(2.5rem, 5.5vw, 4.25rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.08;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}
.hero-headline br { display: none; }
.hero-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.82);
    margin-bottom: 36px;
    max-width: 520px;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 48px;
}
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    list-style: none;
}
.hero-badges li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.88);
}
.hero-badges li svg { flex-shrink: 0; opacity: 0.85; }

.hero-visual {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 0;
}
.hero-img-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}
.hero-img-main img {
    width: 100%;
    height: 470px;
    object-fit: cover;
}
.hero-img-accent {
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 220px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--emerald-800);
}
.hero-img-accent img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}
.hero-stat-card {
    position: absolute;
    bottom: 40px;
    right: -20px;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 18px 24px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}
.hero-stat-card .stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--emerald-900);
}
.hero-stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--stone-500);
    margin-top: 2px;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
}
.hero-wave svg { width: 100%; height: 60px; }

/* --- About --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}
.about-img-stack {
    position: relative;
}
.about-img-stack img {
    width: 100%;
    height: 620px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.about-accent-bar {
    position: absolute;
    bottom: -24px;
    right: -24px;
    background: var(--emerald-700);
    color: var(--white);
    padding: 20px 28px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-md);
}
.about-content .section-heading { margin-top: 4px; }
.about-content .lead {
    font-size: 1.0625rem;
    color: var(--stone-600);
    line-height: 1.85;
    margin-bottom: 20px;
}
.about-content p:not(.lead) {
    color: var(--stone-600);
    line-height: 1.8;
    margin-bottom: 28px;
}
.about-values {
    list-style: none;
    display: grid;
    gap: 14px;
}
.about-values li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 0.95rem;
    color: var(--stone-700);
    font-weight: 500;
}
.about-values li svg { flex-shrink: 0; margin-top: 2px; }

/* --- Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.service-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 36px 30px;
    border: 1px solid var(--stone-200);
    transition: all var(--transition);
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--emerald-100);
}
.service-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
}
.service-title {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--stone-900);
}
.service-desc {
    font-size: 0.9375rem;
    color: var(--stone-600);
    line-height: 1.75;
}

/* --- Approach --- */
.approach-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}
.approach-content .section-heading { margin-top: 4px; }
.approach-content .lead {
    font-size: 1.0625rem;
    color: var(--stone-600);
    line-height: 1.85;
    margin-bottom: 40px;
}
.approach-steps {
    display: grid;
    gap: 32px;
    margin-bottom: 40px;
}
.approach-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.step-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--emerald-100);
    line-height: 1;
    flex-shrink: 0;
    width: 48px;
}
.step-title {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--stone-900);
    margin-bottom: 6px;
}
.step-desc {
    font-size: 0.9375rem;
    color: var(--stone-600);
    line-height: 1.7;
}
.approach-visual img {
    width: 100%;
    height: 700px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* --- FAQ --- */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 960px;
    margin: 0 auto;
}
.faq-item {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--stone-200);
    overflow: hidden;
    transition: all var(--transition);
}
.faq-item:hover { border-color: var(--emerald-100); }
.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--stone-800);
    transition: color var(--transition);
}
.faq-question:hover { color: var(--emerald-700); }
.faq-question[aria-expanded="true"] { color: var(--emerald-700); }
.faq-toggle {
    flex-shrink: 0;
    transition: transform var(--transition);
    color: var(--stone-400);
}
.faq-question[aria-expanded="true"] .faq-toggle {
    transform: rotate(45deg);
    color: var(--emerald-700);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-answer.open {
    max-height: 200px;
}
.faq-answer p {
    padding: 0 24px 20px;
    font-size: 0.9rem;
    color: var(--stone-600);
    line-height: 1.75;
}
.faq-answer a {
    color: var(--emerald-700);
    font-weight: 500;
}

/* --- Contact --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}
.contact-info .section-heading { margin-top: 4px; }
.contact-intro {
    font-size: 1.0625rem;
    color: var(--stone-600);
    line-height: 1.8;
    margin-bottom: 36px;
}
.contact-details {
    list-style: none;
    display: grid;
    gap: 24px;
    margin-bottom: 32px;
}
.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.contact-item strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--stone-500);
    margin-bottom: 4px;
}
.contact-item span,
.contact-item a {
    font-size: 1rem;
    color: var(--stone-800);
    font-weight: 500;
}
.contact-item a:hover { color: var(--emerald-700); }
.contact-map {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.contact-form-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--stone-200);
}
.form-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.form-intro {
    font-size: 0.9375rem;
    color: var(--stone-500);
    margin-bottom: 28px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-group {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}
.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--stone-700);
}
.required {
    color: var(--amber-600);
}
.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    padding: 12px 16px;
    border: 1.5px solid var(--stone-300);
    border-radius: var(--radius-sm);
    background: var(--stone-50);
    color: var(--stone-800);
    transition: all var(--transition);
    width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--emerald-600);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(4,120,87,0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--stone-400);
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}
.form-success {
    text-align: center;
    padding: 40px 20px;
}
.form-success h4 {
    font-size: 1.375rem;
    color: var(--emerald-800);
    margin: 16px 0 8px;
}
.form-success p {
    color: var(--stone-600);
    font-size: 0.9375rem;
}

/* --- Footer --- */
.site-footer {
    background: var(--emerald-900);
    color: var(--stone-300);
    padding: 72px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-desc {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--stone-400);
    max-width: 300px;
}
.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--emerald-100);
    margin-bottom: 20px;
}
.footer-links ul {
    list-style: none;
    display: grid;
    gap: 12px;
}
.footer-links a {
    font-size: 0.9rem;
    color: var(--stone-400);
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }
.footer-contact address {
    font-style: normal;
    display: grid;
    gap: 8px;
    font-size: 0.9rem;
    line-height: 1.7;
}
.footer-contact a {
    color: var(--stone-400);
}
.footer-contact a:hover { color: var(--white); }

.footer-bottom {
    padding: 24px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}
.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--stone-500);
}
.footer-disclaimer {
    max-width: 600px;
    font-size: 0.8125rem;
    color: var(--stone-500);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero-grid { gap: 40px; }
    .hero-img-main img { height: 400px; }
    .hero-img-accent { width: 180px; left: -20px; bottom: -30px; }
    .about-grid,
    .approach-grid { gap: 48px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
    .section { padding: 72px 0; }

    .nav-toggle { display: block; }
    .main-nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(245, 240, 232, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 24px;
        border-bottom: 1px solid var(--cream-dark);
        box-shadow: var(--shadow-lg);
        transform: translateY(-120%);
        transition: transform var(--transition);
        z-index: 999;
    }
    .main-nav.open { transform: translateY(0); }
    .main-nav ul {
        flex-direction: column;
        gap: 4px;
        align-items: stretch;
    }
    .main-nav a {
        display: block;
        padding: 12px 16px;
        border-radius: var(--radius-sm);
    }
    .nav-cta { margin-left: 0 !important; text-align: center; }

    .hero { min-height: auto; padding: 100px 0 80px; }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .hero-content { order: 2; }
    .hero-visual { order: 1; }
    .hero-headline { font-size: clamp(2rem, 8vw, 3rem); }
    .hero-headline br { display: block; }
    .hero-img-main img { height: 320px; }
    .hero-img-accent { display: none; }
    .hero-stat-card { right: 0; bottom: -20px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }

    .about-grid,
    .approach-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-img-stack img { height: 400px; }
    .about-accent-bar { right: 16px; bottom: -16px; }
    .approach-visual img { height: 400px; }

    .services-grid { grid-template-columns: 1fr; }

    .faq-grid { grid-template-columns: 1fr; }

    .form-row { grid-template-columns: 1fr; }
    .contact-form-wrapper { padding: 28px; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero { padding: 90px 0 60px; }
    .hero-badges { flex-direction: column; gap: 12px; }
    .section-header { margin-bottom: 40px; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
