:root {
    --bg: #f6f7f8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --line-strong: #d6dbe2;
    --accent: #1f4f78;
    --accent-dark: #183e5e;
    --accent-soft: #eef4f8;
    --accent-soft-2: #e4eef5;
    --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 20px 60px rgba(15, 23, 42, 0.08);
    --radius-lg: 28px;
    --radius-md: 22px;
    --nav-height: 76px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--accent);
}

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

::selection {
    background: var(--accent-soft-2);
    color: var(--text);
}

.btn {
    border-radius: 12px;
    font-weight: 600;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-dark);
    --bs-btn-hover-border-color: var(--accent-dark);
    --bs-btn-active-bg: #122f47;
    --bs-btn-active-border-color: #122f47;
}

.btn-outline-primary {
    --bs-btn-color: var(--accent);
    --bs-btn-border-color: #aebfcd;
    --bs-btn-hover-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-soft);
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-active-color: var(--accent);
    --bs-btn-active-bg: var(--accent-soft-2);
    --bs-btn-active-border-color: var(--accent);
}

/* Navigation */
.site-navbar {
    min-height: var(--nav-height);
    background: rgba(246, 247, 248, .88);
    border-bottom: 1px solid rgba(214, 219, 226, .7);
    backdrop-filter: blur(16px) saturate(145%);
    -webkit-backdrop-filter: blur(16px) saturate(145%);
    transition: background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
    z-index: 1030;
}

.site-navbar.is-scrolled {
    background: rgba(255, 255, 255, .94);
    border-bottom-color: rgba(214, 219, 226, .9);
    box-shadow: 0 8px 28px rgba(15, 23, 42, .05);
}

.navbar-brand,
.footer-brand {
    color: var(--text);
    text-decoration: none;
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: -.035em;
}

.navbar-brand span,
.footer-brand span {
    color: var(--accent);
}

.site-navbar .nav-link {
    position: relative;
    margin: 0 .05rem;
    padding: .7rem .72rem !important;
    color: #45505d;
    font-size: .96rem;
    font-weight: 500;
    transition: color .2s ease;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    color: var(--accent);
}

.site-navbar .nav-link.active::after {
    content: '';
    position: absolute;
    left: .72rem;
    right: .72rem;
    bottom: .3rem;
    height: 2px;
    border-radius: 999px;
    background: var(--accent);
}

.navbar-cta {
    padding: .62rem 1rem;
}

.navbar-toggler {
    border-color: var(--line-strong);
    border-radius: 10px;
    box-shadow: none !important;
}

/* Shared section language */
.hero-wrap {
    padding: 3rem 0 5.5rem;
    background:
        radial-gradient(circle at 14% 8%, rgba(31, 79, 120, .065), transparent 35%),
        linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
}

