/* ==========================================================================
   LegacyEvents – redesign 2026
   Styl: kinetyczna typografia + techniczny HUD, czerń i jeden akcent (fiolet).
   Ładowany po style.css – nadpisuje tokeny i komponenty, dodaje nowe sekcje (le-*).
   ========================================================================== */

:root {
    --bg-color: #07060b;
    --surface-color: #0d0b14;
    --card-bg: rgba(15, 12, 24, 0.86);
    --border-color: rgba(238, 234, 246, 0.1);
    --text-color: #eeeaf6;
    --text-muted: #948ca8;
    --primary-color: #a855f7;
    --secondary-color: #c99bff;
    --primary-glow: rgba(168, 85, 247, 0.55);

    --le-ink: #eeeaf6;
    --le-muted: #948ca8;
    --le-dim: #5c5570;
    --le-accent: #a855f7;
    --le-accent-hi: #c99bff;
    --le-accent-deep: #6d28d9;
    --le-line: rgba(238, 234, 246, 0.1);
    --le-line-strong: rgba(238, 234, 246, 0.22);
    --le-grid: rgba(168, 85, 247, 0.07);
    --le-paper: #ebe7f2;
    --le-paper-ink: #17121f;

    --font-main: 'Archivo', 'Space Grotesk', system-ui, sans-serif;
    --font-heading: 'Archivo', 'Space Grotesk', system-ui, sans-serif;
    --le-mono: 'JetBrains Mono', ui-monospace, monospace;
    --le-serif: 'Instrument Serif', Georgia, serif;
    --le-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    background-image:
        linear-gradient(var(--le-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--le-grid) 1px, transparent 1px);
    background-size: 88px 88px;
    background-attachment: fixed;
    color: var(--le-ink);
    font-family: var(--font-main);
    font-variation-settings: "wdth" 100;
    letter-spacing: 0.005em;
}

::selection {
    background: var(--le-accent);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--le-accent-hi);
    outline-offset: 3px;
}

/* --- Wspólne drobiazgi HUD --- */
.le-mono,
.hud-label {
    font-family: var(--le-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--le-muted);
}

.hud-label::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 10px;
    background: var(--le-accent);
    vertical-align: 1px;
}

.le-blink {
    animation: leBlink 1s steps(1) infinite;
}

@keyframes leBlink {
    50% { opacity: 0; }
}

/* ramka celownika – 4 narożniki */
.le-brackets {
    position: relative;
}

.le-brackets::before,
.le-brackets::after {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    background:
        linear-gradient(var(--le-accent), var(--le-accent)) top left / 14px 2px no-repeat,
        linear-gradient(var(--le-accent), var(--le-accent)) top left / 2px 14px no-repeat,
        linear-gradient(var(--le-accent), var(--le-accent)) top right / 14px 2px no-repeat,
        linear-gradient(var(--le-accent), var(--le-accent)) top right / 2px 14px no-repeat,
        linear-gradient(var(--le-accent), var(--le-accent)) bottom left / 14px 2px no-repeat,
        linear-gradient(var(--le-accent), var(--le-accent)) bottom left / 2px 14px no-repeat,
        linear-gradient(var(--le-accent), var(--le-accent)) bottom right / 14px 2px no-repeat,
        linear-gradient(var(--le-accent), var(--le-accent)) bottom right / 2px 14px no-repeat;
}

.le-brackets::after {
    display: none;
}

/* --- Nagłówek --- */
.main-header {
    background: rgba(7, 6, 11, 0.72);
    backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s, background 0.4s;
}

.main-header.scrolled {
    background: rgba(7, 6, 11, 0.9);
    border-bottom-color: var(--le-line);
}

.main-nav a {
    font-family: var(--le-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--le-ink);
    text-shadow: none;
    position: relative;
}

.main-nav > .nav-links > li > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: var(--le-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--le-ease);
}

.main-nav > .nav-links > li > a:hover::after,
.main-nav > .nav-links > li > a:focus-visible::after {
    transform: scaleX(1);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--le-accent-hi);
    text-shadow: none;
}

.dropdown-menu {
    background: rgba(10, 8, 16, 0.97);
    border: 1px solid var(--le-line-strong);
    border-radius: 0;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

.mega-menu .mega-heading {
    font-family: var(--le-mono);
    color: var(--le-accent-hi);
}

.dropdown-menu a {
    font-family: var(--font-main);
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
}

/* --- Typografia nagłówków --- */
h1, h2, h3, h4,
.section-title,
.subpage-title {
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

.section-title {
    font-size: clamp(2.1rem, 5.2vw, 4.4rem);
    font-weight: 850;
    font-variation-settings: "wdth" 118;
    text-transform: uppercase;
    line-height: 0.95;
    letter-spacing: -0.02em;
    text-shadow: none;
}

.magical-text,
.section-title .magical-text,
.subpage-title .magical-text {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: currentColor;
    color: var(--le-accent);
    text-shadow: none;
    animation: none;
}

.handwritten-title {
    font-family: var(--le-serif);
    font-style: italic;
    font-weight: 400;
}

/* --- Przyciski --- */
.cta-button {
    font-family: var(--le-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 0;
    padding: 16px 26px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.3s, border-color 0.3s, transform 0.3s var(--le-ease);
}

.cta-button.primary {
    background: var(--le-accent);
    color: #fff;
    border: 1px solid var(--le-accent);
    box-shadow: 0 0 0 0 transparent;
}

.cta-button.primary::before,
.cta-button.secondary::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: #fff;
    transform: translateX(-101%);
    transition: transform 0.45s var(--le-ease);
}

.cta-button.primary:hover,
.cta-button.primary:focus-visible {
    color: var(--le-paper-ink);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.45);
    transform: translateY(-2px);
}

.cta-button.primary:hover::before,
.cta-button.primary:focus-visible::before,
.cta-button.secondary:hover::before,
.cta-button.secondary:focus-visible::before {
    transform: translateX(0);
}

.cta-button.secondary {
    background: transparent;
    color: var(--le-ink);
    border: 1px solid var(--le-line-strong);
}

.cta-button.secondary::before {
    background: var(--le-accent);
}

.cta-button.secondary:hover,
.cta-button.secondary:focus-visible {
    color: #fff;
    border-color: var(--le-accent);
}

.cta-button::after {
    content: " →";
}

.animated-glow-btn {
    animation: none;
}

/* --- Karty (wspólne) --- */
.event-card,
.testimonial-card,
.audience-card,
.service-tile,
.client-tile,
.feature-grid > div,
.software-trio article,
.media-figure,
.rider-card,
.oferta-kategoria-card,
.castle3d,
.castle3d-info,
.castle3d-mode {
    border-radius: 0 !important;
}

.event-card {
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.07), transparent 40%), var(--card-bg);
    border: 1px solid var(--le-line);
    transition: border-color 0.35s, transform 0.35s var(--le-ease);
}

.event-card:hover {
    border-color: var(--le-accent);
    transform: translateY(-4px);
}

.event-card h3 {
    font-variation-settings: "wdth" 110;
    font-weight: 750;
    color: var(--le-ink);
}

.card-glow {
    display: none;
}

/* zdjęcia: lekko stonowane, pełne kolory po najechaniu */
.media-figure img,
.gallery-item img,
.carousel-item img,
.oferta-kategoria-bg {
    filter: saturate(0.85) contrast(1.05);
    transition: filter 0.5s, transform 0.6s var(--le-ease);
}

.media-figure:hover img,
.gallery-item:hover img,
.carousel-item:hover img,
.oferta-kategoria-card:hover .oferta-kategoria-bg {
    filter: none;
}

/* --- Podstrony: nagłówek w stylu HUD --- */
.subpage-hero,
.subpage-hero-with-bg {
    position: relative;
    text-align: left;
}

.subpage-hero-content,
.subpage-hero {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.subpage-title {
    font-size: clamp(2.6rem, 7vw, 6rem);
    font-weight: 900;
    font-variation-settings: "wdth" 120;
    text-transform: uppercase;
    line-height: 0.92;
    letter-spacing: -0.025em;
}

.subpage-subtitle {
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    color: var(--le-muted);
    max-width: 640px;
    margin-left: 0;
}

.subpage-hero-with-bg .subpage-hero-content {
    text-align: left;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}

.subpage-hero-with-bg .subpage-subtitle {
    color: #d9d3e6;
}

.subpage-hero-bg {
    filter: saturate(0.7) brightness(0.55) contrast(1.1) !important;
}

.le-crumb {
    display: block;
    margin-bottom: 22px;
}

.text-content .lead {
    font-family: var(--le-serif);
    font-style: italic;
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    line-height: 1.25;
    color: var(--le-ink);
    font-weight: 400;
}

.text-content .pull-quote {
    border-left: 3px solid var(--le-accent);
    font-family: var(--le-serif);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--le-ink);
    background: none;
}

