/* wut racing */

:root {
    /* ciemny szary jako baza, czern tylko do przeplatania sekcji */
    --black: #16161a;
    --black-2: #1c1c21;
    --deep: #101012;
    --ink: #101014;
    --white: #ffffff;
    --gray: #97979e;
    --gray-2: #66666e;
    /* stonowana czerwien */
    --red: #ab2b3c;
    --red-dark: #8e2231;

    --line-d: rgba(255, 255, 255, 0.14);
    --line-l: rgba(16, 16, 20, 0.14);

    --bg-0: var(--black);
    --bg-1: var(--black-2);
    --text-0: #f4f4f5;
    --text-1: #c9c9ce;
    --text-2: var(--gray);
    --text-3: #5c5c63;
    --accent: var(--red);
    --line: var(--line-d);
    --line-strong: rgba(255, 255, 255, 0.28);

    --font-d: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    --font-b: 'Barlow', 'Helvetica Neue', sans-serif;
    /* podpisy i etykiety: ten sam kroj co naglowki, rozni je tylko
       wielkosc, swiatlo miedzy literami i wersaliki */
    --font-u: var(--font-d);

    --skew: -12deg;
    --ease: cubic-bezier(0.32, 0.72, 0, 1);
    --speed: cubic-bezier(0.32, 0.72, 0, 1);

    --maxw: 1520px;
    --pad-x: clamp(20px, 4.5vw, 72px);
    --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--black); }

body {
    font-family: var(--font-b);
    background: var(--black);
    color: var(--text-0);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--red); color: #fff; }

/* typografia */
/* male nadpisy nad naglowkami — wylaczone */
.eyebrow,
.dept-strip-eyebrow { display: none !important; }

h1, h2, h3, h4 {
    font-family: var(--font-d);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.015em;
    line-height: 1;
}

.h-display {
    font-size: clamp(38px, 6vw, 92px);
    font-weight: 700;
}

.h-1 { font-size: clamp(29px, 3.7vw, 56px); }
.h-2 { font-size: clamp(24px, 2.8vw, 38px); }
.h-3 { font-size: clamp(18px, 1.8vw, 23px); }

.lead {
    font-family: var(--font-b);
    font-size: clamp(16px, 1.3vw, 19px);
    color: var(--text-1);
    max-width: 62ch;
    line-height: 1.7;
}

.mono {
    font-family: var(--font-u);
    font-feature-settings: "tnum";
}

/* naglowki jednolitym kolorem — bez wyrozniania fragmentow */
.text-accent { color: inherit; }
.text-mute { color: var(--text-2); }

/* skosna plakietka - motyw liveries */
.tab {
    display: inline-block;
    transform: skewX(var(--skew));
    background: var(--red);
    padding: 5px 14px;
}
.tab > span {
    display: inline-block;
    transform: skewX(calc(-1 * var(--skew)));
    font-family: var(--font-u);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #fff;
}

/* layout */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding-left: var(--pad-x);
    padding-right: var(--pad-x);
}

section { position: relative; }

.section-light { background: var(--white); color: var(--ink); }
.section-light .lead { color: #3c3c42; }
.section-light .eyebrow { color: var(--red); }

/* kropkowany bolid przenikajacy w rogach bialych sekcji */
/* isolation zamyka z-index dzieci w tej sekcji. Bez tego tresc (z-index 1)
   potrafi wyskoczyc nad sasiednia sekcje, a tlo zostaje pod spodem - wtedy
   spod sekcji przebija to, co jest za nia */
.paper-deco-tl,
.paper-deco-br { position: relative; overflow: hidden; isolation: isolate; }
.paper-deco-tl > *,
.paper-deco-br > * { position: relative; z-index: 1; }

.paper-deco-tl::before,
.paper-deco-br::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: clamp(340px, 42vw, 780px);
    aspect-ratio: 588 / 379;
    background: url("../assets/media/bolid-tlo.png") no-repeat center / contain;
    opacity: 0.55;
    pointer-events: none;
}
.paper-deco-tl::before {
    top: 0; left: 0;
    transform: translate(-28%, -34%);
}
.paper-deco-br::after {
    bottom: 0; right: 0;
    transform: translate(28%, 36%) scaleX(-1);
}

