/* ═══════════════════════════════════════════════
   RESET & TOKENS
   Paleta zmierzona z logo — tylko te kolory.
═══════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg:          #150e2d;  /* tło strony = brzeg logo */
    --accent:      #9056e0;  /* akcent, przyciski, linia wykresu */
    --glow:        #9961db;  /* poświata i jasny punkt */
    --heading:     #d0c8f0;  /* nagłówki */
    --text:        #a898e0;  /* mniejsze napisy */
    --line:        #443667;  /* ramki i tła plakietek */

    /* pochodne (te same kolory, tylko przezroczystość) */
    --bg-glass:    color-mix(in srgb, var(--bg) 80%, transparent);
    --line-soft:   color-mix(in srgb, var(--line) 55%, transparent);
    --line-grid:   color-mix(in srgb, var(--line) 40%, transparent);
    --glow-dim:    color-mix(in srgb, var(--glow) 18%, transparent);

    --radius:      14px;
    --transition:  0.3s cubic-bezier(0.4,0,0.2,1);
    --header-h:    66px;
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* widoczny focus z klawiatury */
:focus-visible {
    outline: 2px solid var(--heading);
    outline-offset: 3px;
    border-radius: 10px;
}

/* ── UTILS ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 32px; }

.tag {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--line-soft);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 0.75rem; font-weight: 600;
    letter-spacing: 1.8px; text-transform: uppercase;
    padding: 6px 16px; border-radius: 50px;
}

.tag-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--glow);
    box-shadow: 0 0 8px var(--glow);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%,100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.7); }
}

.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent);
    color: var(--bg); font-family: inherit;
    font-size: 0.95rem; font-weight: 700; letter-spacing: 0.2px;
    padding: 13px 28px; border-radius: 10px; border: none;
    cursor: pointer; text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 0 0 0 transparent;
}
.btn-primary:hover {
    background: var(--glow);
    box-shadow: 0 8px 32px color-mix(in srgb, var(--accent) 40%, transparent);
    transform: translateY(-1px);
}
.btn-primary.btn-sm { padding: 10px 20px; font-size: 0.88rem; }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent;
    color: var(--text); font-family: inherit;
    font-size: 0.95rem; font-weight: 500;
    padding: 12px 24px; border-radius: 10px;
    border: 1px solid var(--line);
    cursor: pointer; text-decoration: none;
    transition: var(--transition);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--heading); }

/* reveal: wejście elementów z opóźnieniami */
.reveal {
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.anim .reveal { opacity: 0; transform: translateY(28px); }
.anim .reveal.in { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════
   GRID BG PATTERN
═══════════════════════════════════════════════ */
.grid-bg {
    position: absolute; inset: 0; z-index: 0;
    background-image:
        linear-gradient(var(--line-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-grid) 1px, transparent 1px);
    background-size: 60px 60px;
    -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, #000 30%, transparent 100%);
            mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, #000 30%, transparent 100%);
    pointer-events: none;
}

/* ═══════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════ */
header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    border-bottom: 1px solid var(--line-soft);
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(24px);
            backdrop-filter: blur(24px);
}

.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--header-h);
}

.logo {
    display: flex; align-items: center;
    text-decoration: none;
}
.logo img {
    display: block;
    height: 28px; width: auto;
    filter: drop-shadow(0 0 10px color-mix(in srgb, var(--glow) 45%, transparent));
}

.nav-links {
    display: flex; align-items: center; gap: 6px;
    list-style: none;
}
.nav-links a {
    color: var(--text); text-decoration: none;
    font-size: 0.88rem; font-weight: 500;
    padding: 8px 14px; border-radius: 8px;
    transition: var(--transition);
}
.nav-links a:hover { color: var(--heading); background: var(--line-soft); }

.nav-cta { display: flex; align-items: center; gap: 10px; }

.nav-pill {
    font-size: 0.72rem; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--text);
    background: var(--line-soft);
    border: 1px solid var(--line);
    padding: 5px 14px; border-radius: 50px;
}

/* ═══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
#hero {
    position: relative; overflow: hidden;
    min-height: 100vh;
    display: flex; align-items: center;
    padding: calc(var(--header-h) + 40px) 0 60px;
}

#hero .grid-bg { opacity: 0.6; }

#hero > .container {
    width: 100%;
    max-width: none;
    padding-left: clamp(24px, 8vw, 140px);
    padding-right: clamp(24px, 5vw, 80px);
}

.hero-glow {
    position: absolute; top: -200px; left: 30%; transform: translateX(-50%);
    width: 700px; height: 700px; border-radius: 50%;
    background: radial-gradient(circle, var(--glow-dim) 0%, transparent 65%);
    pointer-events: none; z-index: 0;
}

.hero-content {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-left { display: flex; flex-direction: column; align-items: flex-start; }

.hero-eyebrow { margin-bottom: 32px; }

.hero-headline {
    color: var(--heading);
    font-size: clamp(2.4rem, 3.7vw, 4.4rem);
    font-weight: 900; line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 28px;
}

.word-accent,
.hero-headline .accent {
    background: linear-gradient(135deg, var(--text) 0%, var(--glow) 45%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-typed { white-space: nowrap; display: inline-block; }

.hero-sub {
    font-size: 1.1rem; color: var(--text); font-weight: 400;
    max-width: 480px; margin-bottom: 44px; line-height: 1.8;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-disclaimer {
    margin-top: 22px;
    max-width: 440px;
    font-size: 0.78rem; line-height: 1.6;
    color: var(--text);
}

/* hero typewriter cursor */
.hero-caret {
    color: var(--glow);
    font-weight: 300;
    margin-left: 1px;
}
.anim .hero-caret { animation: hero-blink 0.85s step-end infinite; }

@keyframes hero-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ═══════════════════════════════════════════════
   LOGO + LINIA WYKRESU
═══════════════════════════════════════════════ */
.hero-right {
    display: flex; align-items: center; justify-content: center;
}

.hero-logo-wrap {
    position: relative;
    width: min(100%, calc(100vh - 150px));
    aspect-ratio: 1 / 1;
}

