*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* ── Colour tokens ── */
    --white: #FFFFFF;
    --off-white: #F6F6F6;
    --light-gray: #E8E8E8;
    --mid-gray: #888888;
    --dark-soft: #333333;
    --dark: #1A1A1A;
    --black: #0D0D0D;
    --accent-pale: #EBEBEB;
    --divider: rgba(0, 0, 0, 0.1);
    --shadow-soft: 0 4px 32px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 2px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.14);
    --radius: 2px;

    /* ── Font tokens (overridden by font-themes.css) ── */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', system-ui, sans-serif;
    --font-heading-weight: 600;
    --font-body-weight: 400;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: var(--font-body-weight);
    background: var(--off-white);
    color: var(--dark);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: var(--font-heading-weight);
    line-height: 1.15;
}

/* Type scale: H1 48px / H2 36px / H3 28px */
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.75rem; }

/* Small text: 14px */
small, .text-sm { font-size: 0.875rem; }

p { color: var(--dark-soft); }

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

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-dark {
    background: var(--dark);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--black);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

/* ─── EYEBROW ─── */
.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mid-gray);
    margin-bottom: 1rem;
}

/* ─── ORNAMENT ─── */
.ornament {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 auto 2rem;
    width: fit-content;
}

.ornament::before,
.ornament::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--dark);
    transform: scaleX(0);
}

.ornament::before { transform-origin: right center; }
.ornament::after  { transform-origin: left center; }

.ornament-dot {
    width: 5px;
    height: 5px;
    background: var(--dark);
    border-radius: 50%;
}

/* ─── HEADER ─── */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: all 0.4s ease;
}

header.scrolled {
    background: rgba(246, 246, 246, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--divider), 0 4px 24px rgba(0, 0, 0, 0.05);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.75rem 2rem;
    transition: padding 0.4s ease;
}

header.scrolled .nav {
    padding: 1.1rem 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-weight: var(--font-heading-weight);
    font-size: 1.95rem;
    color: var(--white);
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: color 0.3s, opacity 0.3s;
}

header.scrolled .logo {
    color: var(--dark);
}

.logo em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.55);
}

header.scrolled .logo em {
    color: var(--mid-gray);
}

/* ─── HERO ─── */
.hero {
    min-height: 88vh;
    background: linear-gradient(rgba(13, 13, 13, 0.62), rgba(13, 13, 13, 0.62)),
        url('../img/IMG_1020.PNG');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 10rem 0 7rem;
}

.hero-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-lines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 33%;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.05), transparent);
}

.hero-lines::after {
    content: '';
    position: absolute;
    top: 0;
    right: 33%;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.03), transparent);
}

.hero-inner {
    position: relative;
    text-align: center;
    max-width: 860px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 2rem;
}

.hero-badge::before,
.hero-badge::after {
    content: '';
    display: block;
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.35);
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.hero h1 em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.6);
}

.hero-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.05rem;
    font-weight: var(--font-body-weight);
    max-width: 560px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── TRUST STRIP ─── */
.trust-strip {
    background: var(--white);
    border-top: 1px solid var(--divider);
    border-bottom: 1px solid var(--divider);
}

.trust-strip-inner {
    display: flex;
    align-items: stretch;
}

.trust-item {
    flex: 1;
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    border-right: 1px solid var(--divider);
}

.trust-item:last-child {
    border-right: none;
}

.trust-item-icon {
    color: var(--dark);
    flex-shrink: 0;
}

.trust-item-label {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mid-gray);
    display: block;
    margin-bottom: 0.2rem;
}

.trust-item-value {
    font-family: var(--font-heading);
    font-weight: var(--font-heading-weight);
    font-size: 1rem;
    color: var(--dark);
}

@media (max-width: 760px) {
    .trust-strip-inner {
        flex-direction: column;
    }

    .trust-item {
        border-right: none;
        border-bottom: 1px solid var(--divider);
    }

    .trust-item:last-child {
        border-bottom: none;
    }
}

/* ─── SECTION SHARED ─── */
section {
    padding: 7rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4.5rem;
}

/* ─── PORTAL GRID ─── */
.practices-section {
    background: var(--off-white);
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    background: var(--divider);
    border: 1px solid var(--divider);
}

.portal-grid .card            { grid-column: span 2; }
.portal-grid .card:nth-child(4) { grid-column: 2 / span 2; }
.portal-grid .card:nth-child(5) { grid-column: 4 / span 2; }

.card {
    background: var(--white);
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

.card-img-wrap {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: grayscale(30%);
}

.card:hover .card-img-wrap img {
    transform: scale(1.04);
    filter: grayscale(0%);
}

.card-body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--dark);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover::after {
    transform: scaleX(1);
}

.card:hover {
    background: var(--off-white);
    z-index: 2;
    box-shadow: var(--shadow-hover);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-pale);
    color: var(--dark);
    margin-bottom: 2rem;
    border-radius: var(--radius);
    transition: all 0.3s;
}

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

.card-practice-label {
    font-family: var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mid-gray);
    display: block;
    margin-bottom: 0.5rem;
}

.card h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.card p {
    font-size: 0.9375rem;
    color: var(--mid-gray);
    line-height: 1.7;
    margin-bottom: 1.75rem;
    flex: 1;
}

.services-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2.5rem;
}

.tag {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    padding: 5px 12px;
    background: var(--light-gray);
    color: var(--dark-soft);
    border-radius: var(--radius);
    transition: all 0.25s;
}

