/* SHIFT TV - Custom Styles */

/* Smooth scrolling via Lenis */
html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-smooth iframe {
    pointer-events: none;
}

/* Navbar states */
#navbar {
    background: transparent;
    border-bottom: 1px solid transparent;
}

#navbar.scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.shift-wordmark-nav,
.shift-wordmark-footer {
    display: block;
    object-fit: contain;
}

.shift-wordmark-nav {
    width: 96px;
    height: 28px;
}

.shift-wordmark-footer {
    width: 86px;
    height: 24px;
}

.brand-icon {
    width: 1rem;
    height: 1rem;
    display: block;
    flex-shrink: 0;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: 100%;
    height: 2px;
    background: transparent;
    pointer-events: none;
}

.reading-progress span {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: #fff;
}

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

.floating-card {
    animation: float 4s ease-in-out infinite;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Selection */
::selection {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Blog article rhythm */
.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content h2,
.blog-content h3 {
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.15;
}

.blog-content h2 {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    margin: 2.75rem 0 1rem;
    scroll-margin-top: 7rem;
}

.blog-content h3 {
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    margin: 2rem 0 0.85rem;
    scroll-margin-top: 7rem;
}

.blog-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0 0 1.5rem;
}

.blog-content li {
    margin-bottom: 0.65rem;
}

.blog-content blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.blog-content p:last-child,
.blog-content ul:last-child,
.blog-content blockquote:last-child {
    margin-bottom: 0;
}

/* Video card hover states */
.video-card:hover .play-overlay {
    opacity: 1;
}

/* Programa card image zoom */
.programa-card img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.editor-tool {
    width: 34px;
    height: 34px;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #888;
    background: rgba(255, 255, 255, 0.03);
    transition: all 180ms ease;
}

.editor-tool:hover,
.editor-tool:focus-visible {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.07);
}

.quality-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #888;
}

.quality-row.is-ok {
    color: #e5e5e5;
}

.quality-row.is-ok i {
    color: #22c55e;
}

/* Noise texture overlay (optional) */
.noise-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 1;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
    .font-display {
        letter-spacing: -0.02em;
    }
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    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;
    }
    
    .floating-card {
        animation: none;
    }
}
