/* ============================================
   HOUSE OF CHIROPRACTIC — STYLESHEET
   ============================================ */

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

:root {
    --terracotta: #C06C44;
    --terracotta-dark: #A85A36;
    --terracotta-light: #D4896A;
    --sand: #F5F0E8;
    --sand-light: #FAF7F2;
    --sand-mid: #EDE6D8;
    --cream: #FDFBF7;
    --charcoal: #2A2520;
    --charcoal-light: #4A423A;
    --text: #3A322A;
    --text-light: #7A7068;
    --white: #FFFFFF;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300;
    color: var(--text);
    background-color: var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

ul {
    list-style: none;
}

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

/* --- GRAIN OVERLAY --- */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px;
}

/* --- SKIP LINK --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--charcoal);
    color: var(--white);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    z-index: 10000;
    font-size: 0.875rem;
}
.skip-link:focus {
    top: 16px;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    line-height: 1.15;
    color: var(--charcoal);
}

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

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--terracotta);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--terracotta-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(192, 108, 68, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--charcoal);
    border: 1px solid var(--sand-mid);
}
.btn-ghost:hover {
    border-color: var(--terracotta);
    color: var(--terracotta);
}

.btn-sm {
    padding: 10px 22px;
    font-size: 0.875rem;
}

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

/* --- LINK ARROW --- */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--terracotta);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: gap var(--transition);
}
.link-arrow:hover {
    gap: 14px;
}

/* --- SECTION LABEL --- */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    margin-bottom: 24px;
}

.section-sub {
    font-size: 1.0625rem;
    color: var(--text-light);
    max-width: 520px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(237, 230, 216, 0.5);
    transition: all var(--transition);
}
.site-header.scrolled {
    box-shadow: 0 1px 20px rgba(42, 37, 32, 0.06);
}

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

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

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--terracotta);
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Instrument Serif', serif;
    font-size: 1.125rem;
    line-height: 1.2;
    color: var(--charcoal);
}

.nav ul {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav a {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-light);
    transition: color var(--transition);
    position: relative;
}
.nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--terracotta);
    transition: width var(--transition);
}
.nav a:hover {
    color: var(--charcoal);
}
.nav a:hover::after {
    width: 100%;
}

.nav li:last-child {
    margin-left: 8px;
}

/* Mobile toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.mobile-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--charcoal);
    transition: all var(--transition);
    transform-origin: center;
}
.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}
.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}

/* Mobile nav */
.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    top: 76px;
    background: rgba(253, 251, 247, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    padding: 40px 24px;
    opacity: 0;
    transform: translateY(-8px);
    transition: all var(--transition);
    pointer-events: none;
}
.mobile-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}
.mobile-nav-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}
.mobile-nav a {
    font-family: 'Instrument Serif', serif;
    font-size: 1.75rem;
    color: var(--charcoal);
}
.mobile-nav .btn {
    margin-top: 16px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    padding-top: 140px;
    padding-bottom: 80px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: var(--sand);
    border: 1px solid var(--sand-mid);
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 32px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--terracotta);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-headline {
    font-size: clamp(2.75rem, 5.5vw, 4.5rem);
    line-height: 1.08;
    margin-bottom: 28px;
    color: var(--charcoal);
}

.hero-sub {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--text-light);
    max-width: 460px;
    margin-bottom: 40px;
}

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

.hero-visual {
    position: relative;
    min-height: 640px;
}

.hero-image-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(42, 37, 32, 0.1);
}
.hero-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floating-card {
    position: absolute;
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 16px 48px rgba(42, 37, 32, 0.1);
    border: 1px solid rgba(237, 230, 216, 0.6);
    animation: float 6s ease-in-out infinite;
}

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

.card-stat {
    bottom: 60px;
    left: -40px;
    animation-delay: 0s;
}
.card-stat .fc-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 8px;
}
.card-stat .fc-value {
    display: block;
    font-family: 'Instrument Serif', serif;
    font-size: 1.75rem;
    line-height: 1.2;
    color: var(--charcoal);
}
.card-stat .fc-sub {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 8px;
    line-height: 1.5;
}

.card-welcome {
    top: 40px;
    right: -24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    max-width: 280px;
    animation-delay: 2s;
}
.card-welcome .fc-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--terracotta);
}
.card-welcome .fc-value-sm {
    display: block;
    font-family: 'Instrument Serif', serif;
    font-size: 1.375rem;
    color: var(--charcoal);
    margin-bottom: 6px;
}
.card-welcome .fc-paragraph {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
}

.hero-divider {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}
.hero-divider::after {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sand-mid), transparent);
}

/* ============================================
   INTRO
   ============================================ */
.intro {
    padding: 100px 0;
    background: var(--sand-light);
}
.intro .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.intro-content {
    max-width: 520px;
}

.intro-text {
    font-size: 1.0625rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

.intro-image {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 56px rgba(42, 37, 32, 0.08);
}
.intro-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
    padding: 120px 0;
}

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

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

