/* ==========================================================================
   SHARED.CSS — jedno zrodlo wspolnych regul dla OBU polowek serwisu:
   - strony statyczne (public/*.html): <link> PRZED main.css
   - Next (app/): @import na poczatku globals.css
   Wyekstrahowane 2026-08-07 (136 blokow identycznych 1:1; 7 pominietych
   celowo przez ryzyko kolejnosci kaskady: .btn, .subscribe-btn (+:hover), .btn-ghost,
   .nav-dropdown > a, .footer-links a:hover, .nav-toggle.open span:nth-child(3)).
   Kolejnosc blokow = kolejnosc z main.css. Edytuj TUTAJ, nie w kopiach;
   scripts/css-drift-check.py pilnuje, zeby kopie nie wrocily.
   ========================================================================== */

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

:root,
[data-theme="light"] {
    /* Colors — Light */
    --bg: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #fafafa;
    --text: #1d1d1f;
    --text-secondary: #515154;
    --text-muted: #86868b;
    /* Wariant muted spełniający WCAG AA (4.5:1) dla drobnego tekstu (eyebrow, stat-label, footer) */
    --text-muted-strong: #6b6b70;
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.15);
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(255, 255, 255, 0.85);
    --code-bg: #1d1d1f;
    --code-text: #f5f5f7;

    /* Gradients */
    --gold: linear-gradient(135deg, #d4a012 0%, #c2410c 50%, #b91c1c 100%);
    --fire: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
    --green: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --purple: linear-gradient(135deg, #9333ea 0%, #db2777 100%);
    --ocean: linear-gradient(135deg, #0284c7 0%, #0891b2 100%);

    /* Solid accent fallbacks */
    --gold-solid: #d4a012;
    --fire-solid: #dc2626;
    --green-solid: #059669;
    --purple-solid: #9333ea;
    --ocean-solid: #0284c7;

    /* Typography */
    --font: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-base: 18px;
    --font-size-sm: 15px;
    --font-size-xs: 13px;
    --font-size-lg: 22px;
    --font-size-xl: 28px;
    --font-size-2xl: 36px;
    --font-size-3xl: 48px;
    --font-size-hero: clamp(40px, 6vw, 72px);
    --line-height: 1.7;
    --letter-spacing: -0.022em;

    /* Layout */
    --max-width: 1200px;
    --content-width: 800px;
    --nav-height: 72px;
    --section-gap: 120px;

    /* Transitions */
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 0.4s;
    --duration-fast: 0.2s;
}

[data-theme="dark"] {
    /* Colors — Dark */
    --bg: #111111;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #151515;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-muted: #6e6e73;
    --text-muted-strong: #98989e;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    --card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.3);
    --nav-bg: rgba(17, 17, 17, 0.85);
    --code-bg: #0a0a0a;
    --code-text: #f5f5f7;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: var(--line-height);
    letter-spacing: var(--letter-spacing);
    overflow-x: hidden;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.gradient-gold {
    background: var(--gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-fire {
    background: var(--fire);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-green {
    background: var(--green);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-purple {
    background: var(--purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-ocean {
    background: var(--ocean);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background var(--duration) var(--ease);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo span {
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--gold);
    transition: width 0.3s var(--ease-out);
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--text);
}

.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    font-size: var(--font-size-sm) !important;
    font-weight: 600 !important;
    color: #fff !important;
    background: var(--gold) !important;
    padding: 8px 20px;
    border-radius: 100px;
    transition: all var(--duration-fast) var(--ease) !important;
    box-shadow: 0 2px 10px rgba(212, 160, 18, 0.25);
}

.nav-cta:hover {
    opacity: 0.9;
    box-shadow: 0 4px 16px rgba(212, 160, 18, 0.35);
    transform: translateY(-1px);
}

.nav-dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown-arrow {
    transition: transform 0.2s var(--ease);
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.show .dropdown-arrow,
.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: var(--font-size-sm) !important;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--duration-fast) var(--ease);
    white-space: nowrap;
    position: relative;
}

.dropdown-menu li a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 20px;
    width: 0;
    height: 1.5px;
    background: var(--gold);
    transition: width 0.3s var(--ease-out);
}

.dropdown-menu li a:hover {
    color: var(--text);
}

.dropdown-menu li a:hover::after {
    width: calc(100% - 40px);
}

.nav-cta::after {
    display: none !important;
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem 2rem;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    max-width: 560px;
}

.hero-label {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted-strong, var(--text-muted));
    margin-bottom: 1.5rem;
}

.hero-name {
    font-size: var(--font-size-hero);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
}

.hero-tagline {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 2rem;
}

.hero-description {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 480px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    justify-content: start;
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat-number {
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    white-space: nowrap;
}

.hero-stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted-strong, var(--text-muted));
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}

.hero-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 24px;
}

.hero-image-wrapper:hover .hero-photo-active {
    filter: saturate(0.8) brightness(0.9) sepia(0.08) contrast(1.02);
}

.hero-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1.5px solid var(--text-muted);
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot-active {
    background: var(--gold-solid);
    border-color: var(--gold-solid);
    transform: scale(1.2);
}

.hero-dot:hover:not(.hero-dot-active) {
    border-color: var(--text);
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    top: -8px;
    right: -8px;
    bottom: 8px;
    left: 8px;
    background: var(--gold);
    border-radius: 24px;
    opacity: 0.08;
    z-index: -1;
}

.section {
    padding: var(--section-gap) 0;
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-narrow {
    max-width: var(--content-width);
}

.section-header {
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted-strong, var(--text-muted));
    margin-bottom: 1rem;
}

.section-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 600px;
    line-height: 1.6;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
    border: none;
    margin: 0;
}

.card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 2rem;
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.card-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.card-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-top: 1.25rem;
    transition: gap var(--duration-fast) var(--ease);
}

