/* =================================================
   ZUZIA PAWLIKOWSKA — DESIGN SYSTEM
   Sekcja 1 — HERO
   ================================================= */

/* =================================================
   TOKENY
   ================================================= */
:root {
    /* Tła */
    --bg-ink: #0E1217;
    --bg-ink-deep: #07090C;
    --bg-soft: #F5F1E8;
    --bg-soft-dim: #EFEAE0;

    /* Tekst */
    --ink: #0E1217;
    --ink-muted: #6B7280;
    --paper: #F5F1E8;
    --paper-muted: #C9C4B8;
    --paper-dim: rgba(245, 241, 232, 0.62);

    /* Akcenty */
    --coral: #FF4E5A;
    --coral-deep: #E6394A;
    --coral-glow: rgba(255, 78, 90, 0.32);
    --lime: #D8F25E;
    --lime-glow: rgba(216, 242, 94, 0.28);

    /* Tour category colors — color-coded by tournament level */
    --tour-itf:    #FF8A3D; /* ITF orange */
    --tour-125:    #2B5DA0; /* WTA 125 blue */
    --tour-250:    #3C6E2A; /* WTA 250+ green */
    --tour-gs:     #8B1F4B; /* Grand Slam maroon */
    /* Surface colors */
    --surf-clay:   #C9612A;
    --surf-grass:  #4A7C2C;
    --surf-hard:   #2E5C8A;

    /* Greyscale */
    --g-100: #F5F1E8;
    --g-200: #E8E2D2;
    --g-400: #9CA3AF;
    --g-600: #4B5563;
    --g-800: #1F2937;
    --g-900: #0E1217;

    /* Typografia */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Geist', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Motion */
    --ease-rise: cubic-bezier(0.2, 0.9, 0.3, 1);
    --dur-fast: 150ms;
    --dur-base: 400ms;
    --dur-slow: 700ms;
    --dur-reveal: 900ms;

    /* Layout */
    --container-max: 1440px;
    --container-px: 32px;
}

@media (max-width: 768px) {
    :root {
        --container-px: 20px;
    }
}

/* =================================================
   RESET / BASE
   ================================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

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

::selection {
    background: var(--coral);
    color: var(--paper);
}

/* =================================================
   REVEAL ANIMATIONS
   ================================================= */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity var(--dur-reveal) var(--ease-rise),
        transform var(--dur-reveal) var(--ease-rise);
    will-change: opacity, transform;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* =================================================
   NAV
   ================================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    transition: padding var(--dur-base) var(--ease-rise),
                background-color var(--dur-base) var(--ease-rise),
                backdrop-filter var(--dur-base) var(--ease-rise);
}

.nav.is-solid {
    padding: 12px 0;
    background: rgba(14, 18, 23, 0.78);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(245, 241, 232, 0.06);
}

/* Mobile: nav zawsze ma solid tło (bez czekania na scroll, żeby logo i linki były czytelne) */
@media (max-width: 768px) {
    .nav,
    .nav.is-solid {
        padding: 10px 0;
        background: rgba(14, 18, 23, 0.94);
        backdrop-filter: saturate(180%) blur(16px);
        -webkit-backdrop-filter: saturate(180%) blur(16px);
        border-bottom: 1px solid rgba(245, 241, 232, 0.08);
    }
}

.nav__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.nav__brand {
    display: inline-flex;
    align-items: center;
    color: var(--paper);
    transition: opacity var(--dur-base) ease;
}

.nav__brand:hover {
    opacity: 0.85;
}

.nav__brand-logo {
    height: 38px;
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .nav__brand-logo {
        height: 30px;
    }
}

.nav__links {
    list-style: none;
    display: flex;
    gap: 32px;
    margin: 0 auto 0 32px;
}

.nav__links a {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--paper-dim);
    position: relative;
    padding: 4px 0;
    transition: color var(--dur-fast) ease;
}

.nav__links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--coral);
    transition: width var(--dur-base) var(--ease-rise);
}

