/* ============================================================
   Medison — redesigned 2026 · vanilla CSS
   Paleta: biel / morski (primary) / miękkie szarości
   ============================================================ */

:root {
    --bg: #ffffff;
    --bg-alt: #f2f7f6;
    --ink: #16302e;
    --ink-soft: #4c625f;
    --primary: #0e7490;
    --primary-deep: #0b5c73;
    --accent: #14b8a6;
    --line: #e3ebe9;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 10px 30px rgba(14, 116, 144, .08);
    --shadow-lg: 0 24px 60px rgba(11, 92, 115, .14);
    --font-body: "Manrope", system-ui, -apple-system, sans-serif;
    --font-display: "Fraunces", Georgia, serif;
    --header-h: 76px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body.nav-open {
    overflow: hidden;
}

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

.container {
    width: min(1140px, 92%);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary);
    color: #fff;
    padding: .6rem 1rem;
    border-radius: 0 0 8px 0;
    z-index: 100;
}

.skip-link:focus {
    left: 0;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1.35rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-lg {
    padding: .95rem 1.8rem;
    font-size: 1.05rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-deep);
    box-shadow: 0 12px 28px rgba(14, 116, 144, .35);
}

.btn-accent {
    background: var(--accent);
    color: #062e2a;
}

.btn-accent:hover {
    background: #2dd4bf;
    box-shadow: 0 12px 28px rgba(20, 184, 166, .4);
}

.btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, .55);
    backdrop-filter: blur(6px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, .14);
    border-color: #fff;
}

.btn-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: none;
    flex: none;
}

.icon {
    width: 22px;
    height: 22px;
    flex: none;
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    height: var(--header-h);
    transition: background .3s ease, box-shadow .3s ease;
}

.site-header.is-solid {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(22, 48, 46, .08);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: .01em;
    transition: color .3s ease;
}

.is-solid .brand {
    color: var(--ink);
}

.brand-mark {
    width: 34px;
    height: 34px;
    flex: none;
}

.brand-mark rect {
    fill: var(--accent);
}

.brand-mark path {
    stroke: #062e2a;
    stroke-width: 3;
    stroke-linecap: round;
    fill: none;
}

.main-nav {
    display: flex;
    gap: .35rem;
    margin-left: auto;
}

.main-nav a {
    color: rgba(255, 255, 255, .92);
    text-decoration: none;
    font-weight: 600;
    padding: .45rem .85rem;
    border-radius: 999px;
    font-size: .95rem;
    transition: background .2s ease, color .2s ease;
}

.main-nav a:hover {
    background: #fff;
    color: var(--primary-deep);
}

.is-solid .main-nav a {
    color: var(--ink-soft);
}

.is-solid .main-nav a:hover {
    background: var(--bg-alt);
    color: var(--primary-deep);
}

.header-cta {
    white-space: nowrap;
}

.nav-toggle {
    display: none;
}

/* ---------- Mobile nav ---------- */
.mobile-nav[hidden] {
    display: none;
}

.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(255, 255, 255, .98);
    backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.2rem;
    animation: fadeIn .25s ease;
}

.mobile-nav nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
}

.mobile-nav nav a {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
}

.mobile-nav nav a:hover {
    color: var(--primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-img-blur {
    filter: blur(14px) saturate(1.15) brightness(.75);
    transform: scale(1.12);
    animation: kenburns 26s ease-in-out infinite alternate;
}

.hero-img-sharp {
    filter: saturate(1.05) brightness(.92);
    -webkit-mask-image: radial-gradient(circle 340px at var(--lens-x, 50%) var(--lens-y, 40%), #000 0%, rgba(0, 0, 0, .85) 55%, transparent 100%);
    mask-image: radial-gradient(circle 340px at var(--lens-x, 50%) var(--lens-y, 40%), #000 0%, rgba(0, 0, 0, .85) 55%, transparent 100%);
    transition: opacity .4s ease;
}

.lens-off .hero-img-sharp {
    -webkit-mask-image: none;
    mask-image: none;
    filter: brightness(.8);
}

@keyframes kenburns {
    from {
        transform: scale(1.12) translate(0, 0);
    }

    to {
        transform: scale(1.22) translate(-1.5%, 1.5%);
    }
}

.hero-tint {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 90% at 18% 38%, rgba(6, 40, 48, .42) 0%, rgba(6, 40, 48, .62) 55%, rgba(6, 40, 48, .78) 100%);
}

.hero-content {
    position: relative;
    padding-block: 8rem 6rem;
    max-width: 720px;
}

.hero-eyebrow {
    display: inline-block;
    padding: .35rem 1rem;
    border-radius: 999px;
    background: rgba(8, 47, 58, .72);
    border: 1px solid rgba(45, 212, 191, .5);
    color: #99f6e4;
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin: 0 0 1.2rem;
    backdrop-filter: blur(4px);
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(3.4rem, 9vw, 6rem);
    line-height: 1.02;
    margin: 0 0 .4rem;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0, 0, 0, .35);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.6vw, 1.6rem);
    font-weight: 600;
    color: #ccfbf1;
    margin: 0 0 1rem;
}

.hero-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .88);
    max-width: 540px;
    margin: 0 0 2.2rem;
}

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

