/* Distinctive Styles for szymonpaluch.com v3 - Awwward-worthy */
/* Color: Emerald #10b981 | Typography: Playfair Display + Inter + Space Grotesk */

/* Smooth scroll */
html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* 3D Parallax Depth System - NOTE: perspective on body breaks position:fixed */
/* Perspective is applied directly via GSAP transformPerspective instead */

/* Custom scrollbar — emerald accent */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* ===== WAVE TRANSITION ===== */
.wave-transition {
    position: relative;
    z-index: 20;
    margin-top: -1px;
}

.wave-transition svg {
    display: block;
}

.wave-transition svg path {
    transition: d 0.1s ease-out;
}

/* ===== GIANT TYPOGRAPHY MARQUEE ===== */
.giant-text {
    opacity: 0;
    animation: fadeInGiant 2s ease-out 0.3s forwards;
}

.marquee-track {
    display: flex;
    animation: marquee 60s linear infinite;
}

.marquee-track span {
    flex-shrink: 0;
    user-select: none;
}

@keyframes fadeInGiant {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Delayed fade-in for hero CTA button */
.animate-fade-in-delayed {
    animation: fadeInDelayed 0.6s ease-out 2.5s forwards;
}

@keyframes fadeInDelayed {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ===== HERO ANIMATIONS ===== */
/* Elements start visible - GSAP animates FROM hidden state */

/* ===== PHILOSOPHY SECTION OVERLAP ===== */
.philosophy-section {
    background: linear-gradient(180deg, #0a0a0a 0%, #111111 100%);
}

/* ===== DIAGONAL PATTERN OVERLAY ===== */
.diagonal-pattern {
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 10px,
        rgba(16, 185, 129, 0.03) 10px,
        rgba(16, 185, 129, 0.03) 11px
    );
}

/* ===== TEXTURE OVERLAY ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.02;
    pointer-events: none;
    z-index: 1000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ===== SERVICE CARDS ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #34d399);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover::after {
    opacity: 1;
}

/* ===== STAT ITEMS ===== */
.stat-item {
    /* visible by default */
}

.stat-item .font-mono {
    background: linear-gradient(180deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #10b981 0%, #065f46 100%);
    border-radius: 2px;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover::before {
    transform: scaleY(1);
}

/* ===== CTA BUTTON GLOW ===== */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(90deg, #10b981, #34d399, #10b981);
    background-size: 200% 100%;
    border-radius: inherit;
    z-index: -1;
    animation: shimmer 3s infinite linear;
    opacity: 0;
    transition: opacity 0.3s;
}

.cta-button:hover::before {
    opacity: 1;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Pulse animation for main CTA */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 0 60px rgba(16, 185, 129, 0.5);
    }
}

.hero-cta {
    position: relative;
    overflow: hidden;
    animation: pulse-glow 3s infinite ease-in-out;
}

/* ===== CTA BUTTON WARM HOVER GLOW ===== */
.hero-cta:hover,
.cta-button:hover {
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.4);
}

/* ===== NAVIGATION ===== */
nav {
    transition: all 0.3s ease;
    background-color: transparent;
}

nav.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== TEXT SELECTION ===== */
::selection {
    background: rgba(16, 185, 129, 0.3);
    color: #fff;
}

/* ===== FOCUS STATES (Accessibility) ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .giant-text,
    .hero-headline,
    .hero-tagline,
    .hero-credentials,
    .hero-cta,
    .service-card,
    .stat-item,
    .testimonial-card {
        opacity: 1;
        transform: none;
    }
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media (max-width: 640px) {
    .marquee-track span {
        font-size: 20vw !important;
    }
}

/* ===== LINK HOVER — Emerald underline ===== */
.link-hover {
    position: relative;
}

.link-hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #10b981;
    transition: width 0.3s ease;
}

.link-hover:hover::after {
    width: 100%;
}

/* ===== GRADIENT TEXT ===== */
.text-gradient-emerald {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== SCROLL INDICATOR ===== */
@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

/* Scroll indicator animation - use specific class, not generic selector */

/* ===== CARD HOVER GLOW ===== */
.service-card:hover,
.testimonial-card:hover {
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.08);
}

/* ===== SECTION NUMBER STYLING ===== */
.font-mono[class*="text-accent"] {
    letter-spacing: 0.2em;
}

/* ===== QUOTE SECTION STYLING ===== */
blockquote p {
    text-shadow: 0 0 60px rgba(16, 185, 129, 0.1);
}

/* ===== LOADING STATE ===== */
.loading {
    opacity: 0;
}

.loaded {
    opacity: 1;
}

/* ===== HERO VISUAL ===== */
.hero-visual {
    position: relative;
}

.hero-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    box-shadow: inset 0 0 60px rgba(16, 185, 129, 0.2);
    pointer-events: none;
}