.divider {
    height: 1px;
    background: var(--line-d);
    margin: 0 var(--pad-x);
}

/* nawigacja - pasek rozmywajacy tlo podczas przewijania */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(16, 16, 18, 0.55);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    transition: background 0.4s var(--ease), border-color 0.4s var(--ease),
                transform 0.35s var(--ease);
}
/* przy przewijaniu w dol pasek chowa sie nad krawedzia ekranu */
.nav.is-hidden { transform: translateY(-100%); }
/* na samej gorze pasek jest calkiem przezroczysty */
.nav.is-top {
    background: linear-gradient(180deg, rgba(16,16,18,0.6), transparent);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
}

.nav-inner {
    /* trzy kolumny, zeby logo stalo dokladnie na srodku paska */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--pad-x);
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    justify-self: center;
    gap: 12px;
}

.brand-logo {
    height: 32px;
    width: auto;
    max-width: 210px;
    object-fit: contain;
}

.brand-text-sub { display: none; }

.nav-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 18px;
}

/* ikony social: biala wersja, po najechaniu przenika kolorowa */
.soc {
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 50%;
    transition: background 0.25s var(--ease);
}
.soc img {
    grid-area: 1 / 1;
    display: block;
    width: 100%; height: 100%;
    object-fit: contain;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.soc .soc-off { opacity: 0.78; }
.soc .soc-on { opacity: 0; }
.soc:hover .soc-off,
.soc:focus-visible .soc-off { opacity: 0; }
.soc:hover .soc-on,
.soc:focus-visible .soc-on { opacity: 1; transform: scale(1.06); }

.nav-social { display: flex; align-items: center; gap: 6px; }
.nav-soc { width: 34px; height: 34px; padding: 8px; }
.nav-soc:hover { background: rgba(255, 255, 255, 0.1); }

/* hamburger */
.menu-btn {
    display: grid;
    place-items: center;
    justify-self: start;
    width: 42px; height: 42px;
    margin-left: -8px;
}
.menu-bars { display: block; width: 22px; }
.menu-bars i {
    display: block;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: transform 0.35s var(--ease), width 0.35s var(--ease);
}
.menu-bars i:nth-child(2) { width: 70%; }
.menu-btn:hover .menu-bars i:nth-child(2) { width: 100%; }

/* pelnoekranowe menu */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(12, 12, 14, 0.82);
    backdrop-filter: blur(26px) saturate(130%);
    -webkit-backdrop-filter: blur(26px) saturate(130%);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.45s var(--ease);
}
.menu-overlay.is-open { opacity: 1; }
.menu-overlay[hidden] { display: none; }

.menu-overlay-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px var(--pad-x);
    height: var(--nav-h);
}
.menu-close {
    width: 42px; height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    margin-left: -10px;
    transition: transform 0.3s var(--ease);
}
.menu-close svg { width: 24px; height: 24px; }
.menu-close:hover { transform: rotate(90deg); }
.menu-logo { height: 30px; width: auto; opacity: 0.9; }