.nav__links a:hover {
    color: var(--paper);
}

.nav__links a:hover::after {
    width: 100%;
}

@media (max-width: 900px) {
    .nav__links {
        display: none;
    }
}

.nav__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid rgba(245, 241, 232, 0.2);
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--paper);
    transition: all var(--dur-base) var(--ease-rise);
}

.nav__cta:hover {
    background: var(--coral);
    border-color: var(--coral);
    color: var(--paper);
    transform: translateY(-1px);
}

.nav__cta-arrow {
    transition: transform var(--dur-base) var(--ease-rise);
}

.nav__cta:hover .nav__cta-arrow {
    transform: translateX(3px);
}

/* =================================================
   HERO
   ================================================= */
.hero {
    position: relative;
    /* Skrócone, żeby partners-strip v4 (label + 1 rząd 6 marków ~150px) mieścił się na first screen */
    min-height: calc(100vh - 150px);
    min-height: calc(100dvh - 150px);
    background: var(--bg-ink-deep);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: var(--paper);
}

@media (max-width: 1024px) {
    .hero {
        /* Tablet: strip ma 2 rzędy (3 cols × 2) = ~220px */
        min-height: calc(100vh - 220px);
        min-height: calc(100dvh - 220px);
    }
}

@media (max-width: 720px) {
    .hero {
        /* Mobile: strip 1 rząd horizontal scroll (~80px) */
        min-height: calc(100vh - 90px);
        min-height: calc(100dvh - 90px);
    }
}

/* Screenshot mode — kiedy viewport > 2000px hero ma cap wysokości */
@media (min-height: 2000px) {
    .hero {
        min-height: 750px;
        height: 750px;
    }
}

/* Layer 1: Photo (full-bleed) */
.hero__photo {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 58% 38%;
    filter: brightness(0.88) saturate(1.05) contrast(1.04);
    animation: hero-photo-zoom 22s var(--ease-rise) forwards;
}

@media (max-width: 768px) {
    .hero__photo img {
        object-position: 60% 38%;
        filter: brightness(0.78) saturate(1.0) contrast(1.04);
    }
}

@keyframes hero-photo-zoom {
    from { transform: scale(1.06); }
    to { transform: scale(1.0); }
}

/* Layer 2: Dark gradient overlay
   Strategia: silny ciemny prostokąt po lewej-dolnej dla content,
   Zuzia (postać) eksponowana jaśniej, banner zacieniony */
.hero__gradient {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        /* Radial gradient zaciemniający tło, zachowujący Zuzię w widoku */
        radial-gradient(ellipse 90% 80% at 75% 55%,
            rgba(14, 18, 23, 0) 0%,
            rgba(14, 18, 23, 0.2) 35%,
            rgba(14, 18, 23, 0.75) 100%
        ),
        /* Vertical gradient — dolny ciemniejszy */
        linear-gradient(180deg,
            rgba(14, 18, 23, 0.40) 0%,
            rgba(14, 18, 23, 0.05) 25%,
            rgba(14, 18, 23, 0.35) 58%,
            rgba(14, 18, 23, 0.96) 100%
        ),
        /* Horizontal gradient — lewy ciemny dla content */
        linear-gradient(90deg,
            rgba(14, 18, 23, 0.94) 0%,
            rgba(14, 18, 23, 0.78) 25%,
            rgba(14, 18, 23, 0.30) 55%,
            rgba(14, 18, 23, 0.05) 80%,
            rgba(14, 18, 23, 0) 100%
        );
}

@media (max-width: 768px) {
    .hero__gradient {
        background:
            radial-gradient(ellipse 90% 70% at 50% 40%,
                rgba(14, 18, 23, 0) 0%,
                rgba(14, 18, 23, 0.2) 50%,
                rgba(14, 18, 23, 0.7) 100%
            ),
            linear-gradient(180deg,
                rgba(14, 18, 23, 0.55) 0%,
                rgba(14, 18, 23, 0.20) 30%,
                rgba(14, 18, 23, 0.70) 65%,
                rgba(14, 18, 23, 0.98) 100%
            );
    }
}

