/* =========================================================
   Dr Konrad Rylski — actbe-inspired minimal scrollytelling
   ========================================================= */

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

html,
body {
    height: 100%;
}

:root {
    /* Light theme (hero) */
    --bg-light: #f5f5f5;
    --bg-light-2: #ebebeb;
    --text-dark: #1a1a1a;
    --text-dark-muted: #555;
    
    /* Dark theme (other sections) */
    --bg-dark: #0d0d0d;
    --bg-dark-2: #1a1a1a;
    --text-light: #f5f5f5;
    --text-light-muted: #aaa;

    /* Accent colors - professional, muted */
    --accent-rgb: 46 180 180;    /* teal */
    --accent-2-rgb: 80 120 200;  /* steel blue */
    --accent-3-rgb: 180 140 100; /* warm brown */
    
    --accent: rgb(var(--accent-rgb));
    --accent-2: rgb(var(--accent-2-rgb));
    --accent-3: rgb(var(--accent-3-rgb));

    /* Legacy compatibility */
    --cyan-rgb: 46 180 180;
    --blue-rgb: 80 120 200;
    --purple-rgb: 180 140 100;
    --pink-rgb: 200 100 120;
    --green-rgb: 120 180 100;
    
    --cyan: rgb(var(--cyan-rgb));
    --blue: rgb(var(--blue-rgb));
    --purple: rgb(var(--purple-rgb));
    --pink: rgb(var(--pink-rgb));
    --green: rgb(var(--green-rgb));

    --text: var(--text-light);
    --muted: var(--text-light-muted);
    --faint: rgba(255, 255, 255, 0.52);

    --glass: rgba(255, 255, 255, 0.06);
    --glass-2: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.14);
    --border-dark: rgba(0, 0, 0, 0.1);

    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
    --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.1);

    --wrap: min(1100px, calc(100% - 2 * clamp(24px, 5vw, 64px)));
    --topbar-h: 72px;
}

html {
    scroll-behavior: smooth;
    background: var(--bg-dark);
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg-dark);
    overflow-x: hidden;
    min-height: 100vh;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Keep anchor jumps visible below the fixed topbar */
section[id] {
    scroll-margin-top: calc(var(--topbar-h) + 18px);
}

a {
    color: inherit;
}

button {
    font: inherit;
}

:root {
    --flow-node: 44px;
}

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

:focus-visible {
    outline: 2px solid rgb(var(--cyan-rgb) / 0.65);
    outline-offset: 3px;
}

/* =========================================================
   ACTBE-Inspired Background — 3D Spheres + theme transitions
   ========================================================= */

#stage {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.fx-overlay {
    display: none; /* Not needed for actbe style */
}

/* Theme transitions */
body {
    transition: background-color 0.6s ease, color 0.4s ease;
}

