/* =====================================================================
   TipTech - Common Stylesheet
   Wspólne style dla wszystkich stron: nav, footer, dropdown, utility
   ===================================================================== */

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

:root {
    --primary: #0055FF;
    --primary-light: #3377FF;
    --primary-dark: #0040CC;
    --primary-bg: #EBF1FF;
    --accent: #00D4AA;
    --accent-dark: #00B894;
    --laser: #00E5FF;
    --laser-glow: rgba(0, 229, 255, 0.6);
    --warm: #FFA502;
    --hot: #FF4757;
    --purple: #7C3AED;
    --purple-light: #A78BFA;
    --dark: #050B17;
    --dark-2: #0A1628;
    --dark-3: #1A2744;
    --gray-900: #1E293B;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748B;
    --gray-400: #94A3B8;
    --gray-300: #CBD5E1;
    --gray-200: #E2E8F0;
    --gray-100: #F1F5F9;
    --gray-50: #F8FAFC;
    --white: #FFFFFF;
    --gradient-primary: linear-gradient(135deg, #0055FF 0%, #00D4AA 100%);
    --gradient-laser: linear-gradient(90deg, #00E5FF 0%, #00D4AA 50%, #0055FF 100%);
    --gradient-dark: linear-gradient(180deg, #050B17 0%, #0A1628 100%);
    --gradient-warm: linear-gradient(135deg, #FFA502 0%, #FF4757 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-700);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }

.section-label {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--primary); margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
}
.section-label::before { content: ''; width: 24px; height: 2px; background: var(--primary); border-radius: 1px; }

.section-title {
    font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
    color: var(--gray-900); line-height: 1.15; margin-bottom: 20px; letter-spacing: -0.02em;
}
.section-subtitle { font-size: 1.1rem; color: var(--gray-500); max-width: 720px; line-height: 1.7; }

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

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.95rem; font-family: inherit;
    cursor: pointer; border: none; transition: var(--transition); text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--white); box-shadow: 0 4px 14px rgba(0, 85, 255, 0.3); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 6px 20px rgba(0, 85, 255, 0.4); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.3); }
.btn-outline:hover { background: var(--white); color: var(--primary); border-color: var(--white); }
.btn-white { background: var(--white); color: var(--primary); box-shadow: var(--shadow-lg); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }
.btn svg { width: 18px; height: 18px; transition: transform 0.3s ease; }
.btn:hover svg { transform: translateX(3px); }

/* ===== NAVBAR ===== */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 16px 0; transition: var(--transition); background: transparent;
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--gray-200);
    padding: 10px 0; box-shadow: var(--shadow-sm);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-img { height: 72px; width: auto; transition: var(--transition); filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08)); }
.navbar.scrolled .logo-img { height: 58px; }
.logo-text {
    margin-left: 4px; font-size: 1.7rem; font-weight: 800;
    letter-spacing: -0.03em; line-height: 1; color: var(--white);
    transition: var(--transition); white-space: nowrap;
}
.logo-text em { font-style: normal; }
.navbar.scrolled .logo-text { color: #000000; font-size: 1.5rem; }
.footer .logo-text { font-size: 1.4rem; margin-bottom: 14px; }
@media (max-width: 768px) {
    .logo-text { font-size: 1.2rem; }
    .navbar.scrolled .logo-text { font-size: 1.1rem; }
}

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links > li > a {
    text-decoration: none; color: var(--white); font-weight: 500;
    font-size: 0.9rem; transition: var(--transition); position: relative;
}
.navbar.scrolled .nav-links > li > a { color: var(--gray-700); }
.nav-links > li > a:hover { color: var(--accent); }
.navbar.scrolled .nav-links > li > a:hover { color: var(--primary); }

.nav-cta {
    padding: 10px 22px !important;
    background: var(--primary);
    color: var(--white) !important;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 14px rgba(0, 85, 255, 0.3);
}
.nav-cta:hover { background: var(--primary-dark) !important; box-shadow: 0 6px 20px rgba(0, 85, 255, 0.4); transform: translateY(-1px); }

/* Active link */
.nav-links > li > a.active-link { color: var(--accent) !important; }
.navbar.scrolled .nav-links > li > a.active-link { color: var(--primary) !important; }

/* ===== DROPDOWN MENU ===== */
.has-dropdown { position: relative; }
.has-dropdown > a { cursor: pointer; }
.dropdown {
    position: absolute; top: calc(100% + 14px); left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 320px; background: var(--white);
    border: 1px solid var(--gray-200); border-radius: var(--radius-md);
    padding: 12px; box-shadow: var(--shadow-2xl);
    display: flex; flex-direction: column; gap: 4px;
    opacity: 0; visibility: hidden; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1000;
}
.dropdown::before {
    content: ''; position: absolute; top: -6px; left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px; height: 12px; background: var(--white);
    border-left: 1px solid var(--gray-200); border-top: 1px solid var(--gray-200);
}
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.dropdown a {
    display: flex !important; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: var(--radius-sm);
    color: var(--gray-700) !important; font-size: 0.88rem !important;
    transition: background 0.2s ease; text-decoration: none; font-weight: 500;
}
.dropdown a:hover { background: var(--gray-50); color: var(--primary) !important; }
.dropdown a.active { background: var(--gray-50); }
.dropdown a.active strong { color: var(--primary) !important; }
.dropdown .drop-icon {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dropdown .drop-icon svg { width: 18px; height: 18px; }
.dropdown a > div { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.dropdown a > div strong { font-weight: 600; color: var(--gray-900); font-size: 0.9rem; }
.dropdown a > div span { font-size: 0.75rem; color: var(--gray-500); font-weight: 400; }

/* ===== MOBILE ===== */
.mobile-toggle {
    display: none; flex-direction: column; gap: 5px; cursor: pointer;
    background: none; border: none; padding: 8px;
}
.mobile-toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--transition); }
.navbar.scrolled .mobile-toggle span { background: var(--gray-700); }
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4); z-index: 997; }