.menu-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(2px, 0.8vh, 10px);
    padding: 0 var(--pad-x);
}
.menu-links a {
    font-family: var(--font-d);
    font-size: clamp(30px, 5.4vw, 68px);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    width: fit-content;
    /* napisy wchodza powoli, jeden po drugim */
    opacity: 0;
    transform: translateY(34px);
    transition: color 0.3s var(--ease), transform 1.05s var(--ease), opacity 1.05s var(--ease);
}
.menu-overlay.is-open .menu-links a { opacity: 1; transform: translateY(0); }
.menu-overlay.is-open .menu-links a:nth-child(1) { transition-delay: 0.12s; }
.menu-overlay.is-open .menu-links a:nth-child(2) { transition-delay: 0.22s; }
.menu-overlay.is-open .menu-links a:nth-child(3) { transition-delay: 0.32s; }
.menu-overlay.is-open .menu-links a:nth-child(4) { transition-delay: 0.42s; }
.menu-overlay.is-open .menu-links a:nth-child(5) { transition-delay: 0.52s; }
.menu-links a:hover { color: #fff; }
.menu-links a.active { color: var(--red); }

.menu-social {
    display: flex;
    gap: 10px;
    padding: 0 var(--pad-x) clamp(28px, 5vh, 56px);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.9s var(--ease) 0.6s, transform 0.9s var(--ease) 0.6s;
}
.menu-overlay.is-open .menu-social { opacity: 1; transform: translateY(0); }
.menu-soc {
    width: 44px; height: 44px;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.menu-soc:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.45); }

/* stopka - te same ikony w rzedzie */
.footer-social { display: flex; gap: 10px; margin-top: 4px; }
.footer-soc {
    width: 38px; height: 38px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
}
.footer-soc:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.4); }

