/* Custom styles for the v2 (image-rich) design, layered on top of Tailwind (CDN).
   Kept separate from styles.css so v1 and v2 can be tweaked independently. */

/* ---------- Navbar ---------- */
#navbar {
    background: transparent;
}

#navbar .nav-link {
    color: #334155;
}

.dark #navbar .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

#navbar.nav-scrolled {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dark #navbar.nav-scrolled {
    background: rgba(2, 6, 23, 0.72);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

#navbar.nav-scrolled .nav-link {
    color: #475569;
}

.dark #navbar.nav-scrolled .nav-link {
    color: #cbd5e1;
}

/* Logo wordmark */
.logo-text {
    color: #1e3a8a;
    transition: color 0.25s ease;
}

.dark .logo-text {
    color: #ffffff;
}

#navbar.nav-scrolled .logo-text {
    color: #020617;
}

.dark #navbar.nav-scrolled .logo-text {
    color: #ffffff;
}

/* Animated underline for desktop nav links */
.nav-link {
    position: relative;
    padding-bottom: 4px;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: #3b82f6;
    transition: width 0.25s ease;
}

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

.nav-link:hover {
    color: #3b82f6;
}

#navbar.nav-scrolled .nav-link:hover {
    color: #2563eb;
}

/* Mobile menu links */
.mobile-link {
    display: block;
    padding: 12px 4px;
    color: #334155;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.dark .mobile-link {
    color: #cbd5e1;
}

/* ---------- Scroll reveal ---------- */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: none;
}

/* ---------- v2 image helpers ---------- */

/* Ken Burns-style slow zoom for hero background image */
.kenburns {
    animation: kenburns 26s ease-in-out infinite alternate;
}

@keyframes kenburns {
    0% { transform: scale(1) translateY(0); }
    100% { transform: scale(1.12) translateY(-2%); }
}

/* Floating panel */
.float-anim {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Image card hover zoom */
.img-zoom img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.img-zoom:hover img {
    transform: scale(1.06);
}

/* Subtle grain/vignette overlay hook (applied via Tailwind gradients in markup mostly) */

/* Subtle drifting tech grid in the hero */
.hero-grid {
    animation: grid-drift 40s linear infinite;
}

@keyframes grid-drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 46px 46px, 46px 46px; }
}

@media (prefers-reduced-motion: reduce) {
    .fade-in { opacity: 1; transform: none; transition: none; }
    .kenburns, .float-anim, .hero-grid { animation: none; }
    .img-zoom img { transition: none; }
    html { scroll-behavior: auto; }
}

/* Sections/messages that receive focus programmatically (skip link, in-page nav) don't need a ring */
[tabindex="-1"]:focus { outline: none; }

/* Clear, consistent keyboard focus ring (WCAG 2.4.7) */
a:focus-visible, button:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.dark a:focus-visible, .dark button:focus-visible { outline-color: #93c5fd; }

/* Keep focused elements and anchor targets from hiding under the fixed navbar (WCAG 2.4.11) */
html { scroll-padding-top: 6rem; }