/* obrazek i SVG unoszą się razem */
.logo-stage { position: absolute; inset: 0; }

.anim .logo-stage { opacity: 0; transition: opacity 0.6s ease; }
.anim .logo-stage.in { opacity: 1; }

.logo-stage.floating { animation: logoFloat 6s ease-in-out infinite; }

@keyframes logoFloat {
    0%   { transform: translate(  0px,   0px); }
    25%  { transform: translate(  8px, -18px); }
    50%  { transform: translate(  0px, -28px); }
    75%  { transform: translate( -8px, -18px); }
    100% { transform: translate(  0px,   0px); }
}

.hero-logo {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    display: block;
    /* miękkie wtopienie brzegów — żadnej widocznej ramki na kratce tła */
    -webkit-mask-image: radial-gradient(circle closest-side, #000 80%, transparent 100%);
            mask-image: radial-gradient(circle closest-side, #000 80%, transparent 100%);
}

/* błysk poświaty po dorysowaniu linii */
.logo-flash {
    position: absolute; inset: -8%;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--glow) 45%, transparent) 0%, transparent 62%);
    mix-blend-mode: screen;
    opacity: 0;
    pointer-events: none;
}
.logo-flash.flash { animation: logoFlash 0.75s ease-out 1; }

@keyframes logoFlash {
    0%   { opacity: 0;   transform: scale(0.92); }
    22%  { opacity: 1;   transform: scale(1); }
    100% { opacity: 0;   transform: scale(1.08); }
}

.chart-svg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    overflow: visible;
    pointer-events: none;
}

.chart-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: miter;
    stroke-miterlimit: 10;
}
.chart-glow-wide  { stroke: var(--glow);   stroke-width: 22; opacity: 0.55; }
.chart-glow-tight { stroke: var(--glow);   stroke-width: 10; opacity: 0.9; }
.chart-line       { stroke: var(--accent); stroke-width: 6; }

.chart-dot { opacity: 0; transition: opacity 0.35s ease; }
.chart-dot.on { opacity: 1; }
.chart-dot-halo { fill: var(--glow); opacity: 0.9; }
.chart-dot-ring { fill: var(--glow); }
.chart-dot-core { fill: var(--heading); }

/* przed startem animacji linia jest schowana */
.anim .chart-svg:not(.ready) .chart-path { visibility: hidden; }

/* ═══════════════════════════════════════════════
   SECTION HEADING
═══════════════════════════════════════════════ */
.section-head { text-align: center; margin-bottom: 64px; }

.section-head .tag { margin-bottom: 20px; }

.section-head h2 {
    color: var(--heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800; letter-spacing: -1px; line-height: 1.1;
    margin-bottom: 16px;
}

.section-head p {
    font-size: 1rem; color: var(--text); max-width: 540px; margin: 0 auto;
}

/* ═══════════════════════════════════════════════
   JAK DOŁĄCZYĆ
═══════════════════════════════════════════════ */
#jak-dolaczyc {
    --bg-2: color-mix(in srgb, var(--line) 22%, var(--bg));  /* ton jaśniej niż tło */
    padding: 120px 0;
    background: var(--bg-2);
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    scroll-margin-top: var(--header-h);
}

.steps-wrap { position: relative; }

/* linia łącząca środki kółek (kolumny 1/6 → 5/6) */
.steps-track {
    position: absolute; top: 32px; left: calc(100% / 6); right: calc(100% / 6);
    height: 2px; margin-top: -1px;
    background: var(--line-soft);
    z-index: 0;
}

.steps-line {
    position: absolute; inset: 0;
    background: var(--accent);
    box-shadow: 0 0 8px var(--glow), 0 0 22px color-mix(in srgb, var(--glow) 60%, transparent);
    transform-origin: left center;
}
.anim .steps-line { transform: scaleX(0); }

/* jasny punkt na czubku rysowanej linii */
.steps-dot {
    position: absolute; top: 50%; left: 0;
    width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
    background: var(--heading);
    box-shadow: 0 0 6px 2px var(--glow), 0 0 22px 6px color-mix(in srgb, var(--glow) 70%, transparent);
    opacity: 0; transition: opacity 0.3s ease;
}
.steps-dot.on { opacity: 1; }

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    position: relative;
    list-style: none;
}

.step {
    position: relative; z-index: 1;
    text-align: center; padding: 0 32px 0;
}

.step-num {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--accent);
    color: var(--heading); font-size: 1.4rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 28px;
    box-shadow: 0 0 0 8px var(--bg-2), 0 0 40px color-mix(in srgb, var(--glow) 45%, transparent);
    transition: border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

/* przed zapaleniem: przygaszone kółko */
.anim .step:not(.lit) .step-num {
    border-color: var(--line);
    color: var(--text);
    box-shadow: 0 0 0 8px var(--bg-2), 0 0 40px transparent;
}
.step.lit .step-num { animation: stepFlash 0.6s ease-out 1; }

@keyframes stepFlash {
    0%   { box-shadow: 0 0 0 8px var(--bg-2), 0 0 0 transparent; }
    35%  { box-shadow: 0 0 0 8px var(--bg-2), 0 0 56px var(--glow); }
    100% { box-shadow: 0 0 0 8px var(--bg-2), 0 0 40px color-mix(in srgb, var(--glow) 45%, transparent); }
}

.step h3 {
    color: var(--heading);
    font-size: 1rem; font-weight: 700;
    margin-bottom: 10px; letter-spacing: -0.2px;
}

.step p { font-size: 0.88rem; color: var(--text); line-height: 1.7; text-wrap: balance; }