.text-content h2 {
    font-variation-settings: "wdth" 112;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

/* ==========================================================================
   STRONA GŁÓWNA – nowe sekcje
   ========================================================================== */
.le-home {
    overflow: hidden;
}

.le-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.le-section {
    padding: 120px 0;
    position: relative;
}

.le-section-head {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 30px;
    margin-bottom: 60px;
}

.le-section-head .section-title {
    margin: 14px 0 0;
}

.le-index {
    font-family: var(--le-mono);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--le-accent-hi);
}

.le-rule {
    height: 1px;
    background: var(--le-line-strong);
    margin-top: 26px;
    transform-origin: left;
}

.le-section-note {
    max-width: 360px;
    color: var(--le-muted);
    font-size: 0.98rem;
    line-height: 1.6;
    text-align: right;
}

/* --- HERO --- */
.le-hero {
    position: relative;
    min-height: 100svh;
    padding: 120px 0 70px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.le-hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.le-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 30% 45%, transparent 0%, rgba(7, 6, 11, 0.55) 60%, var(--bg-color) 100%),
        linear-gradient(to bottom, transparent 70%, var(--bg-color));
}

.le-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 50px;
    align-items: center;
    width: 100%;
}

.le-hud {
    position: absolute;
    z-index: 3;
    pointer-events: none;
}

.le-hud-tl { top: 108px; left: 24px; }
.le-hud-tr { top: 108px; right: 24px; text-align: right; }
.le-hud-bl { bottom: 26px; left: 24px; }
.le-hud-br { bottom: 26px; right: 24px; text-align: right; }

.le-hud .le-mono {
    display: block;
    line-height: 1.9;
}

.le-hud .le-on {
    color: var(--le-accent-hi);
}

.le-kicker {
    margin-bottom: 26px;
}

.le-headline {
    font-family: var(--font-heading);
    font-weight: 900;
    font-variation-settings: "wdth" 125;
    text-transform: uppercase;
    font-size: clamp(3.2rem, 9.4vw, 9.2rem);
    line-height: 0.86;
    letter-spacing: -0.035em;
    margin: 0;
}

.le-headline .le-line {
    display: block;
    overflow: hidden;
}

.le-headline .le-line > span {
    display: inline-block;
}

.le-word {
    color: var(--le-accent);
    position: relative;
}

.le-outline {
    color: transparent;
    -webkit-text-stroke: 2px var(--le-ink);
}

.le-serif-tag {
    display: block;
    font-family: var(--le-serif);
    font-style: italic;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    color: var(--le-muted);
    margin-top: 18px;
}

.le-hero-lead {
    max-width: 560px;
    margin: 30px 0 34px;
    font-size: 1.1rem;
    line-height: 1.65;
    color: #cfc8de;
}

/* terminal */
.le-terminal {
    max-width: 620px;
    background: rgba(10, 8, 16, 0.86);
    border: 1px solid var(--le-line-strong);
    padding: 16px 18px;
    margin-bottom: 30px;
    backdrop-filter: blur(6px);
}

.le-terminal-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.le-terminal-line {
    font-family: var(--le-mono);
    font-size: clamp(0.9rem, 1.4vw, 1.08rem);
    color: var(--le-ink);
    min-height: 1.6em;
}

.le-terminal-line .le-prompt {
    color: var(--le-accent);
    margin-right: 10px;
}

.le-terminal-line .le-typed {
    color: var(--le-accent-hi);
}

.le-caret {
    display: inline-block;
    width: 0.6em;
    height: 1.1em;
    background: var(--le-accent);
    vertical-align: -0.18em;
    margin-left: 2px;
    animation: leBlink 1s steps(1) infinite;
}

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

/* monitor ze zdjęciami */
.le-monitor {
    position: relative;
    aspect-ratio: 4 / 5;
    max-height: 70vh;
    border: 1px solid var(--le-line-strong);
    background: #000;
    overflow: hidden;
}

.le-monitor img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1.2s ease, transform 6s linear;
}

.le-monitor img.active {
    opacity: 1;
    transform: scale(1);
}

.le-monitor::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px),
        linear-gradient(180deg, rgba(7, 6, 11, 0.1), rgba(7, 6, 11, 0.55));
    pointer-events: none;
}

.le-monitor-hud {
    position: absolute;
    z-index: 2;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    font-family: var(--le-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
}

.le-monitor-hud.top { top: 12px; }
.le-monitor-hud.bottom { bottom: 12px; }

.le-rec::before {
    content: "●";
    color: #ff3b5c;
    margin-right: 6px;
    animation: leBlink 1.2s steps(1) infinite;
}

.le-crosshair {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.8;
}

.le-crosshair::before,
.le-crosshair::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.75);
}

.le-crosshair::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.le-crosshair::after { top: 50%; left: 0; right: 0; height: 1px; }

/* --- MARQUEE --- */
.le-marquee {
    border-top: 1px solid var(--le-line);
    border-bottom: 1px solid var(--le-line);
    background: var(--bg-color);
    overflow: hidden;
    padding: 18px 0;
    position: relative;
    z-index: 2;
}

.le-marquee-row {
    display: flex;
    width: max-content;
    animation: leMarquee 38s linear infinite;
}

.le-marquee-row.reverse {
    animation-direction: reverse;
    animation-duration: 44s;
}

.le-marquee-row span {
    font-family: var(--font-heading);
    font-weight: 900;
    font-variation-settings: "wdth" 125;
    text-transform: uppercase;
    font-size: clamp(2rem, 4.6vw, 4rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    padding: 0 26px;
    white-space: nowrap;
}

.le-marquee-row span:nth-child(even) {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--le-dim);
}

.le-marquee-row .le-star {
    color: var(--le-accent);
    -webkit-text-stroke: 0;
    padding: 0 6px;
}

@keyframes leMarquee {
    to { transform: translateX(-50%); }
}

/* --- LICZBY --- */
.le-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--le-line-strong);
}

.le-stat {
    padding: 36px 30px 30px 0;
    border-right: 1px solid var(--le-line);
}

.le-stat:last-child {
    border-right: 0;
}

.le-stat + .le-stat {
    padding-left: 30px;
}

.le-stat-num {
    font-family: var(--le-mono);
    font-weight: 500;
    font-size: clamp(3.2rem, 7.5vw, 6.4rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--le-ink);
    display: flex;
    align-items: flex-start;
}

.le-stat-num .stat-plus {
    color: var(--le-accent);
    font-size: 0.55em;
    margin-left: 4px;
}

.le-stat-label {
    margin-top: 18px;
    display: block;
}

.le-meter {
    margin-top: 16px;
    height: 3px;
    background: var(--le-line);
    position: relative;
    overflow: hidden;
}

.le-meter i {
    position: absolute;
    inset: 0;
    background: var(--le-accent);
    transform-origin: left;
    transform: scaleX(var(--fill, 1));
    transition: transform 1.6s var(--le-ease);
}

/* --- NASTĘPNE WYDARZENIE --- */
.le-next {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    border: 1px solid var(--le-line-strong);
    background: rgba(10, 8, 16, 0.85);
}

.le-next-media {
    position: relative;
    min-height: 420px;
    overflow: hidden;
}

.le-next-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85) contrast(1.05);
}

.le-next-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 50%, rgba(10, 8, 16, 0.95));
}

.le-next-body {
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    justify-content: center;
}

.le-next-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-variation-settings: "wdth" 118;
    text-transform: uppercase;
    font-size: clamp(2rem, 3.6vw, 3.2rem);
    line-height: 0.95;
    margin: 0;
}

.le-countdown {
    display: flex;
    gap: 22px;
    font-family: var(--le-mono);
}

.le-countdown div {
    display: flex;
    flex-direction: column;
}

.le-countdown b {
    font-size: 2.4rem;
    font-weight: 500;
    color: var(--le-ink);
    line-height: 1;
}

.le-countdown small {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--le-muted);
    margin-top: 6px;
}

/* --- DLA KOGO (nadpisanie kart) --- */
.audience-section {
    padding: 0;
    text-align: left;
}

.audience-lead {
    margin: 0 0 40px;
    text-align: left;
}

.audience-card {
    background: var(--card-bg);
    border: 1px solid var(--le-line);
    padding: 30px 28px 26px;
}

.audience-card::after {
    opacity: 0.25;
}

.audience-card h3 {
    font-variation-settings: "wdth" 112;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.25rem;
    letter-spacing: -0.005em;
}

.audience-tag {
    font-family: var(--le-mono);
    border-radius: 0;
    font-size: 10.5px;
}

/* --- OFERTA: lista indeksowa --- */
.le-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--le-line-strong);
    counter-reset: offer;
}

.le-index-list li {
    border-bottom: 1px solid var(--le-line);
}

.le-index-row {
    position: relative;
    display: grid;
    grid-template-columns: 70px 1.1fr 1.3fr 40px;
    gap: 24px;
    align-items: center;
    padding: 26px 8px;
    color: var(--le-ink);
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
}

.le-index-row::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--le-accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.45s var(--le-ease);
}