body.theme-light {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

body.theme-dark {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

/* =========================================================
   Topbar
   ========================================================= */

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 clamp(24px, 5vw, 64px);
    background: transparent;
    border-bottom: none;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

/* Light theme topbar */
.theme-light .topbar {
    background: rgba(245, 245, 245, 0.8);
    backdrop-filter: blur(12px);
}

/* Dark theme topbar */
.theme-dark .topbar {
    background: rgba(13, 13, 13, 0.8);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.brand__title {
    font-family: "Inter", system-ui, sans-serif;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 0.75rem;
    transition: color 0.4s ease;
}

.theme-light .brand__title {
    color: var(--text-dark-muted);
}

.theme-dark .brand__title {
    color: var(--text-light-muted);
}

.brand__name {
    font-family: "Inter", system-ui, sans-serif;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.05em;
    transition: color 0.4s ease;
}

.theme-light .brand__name {
    color: var(--text-dark);
}

.theme-dark .brand__name {
    color: var(--text-light);
}

.topbar__nav {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.topbar__nav a {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: none;
    transition: color 0.3s ease, background 0.3s ease;
}

.theme-light .topbar__nav a {
    color: var(--text-dark-muted);
}

.theme-dark .topbar__nav a {
    color: var(--text-light-muted);
}

.topbar__nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgb(var(--cyan-rgb) / 0.22);
    color: rgba(255, 255, 255, 0.92);
}

.topbar__nav a[aria-current="true"] {
    background: rgb(var(--cyan-rgb) / 0.10);
    border-color: rgb(var(--cyan-rgb) / 0.25);
    color: rgb(var(--cyan-rgb) / 0.95);
}

.sound {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    padding: 10px 14px;
    cursor: pointer;
    transition: transform 180ms ease, border-color 200ms ease, background 200ms ease, color 200ms ease;
    white-space: nowrap;
}

.sound:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgb(var(--cyan-rgb) / 0.24);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.sound[aria-pressed="true"] {
    border-color: rgb(var(--cyan-rgb) / 0.35);
    background: rgb(var(--cyan-rgb) / 0.10);
    color: rgb(var(--cyan-rgb) / 0.95);
}

/* =========================================================
   Content + sections
   ========================================================= */

.content {
    position: relative;
    z-index: 2;
    padding-top: var(--topbar-h);
}

.wrap {
    width: var(--wrap);
    margin: 0 auto;
}

.kicker {
    margin: 0 0 12px;
    font-size: 0.9rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgb(var(--cyan-rgb) / 0.85);
}

.h2 {
    margin: 0;
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-weight: 650;
    font-size: clamp(32px, 4vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.lead {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.35vw, 1.15rem);
    line-height: 1.7;
    max-width: 70ch;
}

.chapter {
    padding: clamp(100px, 12vh, 160px) 0;
    background: var(--bg-dark);
    color: var(--text-light);
    position: relative;
    z-index: 10;
}

/* Strategia has a pinned, full-viewport flow — start it sooner */
#strategia.chapter {
    padding-top: clamp(60px, 8vh, 100px);
    padding-bottom: clamp(20px, 3vh, 40px);
}

.chapter::before {
    content: "";
    display: block;
    width: var(--wrap);
    margin: 0 auto 26px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}

.grid3 {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card {
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-soft);
    padding: 22px 22px 24px;
    transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgb(var(--cyan-rgb) / 0.22);
    background: rgba(255, 255, 255, 0.07);
}

.card h3 {
    margin: 0 0 10px;
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
    min-height: 100vh;
    display: grid;
    align-items: center;
    padding: calc(var(--topbar-h) + 60px) 0 80px;
    position: relative;
    overflow: hidden;
    /* Light background for hero */
    background: var(--bg-light);
    transition: background 0.6s ease;
}

#heroRing {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    transform: translateZ(0);
    /* subtle separation on white background */
    filter:
        drop-shadow(0 26px 60px rgba(0, 0, 0, 0.08))
        drop-shadow(0 10px 22px rgba(0, 0, 0, 0.06));
}

.hero__grid {
    width: var(--wrap);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: clamp(40px, 6vw, 100px);
    position: relative;
    z-index: 1;
}

.hero__title {
    margin: 0;
    font-family: "Inter", system-ui, sans-serif;
    font-size: clamp(36px, 4.5vw, 72px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 600;
}

.hero__title span {
    display: block;
    color: var(--text-dark);
}

.hero__title span:nth-child(2),
.hero__title span:nth-child(3) {
    color: var(--text-dark);
}

.hero__lead {
    margin: 24px 0 0;
    color: var(--text-dark-muted);
    line-height: 1.8;
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    max-width: 52ch;
    font-weight: 400;
}

.hero__lead strong {
    color: var(--text-dark);
    font-weight: 600;
}

.hero__cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-dark);
    background: transparent;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Light theme buttons (hero) */
.hero .btn {
    color: var(--text-dark);
    border-color: var(--text-dark);
}

.hero .btn:hover {
    background: var(--text-dark);
    color: var(--bg-light);
}

.hero .btn.primary {
    background: var(--text-dark);
    color: var(--bg-light);
    border-color: var(--text-dark);
}

.hero .btn.primary:hover {
    background: transparent;
    color: var(--text-dark);
}

/* Dark theme buttons */
.theme-dark .btn {
    color: var(--text-light);
    border-color: rgba(255, 255, 255, 0.3);
}

.theme-dark .btn:hover {
    background: var(--text-light);
    color: var(--bg-dark);
}

.meta {
    margin-top: 22px;
    display: grid;
    gap: 12px;
}

.meta__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.chip {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Hero chips (light theme) */
.hero .chip {
    border: 1px solid var(--border-dark);
    background: transparent;
    color: var(--text-dark-muted);
}

/* Dark theme chips */
.theme-dark .chip {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light-muted);
}

.link {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    padding-bottom: 2px;
    transition: color 200ms ease, border-color 200ms ease;
}

.link:hover {
    color: rgb(var(--cyan-rgb) / 0.92);
    border-color: rgb(var(--cyan-rgb) / 0.5);
}

.hero__portrait {
    position: relative;
    display: grid;
    place-items: center;
}

/* Container for the portrait with creative styling */
.hero__portrait-wrapper {
    position: relative;
    width: min(380px, 70vw);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__portrait img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* Elegant rounded square shape */
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    border: 2px solid rgb(var(--cyan-rgb) / 0.3);
    /* Enhanced look - remove white background effect */
    filter: contrast(1.08) saturate(1.1);
    transform: translateZ(0);
    /* Glow effect */
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgb(var(--cyan-rgb) / 0.25),
        inset 0 0 80px rgba(0, 0, 0, 0.2);
    /* Animate the organic shape */
    animation: morphShape 8s ease-in-out infinite;
    /* Blend to reduce white background visibility */
    background: linear-gradient(135deg, 
        rgb(var(--cyan-rgb) / 0.1), 
        rgb(var(--blue-rgb) / 0.15)
    );
}

/* Overlay gradient to blend white background with theme */
.hero__portrait-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: radial-gradient(
        ellipse 100% 100% at 50% 0%,
        transparent 40%,
        rgb(var(--cyan-rgb) / 0.08) 70%,
        rgb(var(--blue-rgb) / 0.12) 100%
    );
    pointer-events: none;
    animation: morphShape 8s ease-in-out infinite;
}

@keyframes morphShape {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
}

/* Glowing backdrop behind portrait */
.portrait-backdrop {
    position: absolute;
    inset: -20%;
    background: radial-gradient(
        ellipse 70% 70% at 50% 50%,
        rgb(var(--cyan-rgb) / 0.35),
        rgb(var(--blue-rgb) / 0.2) 40%,
        transparent 70%
    );
    filter: blur(60px);
    z-index: 0;
    animation: backdropPulse 4s ease-in-out infinite;
}

@keyframes backdropPulse {
    0%, 100% {
        opacity: 0.9;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotate(5deg);
    }
}

/* Floating accent elements around portrait */
.portrait-accents {
    position: absolute;
    inset: -40px;
    z-index: 3;
    pointer-events: none;
}

.portrait-accent {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgb(var(--cyan-rgb) / 0.6),
        rgb(var(--cyan-rgb) / 0) 70%
    );
    animation: accentFloat 6s ease-in-out infinite;
}