/* przelacznik jezyka - tekstowy */
.lang-switch {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.lang-switch button {
    padding: 6px 7px;
    font-family: var(--font-u);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.25s;
}
.lang-switch button + button {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.lang-switch button.active { color: var(--red); }
.lang-switch button:not(.active):hover { color: #fff; }

@media (max-width: 760px) {
    .nav-social { display: none; }
    .nav-inner { gap: 12px; }
    .brand { min-width: 0; flex-shrink: 1; }
}

@media (max-width: 480px) {
    .brand-logo { height: 26px; max-width: 150px; }
    .lang-switch button { padding: 5px 6px; font-size: 10px; }
    .menu-social { flex-wrap: wrap; }
}

.scroll-progress {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    height: 2px;
    background: var(--red);
    z-index: 99;
    width: 0;
    transition: transform 0.35s var(--ease);
}
/* pasek postepu jedzie razem z nawigacja, zeby nie zostac sam w powietrzu */
.scroll-progress.is-hidden { transform: translateY(calc(-1 * var(--nav-h))); }

/* przyciski - prostokaty, uppercase */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    font-family: var(--font-b);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.btn-primary {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn-ghost {
    background: transparent;
    border-color: currentColor;
    color: inherit;
}
.btn-ghost:hover { background: var(--red); border-color: var(--red); color: #fff; }

.btn-arrow::after {
    content: "→";
    font-family: var(--font-b);
    transition: transform 0.3s var(--ease);
}
.btn-arrow:hover::after { transform: translateX(5px); }

/* link z kolkiem-strzalka (ferrari discover) */
.hero-discover {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-b);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #fff;
}
/* strzalka z pliku (ikonadalej) - kolko z szewronem jest juz w grafice */
.hero-discover .disc-arrow {
    display: block;
    width: 42px; height: 42px;
    font-size: 0;
    background: url('../assets/icons/arrow.png') center / contain no-repeat;
    transition: transform 0.35s var(--ease), filter 0.35s var(--ease);
}
.hero-discover:hover .disc-arrow {
    transform: translateX(5px);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.35));
}

/* stopka */
.footer {
    /* bez pozycjonowania tlo stopki rysuje sie pod przyklejonymi sekcjami */
    position: relative;
    z-index: 1;
    background: #101012;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 72px var(--pad-x) 36px;
    color: var(--text-2);
    font-size: 14px;
}

.footer-inner { max-width: var(--maxw); margin: 0 auto; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 64px;
}
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
    .footer-grid { grid-template-columns: 1fr; }
}

.footer-col h4 {
    font-family: var(--font-u);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 20px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; line-height: 1.55; }
.footer-col a { color: var(--text-2); transition: color 0.25s; }
.footer-col a:hover { color: #fff; }

.brand-logo-footer { height: 40px; max-width: 230px; }

.footer-brands {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
/* godlo prowadzi na strone uczelni - link nie moze rozepchnac rzedu logotypow */
.pw-link {
    display: inline-flex;
    transition: opacity 0.3s var(--ease);
}
.pw-link:hover { opacity: 0.72; }

/* godlo PW jest czarna kreska — odwracamy na ciemna stopke */
.pw-logo {
    height: 54px;
    width: auto;
    filter: invert(1);
    opacity: 0.85;
    padding-left: 22px;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
}
.brand-mark { display: none !important; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--font-u);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
}

.footer-designed {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.footer-shield { height: 30px; width: auto; opacity: 0.85; transition: opacity 0.3s; }
.footer-designed:hover .footer-shield { opacity: 1; }
.footer-designed-text { display: flex; flex-direction: column; line-height: 1.25; }
.fd-label { font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255,255,255,0.35); }
.fd-name { font-family: var(--font-d); font-size: 15px; font-weight: 600; letter-spacing: 0.14em; color: #fff; }

/* chip - wylaczone globalnie */
.chip { display: none !important; }

/* reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.4s; }

/* page hero (podstrony bez karuzeli) */
.page-hero {
    padding: calc(var(--nav-h) + clamp(72px, 12vh, 140px)) var(--pad-x) clamp(56px, 9vh, 110px);
    background: var(--white);
    color: var(--ink);
}
.page-hero-inner { max-width: var(--maxw); margin: 0 auto; }
.page-hero .lead { color: #3c3c42; }

/* loader (uzywany tam gdzie zostal) */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--black);
    display: grid;
    place-items: center;
    transition: opacity 0.5s, visibility 0.5s;
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-mark {
    font-family: var(--font-d);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.loader-bar { width: 210px; height: 2px; background: rgba(255,255,255,0.12); margin: 0 auto 12px; }
.loader-bar-fill { height: 100%; width: 0; background: var(--red); transition: width 0.3s; }
.loader-pct { font-family: var(--font-u); font-size: 11px; color: var(--text-2); }

/* intro splash */
.intro-splash {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #101012;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.8s cubic-bezier(0.86, 0, 0.07, 1);
}
.intro-splash.intro-out { transform: translateY(-100%); }

.intro-logo {
    width: clamp(150px, 22vw, 300px);
    height: auto;
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
}
.intro-show .intro-logo { opacity: 1; transform: scale(1); }
.intro-dim .intro-logo { opacity: 0.5; transition: opacity 0.5s ease; }

/* liczniki, countdown */
.event-countdown {
    display: inline-flex;
    align-items: stretch;
    background: #fff;
    transform: skewX(var(--skew));
    padding: 12px 22px;
    gap: 4px;
}
.event-countdown .cd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: skewX(calc(-1 * var(--skew)));
    min-width: 52px;
}
.event-countdown .cd-val {
    font-family: var(--font-d);
    font-size: 34px;
    font-weight: 600;
    color: var(--ink);
    font-feature-settings: "tnum";
    line-height: 1;
}
.event-countdown .cd-lbl {
    font-family: var(--font-u);
    font-size: 8px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: #9a9aa2;
    margin-top: 5px;
}
.event-countdown .cd-sep {
    font-family: var(--font-d);
    font-size: 26px;
    color: rgba(16,16,20,0.25);
    transform: skewX(calc(-1 * var(--skew)));
    align-self: flex-start;
    padding-top: 3px;
}
.event-countdown[hidden] { display: none; }

/* licznik dni od minionego startu */
.event-elapsed {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.28);
    transform: skewX(var(--skew));
    padding: 12px 24px;
}
.event-elapsed[hidden] { display: none; }
.event-elapsed .el-val {
    transform: skewX(calc(-1 * var(--skew)));
    font-family: var(--font-d);
    font-size: 40px;
    font-weight: 600;
    color: #fff;
    line-height: 1;
}
.event-elapsed .el-lbl {
    transform: skewX(calc(-1 * var(--skew)));
    font-family: var(--font-u);
    font-size: 10px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

/* dostepnosc */
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