.le-index-row:hover::before,
.le-index-row:focus-visible::before {
    transform: scaleY(1);
}

.le-index-num {
    font-family: var(--le-mono);
    font-size: 13px;
    color: var(--le-accent-hi);
    transition: color 0.3s;
}

.le-index-name {
    font-family: var(--font-heading);
    font-weight: 850;
    font-variation-settings: "wdth" 118;
    text-transform: uppercase;
    font-size: clamp(1.3rem, 2.4vw, 2rem);
    line-height: 1;
    letter-spacing: -0.01em;
    transition: transform 0.45s var(--le-ease);
}

.le-index-desc {
    color: var(--le-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    transition: color 0.3s;
}

.le-index-arrow {
    font-family: var(--le-mono);
    font-size: 1.4rem;
    text-align: right;
    transition: transform 0.45s var(--le-ease);
}

.le-index-row:hover .le-index-num,
.le-index-row:hover .le-index-desc,
.le-index-row:focus-visible .le-index-num,
.le-index-row:focus-visible .le-index-desc {
    color: #fff;
}

.le-index-row:hover .le-index-name,
.le-index-row:focus-visible .le-index-name {
    transform: translateX(10px);
}

.le-index-row:hover .le-index-arrow,
.le-index-row:focus-visible .le-index-arrow {
    transform: translateX(-6px) rotate(-45deg);
}

.le-preview {
    position: fixed;
    z-index: 50;
    width: 300px;
    aspect-ratio: 4 / 3;
    pointer-events: none;
    border: 1px solid var(--le-line-strong);
    overflow: hidden;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    transition: opacity 0.25s, transform 0.35s var(--le-ease);
    background: #000;
}

.le-preview.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.le-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- KARTKA FORMULARZA (jasna sekcja) --- */
.le-paper {
    background: var(--le-paper);
    color: var(--le-paper-ink);
    padding: 54px 56px 46px;
    position: relative;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
    background-image:
        linear-gradient(rgba(23, 18, 31, 0.05) 1px, transparent 1px);
    background-size: 100% 34px;
}

.le-paper-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    align-items: start;
    border-bottom: 2px solid var(--le-paper-ink);
    padding-bottom: 18px;
    margin-bottom: 30px;
}

.le-paper-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-variation-settings: "wdth" 115;
    text-transform: uppercase;
    font-size: clamp(1.8rem, 3.4vw, 2.8rem);
    line-height: 0.95;
    margin: 0;
}

.le-paper .le-mono {
    color: #5a5168;
}

.le-paper-stamp {
    border: 2px solid var(--le-accent-deep);
    color: var(--le-accent-deep);
    font-family: var(--le-mono);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.14em;
    padding: 8px 10px;
    transform: rotate(-6deg);
    text-transform: uppercase;
    white-space: nowrap;
}

.le-field {
    border: 0;
    padding: 0;
    margin: 0 0 26px;
}

.le-field legend {
    font-family: var(--le-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.le-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.le-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1rem;
    padding: 6px 2px;
}

.le-check input {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--le-paper-ink);
    margin: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: transparent;
}

.le-check input::after {
    content: "";
    width: 12px;
    height: 12px;
    background: var(--le-accent-deep);
    transform: scale(0);
    transition: transform 0.2s var(--le-ease);
}

.le-check input:checked::after {
    transform: scale(1);
}

.le-check input:focus-visible {
    outline: 2px solid var(--le-accent-deep);
    outline-offset: 2px;
}

.le-paper-input {
    width: 100%;
    border: 0;
    border-bottom: 2px solid var(--le-paper-ink);
    background: transparent;
    font: inherit;
    font-size: 1.05rem;
    padding: 8px 2px;
    color: var(--le-paper-ink);
    font-family: var(--le-serif);
    font-style: italic;
    font-size: 1.35rem;
}

.le-paper-input:focus {
    outline: none;
    border-bottom-color: var(--le-accent-deep);
}

.le-paper-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    border-top: 1px dashed rgba(23, 18, 31, 0.35);
    padding-top: 22px;
    margin-top: 10px;
}

.le-paper .cta-button.primary {
    background: var(--le-paper-ink);
    border-color: var(--le-paper-ink);
}

.le-paper .cta-button.primary::before {
    background: var(--le-accent-deep);
}

.le-paper .cta-button.primary:hover {
    color: #fff;
}

/* --- FINAŁ: rozbłysk + Let's event --- */
.cta-bottom {
    position: relative;
    overflow: hidden;
    padding: 160px 20px !important;
    border-top: 1px solid var(--le-line);
}

.le-burst {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.cta-bottom-wrapper {
    position: relative;
    z-index: 2;
}

.cta-bottom .handwritten-title {
    font-family: var(--font-heading);
    font-style: normal;
    font-weight: 900;
    font-variation-settings: "wdth" 125;
    text-transform: uppercase;
    font-size: clamp(3.4rem, 12vw, 11rem);
    line-height: 0.85;
    letter-spacing: -0.04em;
    margin-bottom: 40px;
    color: var(--le-ink);
}

.cta-bottom .handwritten-title em {
    font-family: var(--le-serif);
    font-style: italic;
    font-weight: 400;
    text-transform: none;
    color: var(--le-accent);
    letter-spacing: -0.01em;
}

/* --- Stopka --- */
.main-footer {
    background: #050409 !important;
}

.main-footer h4 {
    font-family: var(--le-mono) !important;
    font-size: 12px !important;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--le-accent-hi) !important;
}

/* --- Animacje wejścia (fx.js) --- */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.9s var(--le-ease), transform 0.9s var(--le-ease);
    transition-delay: var(--d, 0s);
}

.reveal.is-in {
    opacity: 1;
    transform: none;
}

.le-rule.reveal {
    opacity: 1;
    transform: scaleX(0);
    transition: transform 1.4s var(--le-ease);
}

.le-rule.reveal.is-in {
    transform: scaleX(1);
}

.le-line > span.rise {
    transform: translateY(105%);
    transition: transform 1s var(--le-ease);
    transition-delay: var(--d, 0s);
}

.is-loaded .le-line > span.rise {
    transform: none;
}

/* --- Responsywność --- */
@media (max-width: 1000px) {
    .le-hero-grid,
    .le-next {
        grid-template-columns: 1fr;
    }

    .le-monitor {
        aspect-ratio: 16 / 10;
        max-height: none;
    }

    .le-hud-tr,
    .le-hud-br {
        display: none;
    }

    .le-section-head {
        grid-template-columns: 1fr;
    }

    .le-section-note {
        text-align: left;
    }

    .le-index-row {
        grid-template-columns: 46px 1fr 30px;
    }

    .le-index-desc {
        grid-column: 2 / 3;
        grid-row: 2;
    }

    .le-next-media {
        min-height: 260px;
    }
}

@media (max-width: 700px) {
    .le-section {
        padding: 80px 0;
    }

    .le-stats {
        grid-template-columns: 1fr;
    }

    .le-stat,
    .le-stat + .le-stat {
        padding: 26px 0;
        border-right: 0;
        border-bottom: 1px solid var(--le-line);
    }

    .le-paper {
        padding: 34px 22px 28px;
    }

    .le-paper-head {
        grid-template-columns: 1fr;
    }

    .le-hud-tl {
        top: 96px;
    }

    .le-hero {
        padding-top: 150px;
    }

    .le-next-body {
        padding: 30px 22px;
    }

    .le-preview {
        display: none;
    }
}

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

    .reveal,
    .le-line > span.rise {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .le-marquee-row {
        animation: none;
    }

    .le-caret,
    .le-blink,
    .le-rec::before {
        animation: none;
    }

    .le-monitor img {
        transition: opacity 0.3s;
        transform: none;
    }
}

/* --- Poprawki po przeglądzie --- */
.le-hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
}

.le-headline {
    font-size: clamp(2.8rem, 6.6vw, 7rem);
}

.le-headline .le-line > span {
    white-space: nowrap;
}

.le-hud-tl,
.le-hud-tr {
    top: 96px;
}

.le-hero {
    padding-top: 170px;
}

.le-section-head,
.le-section-head .section-title,
.castle3d-header,
.castle3d-header .section-title {
    text-align: left;
}

.castle3d-header {
    max-width: 1280px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

.castle3d-header .section-title {
    margin-top: 14px;
}

.castle3d-sub {
    margin: 14px 0 0;
}

.clients-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px 100px;
    text-align: left;
}

.clients-section .section-title {
    text-align: left;
}

.clients-subtitle {
    margin: 10px 0 40px;
    text-align: left;
}

.clients-grid {
    justify-content: flex-start;
}

.client-tile {
    background: var(--card-bg);
}

.stats-section {
    background: none;
}

@media (max-width: 1000px) {
    .le-hero-grid {
        grid-template-columns: 1fr;
    }

    .le-headline {
        font-size: clamp(2.6rem, 11vw, 5.4rem);
    }
}

.le-hud-tl,
.le-hud-tr {
    top: 112px;
}

.le-hero {
    padding-top: 200px;
}