.anim .step h3,
.anim .step p { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.anim .step.lit h3,
.anim .step.lit p { opacity: 1; transform: none; }
.anim .step.lit p { transition-delay: 0.08s; }

.join-cta {
    margin-top: 64px;
    display: flex; flex-direction: column; align-items: center;
}

/* ═══════════════════════════════════════════════
   WSPÓLNE DLA DALSZYCH SEKCJI
═══════════════════════════════════════════════ */
:root {
    --bg-2:      color-mix(in srgb, var(--line) 22%, var(--bg));  /* ton jaśniej niż tło */
    --radius-lg: 22px;
}

main > section[id] { scroll-margin-top: var(--header-h); }

#co-w-srodku,
#ekipa { padding: 120px 0; }

/* sekcje na przemian: jaśniejsze tło + cienka linia na górze i dole */
.section-alt {
    padding: 120px 0;
    background: var(--bg-2);
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

/* ═══════════════════════════════════════════════
   CO W ŚRODKU
═══════════════════════════════════════════════ */
.features-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feat {
    background: var(--bg-2);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 32px 26px;
    transition: border-color var(--transition), opacity 0.7s ease, transform 0.7s ease;
}
.feat:hover { border-color: var(--accent); }

.feat-icon {
    width: 52px; height: 52px; border-radius: 12px;
    background: var(--line-soft);
    border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    color: var(--glow); margin-bottom: 22px;
}

.feat h3 {
    color: var(--heading);
    font-size: 1.15rem; font-weight: 700;
    margin-bottom: 10px; letter-spacing: -0.3px;
}

.feat p { font-size: 0.95rem; color: var(--text); line-height: 1.7; }

/* ═══════════════════════════════════════════════
   WYNIKI — GALERIA
═══════════════════════════════════════════════ */
.gallery {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

.gallery-item {
    display: block; width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0; border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--line);
    overflow: hidden;
    cursor: zoom-in;
    font: inherit;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.gallery-item:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--accent) 25%, transparent);
}
/* ramka dopasowuje się do proporcji zrzutu — bez pustych pasów i przycinania */
.gallery-item:has(img) { aspect-ratio: auto; background: var(--bg); }
.gallery-item img { display: block; width: 100%; height: auto; }

/* ramka zastępcza, dopóki nie ma zrzutu */
.shot-placeholder {
    width: 100%; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    background: var(--line);
    color: var(--heading);
    font-size: 1rem; font-weight: 600;
}
.shot-placeholder svg { color: var(--text); }

.results-note {
    margin: 40px auto 0;
    max-width: 640px; text-align: center;
    font-size: 1rem; line-height: 1.7;
    color: var(--heading);
}
.faq-risk { max-width: 760px; font-size: 0.85rem; color: var(--text); }

/* podgląd na ciemnym tle */
.lightbox {
    position: fixed; inset: 0;
    width: 100vw; height: 100vh;
    max-width: none; max-height: none;
    margin: 0; padding: 0; border: 0;
    background: transparent;
    color: var(--heading);
    overflow: hidden;
}
.lightbox[open] {
    display: grid;
    grid-template-columns: 96px 1fr 96px;
    align-items: center;
}
.lightbox::backdrop {
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
}

.lb-figure {
    grid-column: 2;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    max-height: 100vh; padding: 48px 0;
}
.lb-media {
    display: flex; align-items: center; justify-content: center;
    width: 100%;
}
.lb-media img {
    display: block;
    max-width: 100%; max-height: calc(100vh - 140px);
    border-radius: var(--radius);
    box-shadow: 0 20px 80px color-mix(in srgb, var(--accent) 25%, transparent);
}
.lb-media .shot-placeholder {
    width: min(960px, 100%); aspect-ratio: 4 / 3; height: auto;
    max-height: calc(100vh - 140px);
    border-radius: var(--radius);
    font-size: 1.4rem;
}
.lb-count { font-size: 0.9rem; color: var(--text); }

.lb-btn {
    display: flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--line-soft);
    border: 1px solid var(--line);
    color: var(--heading);
    cursor: pointer;
    transition: var(--transition);
}
.lb-btn:hover { border-color: var(--accent); background: var(--line); }
.lb-prev { grid-column: 1; justify-self: center; }
.lb-next { grid-column: 3; justify-self: center; }
.lb-close { position: absolute; top: 24px; right: 22px; }

/* ═══════════════════════════════════════════════
   KTO TO PROWADZI
═══════════════════════════════════════════════ */
.team-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.member {
    display: flex; flex-direction: column; align-items: center;
    text-align: center;
    background: var(--bg-2);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 40px 28px 32px;
}

.member-photo {
    width: 104px; height: 104px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--line-soft);
    border: 1px solid var(--accent);
    box-shadow: 0 0 0 6px var(--bg-2), 0 0 36px color-mix(in srgb, var(--glow) 40%, transparent);
    color: var(--heading);
    font-size: 2.4rem; font-weight: 800;
    overflow: hidden;
    margin-bottom: 24px;
}
.member-photo img { width: 100%; height: 100%; object-fit: cover; }

.member h3 {
    color: var(--heading);
    font-size: 1.2rem; font-weight: 800; letter-spacing: -0.3px;
    margin-bottom: 8px;
}
.member .member-actions { padding-top: 14px; }

.member-link {
    margin-top: auto;
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.9rem; font-weight: 600;
    color: var(--text); text-decoration: none;
    padding: 8px 16px; border-radius: 50px;
    border: 1px solid var(--line);
    transition: var(--transition);
}
a.member-link:hover,
button.member-link:hover { border-color: var(--accent); color: var(--heading); }
button.member-link { background: transparent; font-family: inherit; cursor: pointer; }

/* ═══════════════════════════════════════════════
   PYTANIA
═══════════════════════════════════════════════ */
.faq {
    max-width: 780px; margin: 0 auto;
    display: flex; flex-direction: column; gap: 12px;
}

.faq-item {
    background: var(--bg);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    transition: border-color var(--transition), opacity 0.7s ease, transform 0.7s ease;
}
.faq-item[open] { border-color: var(--line); }

.faq-item summary {
    list-style: none;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 22px 26px;
    color: var(--heading);
    font-size: 1.05rem; font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--heading); background: var(--line-soft); }

.faq-icon {
    flex: none;
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line);
    color: var(--glow);
    transition: transform 0.35s ease, border-color var(--transition);
}
.faq-item.is-open .faq-icon { transform: rotate(45deg); border-color: var(--accent); }

