/* ============================================
   The Institute for Sports Medicine
   Clean Minimalist — Terracotta & Sand Palette
   ============================================ */

/* CSS Custom Properties */
:root {
    --color-terracotta: #C05746;
    --color-terracotta-dark: #A04436;
    --color-terracotta-light: #D4786A;
    --color-sand: #E8D5C4;
    --color-sand-light: #F5EDE5;
    --color-sand-lighter: #FAF6F2;
    --color-sand-dark: #C4A882;
    --color-charcoal: #2A2522;
    --color-text: #3D3530;
    --color-text-light: #6B5E56;
    --color-text-muted: #9B8E86;
    --color-white: #FFFFFF;
    --color-border: #E8DDD5;
    
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--color-text);
    background-color: var(--color-sand-lighter);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: var(--color-terracotta);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-terracotta-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-charcoal);
}

/* Section Eyebrow */
.section-eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: var(--space-sm);
}

/* Section Title */
.section-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 300;
    color: var(--color-charcoal);
    margin-bottom: var(--space-md);
    line-height: 1.15;
}

/* Section Subtitle */
.section-subtitle {
    font-size: 1.05rem;
    color: var(--color-text-light);
    max-width: 560px;
    line-height: 1.8;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.875rem 2rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--color-terracotta-dark);
    border-color: var(--color-terracotta-dark);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(192, 87, 70, 0.25);
}

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

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

.btn-full {
    width: 100%;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 246, 242, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: all var(--transition);
}

.nav.scrolled {
    box-shadow: 0 1px 20px rgba(42, 37, 34, 0.06);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-charcoal);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-logo:hover {
    color: var(--color-terracotta);
}

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

.nav-logo-icon svg {
    width: 100%;
    height: 100%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 0.02em;
    position: relative;
    padding: 0.25rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-terracotta);
    transition: width var(--transition);
}

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

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

.nav-cta {
    background-color: var(--color-terracotta) !important;
    color: var(--color-white) !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 500 !important;
}

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

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

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background-color: var(--color-charcoal);
    transition: all var(--transition);
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-3xl) var(--space-md);
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        #C05746 0%,
        #D4786A 25%,
        #E8A08A 45%,
        #F5C4A8 60%,
        #E8D5C4 75%,
        #C4A882 100%
    );
    z-index: 0;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(192, 87, 70, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(232, 213, 196, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(160, 68, 54, 0.2) 0%, transparent 50%);
}

.hero-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(42, 37, 34, 0.25);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 780px;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 300;
    color: var(--color-white);
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

.hero-title-accent {
    font-style: italic;
    font-weight: 300;
    opacity: 0.9;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.8;
    max-width: 560px;
    margin: 0 auto var(--space-xl);
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-actions .btn-outline {
    border-color: rgba(255, 255, 255, 0.7);
    color: var(--color-white);
}

.hero-actions .btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-charcoal);
    border-color: var(--color-white);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: rgba(255, 255, 255, 0.6);
    animation: scrollBounce 2s ease-in-out infinite;
}

.hero-scroll-indicator svg {
    width: 24px;
    height: 24px;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: var(--space-3xl) 0;
}

/* ============================================
   Services
   ============================================ */
.services {
    background-color: var(--color-sand-lighter);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.service-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-xl) var(--space-lg);
    transition: all var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(42, 37, 34, 0.08);
    border-color: var(--color-terracotta-light);
}

.service-card-icon {
    width: 48px;
    height: 48px;
    color: var(--color-terracotta);
    margin-bottom: var(--space-md);
}

.service-card-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-size: 1.35rem;
    font-weight: 400;
    margin-bottom: var(--space-sm);
    color: var(--color-charcoal);
}

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

/* ============================================
   About
   ============================================ */
.about {
    background-color: var(--color-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.about-image-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 6/7;
}

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

.about-content .section-eyebrow {
    margin-bottom: var(--space-sm);
}

.about-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 300;
    color: var(--color-charcoal);
    margin-bottom: var(--space-lg);
    line-height: 1.2;
}