.card:hover .tag {
    background: var(--accent-pale);
    color: var(--dark);
}

.btn-visit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    background: transparent;
    color: var(--dark);
    border: 1px solid rgba(26, 26, 26, 0.2);
    border-radius: var(--radius);
    transition: all 0.3s;
    align-self: flex-start;
}

.btn-visit:hover {
    background: var(--dark);
    border-color: var(--dark);
    color: var(--white);
}

.btn-visit svg {
    transition: transform 0.3s;
}

.btn-visit:hover svg {
    transform: translateX(3px);
}

.card-ctas {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .portal-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portal-grid .card,
    .portal-grid .card:nth-child(4),
    .portal-grid .card:nth-child(5) {
        grid-column: span 1;
    }
}

@media (max-width: 560px) {
    .portal-grid {
        grid-template-columns: 1fr;
    }

    .portal-grid .card,
    .portal-grid .card:nth-child(4),
    .portal-grid .card:nth-child(5) {
        grid-column: 1;
    }
}

/* ─── CTA SECTION ─── */
.cta-section {
    background: var(--dark);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section .eyebrow {
    color: rgba(255, 255, 255, 0.35);
    display: block;
    text-align: center;
    margin-bottom: 1.25rem;
}

.cta-section h2 {
    color: var(--white);
    font-style: italic;
    margin-bottom: 1rem;
}

.cta-section > .container > p {
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 2.5rem;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-hours {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.22);
    letter-spacing: 0.08em;
    display: block;
    margin-top: 1.5rem;
}

/* ─── FOOTER ─── */
.rich-footer {
    background: var(--black);
    padding: 5.5rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 4rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: var(--font-heading-weight);
    font-size: 1.2rem;
    color: var(--white);
    letter-spacing: 0.02em;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1.25rem;
    transition: opacity 0.3s;
}

.footer-logo em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.35);
}

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

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-links a,
.footer-links p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    line-height: 1.6;
}

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

.footer-bottom {
    margin-top: 4rem;
    padding: 1.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-bottom p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.18);
    text-align: center;
}

@media (max-width: 860px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 540px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── HEADER MOBILE ─── */
@media (max-width: 640px) {
    .nav {
        padding: 1rem 1.25rem;
    }

    header.scrolled .nav {
        padding: 0.75rem 1.25rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    header.scrolled .logo {
        font-size: 1.3rem;
    }

    .hero {
        background: linear-gradient(rgba(13, 13, 13, 0.62), rgba(13, 13, 13, 0.62)),
            url('../img/IMG_0990.jpg');
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
    }
}

/* ─── REVEAL ─── */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ══════════════════════════════════════════════════════
   MOTION & ANIMATION SYSTEM
══════════════════════════════════════════════════════ */

/* ─── Keyframes ─── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes lineDraw {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.07; transform: translate(-50%, -50%) scale(1); }
    50%       { opacity: 0.15; transform: translate(-50%, -50%) scale(1.12); }
}

/* ─── Scroll progress bar ─── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: var(--white);
    mix-blend-mode: difference;
    z-index: 300;
    pointer-events: none;
    transition: width 0.08s linear;
}

/* ─── Hero staggered entrance ─── */
.hero-badge {
    animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.hero h1 {
    animation: fadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.hero-desc {
    animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

.hero-btns {
    animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.75s both;
}

/* ─── Ornament line-draw on section reveal ─── */
.section-header.visible .ornament::before {
    animation: lineDraw 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both;
}

.section-header.visible .ornament::after {
    animation: lineDraw 0.85s cubic-bezier(0.22, 1, 0.36, 1) 1s both;
}

/* ─── Cards: fade-only reveal, transform free for hover ─── */
.card.reveal {
    transform: none;
}

.card {
    transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.48s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* ─── Card image gradient overlay ─── */
.card-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 13, 13, 0.38) 0%, transparent 58%);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

.card:hover .card-img-wrap::after {
    opacity: 1;
}

/* ─── Trust strip hover ─── */
.trust-item {
    cursor: default;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.28s ease;
}

.trust-item:hover {
    background: var(--off-white);
}

.trust-item-icon {
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.trust-item:hover .trust-item-icon {
    transform: scale(1.2) rotate(-8deg);
}

/* ─── Button shimmer ─── */
.btn-dark,
.btn-outline-white {
    position: relative;
    overflow: hidden;
}

.btn-dark::before,
.btn-outline-white::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.18) 50%,
        transparent 70%
    );
    background-size: 200% 100%;
    background-position: -200% center;
    pointer-events: none;
    opacity: 0;
}

.btn-dark:hover::before,
.btn-outline-white:hover::before {
    opacity: 1;
    animation: shimmer 0.55s ease forwards;
}

/* ─── Visit button arrow glide ─── */
.btn-visit svg {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-visit:hover svg {
    transform: translateX(5px);
}

/* ─── CTA section ambient glow ─── */
.cta-section::before {
    content: '';
    position: absolute;
    width: 650px;
    height: 650px;
    top: 50%;
    left: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
    animation: pulseGlow 9s ease-in-out infinite;
}

/* ─── Footer link underline slide ─── */
.footer-links a {
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.32s ease;
}

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

/* ─── Footer col reveal transition ─── */
.footer-col {
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Logo hover ─── */
.logo:hover,
.footer-logo:hover {
    opacity: 0.7;
}