/* ===== PHOTO FRAME GRADIENT ===== */
.photo-frame {
    background: linear-gradient(135deg, #10b981 0%, #34d399 40%, #f59e0b 100%);
    padding: 2px;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* ===== CTA BUTTON GRADIENT BACKGROUND ===== */
.hero-cta,
.cta-button {
    background: linear-gradient(135deg, #10b981 0%, #10b981 75%, #f59e0b 100%) !important;
}

.hero-cta:hover,
.cta-button:hover {
    background: linear-gradient(135deg, #34d399 0%, #34d399 75%, #fbbf24 100%) !important;
}

/* ===== NEURAL NETWORK STACK ===== */
.neural-network {
    position: relative;
}

.neural-node {
    position: absolute;
    left: var(--x);
    top: var(--y);
    transform: translate(-50%, -50%);
    z-index: 2;
    animation: neural-float 6s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.node-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #1a1a1a, #0a0a0a);
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow:
        0 0 30px rgba(16, 185, 129, 0.1),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    cursor: default;
}

.node-inner:hover {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow:
        0 0 50px rgba(16, 185, 129, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    transform: scale(1.15);
}

.node-icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.node-label {
    font-size: 0.6rem;
    color: #9ca3af;
    text-align: center;
    font-family: 'Space Grotesk', monospace;
    max-width: 70px;
    line-height: 1.2;
}

/* Placeholder/empty nodes */
.node-placeholder {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(16, 185, 129, 0.15);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.05);
}

.node-placeholder:hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.1);
    transform: scale(1.1);
}

/* Floating animation */
@keyframes neural-float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-8px); }
}

/* Connection lines */
.neural-line {
    stroke: rgba(16, 185, 129, 0.15);
    stroke-width: 1;
    animation: neural-pulse 4s ease-in-out infinite;
}

.neural-line:nth-child(odd) {
    animation-delay: 0.5s;
}

.neural-line:nth-child(3n) {
    animation-delay: 1s;
}

@keyframes neural-pulse {
    0%, 100% { stroke-opacity: 0.15; }
    50% { stroke-opacity: 0.4; }
}

/* Mobile adjustments for neural network */
@media (max-width: 768px) {
    .node-inner {
        width: 70px;
        height: 70px;
    }

    .node-icon {
        font-size: 1.2rem;
    }

    .node-label {
        font-size: 0.5rem;
        max-width: 55px;
    }
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    .service-card::before {
        transform: scaleX(1);
    }

    .testimonial-card::before {
        transform: scaleY(1);
    }
}

/* ===== CUSTOM CURSOR (optional) ===== */
@media (hover: hover) {
    .service-card {
        cursor: pointer;
    }
}

/* ===== ASSESSMENT TOOL ===== */
.assessment-wizard {
    background: linear-gradient(180deg, rgba(22, 22, 22, 0.8) 0%, rgba(17, 17, 17, 0.9) 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.assessment-option {
    background: rgba(10, 10, 10, 0.6);
    cursor: pointer;
}

.assessment-option:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.5);
}

.assessment-option.selected {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
}

.assessment-option.selected span {
    color: #fff;
}

/* Score circle animation */
@keyframes scoreReveal {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#assessment-results .inline-flex {
    animation: scoreReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Gap item styling */
.gap-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 0.75rem;
    border-left: 3px solid #f59e0b;
}

.gap-item span {
    color: #fbbf24;
}

/* Question transition */
.assessment-question {
    animation: fadeSlideIn 0.3s ease-out;
}

@keyframes fadeSlideIn {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Progress bar glow */
#progress-bar {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Email input focus */
#email-input:focus {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

/* Mobile adjustments for assessment */
@media (max-width: 640px) {
    .assessment-wizard {
        padding: 1.5rem;
    }

    .assessment-option {
        padding: 1rem;
    }
}

/* ===== CMD+K COMMAND MENU ===== */
#cmdk-overlay.active {
    opacity: 1;
}

#cmdk-overlay.active #cmdk-modal {
    transform: scale(1);
}

#cmdk-results::-webkit-scrollbar {
    width: 4px;
}

#cmdk-results::-webkit-scrollbar-track {
    background: transparent;
}

#cmdk-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

#cmdk-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cmdk-item {
    position: relative;
}

.cmdk-item.active {
    background: rgba(16, 185, 129, 0.1);
}

.cmdk-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: #10b981;
    border-radius: 0 2px 2px 0;
}

.cmdk-group.hidden {
    display: none;
}

/* Keyboard hint in nav */
.cmdk-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: #6b7280;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.2s;
}

.cmdk-hint:hover {
    color: #fff;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

/* Prevent body scroll when modal is open */
body.cmdk-open {
    overflow: hidden;
}

/* ===== HERO SECTION ===== */
.hero-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    z-index: 1;
    /* Simple - let GSAP handle transforms */
    will-change: transform, opacity;
}

/* Content wrapper - scrolls OVER the fixed hero */
.content-wrapper {
    position: relative;
    z-index: 10;
    /* Margin pushes wrapper down - doesn't cover hero area */
    margin-top: 85vh;
    overflow-x: hidden;
}

/* Wave - transparent so SVG curve shows, not a straight line */
.wave-transition {
    background: transparent;
    /* No shadow - clean transition */
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    animation: scrollBounce 2s infinite ease-in-out;
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

/* ===== PARALLAX MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    .content-wrapper {
        margin-top: 90vh;  /* Slightly more on mobile */
    }
}

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {
    .hero-sticky {
        transform: none !important;
        filter: none !important;
        will-change: auto;
    }
}