.faq-answer { overflow: hidden; }
.faq-answer p {
    padding: 0 26px 24px;
    color: var(--text);
    font-size: 1rem; line-height: 1.75;
    max-width: 680px;
}

/* ═══════════════════════════════════════════════
   OSTATNIE WEZWANIE
═══════════════════════════════════════════════ */
#wchodzisz {
    position: relative; overflow: hidden;
    padding: 180px 0;
    text-align: center;
}

.final-chart {
    position: absolute; left: 50%; top: 50%;
    height: 84%; width: auto;
    aspect-ratio: 840 / 580;
    transform: translate(-50%, -50%);
    opacity: 0.32;
    overflow: visible;
    pointer-events: none;
    z-index: 0;
}
.final-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: miter;
    stroke-miterlimit: 10;
}
.final-glow-wide  { stroke: var(--glow);   stroke-width: 20; opacity: 0.6; }
.final-glow-tight { stroke: var(--glow);   stroke-width: 9; }
.final-line       { stroke: var(--accent); stroke-width: 5; }
.anim .final-chart:not(.ready) .final-path { visibility: hidden; }

.final-inner {
    position: relative; z-index: 1;
    max-width: 640px; margin: 0 auto;
    display: flex; flex-direction: column; align-items: center;
}
.final-inner h2 {
    color: var(--heading);
    font-size: clamp(3rem, 5.5vw, 5rem);
    font-weight: 900; letter-spacing: -2px; line-height: 1.05;
    margin-bottom: 18px;
}
.final-inner p {
    color: var(--text);
    font-size: 1.15rem; line-height: 1.7;
    margin-bottom: 40px;
}