/* Layer 3: Court lines decoration — sygnaturowy element */
.hero__lines {
    position: absolute;
    top: -4vh;
    right: -3vw;
    width: 60vw;
    max-width: 880px;
    height: 96vh;
    z-index: 3;
    color: var(--paper);
    opacity: 0.13;
    pointer-events: none;
    mix-blend-mode: screen;
}

.hero__lines line {
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: court-line-draw 1800ms var(--ease-rise) forwards;
}

.hero__lines line:nth-child(1) { animation-delay: 600ms; }
.hero__lines line:nth-child(2) { animation-delay: 850ms; }
.hero__lines line:nth-child(3) { animation-delay: 1050ms; }
.hero__lines line:nth-child(4) { animation-delay: 1250ms; }
.hero__lines line:nth-child(5) { animation-delay: 1400ms; }
.hero__lines line:nth-child(6) { animation-delay: 1450ms; }

@keyframes court-line-draw {
    to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hero__lines line {
        stroke-dashoffset: 0;
        animation: none;
    }
}

@media (max-width: 900px) {
    .hero__lines {
        width: 110vw;
        height: 55vh;
        top: auto;
        bottom: 14vh;
        right: -10vw;
        opacity: 0.09;
    }
}

/* Layer 4: Noise grain (very subtle texture) */
.hero__grain {
    position: absolute;
    inset: 0;
    z-index: 4;
    opacity: 0.04;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* Layer 5: Content */
.hero__content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    align-items: flex-end;
    padding: 0 0 110px;
}

@media (max-width: 768px) {
    .hero__content {
        padding: 100px 0 90px;
        align-items: flex-end;
    }
}

.hero__container {
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--container-px);
}

/* Eyebrow ("RISING · WTA TOUR") */
.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.24em;
    color: var(--paper);
    margin-bottom: 28px;
    padding: 10px 18px 10px 14px;
    border: 1px solid rgba(216, 242, 94, 0.32);
    border-radius: 999px;
    background:
        linear-gradient(90deg,
            rgba(216, 242, 94, 0.08) 0%,
            rgba(14, 18, 23, 0.42) 100%
        );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-transform: uppercase;
}

.hero__rising-dot {
    position: relative;
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 14px var(--lime-glow), 0 0 28px var(--lime-glow);
    animation: pulse-dot 2.4s ease-in-out infinite;
    flex-shrink: 0;
}

.hero__rising-dot::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 1px solid var(--lime);
    border-radius: 50%;
    opacity: 0.4;
    animation: pulse-ring 2.4s ease-in-out infinite;
}

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

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

/* Imię — mega serif */
.hero__name {
    font-family: var(--font-display);
    font-variation-settings: 'opsz' 144;
    font-weight: 900;
    font-size: clamp(44px, 10.5vw, 152px);
    line-height: 0.86;
    letter-spacing: -0.045em;
    color: var(--paper);
    margin: 0 0 36px;
    max-width: 100%;
}

.hero__name-line {
    display: block;
    overflow: hidden;
}

.hero__name-mask {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 1100ms var(--ease-rise);
}

[data-reveal].is-visible .hero__name-mask {
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .hero__name-mask {
        transform: none;
    }
}

@media (max-width: 768px) {
    .hero__name {
        margin-bottom: 22px;
    }
}

/* Ranking — scoreboard */
.hero__ranking-block {
    margin-bottom: 28px;
}

.hero__ranking {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 14px;
    width: fit-content;
    padding: 18px 28px;
    background: rgba(14, 18, 23, 0.66);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(245, 241, 232, 0.1);
    border-radius: 4px;
}

.hero__ranking-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 28px;
}

.hero__ranking-item:first-child {
    padding-left: 0;
}

.hero__ranking-item:last-child {
    padding-right: 0;
}

.hero__ranking-divider {
    width: 1px;
    background: rgba(245, 241, 232, 0.14);
    align-self: stretch;
}

