/* Shared public-site layer (js/site.js): mobile nav, accessibility, reveal, footer. Load after portfolio.css. */

.skip-link {
    position: absolute; left: 1rem; top: -3rem; z-index: 2000;
    padding: 0.5rem 1rem; border-radius: 4px;
    background: var(--primary-color); color: var(--bg-darker); font-weight: bold;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 3px; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.nav-logo-link { text-decoration: none; color: inherit; }

/* Legacy green glow left over from an older theme — align to purple tokens */
.nav-cta { box-shadow: 0 0 10px rgba(199, 125, 255, 0.2); }
.nav-cta:hover { box-shadow: 0 0 20px rgba(199, 125, 255, 0.5); }

/* Mobile menu */
.mobile-menu-toggle {
    display: none; background: none; border: 1px solid var(--border-color);
    border-radius: 4px; padding: 0.5rem; cursor: pointer;
}
.hamburger { display: grid; gap: 5px; width: 24px; }
.hamburger span { display: block; height: 2px; background: var(--primary-color); transition: transform 0.25s ease, opacity 0.25s ease; }
.mobile-menu-toggle.active .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.active .hamburger span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    .nav-container { padding: 0.75rem 1rem; }
    .mobile-menu-toggle { display: block; }
    /* .nav-bar's backdrop-filter makes it the containing block for fixed children,
       so size the panel from the viewport explicitly instead of using bottom: 0. */
    .nav-menu {
        display: flex; flex-direction: column; gap: 0;
        position: fixed; top: 64px; left: 0; right: 0;
        height: calc(100vh - 64px); height: calc(100dvh - 64px);
        padding: 1rem; background: var(--bg-darker); overflow-y: auto;
        transform: translateX(100%); visibility: hidden;
        transition: transform 0.3s ease, visibility 0.3s;
    }
    .nav-menu.active { transform: none; visibility: visible; }
    .nav-menu li { border-bottom: 1px solid var(--border-color); }
    .nav-menu a { display: block; padding: 1rem 0.5rem; font-size: 1.1rem; }
    .nav-menu a::after { display: none; }
    .nav-menu .nav-cta { margin-top: 1rem; text-align: center; }
    body.menu-open { overflow: hidden; }
}

/* Reveal on scroll (skipped entirely with reduced motion) */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.revealed { opacity: 1; transform: none; }

.footer-links { margin-top: 0.5rem; font-size: 0.9rem; }
.footer-links a { color: var(--primary-color); }

.hero.hero-compact { min-height: 50vh; }

.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

.form-status { margin-top: 1rem; font-weight: bold; }
.form-status[data-kind="error"] { color: #ff6b8a; }
.form-status[data-kind="success"] { color: #7dffb0; }
.turnstile-slot:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
    .nav-bar, .footer, .skip-link, .hero-bg, .download-btn, .mobile-menu-toggle { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
}
