/* ═══════════════════════════════════════════
   William Onan — Medical & Health
   Clean Minimalist · Terracotta + Sand
   ═══════════════════════════════════════════ */

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

:root {
    --terracotta: #B85C38;
    --terracotta-dark: #9A4B2C;
    --terracotta-light: #D4856A;
    --sand: #F5EDE3;
    --sand-light: #FAF6F1;
    --sand-mid: #EDE3D5;
    --sand-dark: #C8B8A8;
    --charcoal: #2A2522;
    --charcoal-light: #4A423D;
    --warm-gray: #6B6058;
    --warm-gray-light: #9A8E85;
    --white: #FEFCF9;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    color: var(--charcoal);
    background: var(--sand-light);
    line-height: 1.6;
    font-size: 15px;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Loader ──────────────────────────────── */
#page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-line {
    width: 60px;
    height: 2px;
    background: var(--sand-dark);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.loader-line::after {
    content: '';
    position: absolute;
    left: -60px;
    top: 0;
    width: 60px;
    height: 2px;
    background: var(--terracotta);
    animation: loaderSlide 0.8s var(--ease-smooth) infinite;
}

@keyframes loaderSlide {
    to { left: 60px; }
}

/* ── Navigation ──────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 246, 241, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s, box-shadow 0.4s;
}

.nav.scrolled {
    border-bottom-color: var(--sand-mid);
    box-shadow: 0 1px 20px rgba(42, 37, 34, 0.06);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--terracotta);
    color: var(--white);
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-brand-text {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 400;
    color: var(--charcoal);
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--warm-gray);
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--terracotta);
    transition: width 0.3s var(--ease-out);
}

.nav-links a:hover {
    color: var(--charcoal);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--charcoal) !important;
    color: var(--white) !important;
    padding: 10px 22px;
    border-radius: 100px;
    font-size: 13px !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: background 0.3s, transform 0.2s !important;
}

.nav-cta::after {
    display: none !important;
}

.nav-cta:hover {
    background: var(--terracotta) !important;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle-line {
    width: 22px;
    height: 1.5px;
    background: var(--charcoal);
    transition: transform 0.3s var(--ease-out), opacity 0.3s;
    transform-origin: center;
}

.nav-toggle.active .nav-toggle-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle.active .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .nav-toggle-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(42, 37, 34, 0.4);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ── Buttons ─────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.btn-primary {
    background: var(--terracotta);
    color: var(--white);
    border-color: var(--terracotta);
}

.btn-primary:hover {
    background: var(--terracotta-dark);
    border-color: var(--terracotta-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(184, 92, 56, 0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--charcoal);
    border-color: var(--charcoal);
}

.btn-ghost:hover {
    background: var(--charcoal);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-light {
    background: var(--white);
    color: var(--charcoal);
    border-color: var(--white);
}

.btn-light:hover {
    background: var(--sand);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.5);
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--white);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ── Section Headers ─────────────────────── */
.section-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 16px;
    position: relative;
    padding-left: 32px;
}

.section-eyebrow::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 22px;
    height: 1px;
    background: var(--terracotta);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 4.5vw, 56px);
    font-weight: 300;
    line-height: 1.15;
    color: var(--charcoal);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 16px;
    line-height: 1.7;
    color: var(--warm-gray);
    max-width: 520px;
}

/* ── Hero ────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 72px 0 0;
    position: relative;
    overflow: hidden;
    background: var(--sand-light);
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(184, 92, 56, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(200, 184, 168, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    padding: 60px 24px 60px 80px;
    max-width: 600px;
    margin: 0 auto;
}

.hero-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-eyebrow::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--terracotta);
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(44px, 6vw, 76px);
    font-weight: 300;
    line-height: 1.08;
    color: var(--charcoal);
    letter-spacing: -0.03em;
    margin-bottom: 28px;
}

.hero-accent {
    font-style: italic;
    color: var(--terracotta);
    font-weight: 300;
}

.hero-subtitle {
    font-size: 17px;
    line-height: 1.75;
    color: var(--warm-gray);
    margin-bottom: 40px;
    max-width: 440px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-divider {
    width: 60px;
    height: 1px;
    background: var(--sand-dark);
    margin-bottom: 24px;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 24px;
}

.hero-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-meta-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--warm-gray-light);
}

.hero-meta-value {
    font-size: 14px;
    color: var(--charcoal);
    font-weight: 400;
}

.hero-phone {
    color: var(--terracotta);
    transition: color 0.3s;
}

.hero-phone:hover {
    color: var(--terracotta-dark);
}

.hero-meta-sep {
    width: 1px;
    height: 32px;
    background: var(--sand-dark);
}

.hero-image {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, var(--sand-light), transparent);
    pointer-events: none;
}

/* ── Services ────────────────────────────── */
.services {
    padding: 120px 0;
    background: var(--sand-light);
}

.section-header {
    margin-bottom: 64px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.service-card {
    background: var(--white);
    padding: 40px 32px;
    transition: all 0.4s var(--ease-out);
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--terracotta);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}

.service-card:hover {
    background: var(--sand);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(42, 37, 34, 0.08);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--terracotta);
    margin-bottom: 24px;
    transition: background 0.3s, color 0.3s;
}

.service-card:hover .service-icon {
    background: var(--terracotta);
    color: var(--white);
}

.service-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.service-desc {
    font-size: 14px;
    line-height: 1.75;
    color: var(--warm-gray);
}

/* ── About ───────────────────────────────── */
.about {
    padding: 120px 0;
    background: var(--sand);
}

.about-layout {
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: 64px;
    align-items: center;
}

.about-image-wrap {
    position: relative;
}

