/* ============================================
   DR. GONZALEZ - MEDICAL WEBSITE STYLES
   Palette: Terracotta + Sand
   Fonts: Cormorant Garamond + Inter
============================================ */

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

:root {
    --terra-50: #FBF5F2;
    --terra-100: #F5E6DF;
    --terra-200: #EDCFC2;
    --terra-300: #E0B0A0;
    --terra-400: #D4917E;
    --terra-500: #B56C4A;
    --terra-600: #9A5538;
    --terra-700: #7D432D;
    --terra-800: #633524;
    --terra-900: #4E2A1D;

    --sand-50: #FDFCFA;
    --sand-100: #FAF7F2;
    --sand-200: #F3EDE2;
    --sand-300: #E8DFD0;
    --sand-400: #D6C7B4;
    --sand-500: #B8A48C;
    --sand-600: #968068;
    --sand-700: #7A6652;
    --sand-800: #5E4D3F;
    --sand-900: #44372E;

    --ink: #2A1F1A;
    --ink-light: #5C4A3F;
    --ink-muted: #8A7568;
    --white: #FFFFFF;

    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 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;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    color: var(--ink);
    background-color: var(--sand-50);
    line-height: 1.7;
    overflow-x: hidden;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

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

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

/* --- Section Headline --- */
.section-headline {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 300;
    line-height: 1.2;
    color: var(--ink);
    margin-bottom: 1.5rem;
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.875rem 2rem;
    border-radius: 2px;
    transition: all 0.3s var(--ease-smooth);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--terra-500);
    color: var(--white);
    border: 1px solid var(--terra-500);
}

.btn-primary:hover {
    background-color: var(--terra-600);
    border-color: var(--terra-600);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(181, 108, 74, 0.25);
}

.btn-ghost {
    background-color: transparent;
    color: var(--terra-600);
    border: 1px solid var(--terra-300);
}

.btn-ghost:hover {
    background-color: var(--terra-50);
    border-color: var(--terra-500);
}

.btn-outline {
    background-color: transparent;
    color: var(--terra-500);
    border: 1px solid var(--terra-300);
}

.btn-outline:hover {
    background-color: var(--terra-500);
    color: var(--white);
    border-color: var(--terra-500);
}

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

.btn-ghost-sm {
    font-size: 0.75rem;
    padding: 0.625rem 1.5rem;
    color: var(--terra-500);
    border: 1px solid var(--terra-300);
}

.btn-ghost-sm:hover {
    background-color: var(--terra-50);
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sand-200);
    transition: box-shadow 0.3s var(--ease-smooth);
}

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

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo-mark {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--terra-500);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--terra-300);
    border-radius: 2px;
}

.nav-logo-text {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: 0.01em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--ink-light);
    letter-spacing: 0.04em;
    transition: color 0.2s;
    position: relative;
}

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

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

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

.nav-cta {
    color: var(--terra-500) !important;
    border: 1px solid var(--terra-300);
    padding: 0.5rem 1.25rem;
    border-radius: 2px;
    transition: all 0.2s !important;
}

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

.nav-cta:hover {
    background-color: var(--terra-50);
    border-color: var(--terra-500);
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    padding: 4px 0;
}

.nav-toggle-line {
    display: block;
    width: 100%;
    height: 1.5px;
    background-color: var(--ink);
    border-radius: 1px;
    transition: all 0.3s var(--ease-smooth);
    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 Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--sand-50);
    z-index: 999;
    padding: 2rem;
}

.mobile-menu.open {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.mobile-menu-links {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu-links a {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--ink);
    transition: color 0.2s;
}

.mobile-menu-links a:hover {
    color: var(--terra-500);
}

.mobile-menu-cta {
    margin-top: 1rem;
    font-family: var(--font-sans) !important;
    font-size: 0.875rem !important;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--terra-500) !important;
    border: 1px solid var(--terra-300);
    padding: 0.75rem 2rem;
    border-radius: 2px;
}

/* --- Hero --- */
.hero {
    padding-top: 72px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero-inner {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-left {
    padding-right: 1rem;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--terra-500);
    margin-bottom: 1.5rem;
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 300;
    line-height: 1.25;
    color: var(--ink);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.hero-sub {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--ink-light);
    margin-bottom: 2.5rem;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 2rem;
    border-top: 1px solid var(--sand-200);
}

.hero-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hero-detail-label {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.hero-detail-value {
    font-size: 0.9375rem;
    color: var(--ink);
    font-weight: 400;
}

.hero-detail-value a {
    color: var(--terra-500);
    transition: color 0.2s;
}

.hero-detail-value a:hover {
    color: var(--terra-600);
    text-decoration: underline;
}

/* Hero Image */
.hero-right {
    position: relative;
}

.hero-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

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

.hero-image-accent {
    position: absolute;
    bottom: -12px;
    right: -12px;
    width: 60%;
    height: 40%;
    border: 1px solid var(--terra-300);
    border-radius: 4px;
    z-index: -1;
}

.hero-line {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, var(--terra-200), transparent);
}

/* --- About --- */
.about {
    padding: 8rem 0;
    background-color: var(--sand-50);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 5rem;
}

.about-right p {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--ink-light);
    margin-bottom: 1.25rem;
}

.about-stats {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 3rem 0;
    border-top: 1px solid var(--sand-200);
}

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

.stat-number {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--terra-500);
    line-height: 1.2;
}

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