.portrait-accent:nth-child(1) {
    width: 12px;
    height: 12px;
    top: 15%;
    right: 5%;
    animation-delay: 0s;
}

.portrait-accent:nth-child(2) {
    width: 8px;
    height: 8px;
    top: 25%;
    left: 10%;
    animation-delay: -1.5s;
    background: radial-gradient(
        circle,
        rgb(var(--purple-rgb) / 0.6),
        rgb(var(--purple-rgb) / 0) 70%
    );
}

.portrait-accent:nth-child(3) {
    width: 6px;
    height: 6px;
    bottom: 35%;
    right: 8%;
    animation-delay: -3s;
}

.portrait-accent:nth-child(4) {
    width: 10px;
    height: 10px;
    bottom: 45%;
    left: 5%;
    animation-delay: -4.5s;
    background: radial-gradient(
        circle,
        rgb(var(--green-rgb) / 0.5),
        rgb(var(--green-rgb) / 0) 70%
    );
}

@keyframes accentFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    25% {
        transform: translate(5px, -8px) scale(1.2);
        opacity: 1;
    }
    50% {
        transform: translate(-3px, -12px) scale(0.9);
        opacity: 0.6;
    }
    75% {
        transform: translate(-6px, -4px) scale(1.1);
        opacity: 0.9;
    }
}

/* Orbiting ring effect */
.portrait-ring {
    position: absolute;
    width: 115%;
    height: 115%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgb(var(--cyan-rgb) / 0.15);
    border-radius: 50%;
    z-index: 3;
    animation: ringOrbit 20s linear infinite;
    pointer-events: none;
}