.service-card {
    padding: 40px 32px;
    border-radius: var(--radius);
    border: 1px solid var(--sand-mid);
    background: var(--white);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--terracotta);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}
.service-card:hover {
    border-color: transparent;
    box-shadow: 0 16px 48px rgba(42, 37, 32, 0.08);
    transform: translateY(-4px);
}
.service-card:hover::before {
    transform: scaleX(1);
}

.service-num {
    font-family: 'Instrument Serif', serif;
    font-size: 2.5rem;
    color: var(--sand-mid);
    line-height: 1;
    margin-bottom: 20px;
    transition: color var(--transition);
}
.service-card:hover .service-num {
    color: var(--terracotta-light);
}

.service-title {
    font-family: 'Instrument Serif', serif;
    font-size: 1.375rem;
    margin-bottom: 14px;
    color: var(--charcoal);
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ============================================
   PHILOSOPHY
   ============================================ */
.philosophy {
    padding: 120px 0;
    background: var(--sand-light);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.philosophy-points {
    display: flex;
    flex-direction: column;
    gap: 36px;
    margin-top: 48px;
}

.philosophy-point {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.pp-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid var(--sand-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--terracotta);
}

.philosophy-point strong {
    display: block;
    font-weight: 500;
    font-size: 1.0625rem;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.philosophy-point p {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.65;
}

.philosophy-visual {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(42, 37, 32, 0.1);
}
.philosophy-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   VISIT / STEPS
   ============================================ */
.visit {
    padding: 120px 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.step-card {
    padding: 36px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--sand-mid);
    background: var(--white);
    transition: all var(--transition);
}
.step-card:hover {
    border-color: var(--terracotta-light);
    box-shadow: 0 12px 36px rgba(192, 108, 68, 0.08);
}

.step-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--sand);
    color: var(--terracotta);
    font-family: 'Instrument Serif', serif;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.step-title {
    font-family: 'Instrument Serif', serif;
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--charcoal);
}

.step-desc {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ============================================
   TESTIMONIAL
   ============================================ */
.testimonial {
    padding: 120px 0;
    background: var(--charcoal);
}

.testimonial-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--terracotta-light);
    margin-bottom: 40px;
}

.testimonial-inner blockquote {
    position: relative;
}

.quote-mark {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    color: var(--terracotta);
    opacity: 0.3;
}

.testimonial-inner p {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(1.375rem, 2.5vw, 1.875rem);
    line-height: 1.6;
    color: var(--sand);
    margin-bottom: 36px;
    font-style: italic;
}

.t-author {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--white);
}

.t-location {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
    padding: 120px 0;
}

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

.contact-intro {
    font-size: 1.0625rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 48px;
    max-width: 440px;
}

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

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.ci-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--sand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--terracotta);
}

.contact-item strong {
    display: block;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 6px;
}

.contact-item p,
.contact-item a {
    font-size: 1rem;
    color: var(--charcoal);
    line-height: 1.6;
}
.contact-item a:hover {
    color: var(--terracotta);
}

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

.form-title {
    font-family: 'Instrument Serif', serif;
    font-size: 1.75rem;
    margin-bottom: 8px;
    color: var(--charcoal);
}

.form-sub {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-bottom: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--sand-mid);
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--charcoal);
    background: var(--sand-light);
    transition: all var(--transition);
    outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--terracotta);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(192, 108, 68, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px;
    text-align: center;
    background: var(--sand-light);
    border-radius: var(--radius-sm);
    margin-top: 20px;
}
.form-success.show {
    display: flex;
}
.form-success svg {
    color: var(--terracotta);
}
.form-success p {
    font-size: 0.9375rem;
    color: var(--charcoal);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    padding: 64px 0 40px;
    background: var(--charcoal);
    border-top: 1px solid rgba(255,255,255,0.06);
}

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

.footer-top .logo-text {
    color: var(--sand);
}

.footer-links {
    display: flex;
    gap: 32px;
}
.footer-links a {
    font-size: 0.875rem;
    color: var(--text-light);
    transition: color var(--transition);
}
.footer-links a:hover {
    color: var(--sand);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--text-light);
}
.footer-bottom a {
    color: var(--terracotta-light);
    transition: color var(--transition);
}
.footer-bottom a:hover {
    color: var(--sand);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .hero-visual {
        max-width: 520px;
        margin: 0 auto;
        min-height: 480px;
    }
    .card-stat {
        left: 0;
    }
    .card-welcome {
        right: 0;
    }
    .intro .container,
    .philosophy-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .intro-content {
        max-width: 100%;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    .mobile-toggle {
        display: flex;
    }
    .mobile-nav {
        display: block;
    }
    .hero {
        padding-top: 112px;
        padding-bottom: 60px;
    }
    .hero-headline {
        font-size: clamp(2.25rem, 8vw, 3rem);
    }
    .hero-visual {
        min-height: 400px;
    }
    .floating-card {
        display: none;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .steps-grid {
        grid-template-columns: 1fr;
    }
    .contact-form-wrap {
        padding: 32px 24px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .footer-top {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