.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 1.6rem;
    transform: translateX(-50%);
    opacity: .85;
}

.mouse {
    display: block;
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, .8);
    border-radius: 14px;
    position: relative;
}

.wheel {
    position: absolute;
    left: 50%;
    top: 7px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: #fff;
    animation: wheel 1.8s ease-in-out infinite;
}

@keyframes wheel {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    70% {
        transform: translateY(12px);
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* ---------- Sections ---------- */
.section {
    padding-block: clamp(4rem, 9vw, 6.5rem);
}

.section-alt {
    background: var(--bg-alt);
}

.section-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 3rem;
}

.section-kicker {
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-size: .8rem;
    color: var(--primary);
    margin: 0 0 .6rem;
}

.section-kicker.light {
    color: var(--accent);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2rem, 4.5vw, 2.9rem);
    line-height: 1.15;
    margin: 0 0 1rem;
    color: var(--ink);
}

.section-lede {
    color: var(--ink-soft);
    margin: 0;
}

/* ---------- O nas ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 3rem;
    align-items: start;
}

.about-text .lead {
    font-size: 1.06rem;
    color: var(--ink-soft);
    text-align: justify;
    margin: 0;
}

.about-text .lead::first-letter {
    font-family: var(--font-display);
    font-size: 3.4rem;
    font-weight: 600;
    color: var(--primary);
    float: left;
    line-height: .9;
    padding-right: .5rem;
}

.fact-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.fact-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.1rem 1.3rem;
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.fact-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.fact-icon {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
}

.fact-icon .icon {
    width: 24px;
    height: 24px;
}

.fact-card h3 {
    margin: 0 0 .15rem;
    font-size: 1.02rem;
}

.fact-card p {
    margin: 0;
    font-size: .9rem;
    color: var(--ink-soft);
}

/* ---------- Specjalności ---------- */
.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.4rem;
}

.spec-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease;
}

.spec-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, var(--spec), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.spec-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.spec-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    margin-bottom: 1rem;
    background: var(--spec-soft);
    color: var(--spec);
}

.spec-icon .icon {
    width: 32px;
    height: 32px;
}

.spec-card h3 {
    margin: 0 0 .5rem;
    font-size: 1.15rem;
    color: var(--ink);
}

.spec-card p {
    margin: 0;
    font-size: .88rem;
    color: var(--ink-soft);
}

/* ---------- Lekarze ---------- */
.doctor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.4rem;
    align-items: start;
}

.doc-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease;
}

.doc-card:hover {
    box-shadow: var(--shadow-lg);
}

.doc-card.open {
    border-color: color-mix(in srgb, var(--spec) 45%, var(--line));
}

.doc-head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    background: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: left;
}

.doc-media {
    flex: none;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    overflow: hidden;
}

.doc-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-avatar {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--av1), var(--av2));
    color: #fff;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: .04em;
    font-family: var(--font-display);
    text-transform: uppercase;
}

.doc-id {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.doc-id strong {
    font-size: 1.04rem;
    line-height: 1.3;
}

.doc-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--spec);
    letter-spacing: .04em;
}

.doc-chevron {
    margin-left: auto;
    color: var(--ink-soft);
    flex: none;
    transition: transform .3s ease;
}

.doc-card.open .doc-chevron {
    transform: rotate(180deg);
    color: var(--spec);
}