.btn-primary.btn-lg {
    padding: 18px 40px;
    font-size: 1.2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* ═══════════════════════════════════════════════
   STOPKA
═══════════════════════════════════════════════ */
footer {
    background: var(--bg);
    border-top: 1px solid var(--line-soft);
    padding: 72px 0 40px;
}

.footer-top {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 48px;
    margin-bottom: 48px;
}

.footer-logo {
    display: inline-block;
    font-size: 1.35rem; font-weight: 800; letter-spacing: -0.2px;
    color: var(--heading); text-decoration: none;
    margin-bottom: 14px;
}

.footer-brand p {
    color: var(--text); font-size: 0.95rem;
    line-height: 1.7; max-width: 380px;
}

.footer-links {
    list-style: none;
    display: flex; gap: 10px; flex-wrap: wrap;
}
.footer-links a,
.footer-links span {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.92rem; font-weight: 500;
    color: var(--text); text-decoration: none;
    padding: 9px 16px; border-radius: 10px;
    border: 1px solid var(--line);
    transition: var(--transition);
}
.footer-links a:hover { border-color: var(--accent); color: var(--heading); }
.footer-links span { border-style: dashed; }

.footer-risk {
    padding-top: 28px;
    border-top: 1px solid var(--line-soft);
    color: var(--text);
    font-size: 0.95rem; line-height: 1.75;
}

.footer-copy {
    margin-top: 20px;
    color: var(--text);
    font-size: 0.85rem;
}

/* Elementy listy (kafelki, zdjęcia, karty, pytania) wjeżdżają tak jak .reveal */
.anim .reveal-item { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.anim .reveal-item.in { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════════
   TELEFON (≤ 860 px)
   Wersja na komputer zostaje bez zmian — wszystko niżej
   działa tylko na wąskich ekranach.
═══════════════════════════════════════════════ */
.nav-toggle,
.cta-short { display: none; }

/* tablet / mały laptop: 8 kafelków w 2 kolumnach zamiast 4 */
@media (max-width: 1100px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    :root { --header-h: 60px; }

    .container { padding: 0 20px; }

    /* ── Header ── */
    .nav-links,
    .nav-pill { display: none; }
    .logo img { height: 22px; }
    .nav-cta { gap: 8px; }
    .nav-cta .btn-primary.btn-sm { padding: 9px 16px; font-size: 0.88rem; }
    .cta-long { display: none; }
    .cta-short { display: inline; }

    .nav-toggle {
        display: flex; align-items: center; justify-content: center;
        width: 42px; height: 42px; border-radius: 10px;
        background: transparent;
        border: 1px solid var(--line);
        color: var(--heading);
        cursor: pointer;
    }
    .nav-toggle path { transition: transform 0.25s ease, opacity 0.2s ease; transform-origin: 12px 12px; }
    .nav-toggle[aria-expanded="true"] .nt-1 { transform: translateY(5px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] .nt-2 { opacity: 0; }
    .nav-toggle[aria-expanded="true"] .nt-3 { transform: translateY(-5px) rotate(-45deg); }

    .mobile-nav {
        border-top: 1px solid var(--line-soft);
        padding: 8px 20px 18px;
    }
    .mobile-nav ul { list-style: none; display: flex; flex-direction: column; }
    .mobile-nav a {
        display: block;
        padding: 14px 4px;
        color: var(--heading); text-decoration: none;
        font-size: 1.05rem; font-weight: 600;
        border-bottom: 1px solid var(--line-soft);
    }
    .mobile-nav li:last-child a { border-bottom: 0; }

    /* ── Pierwszy ekran: najpierw logo, pod nim teksty ── */
    #hero {
        min-height: 0;
        display: block;
        padding: calc(var(--header-h) + 4px) 0 64px;
    }
    #hero > .container { padding-left: 20px; padding-right: 20px; }

    .hero-glow { left: 50%; top: -120px; width: 520px; height: 520px; }

    .hero-content {
        grid-template-columns: minmax(0, 1fr);   /* kolumna nie rośnie od długiego tekstu */
        gap: 0;
        text-align: center;
    }
    .hero-right { order: -1; }
    /* logo ma dużo pustego tła u góry i u dołu — przycinamy odstęp */
    .hero-logo-wrap {
        --lw: min(100%, 440px);              /* szerokość logo */
        width: var(--lw);
        /* marginesy liczone od logo, nie od ekranu — odstęp do tekstu zawsze podobny */
        margin: calc(var(--lw) * -0.09) auto calc(var(--lw) * -0.07);
    }
    @keyframes logoFloat {
        0%, 100% { transform: translate(0, 0); }
        50%      { transform: translate(0, -12px); }
    }

    .hero-left { align-items: center; }
    /* plakietka partnera nachodzi na dolną część logo, a nie leży pod nim */
    .hero-eyebrow { margin-top: -44px; margin-bottom: 18px; position: relative; z-index: 3; }
    .hero-headline {
        width: 100%;
        font-size: clamp(1.95rem, 8.6vw, 2.6rem);
        letter-spacing: -1px;
        margin-bottom: 18px;
    }
    .hero-typed { white-space: normal; display: inline; }       /* „która” zostaje w zdaniu… */
    .hero-typed-anim { display: block; white-space: nowrap; }   /* …a pisana końcówka ma osobną, jedną linię */
    .hero-sub {
        font-size: 1rem; line-height: 1.7;
        margin-bottom: 28px;
    }
    .hero-actions { flex-direction: column; align-items: stretch; width: 100%; gap: 10px; }
    .hero-actions .btn-primary,
    .hero-actions .btn-ghost { justify-content: center; padding-top: 15px; padding-bottom: 15px; }
    .hero-disclaimer { margin-top: 18px; }

    /* ── Wspólne dla sekcji ── */
    #jak-dolaczyc,
    #co-w-srodku,
    #ekipa,
    .section-alt { padding: 72px 0; }
    .section-head { margin-bottom: 40px; }
    .section-head h2 { font-size: clamp(1.75rem, 7.5vw, 2.3rem); text-wrap: balance; }

    /* ── Jak dołączyć: kroki pod sobą, linia pionowo ── */
    .steps { grid-template-columns: 1fr; gap: 36px; }
    .step {
        display: grid;
        grid-template-columns: 64px 1fr;
        column-gap: 20px;
        text-align: left;
        padding: 0;
    }
    .step-num { margin: 0; grid-row: span 2; align-self: start; }
    .step h3 { align-self: end; margin: 6px 0 4px; font-size: 1.05rem; }
    .step p { text-wrap: pretty; }
    .steps-track { right: auto; width: 2px; margin: 0 0 0 -1px; }
    .steps-line { transform-origin: center top; }
    .anim .steps-line { transform: scaleY(0); }
    .steps-dot { top: 0; left: 50%; margin: -5px 0 0 -5px; }
    .join-cta { margin-top: 48px; }
    .join-cta .btn-primary { width: 100%; justify-content: center; padding-top: 15px; padding-bottom: 15px; }

    /* ── Co w środku: kafelki pod sobą, ikona obok tekstu ── */
    .features-grid { grid-template-columns: 1fr; gap: 12px; }
    .feat {
        display: grid;
        grid-template-columns: 44px 1fr;
        column-gap: 16px;
        padding: 20px 18px;
        border-radius: var(--radius);
    }
    .feat-icon { width: 44px; height: 44px; margin: 0; grid-row: span 2; }
    .feat h3 { font-size: 1.05rem; margin: 0 0 4px; }

    /* ── Wyniki: jedna kolumna, zrzut w naturalnych proporcjach ── */
    .gallery { grid-template-columns: 1fr; gap: 14px; }
    .results-note { margin-top: 28px; }

    .lightbox[open] { grid-template-columns: 1fr; }
    .lb-figure { grid-column: 1; padding: 76px 12px 104px; }
    .lb-media img,
    .lb-media .shot-placeholder { max-height: calc(100vh - 200px); }
    .lb-prev, .lb-next { position: absolute; bottom: 28px; }
    .lb-prev { left: calc(50% - 76px); }
    .lb-next { left: calc(50% + 24px); }
    .lb-close { top: 16px; right: 14px; }
    .lb-count { position: absolute; left: 0; right: 0; bottom: 44px; text-align: center; }

    /* ── Ekipa: karty pod sobą ── */
    .team-grid { grid-template-columns: 1fr; gap: 14px; }
    .member { padding: 32px 22px 26px; }

    /* ── Pytania ── */
    .faq-item summary { padding: 18px 18px; font-size: 1rem; }
    .faq-answer p { padding: 0 18px 20px; font-size: 0.95rem; }

    /* ── Wchodzisz? ── */
    #wchodzisz { padding: 110px 0; }
    .final-chart { width: 92%; height: auto; }
    .final-inner h2 { font-size: clamp(2.6rem, 13vw, 3.4rem); }
    .final-inner p { font-size: 1.05rem; margin-bottom: 30px; }
    .final-inner .btn-primary.btn-lg { width: 100%; justify-content: center; padding: 17px 24px; }

    /* ── Stopka ── */
    footer { padding: 56px 0 32px; }
    .footer-top { flex-direction: column; gap: 24px; margin-bottom: 32px; }
    .footer-links { gap: 8px; }
    .footer-risk { font-size: 0.9rem; }
}

/* ═══════════════════════════════════════════════
   KALENDARZ SESJI LIVE
═══════════════════════════════════════════════ */
#kalendarz {
    position: relative; overflow: hidden;
    padding: 120px 0;
    border-bottom: 1px solid var(--line-soft);
}
#kalendarz .grid-bg { opacity: 0.45; }
#kalendarz > .container { position: relative; z-index: 1; }

.section-head h2 .accent {
    background: linear-gradient(135deg, var(--text) 0%, var(--glow) 45%, var(--accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* pasek: następna sesja / teraz na żywo */
.cal-status { display: flex; justify-content: center; margin: -28px 0 32px; }
.cal-status-pill {
    display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
    padding: 10px 18px; border-radius: 50px;
    background: var(--line-soft);
    border: 1px solid var(--line);
    color: var(--text); font-size: 0.95rem;
}
.cal-status-pill strong { color: var(--heading); font-weight: 700; }
.cal-status-pill svg { color: var(--glow); }
.cal-status-pill .cal-in { color: var(--heading); font-weight: 600; }
.cal-status-pill.is-live { border-color: var(--accent); box-shadow: 0 0 24px color-mix(in srgb, var(--glow) 35%, transparent); }

/* migająca kropka „na żywo” */
.cal-live-dot {
    display: none;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--heading);
    box-shadow: 0 0 8px var(--glow);
    animation: pulse-dot 1.4s ease-in-out infinite;
}
.cal-status-pill.is-live .cal-live-dot,
.cal-card.is-live .cal-live-dot { display: inline-block; }

/* ramka tabeli */
.cal-frame {
    position: relative;
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--bg-2) 85%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--glow) 20%, transparent),
                0 0 48px color-mix(in srgb, var(--glow) 28%, transparent),
                inset 0 0 40px color-mix(in srgb, var(--accent) 10%, transparent);
    overflow: hidden;
}
/* animacja: ramka odsłania się od lewej do prawej, jak rysowana linia */
.anim .cal-frame { clip-path: inset(0 100% 0 0 round 22px); }
.anim .cal-frame.play { clip-path: inset(0 0 0 0 round 22px); transition: clip-path 1.1s cubic-bezier(0.55, 0, 0.3, 1); }

.cal-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.cal-table th,
.cal-table td { border: 1px solid var(--line-soft); }
.cal-table tr > :first-child { border-left: 0; }
.cal-table tr > :last-child { border-right: 0; }
.cal-table thead th { border-top: 0; }
.cal-table tbody tr:last-child > * { border-bottom: 0; }

.cal-table thead th {
    padding: 18px 10px;
    color: var(--heading);
    font-size: 0.85rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
    background: color-mix(in srgb, var(--line) 30%, transparent);
}
.cal-table thead th > * { vertical-align: middle; }
.cal-table thead th svg { color: var(--glow); margin-right: 8px; }
.cal-table .cal-hour-h { width: 15%; }
.cal-today-pill {
    display: inline-block; margin-left: 8px;
    font-style: normal; font-size: 0.68rem; letter-spacing: 0.5px;
    color: var(--bg); background: var(--heading);
    padding: 2px 7px; border-radius: 6px;
}
.cal-table .is-today { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cal-table thead th.is-today { box-shadow: inset 0 -2px 0 var(--accent); }

.cal-hour {
    color: var(--heading);
    font-size: 1.45rem; font-weight: 800; letter-spacing: -0.5px;
}
.cal-table td { padding: 10px; height: 128px; vertical-align: middle; }

/* karta sesji */
.cal-card {
    position: relative;
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    width: 100%;
    padding: 12px 14px;
    text-align: left; font: inherit;
    color: var(--heading);
    background: color-mix(in srgb, var(--line) 38%, var(--bg));
    border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
    border-radius: 14px;
    box-shadow: inset 0 0 18px color-mix(in srgb, var(--accent) 14%, transparent);
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.cal-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: inset 0 0 18px color-mix(in srgb, var(--accent) 20%, transparent), 0 8px 28px color-mix(in srgb, var(--glow) 30%, transparent);
}
.cal-card.is-next { border-color: var(--accent); box-shadow: inset 0 0 18px color-mix(in srgb, var(--accent) 22%, transparent), 0 0 22px color-mix(in srgb, var(--glow) 25%, transparent); }
.cal-card.is-live { border-color: var(--heading); animation: calLiveGlow 2s ease-in-out infinite; }
.cal-card.is-selected { outline: 2px solid var(--heading); outline-offset: 2px; }

@keyframes calLiveGlow {
    0%, 100% { box-shadow: 0 0 10px color-mix(in srgb, var(--glow) 30%, transparent); }
    50%      { box-shadow: 0 0 30px color-mix(in srgb, var(--glow) 70%, transparent); }
}

.cal-badge {
    display: inline-flex; align-items: center; gap: 6px;
    margin-bottom: 6px;
    padding: 2px 8px; border-radius: 6px;
    background: var(--line);
    border: 1px solid var(--accent);
    color: var(--heading);
    font-size: 0.68rem; font-weight: 800; letter-spacing: 1px;
}
.cal-time { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; }
.cal-time small { font-size: 0.72rem; font-weight: 700; color: var(--text); letter-spacing: 0.3px; }
.cal-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.cal-desc  { font-size: 0.8rem; color: var(--text); }
.cal-chat  { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 0.8rem; color: var(--text); }
.cal-chat svg { color: var(--glow); }

.cal-icon { position: absolute; top: 10px; right: 10px; pointer-events: none; }
.cal-icon-tt { color: var(--glow); opacity: 0.9; }
.cal-icon-spark { color: var(--glow); width: 46px; height: 30px; opacity: 0.85; }
.cal-icon-spark .cal-spark { stroke-width: 2; }

/* animacja wejścia: nagłówki i karty po kolei, wykresik się rysuje */
.anim .cal-frame:not(.play) thead th,
.anim .cal-frame:not(.play) .cal-hour,
.anim .cal-frame:not(.play) .cal-card { opacity: 0; }
.anim .cal-frame.play thead th,
.anim .cal-frame.play .cal-hour { animation: calFade 0.5s ease backwards; animation-delay: calc(0.25s + var(--i, 0) * 90ms); }
.anim .cal-frame.play .cal-card { animation: calPop 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(0.7s + var(--i) * 90ms); }
.anim .cal-frame.play .cal-card.is-live { animation: calPop 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) backwards, calLiveGlow 2s ease-in-out infinite; animation-delay: calc(0.7s + var(--i) * 90ms), 0s; }
.anim .cal-spark { stroke-dasharray: 1; stroke-dashoffset: 1; }
.anim .cal-frame.play .cal-spark { stroke-dashoffset: 0; transition: stroke-dashoffset 0.9s ease; transition-delay: calc(0.95s + var(--i) * 90ms); }

@keyframes calFade { from { opacity: 0; transform: translateY(-6px); } }
@keyframes calPop  { from { opacity: 0; transform: translateY(12px) scale(0.94); } }
@keyframes calSpark { from { stroke-dashoffset: 1; } }

/* szczegóły klikniętej sesji */
.cal-detail {
    margin-top: 20px;
    display: flex; align-items: center; gap: 16px;
    padding: 16px 18px 16px 22px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    animation: calFade 0.3s ease;
}
.cal-detail[hidden] { display: none; }
.cal-detail-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cal-detail-text strong { color: var(--heading); font-size: 1.05rem; }
.cal-detail-text span { color: var(--text); font-size: 0.92rem; }
.cal-add { padding: 10px 18px; white-space: nowrap; }
.cal-close {
    flex: none;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--line);
    color: var(--heading); cursor: pointer;
}
.cal-close:hover { border-color: var(--accent); }