@media (max-width: 700px) {
    .le-hud-tl { top: 100px; }
    .le-hero { padding-top: 160px; }
}

/* miejsce na polskie znaki diakrytyczne (Ś, Ź, Ż) nad wierszem z animacją wjazdu */
.le-headline .le-line {
    padding-top: 0.14em;
    margin-top: -0.14em;
}

@media (max-width: 700px) {
    .le-hud-tl {
        display: none;
    }
}

/* ==========================================================================
   v2 – kolejne motywy z klipu + mobile first
   ========================================================================== */

/* --- Lont z iskrą: postęp przewijania --- */
.le-fuse {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    z-index: 2000;
    pointer-events: none;
}

.le-fuse::before {
    content: "";
    position: absolute;
    inset: 1px 0;
    background: repeating-linear-gradient(90deg, rgba(201, 155, 255, 0.25) 0 6px, transparent 6px 10px);
}

.le-fuse i {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--p, 0%);
    background: linear-gradient(90deg, var(--le-accent-deep), var(--le-accent));
}

.le-fuse b {
    position: absolute;
    top: 50%;
    left: var(--p, 0%);
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px 4px var(--le-accent), 0 0 24px 8px rgba(168, 85, 247, 0.55);
}

/* --- Router „Kim jesteś?” --- */
.le-router {
    padding: 70px 0 30px;
}

.le-router-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-variation-settings: "wdth" 112;
    text-transform: uppercase;
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    margin: 0 0 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 18px;
}

.le-router-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.le-door {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 28px 26px 24px;
    min-height: 220px;
    border: 1px solid var(--le-line-strong);
    background: var(--card-bg);
    color: var(--le-ink);
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition: border-color 0.35s, transform 0.35s var(--le-ease);
}

.le-door::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--le-accent);
    clip-path: circle(0% at 100% 100%);
    transition: clip-path 0.6s var(--le-ease);
}

.le-door:hover::before,
.le-door:focus-visible::before {
    clip-path: circle(150% at 100% 100%);
}

.le-door:hover,
.le-door:focus-visible {
    border-color: var(--le-accent);
    transform: translateY(-4px);
}

.le-door-tag {
    color: var(--le-accent-hi);
}

.le-door-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-variation-settings: "wdth" 120;
    text-transform: uppercase;
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 0.92;
    letter-spacing: -0.02em;
}

.le-door-title em {
    font-family: var(--le-serif);
    font-style: italic;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--le-accent-hi);
}

.le-door-desc {
    color: var(--le-muted);
    line-height: 1.55;
    max-width: 440px;
}

.le-door-go {
    margin-top: auto;
    color: var(--le-ink);
}

.le-door:hover .le-door-tag,
.le-door:hover .le-door-desc,
.le-door:hover .le-door-title em,
.le-door:focus-visible .le-door-tag,
.le-door:focus-visible .le-door-desc,
.le-door:focus-visible .le-door-title em {
    color: #fff;
}

/* --- Liczydła (odometr) --- */
.le-odo {
    display: inline-flex;
    overflow: hidden;
    height: 1em;
    line-height: 1;
}

.le-odo-col {
    display: inline-block;
    height: 1em;
    overflow: hidden;
}

.le-odo-col > span {
    display: flex;
    flex-direction: column;
    transform: translateY(0);
    transition: transform 1.8s var(--le-ease);
    transition-delay: var(--dl, 0s);
}

.le-odo-col > span > span {
    height: 1em;
    display: block;
}

.le-odo-sep {
    width: 0.32em;
}

/* --- Pierścień z tekstem przy monitorze --- */
.le-monitor-wrap {
    position: relative;
}

.le-ring {
    position: absolute;
    z-index: 4;
    width: 150px;
    height: 150px;
    left: -62px;
    bottom: -48px;
    animation: leSpin 22s linear infinite;
    pointer-events: none;
}

.le-ring text {
    font-family: var(--le-mono);
    font-size: 12.6px;
    letter-spacing: 2.2px;
    fill: var(--le-ink);
    text-transform: uppercase;
}

.le-ring circle {
    fill: var(--le-accent);
}

@keyframes leSpin {
    to { transform: rotate(360deg); }
}

/* --- Zaczerniony tytuł --- */
.le-redacted {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.le-redacted span {
    position: relative;
    color: var(--le-ink);
    letter-spacing: -0.06em;
    width: fit-content;
}

.le-redacted span::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(201, 155, 255, 0.55) 50%, transparent 70%);
    background-size: 250% 100%;
    animation: leScan 2.8s linear infinite;
    mix-blend-mode: overlay;
}

@keyframes leScan {
    from { background-position: 150% 0; }
    to { background-position: -100% 0; }
}

/* --- Lista kontrolna misji --- */
.le-mission {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: relative;
}

.le-mission::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 11px;
    height: 1px;
    background: var(--le-line-strong);
}

.le-mission::after {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    height: 2px;
    width: var(--mp, 0%);
    background: var(--le-accent);
    box-shadow: 0 0 12px var(--le-accent);
    transition: width 0.3s linear;
}

.le-step {
    position: relative;
    padding: 0 18px 0 0;
}

.le-diamond {
    position: relative;
    z-index: 1;
    display: block;
    width: 22px;
    height: 22px;
    border: 2px solid var(--le-ink);
    background: var(--bg-color);
    transform: rotate(45deg) scale(0.86);
    transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
    margin-bottom: 22px;
}

.le-step.done .le-diamond {
    background: var(--le-accent);
    border-color: var(--le-accent);
    box-shadow: 0 0 18px var(--le-accent);
}

.le-step-code {
    color: var(--le-accent-hi);
}

.le-step-name {
    font-family: var(--font-heading);
    font-weight: 850;
    font-variation-settings: "wdth" 115;
    text-transform: uppercase;
    font-size: 1.25rem;
    margin: 8px 0 8px;
}