.stat-divider {
    width: 1px;
    height: 48px;
    background-color: var(--sand-300);
    flex-shrink: 0;
}

/* --- Services --- */
.services {
    padding: 8rem 0;
    background-color: var(--terra-50);
}

.services .section-headline {
    margin-bottom: 3.5rem;
}

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

.service-card {
    background-color: var(--sand-50);
    border: 1px solid var(--sand-200);
    border-radius: 4px;
    padding: 2.25rem;
    transition: all 0.3s var(--ease-smooth);
}

.service-card:hover {
    border-color: var(--terra-300);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(181, 108, 74, 0.08);
}

.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--terra-200);
    border-radius: 2px;
    color: var(--terra-500);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

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

/* --- Approach --- */
.approach {
    padding: 8rem 0;
    background-color: var(--sand-50);
}

.approach-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.approach-image {
    border-radius: 4px;
    overflow: hidden;
}

.approach-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.approach-content {
    padding-left: 1rem;
}

.approach-items {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 3rem;
}

.approach-item {
    display: grid;
    grid-template-columns: 3rem 1fr;
    gap: 1.25rem;
    align-items: start;
}

.approach-num {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--terra-300);
    line-height: 1;
    padding-top: 0.25rem;
}

.approach-item h4 {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.approach-item p {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--ink-light);
    font-weight: 300;
}

/* --- Location --- */
.location {
    padding: 8rem 0;
    background-color: var(--sand-100);
}

.location .section-headline {
    margin-bottom: 3.5rem;
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 3rem;
    background-color: var(--sand-50);
    border: 1px solid var(--sand-200);
    border-radius: 4px;
}

.location-detail {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.location-detail svg {
    color: var(--terra-500);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

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

.location-detail-value {
    font-size: 1rem;
    color: var(--ink);
    font-weight: 400;
    line-height: 1.6;
}

.location-detail-value a {
    color: var(--terra-500);
    transition: color 0.2s;
}

.location-detail-value a:hover {
    color: var(--terra-600);
    text-decoration: underline;
}

.location-map {
    border-radius: 4px;
    overflow: hidden;
    min-height: 400px;
}

.location-map iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: block;
}

/* --- Contact --- */
.contact {
    padding: 8rem 0;
    background-color: var(--sand-50);
}

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

.contact-left p {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--ink-light);
    font-weight: 300;
    margin-bottom: 2.5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ink);
    font-size: 1rem;
}

.contact-info-item svg {
    color: var(--terra-500);
    flex-shrink: 0;
}

.contact-info-item a {
    color: var(--terra-500);
    transition: color 0.2s;
}

.contact-info-item a:hover {
    color: var(--terra-600);
    text-decoration: underline;
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 300;
    color: var(--ink);
    background-color: var(--sand-50);
    border: 1px solid var(--sand-300);
    border-radius: 2px;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--terra-400);
    box-shadow: 0 0 0 3px rgba(181, 108, 74, 0.08);
}

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

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

.form-privacy {
    font-size: 0.75rem;
    color: var(--ink-muted);
    text-align: center;
    margin-top: 0.5rem;
}

/* Success State */
.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
    padding: 3rem 2rem;
    height: 100%;
}

.form-success.visible {
    display: flex;
}

.form-success svg {
    color: var(--terra-500);
}

.form-success h3 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--ink);
}

.form-success p {
    font-size: 0.9375rem;
    color: var(--ink-light);
    line-height: 1.75;
    max-width: 320px;
}

/* --- Footer --- */
.footer {
    background-color: var(--ink);
    color: var(--sand-200);
    padding: 4rem 0 2rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(232, 223, 208, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo-mark {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--terra-400);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(181, 108, 74, 0.4);
    border-radius: 2px;
}

.footer-name {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    font-weight: 400;
    color: var(--sand-100);
}

.footer-tagline {
    display: block;
    font-size: 0.75rem;
    color: var(--sand-500);
    letter-spacing: 0.06em;
    margin-top: 0.125rem;
}

.footer-nav {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-nav a {
    font-size: 0.8125rem;
    color: var(--sand-400);
    transition: color 0.2s;
    letter-spacing: 0.04em;
}

.footer-nav a:hover {
    color: var(--terra-400);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    font-size: 0.8125rem;
    color: var(--sand-600);
}

.footer-bottom a {
    color: var(--sand-500);
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: var(--terra-400);
}

/* ============================================
   SCROLL REVEAL (progressive enhancement)
============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    }

    .reveal.revealed {
        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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 1024px) {
    .hero-inner {
        gap: 3rem;
    }

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

@media (max-width: 900px) {
    .about-grid,
    .approach-split,
    .location-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .approach-content {
        padding-left: 0;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        padding: 3rem 2rem;
        gap: 3rem;
    }

    .hero-left {
        padding-right: 0;
    }

    .hero-right {
        max-width: 500px;
    }

    .hero-image-accent {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        min-height: auto;
    }

    .hero-headline {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .hero-actions {
        flex-direction: column;
    }

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

    .about-stats {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .stat-divider {
        width: 48px;
        height: 1px;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-top {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-brand {
        flex-direction: column;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.25rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    .nav-inner {
        padding: 0 1.25rem;
    }

    .hero-inner {
        padding: 2.5rem 1.25rem;
    }

    .location-info {
        padding: 2rem 1.5rem;
    }
}