/* telefon: zakładki z dniami zamiast tabeli */
.cal-mobile { display: none; }

@media (max-width: 860px) {
    #kalendarz { padding: 72px 0; }
    .cal-status { margin: -16px 0 22px; }
    .cal-status-pill { font-size: 0.88rem; border-radius: 16px; text-align: center; }

    .cal-frame { display: none; }
    .cal-mobile { display: block; }

    .cal-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
    .cal-tab {
        position: relative;
        padding: 12px 0;
        border-radius: 12px;
        border: 1px solid var(--line);
        background: transparent;
        color: var(--text);
        font: inherit; font-size: 0.95rem; font-weight: 700;
        cursor: pointer;
        transition: var(--transition);
    }
    .cal-tab[aria-selected="true"] {
        background: var(--accent); border-color: var(--accent); color: var(--bg);
        box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 35%, transparent);
    }
    .cal-tab.is-today::after {
        content: ''; position: absolute; top: 6px; right: 6px;
        width: 6px; height: 6px; border-radius: 50%;
        background: var(--glow);
    }
    .cal-tab.is-today[aria-selected="true"]::after { background: var(--bg); }

    .cal-day { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
    .cal-day .cal-card { animation: calPop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(var(--i) * 70ms); padding: 14px 16px; }
    /* na telefonie wykresik rysuje się przy każdym pokazaniu dnia */
    .anim .cal-day .cal-spark { stroke-dashoffset: 0; animation: calSpark 0.8s ease backwards; animation-delay: calc(0.2s + var(--i) * 70ms); }
    .cal-day .cal-card.is-live { animation: calPop 0.4s backwards, calLiveGlow 2s ease-in-out infinite; }
    .cal-empty {
        padding: 22px; text-align: center;
        border: 1px dashed var(--line); border-radius: 14px;
        color: var(--text);
    }

    .cal-detail { flex-wrap: wrap; padding: 16px; }
    .cal-detail-text { flex-basis: calc(100% - 60px); }
    .cal-add { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .cal-day .cal-card,
    .cal-card.is-live,
    .cal-detail { animation: none; }
}

/* ═══════════════════════════════════════════════
   EKIPA: WŁAŚCICIEL + EDUKATORZY
═══════════════════════════════════════════════ */
.owner-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 40px;
    max-width: 880px; margin: 0 auto;
    padding: 40px 48px;
    background: var(--bg-2);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 48px color-mix(in srgb, var(--glow) 22%, transparent);
    transition: box-shadow var(--transition), opacity 0.7s ease, transform 0.7s ease;
}
.owner-card:hover { box-shadow: 0 0 64px color-mix(in srgb, var(--glow) 34%, transparent); }
.owner-card .member-photo {
    width: 168px; height: 168px; margin: 0;
    font-size: 3.6rem;
    box-shadow: 0 0 0 8px var(--bg-2), 0 0 0 9px var(--accent), 0 0 56px color-mix(in srgb, var(--glow) 50%, transparent);
}
.owner-body { display: flex; flex-direction: column; align-items: flex-start; }
.owner-body h3 {
    color: var(--heading);
    font-size: 2.2rem; font-weight: 900; letter-spacing: -1px; line-height: 1.1;
    margin: 10px 0 8px;
}