.le-step-desc {
    color: var(--le-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0 0 10px;
}

.le-step-when {
    color: var(--le-dim);
}

.le-step.done .le-step-when::before {
    content: "STATUS: OK · ";
    color: var(--le-accent-hi);
}

/* --- Przekreślona „zwykła impreza” --- */
.le-versus-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.le-crossed,
.le-ours {
    position: relative;
    padding: 30px 30px 34px;
    border: 1px solid var(--le-line);
}

.le-crossed {
    background: var(--le-paper);
    color: var(--le-paper-ink);
    overflow: hidden;
}

.le-crossed .le-mono {
    color: #5a5168;
}

.le-crossed ul,
.le-ours ul {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
    font-size: 1.15rem;
}

.le-crossed li::before {
    content: "□ ";
    font-family: var(--le-mono);
}

.le-ours {
    background: linear-gradient(160deg, rgba(168, 85, 247, 0.22), rgba(168, 85, 247, 0.04) 60%), var(--card-bg);
    border-color: rgba(168, 85, 247, 0.5);
}

.le-ours li::before {
    content: "■ ";
    color: var(--le-accent);
    font-family: var(--le-mono);
}

.le-ours b {
    color: #fff;
}

.le-x {
    position: absolute;
    inset: 10% 6%;
    width: 88%;
    height: 80%;
    pointer-events: none;
}

.le-x path {
    fill: none;
    stroke: var(--le-accent-deep);
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 0.7s var(--le-ease);
    vector-effect: non-scaling-stroke;
}

.le-x path + path {
    transition-delay: 0.35s;
}

.le-crossed.is-in .le-x path {
    stroke-dashoffset: 0;
}

.le-scribble {
    position: absolute;
    right: 22px;
    bottom: 16px;
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 2.4rem;
    color: var(--le-accent-deep);
    transform: rotate(-8deg) scale(0.6);
    opacity: 0;
    transition: opacity 0.4s 0.9s, transform 0.5s 0.9s var(--le-ease);
}

.le-crossed.is-in .le-scribble {
    opacity: 1;
    transform: rotate(-8deg) scale(1);
}

/* --- Pieczątka uderza w kartkę --- */
.le-paper-stamp {
    transition: transform 0.35s cubic-bezier(0.2, 2, 0.4, 1), opacity 0.2s;
}

.le-paper-stamp.pre {
    opacity: 0;
    transform: rotate(-14deg) scale(2.4);
}

.le-paper-stamp.slam {
    opacity: 1;
    transform: rotate(-6deg) scale(1);
}

/* --- Pas „Twoja kolej” --- */
.le-flash {
    position: relative;
    background: var(--le-accent);
    overflow: hidden;
    padding: 30px 0 22px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.le-flash-word {
    display: block;
    white-space: nowrap;
    font-family: var(--font-heading);
    font-weight: 900;
    font-variation-settings: "wdth" 125;
    text-transform: uppercase;
    font-size: clamp(4.5rem, 17vw, 16rem);
    line-height: 0.82;
    letter-spacing: -0.045em;
    color: #0b0811;
    will-change: transform;
}

.le-flash-outline {
    color: transparent;
    -webkit-text-stroke: 2px rgba(11, 8, 17, 0.75);
    padding-left: 8vw;
}

/* --- Dolny pasek akcji (tylko telefon) --- */
.le-dock {
    display: none;
}

/* --- Telefon --- */
@media (max-width: 760px) {
    .le-router-grid,
    .le-versus-grid {
        grid-template-columns: 1fr;
    }

    .le-door {
        min-height: 0;
        padding: 22px 20px 20px;
    }

    .le-mission {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-left: 40px;
    }

    .le-mission::before,
    .le-mission::after {
        top: 0;
        left: 10px;
        right: auto;
        width: 1px;
        height: 100%;
    }

    .le-mission::after {
        width: 2px;
        height: var(--mp, 0%);
        transition: height 0.3s linear;
    }

    .le-diamond {
        position: absolute;
        left: -40px;
        top: 0;
        margin: 0;
    }

    .le-ring {
        width: 108px;
        height: 108px;
        left: auto;
        right: -10px;
        bottom: -40px;
    }

    .le-dock {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 1500;
        background: rgba(10, 8, 16, 0.94);
        border: 1px solid var(--le-line-strong);
        backdrop-filter: blur(12px);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    }

    .le-dock a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 10px 4px 9px;
        color: var(--le-ink);
        text-decoration: none;
        font-family: var(--le-mono);
        font-size: 10px;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        min-height: 48px;
        justify-content: center;
    }

    .le-dock a span {
        color: var(--le-accent-hi);
        font-size: 15px;
        line-height: 1;
    }

    .le-dock .le-dock-main {
        background: var(--le-accent);
    }

    .le-dock .le-dock-main span {
        color: #fff;
    }

    body {
        padding-bottom: 84px;
    }

    .le-flash-outline {
        -webkit-text-stroke: 1.5px rgba(11, 8, 17, 0.75);
    }
}

@media (prefers-reduced-motion: reduce) {
    .le-ring,
    .le-redacted span::after {
        animation: none;
    }

    .le-x path {
        stroke-dashoffset: 0;
        transition: none;
    }

    .le-scribble {
        opacity: 1;
        transform: rotate(-8deg);
        transition: none;
    }

    .le-odo-col > span {
        transition: none;
    }
}

/* --- Nagłówek hero skalowany od szerokości kolumny, nie okna (nie ucina się przy żadnej szerokości) --- */
.le-hero-text {
    container-type: inline-size;
    min-width: 0;
}

.le-monitor-wrap {
    min-width: 0;
}

.le-headline {
    /* najdłuższe słowo (~8,3 em przy wdth 125) mieści się w 100% kolumny */
    font-size: clamp(2.4rem, 11.4cqi, 7.2rem);
}

@media (max-width: 1000px) {
    .le-headline {
        font-size: clamp(2.4rem, 11.4cqi, 6rem);
    }
}

/* ==========================================================================
   Runda 1 krytyki – poprawki
   ========================================================================== */

/* --- bez poziomego przewijania nigdzie --- */
html, body {
    overflow-x: clip;
}

/* --- tytuły podstron i sekcji: najdłuższe słowo mieści się w 360 px --- */
.subpage-title {
    font-size: clamp(1.9rem, 8.4vw, 6rem);
    overflow-wrap: anywhere;
    hyphens: manual;
}

.section-title {
    font-size: clamp(1.8rem, 7.6vw, 4.4rem);
    overflow-wrap: anywhere;
}

.subpage-hero,
.subpage-hero-content {
    max-width: 100%;
    box-sizing: border-box;
}

/* --- przekreślenie: pełne linie odsłaniane od lewej (bez kreskowania) --- */
.le-x path {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    transition: none;
}

.le-x {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.9s var(--le-ease);
}

.le-crossed.is-in .le-x {
    clip-path: inset(0 0 0 0);
}

/* --- kontrast: ciemniejszy fiolet pod białym tekstem (5,2:1) --- */
:root {
    --le-btn: #7c3aed;
    --le-dim: #9a92b0;
}

.cta-button.primary,
.le-dock .le-dock-main,
.le-head-cta {
    background: var(--le-btn);
    border-color: var(--le-btn);
}

/* --- czytelność kroju mono --- */
.le-mono,
.hud-label,
.le-index {
    font-size: 12px;
    letter-spacing: 0.1em;
}

.le-door-go,
.le-text-link {
    font-size: 13px;
}

.le-step-when {
    color: var(--le-dim);
}

/* --- kotwice nie chowają się pod nagłówkiem --- */
[id] {
    scroll-margin-top: 100px;
}

/* --- link pomijania nawigacji --- */
.le-skip {
    position: fixed;
    left: 12px;
    top: -60px;
    z-index: 3000;
    background: #fff;
    color: var(--le-paper-ink);
    padding: 12px 16px;
    font-family: var(--le-mono);
    font-size: 13px;
    transition: top 0.2s;
}

.le-skip:focus {
    top: 12px;
}

/* --- nagłówek: telefon i „Wycena” na komputerze --- */
.header-container {
    gap: 22px;
}

.le-head-phone {
    color: var(--le-ink);
    text-decoration: none;
    white-space: nowrap;
    font-size: 13px;
}

.le-head-phone:hover {
    color: var(--le-accent-hi);
}

.le-head-cta {
    font-family: var(--le-mono);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    padding: 12px 18px;
    border: 1px solid var(--le-btn);
    white-space: nowrap;
    transition: background 0.3s, color 0.3s;
}

.le-head-cta:hover,
.le-head-cta:focus-visible {
    background: #fff;
    color: var(--le-paper-ink);
}

.main-nav {
    margin-left: auto;
}

@media (max-width: 1280px) {
    .le-head-phone {
        display: none;
    }
}

/* --- menu mobilne: X, duże pola, podmenu w miejscu --- */
.mobile-menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--le-ink);
    margin: 6px 0;
    transition: transform 0.3s var(--le-ease), opacity 0.2s;
}

@media (max-width: 900px) {
    .le-head-cta,
    .le-head-phone {
        display: none;
    }

    .mobile-menu-toggle {
        width: 48px;
        height: 48px;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0;
    }

    .mobile-menu-toggle.active {
        transform: none;
    }

    .mobile-menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-links {
        justify-content: flex-start !important;
        gap: 0 !important;
        padding: 18px 20px 110px !important;
        height: auto !important;
        bottom: 0;
        background: #07060b !important;
        overflow-y: auto;
        align-items: stretch !important;
    }

    .nav-links > li {
        border-bottom: 1px solid var(--le-line);
    }

    .nav-links > li > a {
        display: flex;
        align-items: center;
        min-height: 52px;
        font-size: 15px;
    }

    .main-nav > .nav-links > li > a::after {
        display: none;
    }

    .dropdown-menu.mega-menu,
    .dropdown:hover .dropdown-menu.mega-menu {
        display: grid !important;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        translate: none;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0 0 12px;
        min-width: 0;
        text-align: left;
    }

    .mega-menu li {
        padding: 0;
    }

    .mega-menu a {
        display: flex;
        align-items: center;
        min-height: 44px;
        font-size: 15px;
        white-space: normal;
    }

    .mega-menu .mega-heading {
        padding: 12px 0 4px;
    }

    body.menu-open {
        overflow: hidden;
    }
}

/* --- najbliższe wydarzenie: stan „wkrótce” --- */
.le-redacted {
    display: block;
}

.le-redacted span {
    display: inline;
    color: var(--le-accent-hi);
    letter-spacing: inherit;
    background: linear-gradient(90deg, #2a2438, #3a2f52);
    padding: 0 0.12em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.le-next-info {
    color: #cfc8de;
    line-height: 1.6;
    margin: 0;
    max-width: 460px;
}

.le-text-link {
    font-family: var(--le-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--le-accent-hi);
    text-decoration: none;
    padding: 12px 0;
    display: inline-block;
}

.le-text-link:hover {
    color: #fff;
}

/* --- światy: karty ze zdjęciem --- */
.le-worlds {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.le-world {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--le-line);
    transition: border-color 0.35s, transform 0.35s var(--le-ease);
}

.le-world:hover {
    border-color: var(--le-accent);
    transform: translateY(-4px);
}

.le-world-media {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #000;
}

.le-world-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85);
    transition: filter 0.5s, transform 0.8s var(--le-ease);
}

.le-world:hover .le-world-media img {
    filter: none;
    transform: scale(1.04);
}

.le-world-media--pattern {
    display: grid;
    place-items: center;
    background:
        repeating-linear-gradient(45deg, rgba(168, 85, 247, 0.08) 0 2px, transparent 2px 14px),
        radial-gradient(circle at 50% 60%, rgba(168, 85, 247, 0.35), transparent 65%),
        #0d0a16;
}

.le-world-media--pattern > span:not(.le-world-num) {
    font-family: var(--font-heading);
    font-weight: 900;
    font-variation-settings: "wdth" 125;
    font-size: 7rem;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px var(--le-accent-hi);
}

