/* ===== Custom styles for KNR Bionik ===== */

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Logo invert — makes dark logo white on dark backgrounds */
.logo-invert {
    filter: brightness(0) invert(1) !important;
}

/* Nav states */
.nav-text-color {
    color: rgba(255, 255, 255, 0.85);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-scrolled .nav-text-color {
    color: rgb(30, 41, 59);
}

.nav-scrolled .nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Language toggle in scrolled state */
.nav-scrolled .border-white\/20 {
    border-color: rgba(0, 0, 0, 0.12);
}

.nav-scrolled .nav-text-color.hover\:bg-white\/10:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Fade-in animation */
.fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Prose overrides for markdown content */
.prose p {
    margin-bottom: 1em;
    color: rgb(100, 116, 139);
    line-height: 1.75;
}

.prose strong {
    color: rgb(30, 41, 59);
    font-weight: 600;
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgb(15, 23, 42);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.prose h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgb(15, 23, 42);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose a {
    color: rgb(29, 67, 241);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    color: rgb(21, 48, 222);
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
    color: rgb(100, 116, 139);
}

.prose ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
    color: rgb(100, 116, 139);
}

.prose li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.prose li strong {
    color: rgb(30, 41, 59);
}

.prose hr {
    border-color: rgb(226, 232, 240);
    margin: 2rem 0;
}

.prose blockquote {
    border-left: 4px solid rgb(99, 102, 241);
    padding-left: 1rem;
    color: rgb(71, 85, 105);
    font-style: italic;
    margin: 1.5rem 0;
}

.prose code {
    background: rgb(241, 245, 249);
    color: rgb(51, 65, 85);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.875em;
}

/* Let embedded custom blocks opt out of prose typography overrides */
.prose .not-prose p,
.prose .not-prose strong,
.prose .not-prose h2,
.prose .not-prose h3,
.prose .not-prose h4,
.prose .not-prose a,
.prose .not-prose ul,
.prose .not-prose ol,
.prose .not-prose li,
.prose .not-prose blockquote,
.prose .not-prose code {
    color: inherit;
}

.prose .not-prose a:hover {
    color: inherit;
}

.prose .not-prose p,
.prose .not-prose ul,
.prose .not-prose ol,
.prose .not-prose blockquote {
    margin-bottom: 0;
}

.prose .not-prose h2,
.prose .not-prose h3,
.prose .not-prose h4 {
    margin-top: 0;
    margin-bottom: 0;
    line-height: inherit;
}

.prose .not-prose ul,
.prose .not-prose ol {
    padding-left: 0;
}

.prose .not-prose code {
    background: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* Smooth gradient text (optional, for hero) */
.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Selection color */
::selection {
    background: rgba(59, 130, 246, 0.25);
    color: inherit;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