/* ===== FOOTER ===== */
.footer { background: var(--dark-2); color: var(--gray-400); padding: 60px 0 30px; }
.footer-content {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 30px; padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-brand .logo-img { height: 80px; filter: drop-shadow(0 4px 12px rgba(0, 85, 255, 0.2)); margin-bottom: 14px; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; max-width: 340px; color: rgba(255,255,255,0.5); }
.footer-links h4 { color: var(--white); font-size: 0.85rem; font-weight: 700; margin-bottom: 16px; letter-spacing: 0.05em; text-transform: uppercase; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links li, .footer-links a { font-size: 0.85rem; color: var(--gray-400); text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 24px; font-size: 0.82rem;
}
.footer-bottom a { color: var(--gray-400); text-decoration: none; transition: var(--transition); }
.footer-bottom a:hover { color: var(--white); }

/* ===== REVEAL ANIMATIONS ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== UTILITIES ===== */
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.3); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== SCROLL TO TOP ===== */
.scroll-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 44px; height: 44px;
    background: var(--primary); color: var(--white);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: var(--transition); z-index: 100;
}
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--primary-dark); transform: translateY(-3px); }
.scroll-top svg { width: 20px; height: 20px; }

/* Wide dropdown (2 columns) for long menus */
.dropdown.dropdown-wide {
    display: grid; grid-template-columns: 1fr 1fr;
    column-gap: 8px; min-width: 620px;
    left: auto; right: -60px; transform: translateY(8px);
}
.dropdown.dropdown-wide::before { left: auto; right: 110px; transform: rotate(45deg); }
.has-dropdown:hover .dropdown.dropdown-wide { transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .footer-content { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
    .section { padding: 70px 0; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 85%; max-width: 340px; height: 100vh;
        background: var(--white); flex-direction: column; padding: 80px 32px 32px; gap: 20px;
        box-shadow: var(--shadow-2xl); transition: right 0.3s ease; z-index: 998;
        overflow-y: auto; align-items: flex-start;
    }
    .nav-links.open { right: 0; }
    .nav-links > li { width: 100%; }
    .nav-links > li > a { color: var(--gray-700) !important; }
    .mobile-toggle { display: flex; z-index: 999; }
    .mobile-overlay.open { display: block; }

    /* Mobile dropdown - always visible */
    .dropdown {
        position: static; transform: none; min-width: 100%;
        opacity: 1; visibility: visible;
        box-shadow: none; border: none; padding: 8px 0 0 12px;
        background: transparent;
    }
    .dropdown::before { display: none; }
    .dropdown a { padding: 10px 12px; }
    .dropdown.dropdown-wide { display: flex; flex-direction: column; min-width: 100%; }

    .footer-content { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