.le-world-num {
    position: absolute;
    top: 10px;
    left: 12px;
    color: #fff;
    background: rgba(7, 6, 11, 0.7);
    padding: 4px 8px;
}

.le-world-body {
    padding: 20px 22px 24px;
}

.le-world-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.le-world-tags span {
    font-family: var(--le-mono);
    font-size: 11.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--le-accent-hi);
    border: 1px solid rgba(201, 155, 255, 0.4);
    padding: 3px 8px;
}

.le-world h3 {
    font-family: var(--font-heading);
    font-weight: 850;
    font-variation-settings: "wdth" 112;
    text-transform: uppercase;
    font-size: 1.3rem;
    margin: 0 0 6px;
}

.le-world-place {
    margin: 0 0 12px;
    color: var(--le-dim);
}

.le-world-body > p:not(.le-world-place) {
    color: #cfc8de;
    line-height: 1.6;
    margin: 0;
}

/* --- aplikacje: lekkie karty --- */
.le-apps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.le-app {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px 20px 24px;
    min-height: 200px;
    border: 1px solid var(--le-line);
    background: var(--card-bg);
    color: var(--le-ink);
    text-decoration: none;
    transition: border-color 0.3s, background 0.3s;
}

.le-app strong {
    font-family: var(--font-heading);
    font-weight: 850;
    font-variation-settings: "wdth" 112;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.le-app-desc {
    color: var(--le-muted);
    font-size: 0.93rem;
    line-height: 1.5;
}

.le-app-go {
    position: absolute;
    top: 18px;
    right: 18px;
    color: var(--le-accent-hi);
    transition: transform 0.3s var(--le-ease);
}

.le-app:hover {
    border-color: var(--le-accent);
    background: linear-gradient(160deg, rgba(168, 85, 247, 0.2), transparent 70%), var(--card-bg);
}

.le-app:hover .le-app-go {
    transform: translate(3px, -3px);
}

/* --- formularze: duże pola dotykowe --- */
#contact-form input,
#contact-form select,
#contact-form textarea {
    min-height: 48px;
    font-size: 16px !important;
}

.le-check {
    min-height: 44px;
}

/* --- animacje wejścia tylko gdy działa JS --- */
html:not(.js) .reveal {
    opacity: 1;
    transform: none;
}

/* --- telefon: krótsza strona --- */
@media (max-width: 1000px) {
    .le-worlds {
        grid-template-columns: repeat(2, 1fr);
    }

    .le-apps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .le-index-row {
        grid-template-columns: 40px 1fr 24px;
        padding: 16px 4px;
        gap: 12px;
    }

    .le-index-desc {
        display: none;
    }

    .le-index-name {
        font-size: 1.15rem;
    }

    .le-worlds,
    .le-apps,
    .testimonials-grid {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px !important;
        margin-right: -24px;
        padding-right: 24px;
        padding-bottom: 6px;
        scrollbar-width: none;
    }

    .le-world,
    .le-app,
    .testimonial-card {
        flex: 0 0 82%;
        scroll-snap-align: start;
    }

    .le-app {
        min-height: 170px;
    }

    .le-dock a {
        font-size: 11px;
        letter-spacing: 0.04em;
    }

    .le-hero-actions .cta-button {
        padding: 14px 20px;
    }

    .le-hero {
        padding-bottom: 40px;
        min-height: 0;
    }
}

/* --- karuzela bez ruchu (prefers-reduced-motion) --- */
.carousel-viewport:has(.carousel-static) {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.carousel-static .carousel-item {
    scroll-snap-align: start;
    transform: none !important;
}

/* --- lightbox: przyciski bez domyślnego wyglądu --- */
button.lightbox-close,
button.lightbox-nav {
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    padding: 6px;
    min-width: 48px;
    min-height: 48px;
}

/* --- FAQ --- */
.le-faq {
    max-width: 900px;
}

.le-faq h2 {
    font-family: var(--font-heading);
    font-weight: 850;
    font-variation-settings: "wdth" 112;
    text-transform: uppercase;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin: 12px 0 24px;
}

.le-faq-item {
    border-top: 1px solid var(--le-line-strong);
}

.le-faq-item:last-of-type {
    border-bottom: 1px solid var(--le-line-strong);
}

.le-faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 40px 20px 0;
    position: relative;
    font-weight: 700;
    font-size: 1.08rem;
    min-height: 48px;
}

.le-faq-item summary::-webkit-details-marker {
    display: none;
}

.le-faq-item summary::after {
    content: "+";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--le-mono);
    font-size: 1.4rem;
    color: var(--le-accent-hi);
    transition: transform 0.3s var(--le-ease);
}

.le-faq-item[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.le-faq-item p {
    margin: 0 0 22px;
    color: #cfc8de;
    line-height: 1.65;
    max-width: 760px;
}

/* --- drobne: podtytuł w h1, nagłówki pomocnicze, monogramy, kontakt, social --- */
.le-h1-sub {
    display: block;
    font-family: var(--le-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--le-accent-hi);
    margin-top: 18px;
    text-shadow: none;
}

.le-h2-inline {
    font-family: var(--font-heading);
    font-weight: 850;
    font-variation-settings: "wdth" 112;
    text-transform: uppercase;
    font-size: clamp(1.5rem, 3.6vw, 2.2rem);
    margin: 0 0 26px;
}

.tech-monogram {
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    border: 2px solid var(--le-accent);
    font-family: var(--font-heading);
    font-weight: 900;
    font-variation-settings: "wdth" 125;
    font-size: 2.2rem;
    color: var(--le-accent-hi);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.35);
}

.le-contact-quick {
    margin-top: 28px;
}

.le-brief-note {
    background: rgba(168, 85, 247, 0.14);
    border-left: 3px solid var(--le-accent);
    padding: 14px 16px;
    margin: 0 0 6px;
    line-height: 1.5;
}

.le-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.le-social a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--le-line-strong);
    color: var(--le-ink);
    text-decoration: none;
    font-family: var(--le-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.le-social a:hover {
    border-color: var(--le-accent);
    color: #fff;
}

.le-empty {
    grid-column: 1 / -1;
    text-align: left;
    max-width: 560px;
    padding: 30px 0;
}

.le-empty p:not(.hud-label) {
    color: #cfc8de;
    line-height: 1.6;
    margin: 12px 0 22px;
}

.main-footer a {
    display: inline-block;
    min-height: 32px;
    line-height: 32px;
}

@media (max-width: 1200px) {
    .le-head-cta {
        display: none;
    }
}

/* backdrop-filter tworzy blok zawierający dla position:fixed – przy otwartym menu go wyłączamy */
body.menu-open .main-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #07060b;
}

/* ==========================================================================
   Runda 2 krytyki – poprawki
   ========================================================================== */

/* nagłówki: słowa nie łamią się w środku (rozmiar dopasowuje fx.js), łamanie tylko awaryjnie */
.subpage-title,
.section-title {
    overflow-wrap: break-word;
}

/* ikona X: trzy belki co 14 px, obrót wokół środka */
.mobile-menu-toggle span {
    transform-origin: center;
}

@media (max-width: 900px) {
    .mobile-menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .mobile-menu-toggle span {
        margin: 3px 0;
    }

    /* podmenu „Oferta” zwinięte, rozwijane przyciskiem */
    .dropdown {
        display: grid;
        grid-template-columns: 1fr 52px;
        align-items: center;
    }

    .dropdown > a {
        grid-column: 1;
    }

    .le-sub-toggle {
        grid-column: 2;
        width: 52px;
        height: 52px;
        background: none;
        border: 0;
        border-left: 1px solid var(--le-line);
        color: var(--le-accent-hi);
        font-size: 18px;
        cursor: pointer;
    }

    .dropdown.open .le-sub-toggle span {
        display: inline-block;
        transform: rotate(180deg);
    }

    .dropdown-menu.mega-menu,
    .dropdown:hover .dropdown-menu.mega-menu {
        display: none !important;
        grid-column: 1 / -1;
    }

    .dropdown.open .dropdown-menu.mega-menu {
        display: grid !important;
    }
}

@media (min-width: 901px) {
    .le-sub-toggle {
        display: none;
    }

    .dropdown > a::before {
        content: "▾ ";
        display: none;
    }
}

/* cele dotykowe ≥ 44 px i czytelne drobne napisy */
.audience-card a,
.le-text-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.castle3d-mode {
    min-height: 44px;
}

.main-footer a,
.le-social a {
    min-height: 44px;
    line-height: 44px;
}

.le-dock a {
    font-size: 12px !important;
}

.audience-tag,
.le-world-tags span {
    font-size: 12px;
}

/* przycisk pauzy karuzeli */
.le-carousel-pause {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.le-carousel-pause button {
    font-family: var(--le-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    min-height: 44px;
    padding: 0 18px;
    background: transparent;
    color: var(--le-ink);
    border: 1px solid var(--le-line-strong);
    cursor: pointer;
}

.le-carousel-pause button:hover {
    border-color: var(--le-accent);
}

/* emblematy zamiast zdjęć w kartach światów */
.le-world-media--pattern svg {
    width: 46%;
    max-width: 150px;
    height: auto;
    fill: none;
    stroke: var(--le-accent-hi);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.55));
}