.role-badge {
    display: inline-block;
    padding: 4px 12px; border-radius: 50px;
    font-size: 0.72rem; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--text);
    background: var(--line-soft);
    border: 1px solid var(--line);
    margin-bottom: 10px;
}
.role-badge.is-owner { color: var(--bg); background: var(--heading); border-color: var(--heading); margin-bottom: 0; }

.team-sub {
    text-align: center;
    color: var(--heading);
    font-size: 1.1rem; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
    margin: 64px 0 24px;
}
/* tyle kart, ile osób — wyśrodkowane (4 mieszczą się w jednym rzędzie) */
.team-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 260px)); justify-content: center; gap: 16px; }
.member { position: relative; transition: border-color var(--transition), transform var(--transition), opacity 0.7s ease; }
.member:hover { border-color: var(--accent); }
.member h3 { margin-top: 2px; }

.member-actions {
    margin-top: auto;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
}
.owner-body .member-actions { justify-content: flex-start; margin-top: 18px; }
.member .member-actions { flex-direction: column; gap: 10px; }
.member-actions .member-link { white-space: nowrap; font-size: 0.82rem; }
.member-actions .member-link { margin-top: 0; position: relative; z-index: 1; }

.member-profile {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    font-size: 0.9rem; font-weight: 700;
    color: var(--heading); text-decoration: none;
    padding: 8px 16px; border-radius: 50px;
    border: 1px solid var(--accent);
    transition: var(--transition);
}
.member-profile:hover { background: var(--accent); color: var(--bg); }
.btn-primary.member-profile { border: 0; color: var(--bg); }
/* cała karta klika się jak link do profilu */
.member-profile::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.member .member-profile::after,
.owner-card .member-profile::after { border-radius: var(--radius-lg); }
.member:has(.member-profile:focus-visible),
.owner-card:has(.member-profile:focus-visible) { outline: 2px solid var(--heading); outline-offset: 3px; }

