/* =====================================================================
   Trinity Compassionate Care Companion — "Heartbeat" theme
   Tailwind (CDN) handles utilities; this file holds components,
   motion and accessibility modes.
   ===================================================================== */

:root {
    --navy: #0C3865;
    --navy-900: #0A2C50;
    --navy-950: #061A31;
    --pulse: #1D9FD3;
    --pulse-700: #147BA6;
    --pulse-300: #7FCBEA;
    --pulse-50: #EEF8FD;
    --mist: #F3F8FC;
    --line: #DCE8F2;
    --card: #FFFFFF;
    --text: #334155;
    --heading: #0C3865;
    --header-h: 84px;
    --radius: 18px;
    --shadow: 0 18px 40px -26px rgba(12, 56, 101, .55);
    color-scheme: light;
}
html.dark {
    --line: rgba(255, 255, 255, .1);
    --card: #0B223D;
    --text: #CBD5E1;
    --heading: #FFFFFF;
    --shadow: 0 18px 40px -24px rgba(0, 0, 0, .8);
    color-scheme: dark;
}

html { font-size: 106.25%; } /* 17px base: easier to read for seniors */
html.a11y-text-1 { font-size: 118.75%; }
html.a11y-text-2 { font-size: 131.25%; }
body { overflow-x: hidden; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: Poppins, ui-sans-serif, system-ui, sans-serif; }

/* ---------- Accessibility basics ---------- */
.skip-link {
    position: fixed; left: 1rem; top: -100px; z-index: 100;
    background: var(--navy); color: #fff; padding: .75rem 1.1rem; border-radius: 10px; font-weight: 700;
    transition: top .2s;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--pulse); outline-offset: 3px; border-radius: 6px; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .55rem;
    padding: .78rem 1.35rem; border-radius: 999px;
    font-family: Poppins, sans-serif; font-weight: 600; font-size: .9rem; line-height: 1.2;
    transition: background-color .25s, color .25s, border-color .25s, transform .25s;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--pulse-700); color: #fff; }