.le-world-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 6px;
    font-family: var(--le-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--le-accent-hi);
    text-decoration: none;
}

.le-hero-note {
    margin: 14px 0 0;
}

.le-h1-sub {
    margin-top: 18px;
}

/* kolumna nagłówka sekcji nie może rozpychać się do szerokości najdłuższego słowa */
.le-section-head > div,
.le-section-head > p {
    min-width: 0;
}

/* ==========================================================================
   Runda 3 krytyki – nagłówek na tabletach poziomo i małych laptopach
   ========================================================================== */
.main-nav a,
.le-head-cta,
.le-head-phone {
    white-space: nowrap;
}

@media (min-width: 901px) and (max-width: 1279px) {
    .header-container {
        gap: 14px;
    }

    .main-nav .nav-links {
        gap: 16px;
    }

    .main-nav a {
        font-size: 11px;
        letter-spacing: 0.06em;
    }

    .le-head-cta {
        display: inline-flex;
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* menu mobilne nie przewija strony pod spodem */
@media (max-width: 900px) {
    .nav-links {
        overscroll-behavior: contain;
    }
}

/* ==========================================================================
   Runda 4 krytyki
   ========================================================================== */
/* karty światów: 8 kart → 4+4 na komputerze, 2 kolumny na tablecie */
@media (min-width: 1200px) {
    .le-worlds {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 701px) and (max-width: 1199px) {
    .le-worlds {
        grid-template-columns: repeat(2, 1fr);
    }
}

.le-world--next {
    border-style: dashed;
    border-color: var(--le-accent);
    background: linear-gradient(160deg, rgba(124, 58, 237, 0.16), transparent 60%), var(--card-bg);
}

/* nagłówek na tabletach: pola dotyku ≥44 px */
@media (min-width: 901px) and (max-width: 1279px) {
    .main-nav > .nav-links > li > a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        font-size: 12px;
    }

    .main-nav .nav-links {
        gap: 13px;
    }

    .le-head-cta {
        min-height: 44px;
        align-items: center;
    }
}

/* ==========================================================================
   Runda 5 krytyki – szlif
   ========================================================================== */
/* okruszki, tytuł i podtytuł podstron w jednej linii (style.css dodawał 10 px wcięcia na telefonie) */
.subpage-hero-content .subpage-title,
.subpage-hero-content .subpage-subtitle {
    padding-left: 0;
    padding-right: 0;
}

/* niskie telefony (iPhone SE itp.): bez terminala, żeby oba CTA były nad dolnym paskiem */
@media (max-width: 700px) and (max-height: 760px) {
    .le-hero .le-terminal {
        display: none;
    }
}

/* karty światów: tagi, tytuły, miejsca, opisy i linki w tych samych wierszach całego rzędu */
@media (min-width: 701px) {
    .le-world {
        display: grid;
        grid-row: span 6;
        grid-template-rows: subgrid;
        row-gap: 0;
    }

    .le-world-body {
        display: grid;
        grid-row: span 5;
        grid-template-rows: subgrid;
        row-gap: 0;
    }

    .le-world-tags {
        align-content: flex-start;
    }

    .le-world-link {
        justify-self: start;
        align-self: start;
    }
}

.le-world-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0 18px;
}

/* Zamek 3D: plakat i stan ładowania, zanim wejdzie model */
.castle3d-canvas {
  position: relative;
}

.castle3d-canvas canvas {
  position: absolute;
  inset: 0;
}

.castle3d-poster {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.castle3d--ready .castle3d-poster {
  opacity: 0;
}

.castle3d-status {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  max-width: calc(100% - 32px);
  font-family: var(--le-mono, ui-monospace, monospace);
  font-size: 12px;
  color: #d9ccff;
}

.castle3d-status[hidden],
.castle3d-status-btn[hidden] {
  display: none;
}

.castle3d--loading .castle3d-status-text::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 6px;
  background: linear-gradient(90deg, transparent, #9b5cff, transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: castle3d-scan 1.2s linear infinite;
}

@keyframes castle3d-scan {
  from { background-position: -100% 0; }
  to { background-position: 200% 0; }
}

.castle3d-status-btn {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #9b5cff;
  border-radius: 8px;
  background: rgba(5, 5, 8, 0.8);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .castle3d--loading .castle3d-status-text::after {
    animation: none;
    background-position: center;
  }

  .castle3d-poster {
    transition: none;
  }
}

/* Na telefonie na dole obszaru z zamkiem, bo górę zasłania przyklejony nagłówek */
@media (max-width: 800px) {
  .castle3d-status {
    top: calc(max(60vh, 360px) - 12px);
    transform: translateY(-100%);
  }
}

/* Galeria: bez animacji wysokości, zdjęcia ładują się dopiero po otwarciu (display:none wstrzymuje lazy) */
.accordion-content {
  display: none;
  max-height: none;
  transition: none;
}

.event-accordion.active .accordion-content {
  display: block;
}

.event-accordion {
  scroll-margin-top: 90px;
}

.event-gallery-item img {
  height: auto;
}

.accordion-close {
  display: block;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-top: 1px solid var(--border-color);
  background: none;
  color: #d9ccff;
  font-size: 13px;
  cursor: pointer;
}

/* Klienci na telefonie: równa siatka, szerokość kafelka nie zależy od treści */
@media (max-width: 700px) {
  .clients-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clients-grid > li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .client-wordmark {
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-align: center;
  }

  .client-wordmark svg {
    width: 44px;
    height: auto;
  }

  .client-logo-box:has(.client-wordmark) {
    height: auto;
  }

  .client-caption {
    text-align: center;
  }
}

@media (max-width: 400px) {
  .client-tile {
    padding-inline: 8px;
  }

  .client-caption {
    font-size: 11px;
    letter-spacing: 0.3px;
  }
}

/* ==========================================================================
   T4 – uproszczone menu główne (5 pozycji + Wycena), Oferta w 3 grupach
   ========================================================================== */
.le-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.main-nav a[aria-current="page"] {
    color: var(--le-accent-hi);
}

.main-nav > .nav-links > li > a[aria-current="page"]::after {
    transform: scaleX(1);
}

.mega-menu .mega-foot {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
    margin: 6px 0 0;
    padding: 10px 20px 0;
    border-top: 1px solid var(--le-line);
}

.mega-menu .mega-foot a {
    font-family: var(--le-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--le-accent-hi);
}

.mega-menu .mega-foot a:hover,
.mega-menu .mega-foot a:focus-visible {
    color: #fff;
}

@media (min-width: 901px) {
    .le-nav-cta {
        display: none;
    }

    .main-nav .nav-links {
        gap: 28px;
    }

    .main-nav > .nav-links > li > a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }

    /* „Oferta” + przycisk ▾: myszą rozwija się najechaniem, klawiaturą przyciskiem (aria-expanded) */
    .dropdown {
        display: flex;
        align-items: center;
    }

    .le-sub-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 44px;
        margin-left: 2px;
        padding: 0;
        background: none;
        border: 0;
        color: var(--le-accent-hi);
        font-size: 12px;
        cursor: pointer;
    }

    .le-sub-toggle span {
        transition: transform 0.25s var(--le-ease);
    }

    .dropdown.open .le-sub-toggle span,
    .dropdown:hover:not(.hover-off) .le-sub-toggle span {
        transform: rotate(180deg);
    }

    .le-sub-toggle:focus-visible {
        outline: 2px solid var(--le-accent-hi);
        outline-offset: 2px;
    }

    .dropdown-menu.mega-menu {
        grid-template-columns: repeat(3, minmax(190px, auto));
        min-width: 0;
        width: max-content;
        max-width: calc(100vw - 32px);
        top: 100%;
    }

    /* fokus w środku już nie otwiera menu sam – tylko przycisk albo najechanie */
    .main-nav .dropdown:not(.open):not(:hover) .dropdown-menu,
    .main-nav .dropdown.hover-off:not(.open) .dropdown-menu {
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
    }

    .main-nav .dropdown.open .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .mega-menu li a {
        display: inline-flex;
        align-items: center;
        min-height: 32px;
    }

    .mega-menu .mega-foot a {
        display: inline-flex;
        align-items: center;
        min-height: 36px;
    }
}

/* tablety poziomo / małe laptopy: 5 pozycji mieści się z telefonem od 1100 px */
@media (min-width: 901px) and (max-width: 1279px) {
    .main-nav .nav-links {
        gap: 18px;
    }
}

@media (min-width: 1100px) and (max-width: 1280px) {
    .le-head-phone {
        display: inline;
    }
}