@media (max-width: 860px) {
    .owner-card { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 22px; padding: 32px 22px; }
    .owner-card .member-photo { width: 128px; height: 128px; font-size: 2.8rem; }
    .owner-body { align-items: center; }
    .owner-body h3 { font-size: 1.8rem; }
    .owner-body .member-actions { justify-content: center; }
    .team-sub { margin: 44px 0 18px; }
    .team-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   PODSTRONA EDUKATORA (dixitradingclub.com/<slug>)
═══════════════════════════════════════════════ */
.profile-hero {
    position: relative; overflow: hidden;
    padding: calc(var(--header-h) + 56px) 0 100px;
}
.profile-hero .grid-bg { opacity: 0.6; }
.profile-hero > .container { position: relative; z-index: 1; max-width: 1080px; }

.profile-back {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text); text-decoration: none;
    font-size: 0.92rem; font-weight: 600;
    padding: 8px 14px 8px 10px; border-radius: 50px;
    border: 1px solid var(--line);
    margin-bottom: 44px;
    transition: var(--transition);
}
.profile-back:hover { color: var(--heading); border-color: var(--accent); }

.profile-head {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 64px;
}
.profile-photo {
    width: 260px; height: 260px; margin: 0;
    font-size: 5.5rem;
    box-shadow: 0 0 0 10px var(--bg), 0 0 0 11px var(--accent), 0 0 90px color-mix(in srgb, var(--glow) 55%, transparent);
}
.profile-intro { display: flex; flex-direction: column; align-items: flex-start; }
.profile-intro h1 {
    color: var(--heading);
    font-size: clamp(2.8rem, 5.5vw, 4.8rem);
    font-weight: 900; letter-spacing: -2px; line-height: 1.02;
    margin: 14px 0 16px;
}
.profile-intro .hero-actions { margin-top: 18px; }

.profile-results { padding: 120px 0; }
.profile-missing h1 { color: var(--heading); font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; letter-spacing: -1px; }

@media (max-width: 860px) {
    .profile-hero { padding: calc(var(--header-h) + 28px) 0 64px; }
    .profile-back { margin-bottom: 28px; }
    .profile-head { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 32px; }
    .profile-photo { width: 180px; height: 180px; font-size: 3.8rem; }
    .profile-intro { align-items: center; }
    .profile-intro h1 { font-size: clamp(2.4rem, 11vw, 3.2rem); letter-spacing: -1px; }
    .profile-intro .hero-actions { margin-top: 12px; }
    .profile-results { padding: 72px 0; }
}

/* imię pod ksywką (opcjonalne) */
.member-name { color: var(--text); font-size: 0.85rem; font-weight: 600; margin: -4px 0 8px; }
.profile-name { color: var(--text); font-size: 1.1rem; font-weight: 600; margin: -8px 0 14px; }

/* ═══════════════════════════════════════════════
   BANER Z DISCORDA (Nitro) — za zdjęciem profilowym
═══════════════════════════════════════════════ */
/* karta w sekcji ekipy: baner na górze, zdjęcie nachodzi na jego dolną krawędź */
.member.has-banner { padding-top: 0; }
.member-banner {
    position: relative;
    align-self: stretch;
    height: 96px;
    margin: 0 -28px;
    border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
    overflow: hidden;
}
.member-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* dół banera coraz bardziej przezroczysty, aż znika */
.member-banner,
.profile-banner {
    -webkit-mask-image: linear-gradient(to bottom, #000 30%, rgba(0,0,0,.75) 50%, rgba(0,0,0,.45) 66%, rgba(0,0,0,.2) 80%, rgba(0,0,0,.06) 91%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 30%, rgba(0,0,0,.75) 50%, rgba(0,0,0,.45) 66%, rgba(0,0,0,.2) 80%, rgba(0,0,0,.06) 91%, transparent 100%);
}
.member.has-banner .member-photo { position: relative; margin-top: -56px; }

/* profil: szeroki baner nad zdjęciem */
.profile-head.has-banner { grid-template-rows: auto auto; row-gap: 0; }
.profile-banner {
    grid-column: 1 / -1;
    position: relative;
    height: 280px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
}
.profile-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-head.has-banner .profile-photo-wrap { position: relative; z-index: 1; margin: -150px 0 0 48px; }
.profile-head.has-banner .profile-intro { padding-top: 28px; align-self: end; }

@media (max-width: 860px) {
    .member-banner { margin: 0 -22px; height: 110px; }
    .member.has-banner .member-photo { margin-top: -56px; }
    .profile-banner { height: 150px; }
    .profile-head.has-banner { row-gap: 28px; }
    .profile-head.has-banner .profile-photo-wrap { margin: -128px 0 0; }
    .profile-head.has-banner .profile-intro { padding-top: 0; }
}

/* wyniki (strona główna i profile): 4 kolumny, zrzuty o różnych proporcjach układają się bez dziur
   (wysokość każdego kafelka liczy wspolne.js — grid-row-end: span N) */
#wyniki .gallery-masonry {
    --gap: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 4px;
    column-gap: var(--gap);
    row-gap: 0;
    align-items: start;
}
#wyniki .gallery-masonry > li { margin-bottom: var(--gap); }
#wyniki .gallery-masonry .gallery-item:has(img) { aspect-ratio: auto; }
#wyniki .gallery-masonry .gallery-item img { height: auto; }
@media (max-width: 1100px) { #wyniki .gallery-masonry { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px)  { #wyniki .gallery-masonry { --gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* zwijane wyniki */
.gallery-collapse { position: relative; overflow: hidden; }
.gallery-collapse.is-collapsed::after {   /* dół łagodnie zanika */
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 180px;
    background: linear-gradient(to bottom, transparent, var(--bg) 92%);
    pointer-events: none;
}
.section-alt .gallery-collapse.is-collapsed::after { background: linear-gradient(to bottom, transparent, var(--bg-2) 92%); }
.gallery-more { display: flex; justify-content: center; margin-top: 8px; position: relative; z-index: 1; }
.gallery-more[hidden] { display: none; }
.gallery-more .btn-ghost { color: var(--heading); border-color: var(--accent); }
.gallery-more .btn-ghost:hover { background: var(--line-soft); }

/* Telegram + TikTok obok siebie pod „Zobacz profil” */
.member-socials { display: flex; justify-content: center; gap: 8px; position: relative; z-index: 1; }
.owner-body .member-socials { justify-content: flex-start; }
.member-socials .member-link { margin-top: 0; }
a.member-link.member-tg:hover,
a.member-link:hover { border-color: var(--accent); color: var(--heading); }