.hero-card {
    min-height: 610px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.hero-photo-wrap {
    min-height: 610px;
    background: #e9ecef;
    overflow: hidden;
}

.hero-photo {
    width: 100%;
    height: 100%;
    min-height: 610px;
    display: block;
    object-fit: cover;
    object-position: center center;
}

.hero-content {
    display: flex;
    align-items: center;
    padding: clamp(2rem, 5vw, 4rem);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin-bottom: 1rem;
    padding: .38rem .75rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .79rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.hero-title {
    margin: 0;
    max-width: 12ch;
    font-size: clamp(2.55rem, 5vw, 4.5rem);
    line-height: 1.02;
    font-weight: 430;
    letter-spacing: -.055em;
}

.hero-title span {
    display: inline-block;
    margin-left: .12em;
    color: #4b5563;
    font-size: .46em;
    font-weight: 500;
    letter-spacing: -.025em;
    white-space: nowrap;
}

.accent-divider {
    width: 72px;
    height: 4px;
    margin: 1.6rem 0;
    border-radius: 999px;
    background: var(--accent);
}

.hero-text {
    color: #273444;
    font-size: clamp(1.1rem, 1.7vw, 1.32rem);
    line-height: 1.65;
    font-weight: 430;
}

.hero-subtext {
    max-width: 34rem;
    margin-top: 1.35rem;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.75;
}

.hero-actions .btn {
    min-height: 48px;
    padding: .72rem 1.1rem;
}

.hero-contact {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    color: #8a94a2;
    font-size: .93rem;
}

.hero-contact a {
    color: #5f6b78;
    text-decoration: none;
}

.hero-contact a:hover {
    color: var(--accent);
}

.section-wrap {
    padding: 0 0 6rem;
}

.section-header {
    max-width: 49rem;
    margin-bottom: 2.25rem;
}

.section-title {
    margin: 0 0 .8rem;
    color: var(--text);
    font-size: clamp(2rem, 3.5vw, 3rem);
    line-height: 1.12;
    font-weight: 590;
    letter-spacing: -.035em;
}

.section-description {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.text-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 650;
}

.text-link i,
.service-link i,
.article-card-link i {
    transition: transform .2s ease;
}

.text-link:hover i,
.service-card:hover .service-link i,
.article-card-link:hover i {
    transform: translateX(3px);
}

/* Services */
.service-card {
    min-height: 290px;
    padding: 1.75rem;
    color: var(--text);
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.service-card:hover {
    color: var(--text);
    transform: translateY(-4px);
    border-color: #cfd9e1;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .075);
}

.service-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    margin-bottom: 1.45rem;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.4rem;
}

.service-title {
    margin: 0 0 .7rem;
    color: var(--text);
    font-size: 1.22rem;
    line-height: 1.35;
    font-weight: 650;
    letter-spacing: -.015em;
}

.service-text {
    margin-bottom: 1.25rem;
    color: var(--muted);
    font-size: .96rem;
    line-height: 1.7;
}

.service-link {
    color: var(--accent);
    font-size: .92rem;
    font-weight: 650;
}

/* Practice areas */
.section-sticky {
    top: calc(var(--nav-height) + 2rem);
}

.practice-list {
    border-top: 1px solid var(--line-strong);
}

.practice-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 1.2rem;
    padding: 1.65rem 0;
    border-bottom: 1px solid var(--line-strong);
}

.practice-number {
    padding-top: .2rem;
    color: #9aa4b2;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.practice-item h3 {
    margin: 0 0 .45rem;
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1.35;
    font-weight: 650;
    letter-spacing: -.018em;
}

.practice-item p {
    max-width: 52rem;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

/* About */
.about-panel {
    padding: clamp(2rem, 5vw, 4rem);
    background:
        radial-gradient(circle at 88% 12%, rgba(31, 79, 120, .09), transparent 34%),
        #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.about-copy {
    max-width: 44rem;
}

.about-facts {
    border-top: 1px solid var(--line);
}

.about-fact {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--line);
}

.about-fact-label {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.about-fact strong {
    font-size: 1.08rem;
    font-weight: 620;
}

/* Article cards on home */
.article-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.article-card-image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #e9ecef;
}

.article-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.article-card:hover .article-card-image {
    transform: scale(1.025);
}

.article-card-body {
    padding: 1.6rem;
}

.article-card h3 {
    margin: 0 0 .75rem;
    font-size: 1.3rem;
    line-height: 1.35;
    font-weight: 650;
    letter-spacing: -.02em;
}

.article-card h3 a {
    color: var(--text);
    text-decoration: none;
}

.article-card h3 a:hover {
    color: var(--accent);
}

.article-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 1.25rem;
    color: var(--muted);
    line-height: 1.65;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.article-card-link {
    color: var(--accent);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 650;
}

.empty-panel {
    padding: 2rem;
    background: #fff;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    color: var(--muted);
}

/* Clinic */
.clinic-panel {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.clinic-copy {
    padding: clamp(2rem, 4vw, 3.2rem);
}

.clinic-contact {
    display: grid;
    gap: .8rem;
    margin-top: 2rem;
    font-style: normal;
}

.clinic-contact > div {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #3e4956;
}

.clinic-contact i {
    width: 1.25rem;
    color: var(--accent);
    text-align: center;
}

.clinic-contact a {
    color: inherit;
    text-decoration: none;
}

.clinic-contact a:hover {
    color: var(--accent);
}

.clinic-map {
    min-height: 430px;
    background: #e8edf1;
}

.clinic-map iframe {
    width: 100%;
    height: 100%;
    min-height: 430px;
    display: block;
    border: 0;
}

/* Generic content pages */
main.container.py-5,
main > .container.py-5 {
    padding-top: 4.5rem !important;
    padding-bottom: 5rem !important;
}

.display-5,
.display-4 {
    letter-spacing: -.04em;
}

.card {
    border-color: var(--line);
    border-radius: 18px;
}

.list-group-item {
    background: transparent;
}

.form-control {
    border-color: var(--line-strong);
    border-radius: 12px;
}

.form-control:focus {
    border-color: #86a9c4;
    box-shadow: 0 0 0 .25rem rgba(31, 79, 120, .11);
}

.map-placeholder,
.placeholder-photo {
    min-height: 330px;
    background: linear-gradient(145deg, #edf0f2, #dfe5e9);
}

/* Article template */
.article-hero {
    height: min(62vh, 640px);
    min-height: 430px;
    background: #253443;
}

.article-hero-overlay {
    background: linear-gradient(90deg, rgba(7, 19, 30, .82) 0%, rgba(7, 19, 30, .52) 45%, rgba(7, 19, 30, .14) 100%);
}

.article-content {
    color: #26313d;
    font-size: 1.075rem;
    line-height: 1.82;
}

.article-content > *:first-child {
    margin-top: 0;
}

.article-content h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-size: clamp(1.65rem, 3vw, 2.1rem);
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: -.025em;
}

.article-content h3 {
    margin-top: 2.25rem;
    margin-bottom: .8rem;
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 650;
}

.article-content p,
.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
}

.article-content li + li {
    margin-top: .35rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

.article-content table {
    width: 100%;
    margin: 1.75rem 0;
    border-collapse: collapse;
    font-size: .96rem;
}

.article-content th,
.article-content td {
    padding: .7rem .8rem;
    border: 1px solid var(--line-strong);
    vertical-align: top;
}

.article-content th {
    background: var(--surface-soft);
    font-weight: 650;
}

.article-note {
    margin: 1.75rem 0;
    padding: 1.1rem 1.25rem;
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
}

/* Footer */
.site-footer {
    margin-top: 1rem;
    background: #eef1f4;
    border-top: 1px solid var(--line-strong);
}

.footer-brand {
    font-size: 1.35rem;
}

.footer-intro {
    max-width: 31rem;
    color: var(--muted);
    line-height: 1.7;
}

.footer-heading {
    margin-bottom: .9rem;
    color: #4a5563;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.footer-links {
    display: grid;
    gap: .55rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #5d6875;
    font-size: .94rem;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
}

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

.footer-bottom {
    color: #77818d;
    border-top: 1px solid var(--line-strong);
    font-size: .84rem;
}

/* Reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .65s ease, transform .65s ease;
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal,
    .reveal.is-visible,
    .service-card,
    .article-card-image,
    .btn,
    .text-link i,
    .service-link i,
    .article-card-link i {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (max-width: 1199.98px) {
    .hero-card,
    .hero-photo-wrap,
    .hero-photo {
        min-height: 560px;
    }
}

@media (max-width: 991.98px) {
    :root {
        --nav-height: 68px;
    }

    .site-navbar .navbar-collapse {
        padding: .75rem 0 1rem;
    }

    .site-navbar .nav-link {
        padding: .65rem 0 !important;
    }

    .site-navbar .nav-link.active::after {
        display: none;
    }

    .hero-wrap {
        padding: 1.5rem 0 4.5rem;
    }

    .hero-card {
        min-height: 0;
    }

    .hero-photo-wrap,
    .hero-photo {
        min-height: 420px;
        max-height: 520px;
    }

    .hero-content {
        padding: 2.4rem 2rem 2.8rem;
    }

    .hero-title {
        max-width: none;
    }

    .section-wrap {
        padding-bottom: 4.5rem;
    }

    .section-sticky {
        position: static !important;
    }

    .service-card {
        min-height: 260px;
    }

    .clinic-map,
    .clinic-map iframe {
        min-height: 380px;
    }

    .article-hero {
        min-height: 380px;
    }
}

@media (max-width: 575.98px) {
    .container {
        --bs-gutter-x: 1.6rem;
    }

    .hero-card,
    .about-panel,
    .clinic-panel {
        border-radius: 22px;
    }

    .hero-photo-wrap,
    .hero-photo {
        min-height: 345px;
        max-height: 390px;
    }

    .hero-content {
        padding: 2rem 1.4rem 2.3rem;
    }

    .hero-title {
        font-size: clamp(2.45rem, 13vw, 3.4rem);
    }

    .hero-title span {
        display: block;
        margin: .38rem 0 0;
        font-size: .38em;
    }

    .hero-actions {
        display: grid !important;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .section-title {
        font-size: 2rem;
    }

    .service-card {
        min-height: 0;
        padding: 1.5rem;
    }

    .practice-item {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: .7rem;
    }

    .about-panel,
    .clinic-copy {
        padding: 1.7rem;
    }

    .clinic-map,
    .clinic-map iframe {
        min-height: 330px;
    }

    .article-hero {
        min-height: 340px;
    }

    .article-content {
        font-size: 1rem;
        line-height: 1.76;
    }
}