@media (max-width: 900px) {
    .mega-menu .mega-foot {
        flex-direction: column;
        padding: 6px 0 0;
        gap: 0;
    }

    .mega-menu .mega-foot a {
        display: flex;
        align-items: center;
        min-height: 44px;
        font-size: 13px;
    }

    .nav-links > li.le-nav-cta {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding-top: 22px;
        border-bottom: 0;
    }

    .nav-links > li.le-nav-cta > a {
        justify-content: center;
        min-height: 52px;
        font-family: var(--le-mono);
        font-size: 14px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        text-decoration: none;
        border: 1px solid var(--le-line-strong);
    }

    .nav-links > li.le-nav-cta > .le-nav-cta-main {
        background: var(--le-btn);
        border-color: var(--le-btn);
        color: #fff;
        font-weight: 700;
    }
}

/* stopka: listy linków (zamiast stylów w atrybutach) */
.le-foot-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.le-foot-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.le-foot-links a:hover,
.le-foot-links a:focus-visible {
    color: var(--le-accent-hi);
}

.le-foot-links .le-foot-minor a {
    font-size: 0.9em;
    opacity: 0.7;
}

.main-footer .footer-col h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

@media (max-width: 700px) {
    .le-foot-links a {
        min-height: 44px;
        line-height: 44px;
    }

    .le-foot-links {
        gap: 0;
    }
}

/* węższe ekrany komputerowe: podmenu przy prawej krawędzi nagłówka, żeby nie wychodziło poza ekran */
@media (min-width: 901px) and (max-width: 1279px) {
    .header-container {
        position: relative;
    }

    .main-nav .dropdown {
        position: static;
    }

    .dropdown-menu.mega-menu {
        left: auto;
        right: 20px;
        translate: none;
    }
}

/* mostek nad podmenu: kursor nie gubi najechania w szczelinie pod „Oferta” */
@media (min-width: 901px) {
    .dropdown-menu.mega-menu::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 100%;
        height: 34px;
    }
}

/* bieżąca podstrona w podmenu: podkreślenie (kolor akcentu ma już wyróżniona oferta dla zamków) */
.mega-menu li a[aria-current="page"] {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: var(--le-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* hamburger stoi w kodzie przed menu, na ekranie zostaje na końcu nagłówka */
.mobile-menu-toggle {
    order: 10;
}

/* ==========================================================================
   T4 runda 1
   ========================================================================== */
/* zamknięte menu mobilne całkiem niewidoczne i nieklikalne (wcześniej jego dół wystawał w zmniejszony nagłówek) */
@media (max-width: 900px) {
    .nav-links {
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0s linear 0.4s;
    }

    .nav-links.active {
        visibility: visible;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0s;
    }
}

/* telefon w nagłówku: numer od 1100 px, węziej sama ikona 44×44 obok Wyceny */
.le-head-phone-ico {
    display: none;
}

@media (min-width: 901px) and (max-width: 1099px) {
    .le-head-phone {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        flex: none;
        border: 1px solid var(--le-line-strong);
        font-size: 18px;
    }

    .le-head-phone-ico {
        display: inline;
    }

    .le-head-phone-num {
        display: none;
    }
}

/* panel Oferty nieprzezroczysty (nagłówek ma backdrop-filter, treść pod spodem prześwitywała) */
@media (min-width: 901px) {
    .dropdown-menu.mega-menu {
        background: #0a0810;
    }
}

/* ekrany dotykowe 901–1279 px: większe cele w nagłówku i panelu Oferty */
@media (min-width: 901px) and (max-width: 1279px) and (hover: none), (min-width: 901px) and (max-width: 1279px) and (pointer: coarse) {
    .le-sub-toggle {
        width: 44px;
        height: 44px;
        margin-left: 0;
    }

    .mega-menu li a,
    .mega-menu .mega-foot a {
        min-height: 44px;
    }

    .le-head-phone {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}

/* dolny pasek chowa się przy otwartym menu mobilnym (menu ma własną Wycenę i telefon) */
body.menu-open .le-dock {
    display: none;
}

@media (max-width: 900px) {
    body.menu-open .nav-links {
        padding-bottom: 32px !important;
    }
}

/* zamykany panel Oferty od razu niewidoczny dla fokusu (wygasza się tylko opacity) */
@media (min-width: 901px) {
    .main-nav .dropdown:not(.open):not(:hover) .dropdown-menu,
    .main-nav .dropdown.hover-off:not(.open) .dropdown-menu {
        transition: opacity 0.3s, transform 0.3s, visibility 0s;
    }
}

/* Logo w stopce (footer_logo.php): surowa, techniczna pętla 12 s.
   1) linie pomocnicze i kontury liter rysują się kreską, 2) wypełnienie wjeżdża od dołu z jasną linią skanu,
   3) chwila pełnego logo, 4) wypełnienie spływa w dół, kontury zwijają się dalej w tym samym kierunku.
   Start z ujemnym opóźnieniem: pierwsza klatka po wejściu na stronę pokazuje pełne logo. */
.le-foot-logo {
  display: inline-block;
  width: min(300px, 100%);
  --lla-t: 12s;
  --lla-start: -5.4s;
  --lla-ease: cubic-bezier(.65, 0, .35, 1);
}
.le-logo-anim {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.le-logo-anim .lla-v { --c: #bb64ff; }
.le-logo-anim .lla-w { --c: #ffffff; }

.lla-fill path { fill: var(--c); }
.lla-fill {
  clip-path: inset(0 0 0 0);
  animation: lla-fill var(--lla-t) var(--lla-ease) var(--lla-start) infinite both;
}

.lla-line path {
  fill: none;
  stroke: var(--c);
  stroke-width: 1.1px;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: miter;
  stroke-dasharray: 1 1;
  animation: lla-line var(--lla-t) var(--lla-ease) calc(var(--lla-start) + var(--i) * 70ms) infinite both;
}

.lla-guides line {
  stroke: #bb64ff;
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1 1;
  opacity: 0;
  animation: lla-guide var(--lla-t) var(--lla-ease) var(--lla-start) infinite both;
}
.lla-guides line:nth-child(2) { animation-delay: calc(var(--lla-start) + 90ms); }
.lla-guides line:nth-child(3) { animation-delay: calc(var(--lla-start) + 180ms); }
.lla-guides line:nth-child(4) { animation-delay: calc(var(--lla-start) + 270ms); }

.lla-scan {
  fill: #f3e8ff;
  opacity: 0;
  animation: lla-scan var(--lla-t) var(--lla-ease) var(--lla-start) infinite both;
}

/* 0–24% rysowanie, 24–42% wypełnianie, 42–76% pełne logo, 76–90% spływanie, 88–100% zwijanie konturów */
@keyframes lla-line {
  0%   { stroke-dashoffset: 1;  opacity: 1; }
  24%  { stroke-dashoffset: 0;  opacity: 1; }
  46%  { stroke-dashoffset: 0;  opacity: .35; }
  76%  { stroke-dashoffset: 0;  opacity: .35; }
  86%  { stroke-dashoffset: 0;  opacity: 1; }
  100% { stroke-dashoffset: -1; opacity: 1; }
}
@keyframes lla-fill {
  0%, 22%  { clip-path: inset(100% 0 0 0); }
  42%, 76% { clip-path: inset(0 0 0 0); }
  90%, 100% { clip-path: inset(0 0 100% 0); }
}
@keyframes lla-scan {
  0%, 22%   { transform: translateY(0);     opacity: 0; }
  23%       { transform: translateY(0);     opacity: 1; }
  42%       { transform: translateY(-64px); opacity: 1; }
  43%, 75%  { transform: translateY(-64px); opacity: 0; }
  76%       { transform: translateY(-64px); opacity: 1; }
  90%       { transform: translateY(0);     opacity: 1; }
  91%, 100% { transform: translateY(0);     opacity: 0; }
}
@keyframes lla-guide {
  0%   { stroke-dashoffset: 1;  opacity: .45; }
  20%  { stroke-dashoffset: 0;  opacity: .45; }
  40%  { stroke-dashoffset: 0;  opacity: 0; }
  80%  { stroke-dashoffset: 0;  opacity: 0; }
  90%  { stroke-dashoffset: 0;  opacity: .3; }
  100% { stroke-dashoffset: -1; opacity: .3; }
}
.le-foot-logo:hover .le-logo-anim,
.le-foot-logo:focus-visible .le-logo-anim { filter: drop-shadow(0 0 12px rgba(187, 100, 255, .5)); }

@media (prefers-reduced-motion: reduce) {
  .lla-fill, .lla-line path, .lla-guides line, .lla-scan { animation: none; }
  .lla-line, .lla-guides, .lla-scan { display: none; }
}

/* Nagłówek podstrony: tło na całą szerokość, treść wyrównana do logo w nagłówku (kolumna 1400 px z 20 px marginesu);
   na szerokich ekranach treść kleiła się do lewej krawędzi */
.subpage-hero {
  max-width: none;
  padding-left: max(20px, calc((100% - 1360px) / 2));
  padding-right: max(20px, calc((100% - 1360px) / 2));
}
.subpage-hero-content {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}