.doc-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s ease;
}

.doc-card.open .doc-body {
    grid-template-rows: 1fr;
}

.doc-body-inner {
    overflow: hidden;
    min-height: 0;
    padding-inline: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.doc-card.open .doc-body-inner {
    padding-bottom: 1.3rem;
}

.doc-sub {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: .4rem 0 .1rem;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.doc-sub .icon {
    width: 16px;
    height: 16px;
    color: var(--spec);
}

.visit-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .4rem;
}

.visit-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    background: var(--spec-soft);
    border-radius: var(--radius-sm);
    padding: .5rem .9rem;
    font-size: .92rem;
}

.visit-day {
    font-weight: 700;
    color: var(--ink);
}

.visit-hours {
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}

.doc-bio {
    margin: 0;
    font-size: .92rem;
    color: var(--ink-soft);
    text-align: justify;
}

/* ---------- Rejestracja ---------- */
.register-panel {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 3rem;
    align-items: center;
    background: linear-gradient(135deg, #0b3d4d, #0e7490 60%, #0d9488);
    border-radius: calc(var(--radius) + 8px);
    padding: clamp(2rem, 5vw, 3.5rem);
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.register-panel .section-title {
    color: #fff;
}

.register-copy p {
    color: rgba(255, 255, 255, .85);
}

.register-card {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .25);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    align-items: center;
}

.register-label {
    margin: 0;
    font-size: .85rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #99f6e4;
    font-weight: 700;
}

.register-phone {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    letter-spacing: .02em;
}

.register-phone:hover {
    color: #99f6e4;
}

.register-hours {
    margin: 0 0 .8rem;
    color: rgba(255, 255, 255, .85);
    font-weight: 600;
}

/* ---------- Lokalizacja ---------- */
.loc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
}

.loc-address {
    font-style: normal;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary-deep);
    margin: 0 0 1rem;
}

.loc-copy>p {
    color: var(--ink-soft);
}

.loc-btn {
    margin-top: 1.2rem;
}

.loc-map {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    min-height: 380px;
}

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

/* ---------- Footer ---------- */
.site-footer {
    background: #0a2b33;
    color: rgba(255, 255, 255, .8);
    padding-block: 2.8rem;
}

.footer-inner {
    display: grid;
    gap: 1rem;
    text-align: center;
    justify-items: center;
}

.brand-light {
    color: #fff;
}

.footer-info {
    margin: 0;
    font-size: .95rem;
    line-height: 1.8;
}

.footer-info a {
    color: #5eead4;
    text-decoration: none;
    font-weight: 700;
}

.footer-info a:hover {
    text-decoration: underline;
}

.footer-copy {
    margin: 0;
    font-size: .82rem;
    color: rgba(255, 255, 255, .45);
}

/* ---------- Reveal animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

.delay-1 {
    transition-delay: .1s;
}

.delay-2 {
    transition-delay: .2s;
}

.delay-3 {
    transition-delay: .3s;
}

.delay-4 {
    transition-delay: .4s;
}

.load-error {
    position: fixed;
    inset: auto 0 0 0;
    background: #fee2e2;
    color: #991b1b;
    text-align: center;
    padding: 1rem;
    margin: 0;
    font-weight: 700;
    z-index: 99;
}

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

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-img-blur {
        animation: none;
        transform: scale(1.05);
        filter: blur(0) brightness(.72);
    }

    .hero-img-sharp {
        mask-image: none;
        -webkit-mask-image: none;
    }

    .wheel {
        animation: none;
    }

    .btn:hover {
        transform: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {

    .main-nav,
    .header-cta {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 10px;
        margin-left: auto;
        background: none;
        border: 0;
        cursor: pointer;
    }

    .nav-toggle span {
        display: block;
        height: 2.5px;
        width: 100%;
        border-radius: 2px;
        background: #fff;
        transition: transform .25s ease, opacity .25s ease, background .3s ease;
    }

    .is-solid .nav-toggle span {
        background: var(--ink);
    }

    .nav-toggle.is-open span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
        background: var(--ink);
    }

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

    .nav-toggle.is-open span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
        background: var(--ink);
    }

    .about-grid,
    .loc-grid,
    .register-panel {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .visit-row {
        flex-direction: column;
        gap: .1rem;
    }
}