.portrait-ring::before,
.portrait-ring::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, rgb(var(--cyan-rgb)), rgb(var(--blue-rgb)));
    border-radius: 50%;
    box-shadow: 
        0 0 20px rgb(var(--cyan-rgb) / 0.8),
        0 0 40px rgb(var(--cyan-rgb) / 0.4);
}

.portrait-ring::before {
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.portrait-ring::after {
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
}

/* Second orbiting ring */
.hero__portrait-wrapper::before {
    content: "";
    position: absolute;
    width: 130%;
    height: 130%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgb(var(--purple-rgb) / 0.1);
    border-radius: 50%;
    z-index: 3;
    animation: ringOrbit2 30s linear infinite reverse;
    pointer-events: none;
}

@keyframes ringOrbit {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes ringOrbit2 {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    animation: hintFloat 2.8s ease-in-out infinite;
}

@keyframes hintFloat {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-6px);
    }
}

/* =========================================================
   Values / seedline
   ========================================================= */

.values {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.values__item {
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    padding: 22px 22px 24px;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-soft);
}

.values__item h3 {
    margin: 0 0 10px;
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.values__item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.seedline {
    margin-top: 26px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgb(var(--cyan-rgb) / 0.18);
    background: rgb(var(--cyan-rgb) / 0.06);
    backdrop-filter: blur(16px);
}

.seedline__dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgb(var(--cyan-rgb) / 0.95));
    box-shadow: 0 0 16px rgb(var(--cyan-rgb) / 0.55);
    flex-shrink: 0;
}

.seedline__text {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

/* =========================================================
   Companies — vertical scroll drives horizontal movement
   ========================================================= */

.companies {
    padding: clamp(40px, 5vh, 60px) 0 0;
    position: relative;
    z-index: 1;
    background: var(--bg-light);
    color: var(--text-dark);
}

.companies__sticky {
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    display: flex;
    align-items: center;
    overflow: hidden;
}

.companies__head {
    position: absolute;
    top: clamp(12px, 3vh, 24px);
    left: clamp(18px, 5vw, 48px);
    right: clamp(18px, 5vw, 48px);
    z-index: 6;
    pointer-events: none;
}

.companies .h2 {
    color: var(--text-dark);
}

.companies .lead {
    color: var(--text-dark-muted);
}

.companies__stage {
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.companies__track {
    display: flex;
    gap: 18px;
    padding: 80px clamp(18px, 5vw, 48px);
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.company {
    flex: 0 0 min(460px, 84vw);
    border-radius: var(--radius);
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(18px);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.12);
    padding: 24px 24px 22px;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.company:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 0, 0, 0.18);
    background: rgba(255, 255, 255, 0.74);
}

.company[aria-disabled="true"] {
    opacity: 0.55;
    pointer-events: none;
    filter: grayscale(0.2);
}

.company h3 {
    margin: 0 0 10px;
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-weight: 650;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
}

.company p {
    margin: 0 0 16px;
    color: var(--text-dark-muted);
    line-height: 1.7;
}

.pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pill {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.88rem;
    border: 1px solid rgb(var(--cyan-rgb) / 0.18);
    background: rgb(var(--cyan-rgb) / 0.07);
    color: rgb(var(--cyan-rgb) / 0.9);
    white-space: nowrap;
}

/* =========================================================
   Flow (bez boxa): scroll -> przejście po ścieżce (SVG path)
   ========================================================= */

.flow {
    position: relative;
    margin-top: 22px;
    /* break out of wrap – feels more "free" */
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.flow__sticky {
    position: sticky;
    top: calc(var(--topbar-h) + 10px);
    height: calc(100vh - var(--topbar-h) - 20px);
    display: grid;
    align-items: center;
    padding: 0 clamp(18px, 5vw, 48px);
    overflow: hidden;
}

.flow__headline {
    position: absolute;
    top: clamp(12px, 3.5vh, 28px);
    left: clamp(18px, 5vw, 48px);
    right: clamp(18px, 5vw, 48px);
    z-index: 6;
    pointer-events: none;
}

.flow__headline .kicker {
    margin-bottom: 10px;
}

.flow__headline .h2 {
    font-size: clamp(30px, 3.8vw, 56px);
    max-width: 24ch;
}

.flow__hscroll {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 2;
}

.flow__htrack {
    display: flex;
    gap: clamp(60px, 10vw, 140px);
    will-change: transform;
    transform: translate3d(0, 0, 0);
    padding: 0 clamp(18px, 5vw, 48px);
}

.flow__card {
    position: relative;
    flex: 0 0 min(760px, 86vw);
    padding: clamp(10px, 2vh, 22px) 0;
}

.flow__cardIcon {
    position: absolute;
    right: clamp(-10px, -1vw, -4px);
    top: 50%;
    transform: translateY(-50%);
    width: clamp(92px, 12vw, 160px);
    height: clamp(92px, 12vw, 160px);
    opacity: 0.12;
    filter: drop-shadow(0 0 24px rgb(var(--cyan-rgb) / 0.12));
}

.flow__cardIconSvg {
    width: 100%;
    height: 100%;
    stroke: rgb(var(--cyan-rgb) / 0.75);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.flow__cardText {
    margin: 0;
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.05;
    font-size: clamp(28px, 4.4vw, 64px);
    color: rgba(255, 255, 255, 0.92);
    max-width: 18ch;
    text-wrap: balance;
}

.flow__svg {
    position: relative;
    z-index: 1;
    width: 100%;
    height: min(260px, 32vh);
    overflow: visible;
}

.flow__path {
    fill: none;
    stroke: url(#flowGrad);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-dasharray: 6 10;
    opacity: 0.55;
}

.flow__path--glow {
    stroke-width: 8;
    opacity: 0.10;
    filter: blur(10px);
}

.flow__nodes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
}

.flow__node {
    position: absolute;
    width: var(--flow-node);
    height: var(--flow-node);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(14px);
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0.55;
    transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), opacity 260ms ease, border-color 260ms ease;
    appearance: none;
    padding: 0;
    cursor: pointer;
}

.flow__node::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgb(var(--cyan-rgb) / 0.22), transparent 62%);
    filter: blur(10px);
    opacity: 0;
    transition: opacity 260ms ease;
}