.hero__ranking-label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--paper-dim);
    text-transform: uppercase;
}

.hero__ranking-value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: clamp(44px, 5.4vw, 76px);
    line-height: 1;
    color: var(--coral);
    letter-spacing: 0.02em;
    display: flex;
    align-items: baseline;
}

.hero__ranking-hash {
    font-size: 0.55em;
    margin-right: 2px;
    color: var(--paper-dim);
    font-weight: 400;
}

.hero__rise {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--lime);
}

.hero__rise-arrow {
    color: var(--lime);
    font-size: 16px;
    line-height: 1;
}

@media (max-width: 480px) {
    .hero__ranking {
        padding: 14px 18px;
    }

    .hero__ranking-item {
        padding: 0 16px;
    }
}

/* Meta */
.hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--paper-dim);
    margin-bottom: 36px;
}

.hero__meta-dot {
    color: var(--coral);
    font-size: 16px;
    line-height: 0;
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .hero__meta {
        gap: 8px 10px;
        font-size: 10.5px;
        letter-spacing: 0.14em;
        margin-bottom: 26px;
    }
}

/* CTA bar */
.hero__cta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .hero__cta {
        gap: 10px;
    }
}

/* =================================================
   BUTTONS
   ================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 26px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition:
        background-color var(--dur-base) var(--ease-rise),
        color var(--dur-base) var(--ease-rise),
        border-color var(--dur-base) var(--ease-rise),
        transform var(--dur-fast) var(--ease-rise);
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn__arrow {
    transition: transform var(--dur-base) var(--ease-rise);
    font-size: 14px;
    line-height: 1;
}

.btn:hover .btn__arrow {
    transform: translateX(4px);
}

.btn--primary {
    background: var(--coral);
    color: var(--paper);
    box-shadow:
        0 8px 28px var(--coral-glow),
        0 2px 6px rgba(230, 57, 74, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    padding: 20px 32px;
    font-size: 14px;
    letter-spacing: 0.14em;
    font-weight: 700;
}

.btn--primary:hover {
    background: var(--coral-deep);
    box-shadow:
        0 12px 40px var(--coral-glow),
        0 4px 10px rgba(230, 57, 74, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn--outline {
    background: rgba(14, 18, 23, 0.42);
    color: var(--paper);
    border-color: rgba(245, 241, 232, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn--outline:hover {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--paper);
}

.btn--ghost {
    background: transparent;
    color: var(--paper-dim);
    padding-left: 14px;
    padding-right: 14px;
    font-weight: 500;
}

.btn--ghost:hover {
    color: var(--paper);
}

/* =================================================
   HERO TICKER (bottom strip) — wzmocniony
   ================================================= */
/* hero__ticker — usunięty 2026-05-27 (NEXT MATCH skupiał uwagę zamiast partnerów) */

@media (max-width: 640px) {
    .hero__ticker-inner {
        font-size: 10.5px;
        gap: 10px;
    }

    .hero__ticker-cat {
        font-size: 9.5px;
    }

    .hero__ticker-link,
    .hero__ticker-divider {
        display: none;
    }
}

/* =================================================
   SCROLL INDICATOR
   ================================================= */
.hero__scroll {
    position: absolute;
    right: 32px;
    bottom: 84px;
    z-index: 11;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--paper-dim);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    padding: 14px 8px;
    transition: color var(--dur-base) ease;
}

.hero__scroll:hover {
    color: var(--paper);
}

.hero__scroll-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.hero__scroll-arrow {
    display: inline-flex;
    width: 22px;
    height: 22px;
    animation: scroll-bounce 2.4s var(--ease-rise) infinite;
}

.hero__scroll-arrow svg {
    width: 100%;
    height: 100%;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.55; }
    50% { transform: translateY(8px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .hero__scroll-arrow {
        animation: none;
    }
}

@media (max-width: 900px) {
    .hero__scroll {
        display: none;
    }
}
