/* ═══════════════════════════════════════
   JoinTheFuture — main.css
   Single source of truth for all pages
   ═══════════════════════════════════════ */

/* ═══ Font ═══ */
@font-face {
    font-family: 'Mona Sans';
    src: url('https://github.githubassets.com/assets/mona-sans.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ═══ Base ═══ */
html, body { overflow-x: hidden; }
body { font-family: 'Mona Sans', 'Inter', sans-serif; scroll-behavior: smooth; }

/* ═══ Typography system ═══ */
.section-label {
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em;
    text-transform: uppercase; color: #94a3b8; text-align: center;
    margin-bottom: 0.75rem; display: block;
}
.section-heading {
    font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 900;
    line-height: 1.15; text-align: center; margin-bottom: 0.5rem;
    max-width: 800px; margin-left: auto; margin-right: auto;
}
.section-heading > span {
    display: inline; /* nadpisuje Tailwindowe .block – łamanie naturalne */
}
.section-heading .light { font-weight: 300; font-style: italic; color: #94a3b8; }
.section-heading.on-dark .light { color: #64748b; }
.section-subtext {
    font-size: 1rem; color: #64748b; text-align: center;
    max-width: 800px; margin: 0 auto 3.5rem; line-height: 1.7;
}
/* Domyślna wielkość akapitów w sekcjach — 1rem (16px) */
section p.text-sm { font-size: 1rem; line-height: 1.625; }
.card-title-md { font-size: 1.25rem; line-height: 1.3; margin-bottom: 0.75rem; }
.card-title-md .light { font-weight: 300; font-style: italic; color: #94a3b8; }

/* ═══ Typography — index cards ═══ */
.card-title-lg {
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}
.card-title-lg .light { font-weight: 300; font-style: italic; }
.card-body       { font-size: 1rem; color: #64748b; line-height: 1.625; }
.card-body--dark { font-size: 1rem; color: #94a3b8; line-height: 1.625; }
.card-label {
    font-size: 0.75rem; color: #94a3b8; letter-spacing: 0.05em;
    display: flex; align-items: center; gap: 0.5rem;
}
.card-label .num  { color: #cbd5e1; font-weight: 300; }
.card-label--dark  { color: #475569; }
.card-label--dark .num { color: #334155; }

/* ═══ Word-mask animations ═══ */
.word-mask {
    display: inline-block; overflow: hidden; vertical-align: bottom;
    padding-bottom: 0.28em; margin-bottom: -0.28em; line-height: inherit;
}
.word-mask:not(:last-child) { margin-right: 0.22em; }
.word-inner { display: inline-block; line-height: inherit; }

/* ═══ Hero tagline line-mask (index) ═══ */
.line-mask {
    display: block; overflow: hidden;
    padding-bottom: 0.25em; margin-bottom: -0.25em;
}
.line-mask:last-child { margin-bottom: 0; }
.line-inner {
    display: block;
    padding-bottom: 0.25em; margin-bottom: -0.25em;
}

/* ═══ Nav ═══ */
.nav-island {
    position: fixed; top: 16px; left: 0; right: 0; margin: 0 auto; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    width: min(60rem, calc(100vw - 2rem));
    background: rgba(12, 12, 20, 0.82); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 9999px; padding: 10px 14px 10px 22px;
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 8px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
    white-space: nowrap;
}
.nav-logo { display: flex; align-items: center; margin-right: 28px; flex-shrink: 0; }
.nav-links { position: relative; display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.nav-link {
    position: relative; z-index: 1; font-size: 0.8125rem; font-weight: 500;
    color: #94a3b8; padding: 6px 14px; border-radius: 9999px;
    transition: color 0.2s; text-decoration: none;
}
.nav-link:hover { color: #fff; }
.nav-link.active { color: #fff; background: rgba(255,255,255,0.08); }

/* ═══ Dropdown ═══ */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.8125rem; font-weight: 500; color: #94a3b8;
    padding: 6px 14px; border-radius: 9999px; transition: color 0.2s;
    cursor: pointer; background: none; border: none; white-space: nowrap;
}
.nav-dropdown-toggle:hover, .nav-dropdown-toggle[aria-expanded="true"] { color: #fff; }
.nav-dropdown-toggle .chevron { width: 12px; height: 12px; transition: transform 0.25s ease; }
.nav-dropdown-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.nav-dropdown-menu {
    position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(6px);
    min-width: 300px; background: rgba(15,17,23,0.96); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; padding: 8px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
    opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 100; white-space: normal;
}
.nav-dropdown-menu.open { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dropdown-item {
    display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
    border-radius: 12px; text-decoration: none; transition: background 0.15s;
}
.nav-dropdown-item:hover { background: rgba(255,255,255,0.06); }
.nav-dropdown-item .dd-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-dropdown-item .dd-text h3 { font-size: 0.8125rem; font-weight: 600; color: #e2e8f0; margin: 0 0 2px; line-height: 1.3; }
.nav-dropdown-item:hover .dd-text h3 { color: #fff; }
.nav-dropdown-item .dd-text p { font-size: 0.6875rem; color: #64748b; margin: 0; line-height: 1.4; }
.nav-cta {
    position: relative; display: inline-flex; align-items: center; gap: 7px;
    background: #fff; color: #0c0c14; font-size: 0.8125rem; font-weight: 700;
    padding: 8px 18px; border-radius: 9999px; text-decoration: none;
    transition: background 0.2s, transform 0.15s; flex-shrink: 0;
}
.nav-cta:hover { background: #e2e8f0; transform: scale(1.03); }
.nav-cta::before, .nav-cta::after {
    content: ''; position: absolute; inset: 0; border-radius: 9999px;
    background: rgba(255,255,255,0.35); animation: nav-pulse 2.8s ease-out infinite; pointer-events: none;
}
.nav-cta::after { animation-delay: 1.4s; }
@keyframes nav-pulse {
    0% { transform: scale(1); opacity: 0.55; }
    70% { transform: scale(1.55); opacity: 0; }
    100% { transform: scale(1.55); opacity: 0; }
}
.nav-hamburger {
    display: none; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 10px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer; flex-shrink: 0; transition: background 0.2s;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.15); }
.nav-hamburger svg { color: #cbd5e1; }
@media (max-width: 767px) {
    .nav-hamburger { display: flex; }
    .nav-island { width: calc(100vw - 2rem) !important; padding: 8px 12px 8px 18px; }
}

/* ═══ Mobile sidebar ═══ */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 998; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.sidebar-overlay.open { opacity: 1; visibility: visible; }
.sidebar-panel {
    position: fixed; top: 0; right: 0; width: 90vw; max-width: 400px; height: 100vh; height: 100dvh;
    background: #0f1117; border-left: 1px solid rgba(255,255,255,0.08); z-index: 999;
    display: flex; flex-direction: column; transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1); overflow-y: auto;
}
.sidebar-panel.open { transform: translateX(0); }
.sidebar-close {
    position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center; border-radius: 10px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8; cursor: pointer; transition: background 0.2s;
}
.sidebar-close:hover { background: rgba(255,255,255,0.12); }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; padding: 72px 24px 24px; flex: 1; }
.sidebar-group-label { font-size: 0.625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(148,163,184,0.5); padding: 16px 16px 4px; }
.sidebar-link {
    font-size: 1rem; font-weight: 600; color: #94a3b8; padding: 12px 16px;
    border-radius: 12px; text-decoration: none; transition: color 0.2s, background 0.2s;
}
.sidebar-link:hover, .sidebar-link.active { color: #fff; background: rgba(255,255,255,0.06); }
.sidebar-link.active { border-left: 2px solid rgb(79,70,229); padding-left: 14px; }
.sidebar-contact { padding: 20px 24px 28px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; flex-direction: column; gap: 12px; }
.sidebar-contact-card {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px; padding: 16px; text-decoration: none; transition: background 0.2s;
}
.sidebar-contact-card:hover { background: rgba(255,255,255,0.08); }
.sidebar-contact-card .icon-wrap {
    width: 36px; height: 36px; display: flex; align-items: center;
    justify-content: center; border-radius: 10px; flex-shrink: 0;
}

/* ═══ Floating call button ═══ */
.floating-call {
    position: fixed; bottom: 24px; right: 24px; z-index: 60; display: none;
    align-items: center; justify-content: center; width: 56px; height: 56px;
    border-radius: 9999px; background: rgb(79,70,229); color: #fff;
    box-shadow: 0 4px 24px rgba(79,70,229,0.4); text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.floating-call::before, .floating-call::after {
    content: ''; position: absolute; inset: 0; border-radius: 9999px;
    background: rgba(79,70,229,0.35); animation: nav-pulse 2.8s ease-out infinite; pointer-events: none;
}
.floating-call::after { animation-delay: 1.4s; }
.floating-call:hover { transform: scale(1.1); box-shadow: 0 6px 32px rgba(79,70,229,0.5); }
@media (max-width: 767px) { .floating-call { display: flex; } }

/* ═══ Breadcrumb ═══ */
.breadcrumb { font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.breadcrumb a { color: rgba(255,255,255,0.6); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: #fff; }

/* ═══ Hero entrance animations ═══ */
@keyframes hero-fade-down { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hero-fade-up   { from { opacity: 0; transform: translateY(22px); }  to { opacity: 1; transform: translateY(0); } }
@keyframes hero-reveal     { from { opacity: 0; transform: translateY(28px) scale(0.97); filter: blur(6px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes hero-bar-up     { from { opacity: 0; transform: translateX(-50%) translateY(18px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.hero-fade-down { animation: hero-fade-down 0.65s cubic-bezier(0.22,1,0.36,1) both; animation-delay: var(--hd, 0s); }
.hero-fade-up   { animation: hero-fade-up 0.7s cubic-bezier(0.22,1,0.36,1) both;  animation-delay: var(--hd, 0s); }
.hero-reveal    { animation: hero-reveal 1s cubic-bezier(0.22,1,0.36,1) both;      animation-delay: var(--hd, 0s); }
.hero-bar-up    { animation: hero-bar-up 0.8s cubic-bezier(0.22,1,0.36,1) both;    animation-delay: var(--hd, 0s); }

/* ═══ Scroll entrance animations ═══ */
[data-anim] {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--anim-delay, 0s);
}
[data-anim].in { opacity: 1; transform: translateY(0); }

/* ═══ Hover effects ═══ */
.btn-hover { transition: transform 0.18s cubic-bezier(0.22,1,0.36,1), background 0.2s, box-shadow 0.2s, color 0.2s, border-color 0.2s !important; }
.btn-hover:hover { transform: scale(1.045); }
.card-hover { transition: transform 0.22s cubic-bezier(0.22,1,0.36,1), box-shadow 0.22s ease !important; }
.card-hover:hover { transform: translateY(-3px) scale(1.018); box-shadow: 0 6px 20px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04); }
.card-hover.card-dark:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.20), 0 3px 8px rgba(0,0,0,0.10); }
.card-hover-wrap { transition: transform 0.22s cubic-bezier(0.22,1,0.36,1) !important; }
.card-hover-wrap:hover { transform: translateY(-3px) scale(1.018); }

/* ═══ FAQ accordion ═══ */
.faq-item { transition: border-color 0.25s ease, box-shadow 0.25s ease; }
.faq-item:hover { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.faq-item.open { border-color: #818cf8; box-shadow: 0 2px 12px rgba(99,102,241,0.08); }
.faq-toggle { cursor: pointer; transition: background 0.2s ease; }
.faq-toggle:hover { background: rgba(241,245,249,0.6); }
.faq-toggle span:first-child { font-size: 1.125rem; line-height: 1.75rem; }
.faq-answer { max-height: 0; overflow: hidden; padding-top: 0 !important; padding-bottom: 0 !important; transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease, padding 0.3s ease; opacity: 0; }
.faq-answer.open { padding-bottom: 1.25rem !important; opacity: 1; }
.faq-answer p { font-size: 1rem; line-height: 1.75rem; }
.faq-chevron { transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), color 0.25s ease; }
.faq-chevron.open { transform: rotate(180deg); color: #6366f1; }

/* ═══ Tooltip (index) ═══ */
.tooltip-container { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.tooltip-content {
    position: absolute; bottom: 100%; left: 50%;
    transform: translateX(-50%) translateY(10px);
    margin-bottom: 0.75rem; width: 18rem;
    background-color: #1e293b; color: white; font-size: 0.75rem;
    border-radius: 0.5rem; padding: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
    z-index: 50; text-align: center; line-height: 1.5;
    pointer-events: none;
}
.tooltip-container:hover .tooltip-content,
.tooltip-container:focus-within .tooltip-content {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.tooltip-arrow {
    position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%);
    border-width: 8px; border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

/* ═══ Modal (index) ═══ */
#info-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem; backdrop-filter: blur(2px);
}
#info-modal-overlay.hidden { display: none; }
#info-modal-box {
    background: #1e293b; color: white;
    border-radius: 1rem; padding: 1.5rem;
    max-width: 22rem; width: 100%;
    position: relative; font-size: 0.875rem; line-height: 1.6;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
#info-modal-close {
    position: absolute; top: 0.75rem; right: 0.75rem;
    background: rgba(255,255,255,0.1); border: none; color: white;
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    cursor: pointer; font-size: 1rem; display: flex;
    align-items: center; justify-content: center;
}

/* ═══ Calculator (index) ═══ */
@property --kalk-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes kalk-spin-border { to { --kalk-angle: 360deg; } }
.kalk-animated-border {
    background: conic-gradient(from var(--kalk-angle), #818cf8 0%, #c084fc 25%, #34d399 55%, #818cf8 100%);
    animation: kalk-spin-border 7s linear infinite;
}
.kalk-bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(99,102,241,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.045) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 92% 88% at 50% 50%, black 25%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 92% 88% at 50% 50%, black 25%, transparent 100%);
    pointer-events: none; z-index: 0;
}
.kalk-hbeam {
    position: absolute; left: -180px; width: 160px; height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(129,140,248,0.28) 50%, transparent 100%);
    box-shadow: 0 0 8px 2px rgba(129,140,248,0.07);
    animation: kalk-hbeam-move var(--kd, 12s) ease-in-out infinite var(--kdelay, 0s);
    pointer-events: none; z-index: 1; opacity: 0;
}
@keyframes kalk-hbeam-move {
    0%   { left: -180px; opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { left: calc(100% + 180px); opacity: 0; }
}
.kalk-vbeam {
    position: absolute; top: -180px; width: 1px; height: 140px;
    background: linear-gradient(to bottom, transparent 0%, rgba(192,132,252,0.28) 50%, transparent 100%);
    box-shadow: 0 0 8px 2px rgba(192,132,252,0.07);
    animation: kalk-vbeam-move var(--kd, 16s) ease-in-out infinite var(--kdelay, 0s);
    pointer-events: none; z-index: 1; opacity: 0;
}
@keyframes kalk-vbeam-move {
    0%   { top: -180px; opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { top: calc(100% + 180px); opacity: 0; }
}

/* ═══ Index misc ═══ */
.gradient-bg { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); }
.feature-check { color: #16a34a; margin-right: 0.5rem; flex-shrink: 0; }

/* ═══ 404 ═══ */
.error-number {
    font-size: clamp(7rem, 25vw, 14rem); font-weight: 900; line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    user-select: none;
}
.glow-ring {
    position: absolute; width: 600px; height: 600px; border-radius: 9999px;
    background: radial-gradient(circle, rgba(79,70,229,0.15) 0%, transparent 70%);
    pointer-events: none; left: 50%; top: 50%; transform: translate(-50%, -60%);
}