.flow__node.is-active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
    border-color: rgb(var(--cyan-rgb) / 0.28);
}

.flow__node.is-active::before {
    opacity: 1;
}

.flow__iconSvg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: rgba(255, 255, 255, 0.92);
}

.flow__iconSvg--lg {
    width: 22px;
    height: 22px;
}

.flow__cursor {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: rgb(var(--cyan-rgb) / 0.95);
    box-shadow: 0 0 20px rgb(var(--cyan-rgb) / 0.35);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 4;
}

.flow__label {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, -115%);
    /* Hide tooltip text above the moving blue dot */
    display: none;
    align-items: center;
    gap: 10px;
    max-width: min(820px, calc(100% - 24px));
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
}

.flow__labelIcon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.flow__labelText {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

@media (prefers-reduced-motion: reduce) {
    .flow__path {
        stroke-dasharray: none;
    }
}

/* =========================================================
   Contact
   ========================================================= */

.contact-grid {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.contact-card {
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-soft);
    padding: 22px;
    text-decoration: none;
    display: grid;
    gap: 10px;
    transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: rgb(var(--cyan-rgb) / 0.22);
    background: rgba(255, 255, 255, 0.07);
}

.contact-card__label {
    color: var(--faint);
    letter-spacing: 0.26em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.contact-card__value {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.fine {
    margin: 18px 0 0;
    color: var(--faint);
    line-height: 1.7;
    max-width: 70ch;
}

.footer {
    padding: 26px 0 36px;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
}

.footer p {
    margin: 0;
}

.noscript {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 100;
    border-radius: 999px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.85);
    width: min(920px, calc(100% - 36px));
    text-align: center;
}

/* =========================================================
   Reveal animations
   ========================================================= */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
    transition:
        opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
        transform 900ms cubic-bezier(0.16, 1, 0.3, 1),
        filter 900ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
}

.reveal.is-inview {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 980px) {
    :root {
        --topbar-h: 70px;
    }

    .topbar__nav {
        display: none;
    }

    .hero__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero__portrait {
        order: -1;
    }

    .grid3 {
        grid-template-columns: 1fr;
    }

    .values {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

}

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

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

    .portrait-ring,
    .scroll-hint {
        animation: none;
    }
}