.about-text {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.85;
    margin-bottom: var(--space-md);
}

.about-stats {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 400;
    color: var(--color-terracotta);
    line-height: 1;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 400;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background-color: var(--color-border);
}

/* ============================================
   Approach
   ============================================ */
.approach {
    background-color: var(--color-sand-lighter);
}

.approach-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.approach-step {
    position: relative;
    padding: var(--space-xl) var(--space-md);
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.approach-step:hover {
    border-color: var(--color-terracotta-light);
    box-shadow: 0 8px 30px rgba(42, 37, 34, 0.06);
}

.step-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    color: var(--color-terracotta);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: var(--space-md);
    display: block;
}

.approach-step h3 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: var(--space-sm);
    color: var(--color-charcoal);
}

.approach-step p {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    line-height: 1.75;
}

/* ============================================
   Testimonial
   ============================================ */
.testimonial-section {
    background: linear-gradient(135deg, var(--color-terracotta) 0%, var(--color-terracotta-dark) 100%);
    padding: var(--space-3xl) 0;
}

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

.testimonial-quote {
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.3);
    margin: 0 auto var(--space-lg);
}

.testimonial-card blockquote {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 300;
    font-style: italic;
    color: var(--color-white);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.testimonial-attribution {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 400;
}

/* ============================================
   Contact
   ============================================ */
.contact {
    background-color: var(--color-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.contact-info .section-eyebrow {
    margin-bottom: var(--space-sm);
}

.contact-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 300;
    color: var(--color-charcoal);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.contact-text {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.85;
    margin-bottom: var(--space-xl);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-detail {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.contact-detail-icon {
    width: 40px;
    height: 40px;
    color: var(--color-terracotta);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-detail-icon svg {
    width: 100%;
    height: 100%;
}

.contact-detail-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.contact-detail p,
.contact-detail a {
    font-size: 0.9375rem;
    color: var(--color-text);
    line-height: 1.6;
}

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

/* Form */
.contact-form-wrapper {
    background-color: var(--color-sand-lighter);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
}

.contact-form h3 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-charcoal);
    margin-bottom: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-md);
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--color-text);
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-terracotta);
    box-shadow: 0 0 0 3px rgba(192, 87, 70, 0.1);
}

.form-note {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--space-sm);
}

.form-success {
    text-align: center;
    padding: var(--space-xl);
}

.form-success svg {
    width: 56px;
    height: 56px;
    color: var(--color-terracotta);
    margin: 0 auto var(--space-md);
}

.form-success h4 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-charcoal);
    margin-bottom: var(--space-sm);
}

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

/* ============================================
   Map
   ============================================ */
.map-section {
    border-top: 1px solid var(--color-border);
}

.map-section iframe {
    filter: grayscale(30%) contrast(1.05);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--color-charcoal);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: var(--space-sm);
}

.footer-logo svg {
    color: var(--color-terracotta-light);
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.55);
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: var(--space-md);
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color var(--transition);
}

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

.footer-contact p {
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.footer-contact a {
    color: var(--color-terracotta-light);
    text-decoration: none;
}

.footer-contact a:hover {
    color: var(--color-white);
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.35);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .approach-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }
}

@media (max-width: 768px) {
    :root {
        --space-3xl: 5rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--color-sand-lighter);
        flex-direction: column;
        justify-content: center;
        gap: var(--space-md);
        padding: var(--space-xl);
        border-left: 1px solid var(--color-border);
        transition: right var(--transition);
        z-index: 999;
    }
    
    .nav-links.open {
        right: 0;
    }
    
    .nav-links a {
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image-wrapper {
        aspect-ratio: 4/3;
    }
    
    .approach-steps {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .about-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .stat-divider {
        width: 48px;
        height: 1px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .hero {
        padding: var(--space-2xl) var(--space-sm);
    }
    
    .service-card {
        padding: var(--space-lg) var(--space-md);
    }
    
    .contact-form-wrapper {
        padding: var(--space-md);
    }
}

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