.about-image-wrap img {
    width: 100%;
    height: 700px;
    object-fit: cover;
    border-radius: 2px;
}

.about-image-frame {
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 1px solid var(--terracotta-light);
    border-radius: 2px;
    pointer-events: none;
    z-index: -1;
}

.about-content {
    padding: 20px 0;
}

.about-text {
    font-size: 15px;
    line-height: 1.85;
    color: var(--warm-gray);
    margin-bottom: 20px;
}

.about-stats {
    display: flex;
    gap: 32px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--sand-dark);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-value {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 400;
    color: var(--terracotta);
}

.stat-label {
    font-size: 12px;
    color: var(--warm-gray-light);
    letter-spacing: 0.04em;
}

.stat-sep {
    width: 1px;
    height: 40px;
    background: var(--sand-dark);
    align-self: center;
}

/* ── Approach ────────────────────────────── */
.approach {
    padding: 120px 0;
    background: var(--sand-light);
}

.approach-header {
    text-align: center;
    margin-bottom: 80px;
}

.approach-header .section-eyebrow {
    padding-left: 0;
}

.approach-header .section-eyebrow::before {
    display: none;
}

.approach-header .section-subtitle {
    margin: 0 auto;
}

.approach-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
}

.approach-step {
    text-align: center;
    padding: 0 24px;
    position: relative;
}

.step-number {
    font-family: var(--font-serif);
    font-size: 48px;
    font-weight: 300;
    color: var(--sand-dark);
    display: block;
    margin-bottom: 16px;
    line-height: 1;
}

.step-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 400;
    color: var(--charcoal);
    margin-bottom: 12px;
}

.step-desc {
    font-size: 14px;
    line-height: 1.75;
    color: var(--warm-gray);
}

.approach-step-line {
    align-self: center;
    width: 40px;
    height: 1px;
    background: var(--sand-dark);
    margin: 0 auto;
}

/* ── CTA Section ─────────────────────────── */
.cta-section {
    padding: 120px 0;
    background: var(--charcoal);
    position: relative;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 10% 50%, rgba(184, 92, 56, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 90% 50%, rgba(200, 184, 168, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.cta-eyebrow {
    color: var(--terracotta-light) !important;
}

.cta-eyebrow::before {
    background: var(--terracotta-light) !important;
}

.cta-title {
    color: var(--white);
    margin-bottom: 24px;
}

.cta-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--sand-dark);
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Contact ─────────────────────────────── */
.contact {
    padding: 120px 0;
    background: var(--sand-light);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-info {
    padding-top: 8px;
}

.contact-desc {
    font-size: 15px;
    line-height: 1.75;
    color: var(--warm-gray);
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-detail-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--terracotta);
    flex-shrink: 0;
}

.contact-detail-label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--warm-gray-light);
    margin-bottom: 4px;
}

.contact-detail-value {
    font-size: 15px;
    color: var(--charcoal);
    line-height: 1.6;
}

.contact-detail-value a {
    color: var(--terracotta);
    transition: color 0.3s;
}

.contact-detail-value a:hover {
    color: var(--terracotta-dark);
}

.contact-form-wrap {
    background: var(--white);
    padding: 48px;
    border-radius: 4px;
    border: 1px solid var(--sand-mid);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--warm-gray);
}

.form-input,
.form-textarea {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 300;
    color: var(--charcoal);
    background: var(--sand-light);
    border: 1px solid var(--sand-mid);
    border-radius: 2px;
    padding: 14px 16px;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
    resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--terracotta);
    background: var(--white);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--sand-dark);
}

.form-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 40px 20px;
    color: var(--terracotta);
}

.form-success p {
    font-size: 15px;
    color: var(--charcoal);
    line-height: 1.6;
}

/* ── Footer ──────────────────────────────── */
.footer {
    background: var(--charcoal);
    padding: 64px 0 32px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    gap: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand .nav-brand-mark {
    width: 40px;
    height: 40px;
}

.footer-brand-name {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 400;
    color: var(--white);
}

.footer-tagline {
    font-size: 13px;
    color: var(--warm-gray-light);
    line-height: 1.6;
    margin-top: 4px;
    padding-left: 52px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: right;
}

.footer-links a {
    font-size: 13px;
    color: var(--warm-gray-light);
    transition: color 0.3s;
    letter-spacing: 0.02em;
}

.footer-links a:hover {
    color: var(--terracotta-light);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    gap: 16px;
}

.footer-bottom span {
    font-size: 12px;
    color: var(--warm-gray);
}

/* ── Scroll Reveal ───────────────────────── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-content {
        padding: 0 24px;
        text-align: center;
        max-width: 100%;
    }

    .hero-eyebrow {
        justify-content: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-meta {
        justify-content: center;
    }

    .hero-image {
        display: none;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-image-wrap img {
        height: 500px;
    }

    .about-image-frame {
        top: 12px;
        left: 12px;
        right: -12px;
        bottom: -12px;
    }

    .approach-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 48px 24px;
    }

    .approach-step-line {
        display: none;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--sand-light);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        z-index: 999;
        transform: translateX(100%);
        transition: transform 0.4s var(--ease-out);
        box-shadow: -10px 0 40px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

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

    .service-card {
        padding: 32px 28px;
    }

    .about-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-sep {
        width: 40px;
        height: 1px;
        align-self: center;
    }

    .approach-steps {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .contact-form-wrap {
        padding: 32px 24px;
    }

    .footer-top {
        flex-direction: column;
        gap: 32px;
    }

    .footer-links {
        text-align: left;
    }

    .footer-tagline {
        padding-left: 0;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 40px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-meta {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .hero-meta-sep {
        width: 32px;
        height: 1px;
    }
}