.card-link:hover {
    gap: 10px;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.blog-item:first-child {
    border-top: 1px solid var(--border);
}

.blog-item-title {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.blog-item-tag {
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.blog-item-date {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    white-space: nowrap;
}

.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-primary {
    background: var(--gold);
    color: #fff;
    box-shadow: 0 2px 10px rgba(212, 160, 18, 0.25);
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: 0 4px 16px rgba(212, 160, 18, 0.35);
    transform: translateY(-1px);
}

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

.animate-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-children .animate-in:nth-child(1) { transition-delay: 0ms; }

.stagger-children .animate-in:nth-child(2) { transition-delay: 80ms; }

.stagger-children .animate-in:nth-child(3) { transition-delay: 160ms; }

.site-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0.5rem;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
}

.lang-toggle {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 2px;
    gap: 0;
}

.lang-option {
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.2s;
}

.lang-option.active {
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lang-option:hover:not(.active) {
    color: var(--text-secondary);
}

[data-theme="dark"] .hero-photo {
    filter: saturate(0.5) brightness(0.7) sepia(0.2) contrast(1.05);
}

[data-theme="dark"] .hero-image-wrapper:hover .hero-photo-active {
    filter: saturate(0.7) brightness(0.8) sepia(0.1) contrast(1.02);
}

[data-theme="dark"] .nav-toggle span {
    background: var(--text);
}

.subscribe-form {
    max-width: 460px;
    margin: 0 auto;
}

.subscribe-fields {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.subscribe-input {
    flex: 1;
    font-family: var(--font);
    font-size: var(--font-size-sm);
    padding: 14px 20px;
    border: 1.5px solid var(--border-strong);
    border-radius: 100px;
    outline: none;
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.2s;
}

.subscribe-input:focus {
    border-color: var(--text-secondary);
}

.subscribe-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.subscribe-status {
    font-size: var(--font-size-sm);
    margin-top: 1rem;
    text-align: center;
    padding: 10px 16px;
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
}

.subscribe-status.success {
    color: #0c905c;
    background: rgba(16, 191, 122, 0.1);
}

.subscribe-status.error {
    color: #ea4110;
    background: rgba(242, 100, 59, 0.1);
}

.blog-subscribe {
    margin: 2.5rem 0 1rem;
    padding: 2rem;
    border: 1.5px solid var(--border-strong);
    border-radius: 16px;
    background: var(--bg-secondary);
    text-align: center;
}

.blog-subscribe-heading {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--text);
}

.blog-subscribe-sub {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
}

.blog-subscribe-form .subscribe-fields {
    max-width: 400px;
    margin: 0 auto 10px;
}

.blog-subscribe-form .subscribe-btn {
    max-width: 400px;
    margin: 0 auto;
    display: block;
}

#cookieConsent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg);
    border-top: 1px solid var(--border-strong);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
    padding: 1.25rem 2rem;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

#cookieConsent.cc-visible {
    transform: translateY(0);
    opacity: 1;
}

[data-theme="dark"] #cookieConsent {
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
}

.cc-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: space-between;
}

.cc-text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.cc-link {
    color: var(--gold-solid);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cc-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cc-btn-accept {
    background: var(--gold);
    color: #fff;
    box-shadow: 0 2px 8px rgba(212, 160, 18, 0.25);
}

.cc-btn-accept:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.cc-btn-necessary {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border-strong);
}

.cc-btn-necessary:hover {
    border-color: var(--text);
    color: var(--text);
}

.post-votes {
    display: flex;
    justify-content: center;
    padding: 2rem 0 0.5rem;
}

.vote-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 22px;
    border-radius: 100px;
    border: 1.5px solid var(--border-strong);
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s var(--ease);
    -webkit-user-select: none;
    user-select: none;
}

.vote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.vote-btn.vote-like:hover {
    border-color: var(--gold-solid);
    color: var(--gold-solid);
    background: rgba(212, 160, 18, 0.06);
}

.vote-btn.vote-dislike:hover {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

.vote-btn.active.vote-like {
    border-color: var(--gold-solid);
    color: #fff;
    background: var(--gold-solid);
    box-shadow: 0 4px 16px rgba(212, 160, 18, 0.3);
}

.vote-btn.active.vote-dislike {
    border-color: var(--text-muted);
    color: var(--bg);
    background: var(--text-muted);
}

.vote-btn.vote-loading {
    pointer-events: none;
    opacity: 0.6;
}

.vote-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease);
}

.vote-btn:hover .vote-icon {
    transform: scale(1.15);
}

.vote-pop .vote-icon {
    animation: vote-pop 0.4s var(--ease-out);
}

.vote-label {
    font-size: 13px;
    letter-spacing: -0.01em;
}

.vote-count {
    min-width: 1.2em;
    text-align: center;
    font-variant-numeric: tabular-nums;
    opacity: 0.7;
    font-size: 13px;
}

[data-theme="dark"] .vote-btn {
    background: rgba(255, 255, 255, 0.04);
}

.nav-logo-mark {
    position: relative;
    display: block;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    overflow: hidden;
    border-radius: 6px;
}

.nav-logo-mark-dark,
[data-theme="dark"] .nav-logo-mark-light {
    opacity: 0;
}

[data-theme="dark"] .nav-logo-mark-dark {
    opacity: 1;
}

:focus-visible {
    outline: 2px solid var(--gold-solid, #d4a012);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 3000;
    padding: 10px 16px;
    background: var(--bg);
    color: var(--text);
    border: 1.5px solid var(--border-strong, var(--border));
    border-radius: 0 0 12px 0;
    font-weight: 600;
}

.skip-link:focus {
    left: 0;
}