.btn-primary:hover { background: var(--navy); }
html.dark .btn-primary:hover { background: #fff; color: var(--navy); }
.btn-ghost { border: 2px solid rgba(255, 255, 255, .75); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: var(--pulse-50); }
.btn-outline { border: 2px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
html.dark .btn-outline { border-color: var(--pulse-300); color: #fff; }

/* ---------- Header ---------- */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 50;
    height: var(--header-h); display: flex; align-items: center;
    background: transparent;
    transition: background-color .35s, box-shadow .35s, height .35s;
}
.site-header.is-solid {
    --header-h: 70px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 30px -22px rgba(12, 56, 101, .6);
    backdrop-filter: blur(10px);
}
html.dark .site-header.is-solid { background: rgba(6, 23, 43, .94); }
.brand img { height: 54px; width: auto; transition: height .35s; }
.site-header.is-solid .brand img { height: 46px; }
.brand .brand-dark { display: none; }
.site-header.is-solid .brand .brand-light { display: none; }
.site-header.is-solid .brand .brand-dark { display: block; }
html.dark .site-header.is-solid .brand .brand-light { display: block; }
html.dark .site-header.is-solid .brand .brand-dark { display: none; }

.nav-link {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .55rem .8rem; border-radius: 999px;
    font-family: Poppins, sans-serif; font-weight: 500; font-size: .88rem;
    color: #fff; position: relative; transition: color .25s, background-color .25s;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { background: rgba(255, 255, 255, .14); }
.nav-link.is-active::after {
    content: ""; position: absolute; left: 50%; bottom: .2rem; width: 18px; height: 3px; border-radius: 3px;
    background: var(--pulse); transform: translateX(-50%);
}
.site-header.is-solid .nav-link { color: var(--navy); }
.site-header.is-solid .nav-link:hover, .site-header.is-solid .nav-link[aria-expanded="true"] { background: var(--pulse-50); }
html.dark .site-header.is-solid .nav-link { color: #E2E8F0; }
html.dark .site-header.is-solid .nav-link:hover { background: rgba(255, 255, 255, .08); }

.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; top: calc(100% + 10px); left: 50%;
    min-width: 260px; padding: .5rem; border-radius: 16px;
    background: #fff; box-shadow: 0 26px 50px -24px rgba(12, 56, 101, .55); border: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translate(-50%, 8px) rotateX(-12deg); transform-origin: top center;
    transition: opacity .25s, transform .3s, visibility .25s;
}
html.dark .dropdown-menu { background: #0B223D; }
.dropdown [aria-expanded="true"] + .dropdown-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0) rotateX(0); }
.dropdown [aria-expanded="true"] .fa-chevron-down { transform: rotate(180deg); }
.dropdown-menu a {
    display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; border-radius: 10px;
    color: var(--navy); font-size: .93rem; font-weight: 600;
}
.dropdown-menu a i { width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 9px; background: var(--pulse-50); color: var(--pulse-700); font-size: .85rem; }
.dropdown-menu a:hover, .dropdown-menu a.is-active { background: var(--pulse-50); }
html.dark .dropdown-menu a { color: #E2E8F0; }
html.dark .dropdown-menu a:hover, html.dark .dropdown-menu a.is-active { background: rgba(255, 255, 255, .06); }
html.dark .dropdown-menu a i { background: rgba(127, 203, 234, .12); color: var(--pulse-300); }

.header-phone { align-items: center; gap: .6rem; color: #fff; }
.header-phone__icon { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .15); animation: ring 3.5s ease-in-out infinite; }
.site-header.is-solid .header-phone { color: var(--navy); }
.site-header.is-solid .header-phone__icon { background: var(--pulse-50); color: var(--pulse-700); }
html.dark .site-header.is-solid .header-phone { color: #fff; }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(-14deg); } 78% { transform: rotate(14deg); } 82% { transform: rotate(-8deg); } 86% { transform: rotate(0); } }

.menu-toggle {
    width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 12px;
    background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.15rem;
}
@media (min-width: 1280px) { .site-header .menu-toggle { display: none; } }
.site-header.is-solid .menu-toggle { background: var(--pulse-50); color: var(--navy); }
html.dark @media (min-width: 1280px) { .site-header .menu-toggle { display: none; } }
.site-header.is-solid .menu-toggle { background: rgba(255, 255, 255, .08); color: #fff; }

.mobile-menu { position: fixed; inset: 0; z-index: 60; }
.mobile-menu__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .3s; }
.mobile-menu__panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 380px); overflow-y: auto;
    background: var(--navy-950); padding: 1.25rem 1.25rem 2rem; transform: translateX(100%); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.mobile-menu__panel .menu-toggle { background: rgba(255, 255, 255, .1); color: #fff; }
.mobile-menu.is-open .mobile-menu__backdrop { opacity: 1; }
.mobile-menu.is-open .mobile-menu__panel { transform: translateX(0); }
.m-link { display: flex; align-items: center; padding: .8rem .9rem; border-radius: 12px; color: #fff; font-family: Poppins, sans-serif; font-weight: 500; }
.m-link:hover, .m-link[aria-current="page"] { background: rgba(255, 255, 255, .08); color: var(--pulse-300); }
.m-link[aria-expanded="true"] i { transform: rotate(180deg); }
.m-sub { padding: .25rem 0 .5rem .6rem; }
.m-sub a { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; border-radius: 10px; color: #CBD5E1; font-size: .95rem; }
.m-sub a i { color: var(--pulse-300); width: 1.1rem; text-align: center; }
.m-sub a:hover, .m-sub a[aria-current="page"] { background: rgba(255, 255, 255, .06); color: #fff; }

/* ---------- Shared ---------- */
.overlay-50 { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.section { padding: 4.25rem 0; }
.section-tight { padding: 3.25rem 0; }
@media (min-width: 1024px) { .section { padding: 5rem 0; } }
.section-title {
    font-family: Poppins, sans-serif; font-weight: 700; color: var(--heading);
    font-size: clamp(1.55rem, 1.15rem + 1.3vw, 2.2rem); line-height: 1.2; letter-spacing: -.01em;
}
.kicker {
    display: inline-flex; align-items: center; gap: .55rem; margin-bottom: .6rem;
    color: var(--pulse-700); font-weight: 700; font-size: .95rem;
}
.kicker::before {
    content: ""; width: 28px; height: 12px; flex: none;
    background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 12'%3E%3Cpath d='M0 6h8l2-5 3 10 3-8 2 3h10' fill='none' stroke='%231D9FD3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html.dark .kicker { color: var(--pulse-300); }
.read-more { display: inline-flex; align-items: center; gap: .5rem; margin-top: .9rem; font-family: Poppins, sans-serif; font-weight: 600; font-size: .88rem; color: var(--pulse-700); }
html.dark .read-more { color: var(--pulse-300); }
.read-more i { transition: transform .25s; }
.live-dot { width: .6rem; height: .6rem; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: live 1.8s infinite; flex: none; }
@keyframes live { 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

/* ---------- ECG (signature element) ---------- */
.ecg { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; pointer-events: none; z-index: 2; }
.ecg svg { width: 100%; height: 100%; }
.ecg path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ecg__base { stroke: rgba(255, 255, 255, .22); stroke-width: 1.5; }
.ecg__beat {
    stroke: var(--pulse-300); stroke-width: 2.5;
    stroke-dasharray: 140 860; stroke-dashoffset: 1000;
    filter: drop-shadow(0 0 6px rgba(127, 203, 234, .9));
    animation: beat 3.4s linear infinite;
}
@keyframes beat { to { stroke-dashoffset: 0; } }

/* ---------- Hero ---------- */
.hero {
    position: relative; isolation: isolate; overflow: hidden;
    height: 100vh; height: 100svh; min-height: 34rem;
    display: flex; align-items: center; background: var(--navy-950);
}
.hero__slides { position: absolute; inset: 0; z-index: -1; }
.hero__slide {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transform: scale(1.06);
    transition: opacity 1.4s ease, transform 7s ease-out;
}
.hero__slide.is-active { opacity: 1; transform: scale(1); }
.hero .overlay-50 { z-index: 0; }
.hero__content { position: relative; z-index: 1; padding-top: calc(var(--header-h) + 1rem); padding-bottom: 5.5rem; }
.hero-tag {
    display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .95rem; border-radius: 999px;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); color: #fff; font-weight: 600; font-size: .9rem;
}
.hero-title { font-weight: 700; font-size: clamp(1.95rem, 1.1rem + 3.1vw, 3.4rem); line-height: 1.1; letter-spacing: -.015em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; transform: translateY(105%); animation: rise .9s cubic-bezier(.2, .8, .2, 1) forwards; }
.hero-title .line:nth-child(2) > span { animation-delay: .12s; }
.hero-title .line:nth-child(3) > span { animation-delay: .24s; }
.hero-copy, .hero-cta, .hero-tag { opacity: 0; animation: fadeIn .8s .45s ease forwards; }
.hero-tag { animation-delay: .05s; }
.hero-cta { animation-delay: .6s; }
@keyframes rise { to { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-hero .hero-title { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.8rem); }

.hero__controls { position: absolute; z-index: 3; right: max(1rem, calc((100vw - 76rem) / 2 + 1.5rem)); bottom: 4.6rem; display: flex; align-items: center; gap: .8rem; }
.hero__dot { width: 34px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .4); transition: background-color .3s, width .3s; }
.hero__dot.is-active { background: #fff; width: 48px; }
.hero__dot::before { content: ""; display: block; height: 24px; margin-top: -9px; } /* larger touch target */
.hero__pause { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .15); font-size: .8rem; }

.pulse-card {
    position: relative; margin-left: auto; max-width: 25rem; padding: 1.6rem; border-radius: 26px;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transform-style: preserve-3d; transition: transform .25s ease-out;
    opacity: 0; animation: fadeIn .9s .7s ease forwards;
}
.pulse-card__heart { width: 3.2rem; height: 3.2rem; border-radius: 16px; display: grid; place-items: center; background: var(--pulse-700); color: #fff; font-size: 1.35rem; animation: heart 1.4s ease-in-out infinite; }
@keyframes heart { 0%, 40%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 28% { transform: scale(1.04); } }
.pulse-card__cell { padding: .75rem .9rem; border-radius: 14px; background: rgba(255, 255, 255, .1); }
.mini-ecg { width: 100%; height: 56px; margin: 1rem 0; }
.mini-ecg path { fill: none; stroke: var(--pulse-300); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 2.6s ease-in-out infinite; }
@keyframes draw { 0% { stroke-dashoffset: 1000; } 60%, 100% { stroke-dashoffset: 0; } }

/* ---------- Quick actions ---------- */
.quick { background: var(--navy); }
html.dark .quick { background: var(--navy-950); border-bottom: 1px solid var(--line); }
.quick__item { display: flex; align-items: center; gap: .9rem; padding: 1.15rem 1.1rem; height: 100%; border-right: 1px solid rgba(255, 255, 255, .1); transition: background-color .25s; }
.quick li:last-child .quick__item { border-right: 0; }
.quick__item:hover { background: rgba(255, 255, 255, .06); }
.quick__icon { width: 2.9rem; height: 2.9rem; flex: none; display: grid; place-items: center; border-radius: 14px; background: rgba(127, 203, 234, .16); color: var(--pulse-300); font-size: 1.15rem; transition: transform .3s; }
.quick__item:hover .quick__icon { transform: rotateY(180deg); }
@media (max-width: 1023px) { .quick li:nth-child(2) .quick__item { border-right: 0; } .quick li:nth-child(-n+2) .quick__item { border-bottom: 1px solid rgba(255, 255, 255, .1); } }
@media (max-width: 479px) { .quick__item { flex-direction: column; align-items: flex-start; gap: .55rem; } }

/* ---------- Photo deck (light 3D) ---------- */
.photo-deck { position: relative; max-width: 30rem; margin: 0 auto; padding: 1.5rem 2.5rem 2rem 1rem; perspective: 1200px; transform-style: preserve-3d; transition: transform .25s ease-out; }
.photo-deck__card { border-radius: 24px; overflow: hidden; background: var(--pulse-50); box-shadow: var(--shadow); }
.photo-deck__card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-deck__card--front { position: relative; z-index: 3; border: 6px solid var(--card); }
.photo-deck__card--front img { height: auto; min-height: 16rem; }
.photo-deck__next { position: absolute; z-index: 5; right: 1.2rem; bottom: .2rem; width: 2.8rem; height: 2.8rem; border-radius: 50%; display: grid; place-items: center; background: var(--pulse-700); color: #fff; box-shadow: var(--shadow); transform: translateZ(40px); }
.photo-deck.is-flipping .photo-deck__card--front { animation: deckOut .5s ease; }
@keyframes deckOut { 0% { transform: none; } 50% { transform: translate3d(-12%, 4%, 60px) rotate(-8deg); opacity: .2; } 100% { transform: none; } }
.photo-deck__card--mid, .photo-deck__card--back { position: absolute; inset: 1.5rem 2.5rem 2rem 1rem; }
.photo-deck__card--mid { z-index: 2; transform: translate3d(1.6rem, -0.6rem, -40px) rotate(5deg); }
.photo-deck__card--back { z-index: 1; transform: translate3d(2.8rem, -1.2rem, -80px) rotate(10deg); opacity: .9; }
.photo-deck__badge {
    position: absolute; z-index: 4; left: -.25rem; bottom: .5rem;
    display: flex; align-items: center; gap: .7rem; padding: .8rem 1.1rem; border-radius: 16px;
    background: var(--navy); color: #fff; font-family: Poppins, sans-serif; font-weight: 600; font-size: .92rem;
    box-shadow: var(--shadow); transform: translateZ(40px);
}
.photo-deck__badge i { color: var(--pulse-300); font-size: 1.2rem; }

/* ---------- Tabs ---------- */
.tabs__list { display: flex; flex-wrap: wrap; gap: .4rem; padding: .35rem; border-radius: 16px; background: var(--pulse-50); }
html.dark .tabs__list { background: rgba(255, 255, 255, .05); }
.tabs__list [role="tab"] { flex: 1 1 auto; padding: .65rem .95rem; border-radius: 12px; font-family: Poppins, sans-serif; font-weight: 600; font-size: .86rem; color: var(--navy); transition: background-color .25s, color .25s; }
html.dark .tabs__list [role="tab"] { color: #CBD5E1; }
.tabs__list [aria-selected="true"] { background: var(--navy); color: #fff !important; box-shadow: var(--shadow); }
.tabs__panel { padding: 1.1rem .2rem 0; animation: fadeIn .4s ease; }
.tab-link { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--heading); font-weight: 600; transition: border-color .25s, transform .25s; }
.tab-link i { color: var(--pulse-700); width: 1.2rem; text-align: center; }
html.dark .tab-link i { color: var(--pulse-300); }
.tab-link:hover { border-color: var(--pulse); transform: translateX(4px); }

/* ---------- Service slider + cards ---------- */
.slider__track {
    display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    padding: .5rem max(1rem, calc((100vw - 76rem) / 2 + 1.5rem)) 1.75rem;
    scroll-padding-inline: max(1rem, calc((100vw - 76rem) / 2 + 1.5rem));
    scrollbar-width: none; perspective: 1400px;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__slide { flex: 0 0 clamp(260px, 78vw, 350px); scroll-snap-align: start; transform: rotateY(var(--ry, 0deg)) scale(var(--sc, 1)); transition: transform .35s ease-out; }
.slider-btn { width: 2.9rem; height: 2.9rem; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--navy); color: var(--navy); transition: background-color .25s, color .25s, opacity .25s; }
.slider-btn:hover:not(:disabled) { background: var(--navy); color: #fff; }
.slider-btn:disabled { opacity: .35; cursor: not-allowed; }
html.dark .slider-btn { border-color: var(--pulse-300); color: #fff; }

.svc-card { position: relative; display: flex; flex-direction: column; height: 100%; border-radius: 22px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .35s, box-shadow .35s; }
.svc-card:hover { transform: translateY(-6px); }
.svc-card__media { display: block; aspect-ratio: 793 / 468; overflow: hidden; background: var(--pulse-50); }
.svc-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.svc-card:hover .svc-card__media img { transform: scale(1.05); }
.svc-card__icon { position: absolute; left: 1.25rem; top: 1rem; z-index: 2; width: 3rem; height: 3rem; border-radius: 14px; display: grid; place-items: center; background: #fff; color: var(--pulse-700); font-size: 1.2rem; box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .55); }
.svc-card__body { padding: 1.25rem 1.35rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.svc-card__body .read-more { margin-top: auto; padding-top: .9rem; }
.svc-card:hover .read-more i { transform: translateX(5px); }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.svc-card:focus-within { outline: 3px solid var(--pulse); outline-offset: 3px; }
.svc-card .stretched:focus-visible { outline: none; }

/* ---------- Values, hours ---------- */
.value-chip { display: flex; align-items: center; gap: .65rem; padding: .8rem 1rem; border-radius: 14px; background: var(--pulse-50); color: var(--navy); font-weight: 700; }
.value-chip i { color: var(--pulse-700); }
html.dark .value-chip { background: rgba(255, 255, 255, .05); color: #fff; }
html.dark .value-chip i { color: var(--pulse-300); }

.hours-card { perspective: 1000px; }
.hours-card__inner { padding: 1.6rem; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .25s ease-out; transform-style: preserve-3d; }
.hours-card__icon { width: 3rem; height: 3rem; border-radius: 14px; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 1.25rem; flex: none; }
.hours-row { border-bottom: 1px dashed var(--line); color: var(--heading); }
.hours-row:last-child { border-bottom: 0; }
.hours-row.is-today th, .hours-row.is-today td { color: var(--pulse-700); }
html.dark .hours-row.is-today th, html.dark .hours-row.is-today td { color: var(--pulse-300); }
.today-tag { margin-left: .4rem; padding: .1rem .5rem; border-radius: 999px; background: var(--pulse-50); font-size: .72rem; font-weight: 700; color: var(--pulse-700); }
html.dark .today-tag { background: rgba(127, 203, 234, .14); color: var(--pulse-300); }

/* ---------- Appointment band ---------- */
.appointment { position: relative; isolation: isolate; overflow: hidden; background: var(--navy-950); }
.appointment > img, .appointment > .overlay-50 { z-index: -1; }
.discount { color: var(--pulse-300); font-size: 1.15em; }
.field {
    width: 100%; padding: .85rem 1rem; border-radius: 14px; border: 1.5px solid #C7D7E6; background: #fff; color: #0F172A;
    font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.field::placeholder { color: #64748B; }
.field:focus { outline: none; border-color: var(--pulse-700); box-shadow: 0 0 0 4px rgba(29, 159, 211, .25); }
.field[aria-invalid="true"] { border-color: #B42318; box-shadow: 0 0 0 3px rgba(180, 35, 24, .15); }
html.dark .field { background: #06172B; border-color: rgba(255, 255, 255, .18); color: #fff; }
html.dark .field::placeholder { color: #94A3B8; }
.field--glass { border-color: transparent; }
html.dark .field--glass { background: #fff; color: #0F172A; }
.field-label { display: block; margin-bottom: .4rem; font-weight: 700; color: var(--heading); font-size: .95rem; }
.sub-label { display: block; margin-bottom: .3rem; font-size: .85rem; color: #475569; }
html.dark .sub-label { color: #94A3B8; }
.form-card { padding: 1.75rem; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (min-width: 640px) { .form-card { padding: 2.25rem; } }
.form-status:empty { display: none; }
.form-status.is-ok { padding: .8rem 1rem; border-radius: 12px; background: #ECFDF3; color: #05603A; font-weight: 600; }
.form-status.is-error { padding: .8rem 1rem; border-radius: 12px; background: #FEF3F2; color: #B42318; font-weight: 600; }
button[aria-busy="true"] { opacity: .7; cursor: progress; }

/* ---------- Info cards + map ---------- */
.info-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.info-card__icon { width: 2.8rem; height: 2.8rem; flex: none; display: grid; place-items: center; border-radius: 13px; background: var(--pulse-50); color: var(--pulse-700); font-size: 1.05rem; }
html.dark .info-card__icon { background: rgba(127, 203, 234, .12); color: var(--pulse-300); }
.info-card__label { display: block; font-size: .85rem; color: #64748B; margin-bottom: .1rem; }
html.dark .info-card__label { color: #94A3B8; }
.map-frame { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); min-height: 320px; background: var(--pulse-50); }
.map-frame iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; }
.map-frame--wide iframe { min-height: 400px; }

/* ---------- Inner page hero ---------- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; height: clamp(350px, 50vh, 440px); background: var(--navy-950); }
.page-hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-hero .overlay-50 { z-index: -1; }
.page-hero .hero-title .line > span { animation: none; transform: none; }
.page-hero h1 { animation: fadeIn .7s ease both; }

/* ---------- Service page ---------- */
.service-figure { position: relative; border-radius: 24px; overflow: hidden; background: var(--pulse-50); box-shadow: var(--shadow); }
.service-figure img { display: block; width: 100%; height: auto; }
.service-figure__icon { position: absolute; right: 1rem; bottom: 1rem; width: 3.4rem; height: 3.4rem; border-radius: 16px; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 1.35rem; }
.approach { padding: 1.4rem 1.5rem; border-radius: 18px; background: var(--pulse-50); border-left: 4px solid var(--pulse); }
html.dark .approach { background: rgba(255, 255, 255, .04); }
.item-row { display: flex; align-items: center; gap: .85rem; padding: .75rem .9rem; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--heading); font-weight: 600; font-size: .97rem; transition: border-color .25s, transform .25s; }
.item-row:hover { border-color: var(--pulse); transform: translateX(3px); }
.item-row__icon, .feature-card__icon { width: 2.4rem; height: 2.4rem; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--pulse-50); color: var(--pulse-700); }
html.dark .item-row__icon, html.dark .feature-card__icon { background: rgba(127, 203, 234, .12); color: var(--pulse-300); }
.feature-card { display: flex; gap: .9rem; padding: 1.1rem; border-radius: 16px; border: 1px solid var(--line); background: var(--card); }
.outro { position: relative; padding: 1.5rem 1.6rem 1.5rem 4.2rem; border-radius: 20px; background: var(--navy); color: #fff; line-height: 1.7; }
.outro::before { content: "\f004"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 1.4rem; top: 1.5rem; color: var(--pulse-300); font-size: 1.3rem; animation: heart 1.4s ease-in-out infinite; }
html.dark .outro { background: #0B223D; border: 1px solid var(--line); }
.pn-link { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--heading); font-family: Poppins, sans-serif; font-weight: 600; transition: border-color .25s; }
.pn-link small { display: block; font-family: "Nunito Sans", sans-serif; font-weight: 600; font-size: .8rem; color: #64748B; }
.pn-link--next { justify-content: flex-end; text-align: right; }
.pn-link:hover { border-color: var(--pulse); }
.pn-link i { color: var(--pulse-700); }
.side-card { padding: 1.4rem; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.side-card__title { font-family: Poppins, sans-serif; font-weight: 700; font-size: 1rem; color: var(--heading); }
.side-link { display: flex; align-items: center; gap: .75rem; padding: .55rem .75rem; border-radius: 11px; color: var(--text); font-weight: 600; font-size: .95rem; transition: background-color .2s, color .2s; }
.side-link i { width: 1.1rem; text-align: center; color: var(--pulse-700); }
html.dark .side-link i { color: var(--pulse-300); }
.side-link:hover { background: var(--pulse-50); color: var(--navy); }
.side-link.is-active { background: var(--navy); color: #fff; }
.side-link.is-active i { color: var(--pulse-300); }
html.dark .side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.help-card { padding: 1.5rem; border-radius: 22px; background: var(--navy); }
html.dark .help-card { background: var(--navy-950); border: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: var(--navy-950); color: #CBD5E1; }
.ecg-divider { height: 40px; overflow: hidden; }
.ecg-divider svg { display: block; width: 100%; height: 100%; }
.ecg-divider path { fill: none; stroke: var(--pulse); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; opacity: .7; }
.footer-title { font-family: Poppins, sans-serif; font-weight: 600; color: #fff; margin-bottom: .9rem; font-size: 1rem; }
.footer-list li + li { margin-top: .5rem; }
.footer-list a, .site-footer address a { transition: color .2s; }
.footer-list a:hover, .site-footer address a:hover { color: var(--pulse-300); }

/* ---------- Floating controls + ADA panel ---------- */
.float-controls { position: fixed; left: 1rem; bottom: 1rem; z-index: 70; display: flex; flex-direction: column; gap: .6rem; }
.float-btn { width: 3.25rem; height: 3.25rem; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.35rem; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55); transition: transform .25s; }
.float-btn:hover { transform: scale(1.08); }
.float-btn--ada { background: var(--pulse-700); }
.float-btn--theme { background: var(--navy); font-size: 1.15rem; }
html.dark .float-btn--theme { background: #fff; color: var(--navy); }
.float-btn--theme .icon-sun { display: none; }
html.dark .float-btn--theme .icon-sun { display: block; }
html.dark .float-btn--theme .icon-moon { display: none; }
.ada-panel { position: fixed; left: 1rem; bottom: 8.6rem; z-index: 71; width: min(20.5rem, calc(100vw - 2rem)); max-height: calc(100vh - 10rem); overflow-y: auto; border-radius: 20px; background: #fff; box-shadow: 0 30px 60px -20px rgba(6, 26, 49, .6); border: 1px solid var(--line); animation: fadeIn .25s ease; }
html.dark .ada-panel { background: #0B223D; }
.ada-close { width: 2.2rem; height: 2.2rem; border-radius: 10px; display: grid; place-items: center; color: var(--heading); background: var(--pulse-50); }
html.dark .ada-close { background: rgba(255, 255, 255, .08); }
.ada-opt { display: flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.9rem; padding: .5rem .6rem; border-radius: 12px; border: 1.5px solid var(--line); color: var(--heading); font-weight: 700; font-size: .85rem; text-align: center; transition: background-color .2s, border-color .2s; }
.ada-opt:hover { border-color: var(--pulse); }
.ada-opt[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
html.dark .ada-opt[aria-pressed="true"] { background: var(--pulse-700); border-color: var(--pulse-700); }

/* ---------- Accessibility modes ---------- */
html.a11y-contrast { --f-con: contrast(1.35); }
html.a11y-gray { --f-gray: grayscale(1); }
html.a11y-contrast main, html.a11y-contrast .site-header, html.a11y-contrast .site-footer,
html.a11y-gray main, html.a11y-gray .site-header, html.a11y-gray .site-footer { filter: var(--f-con, ) var(--f-gray, ); }
html.a11y-contrast .overlay-50 { background: rgba(0, 0, 0, .7); }
html.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; }
html.a11y-links a:not(.btn) { color: #0047AB; }
html.dark.a11y-links a:not(.btn) { color: #FFE066; }
html.a11y-readable body, html.a11y-readable h1, html.a11y-readable h2, html.a11y-readable h3,
html.a11y-readable p, html.a11y-readable a, html.a11y-readable li, html.a11y-readable button, html.a11y-readable input, html.a11y-readable textarea { font-family: Verdana, Arial, sans-serif !important; }
html.a11y-spacing p, html.a11y-spacing li, html.a11y-spacing td, html.a11y-spacing th { line-height: 1.95 !important; letter-spacing: .04em !important; word-spacing: .12em !important; }
html.a11y-cursor, html.a11y-cursor * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 11-7 1 4 8-3 1-4-8-5 5z' fill='%23000' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E") 4 2, auto !important; }
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-still .hero-title .line > span { transform: none !important; }
html.a11y-still .hero-copy, html.a11y-still .hero-cta, html.a11y-still .hero-tag, html.a11y-still .pulse-card { opacity: 1 !important; }
html.a11y-still .mini-ecg path { stroke-dashoffset: 0 !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .hero-title .line > span { transform: none; }
    .hero-copy, .hero-cta, .hero-tag, .pulse-card { opacity: 1; }
    .ecg__beat { stroke-dashoffset: 0; stroke-dasharray: none; }
}
.appointment .section-title { color: #fff; }
.section-title--sm { font-size: clamp(1.3rem, 1.1rem + .7vw, 1.6rem); }
html.dark .map-frame, html.dark .service-figure, html.dark .svc-card__media, html.dark .photo-deck__card { background: #0B223D; }

/* Footer: same moving heartbeat line as the banner */
.footer-ecg { position: relative; height: 70px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.footer-ecg .ecg { inset: 0; height: 100%; }
.footer-ecg .ecg__beat { animation-delay: -1.7s; }

/* Mobile menu button: drawn with CSS so it always shows */
.menu-toggle { background: var(--navy) !important; color: #fff !important; box-shadow: 0 8px 18px -10px rgba(6, 26, 49, .7); }
.site-header:not(.is-solid) .menu-toggle { background: rgba(255, 255, 255, .18) !important; border: 1px solid rgba(255, 255, 255, .45); }
.burger { display: flex; flex-direction: column; gap: 4px; width: 20px; }
.burger span { display: block; height: 2.5px; border-radius: 3px; background: currentColor; }
.burger span:nth-child(2) { width: 70%; margin-left: auto; }
.brand { margin-right: auto; }

/* Footer falling leaves */
.site-footer { overflow: hidden; isolation: isolate; }
.site-footer > *:not(.leaves):not(.sr-only) { position: relative; z-index: 1; }
.leaves { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.leaf-track { position: absolute; top: 0; height: 100%; width: 30px; animation: leafFall linear infinite; will-change: transform; }
.leaf { display: block; opacity: .55; animation: leafSway ease-in-out infinite alternate; }
@keyframes leafFall { from { transform: translateY(-8%); } to { transform: translateY(100%); } }
@keyframes leafSway { from { transform: translateX(-14px) rotate(-30deg); } to { transform: translateX(14px) rotate(35deg); } }
html.a11y-still .leaves { display: none; }
@media (prefers-reduced-motion: reduce) { .leaves { display: none; } }

/* Short laptop screens: keep the whole banner on screen, clear of the floating buttons */
@media (min-width: 1024px) and (max-height: 760px) {
    .hero-title { font-size: clamp(1.9rem, 1rem + 2.4vw, 2.8rem); }
    .hero-copy { margin-top: .9rem; font-size: 1rem; }
    .hero-cta { margin-top: 1.1rem; }
    .hero-title { margin-top: .75rem; }
    .hero__content { padding-bottom: 4.5rem; }
    .pulse-card { padding: 1.25rem; }
    .mini-ecg { height: 44px; margin: .6rem 0; }
}
/* Keep banner text clear of the floating accessibility buttons on narrower laptops */
@media (min-width: 1024px) and (max-width: 1500px) { .hero .hero__content { padding-left: 5.5rem; } }

/* Keep the hologram (right side) in view when the banner is cropped on small screens */
.page-hero__img { object-position: 72% center; }
