/* =============================================================
   style.css — Base styles, layout, shared components, utilities
   =============================================================
   
   TABLE OF CONTENTS:
   1. Reset
   2. Body
   3. Custom Cursor
   4. Sidebar VU Meter
   5. Audio Waveform
   6. Manuscript Excerpt Overlay
   7. Pricing / Rate Cards Defaults
   8. Hamburger Button
   9. Mobile Menu Overlay
   10. Accessibility Tweaks
   11. Responsive Breakpoints
   12. Shared Utility Classes

   ============================================================= */

/* -------------------------------------------------------------
   1. Reset
   ------------------------------------------------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

/* -------------------------------------------------------------
   2. Body
   ------------------------------------------------------------- */

body {
    background-color: var(--bg);
    color: var(--paper);
    font-family: "JetBrains Mono", monospace;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* -------------------------------------------------------------
   3. Custom Cursor
   ------------------------------------------------------------- */

.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 9999px;
    z-index: 9999;
    pointer-events: none;
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(
        --tech
    ); /* TODO: Customization Point - Change default cursor dot color here */
}

.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 9999px;
    z-index: 9999;
    pointer-events: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--accent);
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* -------------------------------------------------------------
   4. Sidebar VU Meter
   ------------------------------------------------------------- */

.vu-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.rec-light.active {
    background-color: var(--tech);
    box-shadow: 0 0 15px var(--tech);
    animation: blink 1s infinite alternate;
}

/* -------------------------------------------------------------
   5. Audio Waveform (DAW track display)
   ------------------------------------------------------------- */

.waveform {
    width: 100%;
    height: 60px;
    opacity: 0.5;
    transition-duration: 300ms;
    background-image: repeating-linear-gradient(
        90deg,
        var(--mid-grey),
        var(--mid-grey) 2px,
        transparent 2px,
        transparent 4px
    );
    mask-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 1) 50%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

.track:hover .waveform {
    opacity: 1;
    background-image: repeating-linear-gradient(
        90deg,
        var(--paper),
        var(--paper) 2px,
        transparent 2px,
        transparent 4px
    );
}

/* -------------------------------------------------------------
   6. Manuscript excerpt text overlay
   ------------------------------------------------------------- */

.manuscript-excerpt {
    text-shadow:
        -2px -2px 0 var(--bg),
        2px -2px 0 var(--bg),
        -2px 2px 0 var(--bg),
        2px 2px 0 var(--bg),
        0 0 8px var(--bg),
        0 0 15px var(--bg);
    z-index: 10;
}

/* -------------------------------------------------------------
   7. Pricing / Rate Cards — staggered entrance animation
   ------------------------------------------------------------- */

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rate-card {
    opacity: 0;
    animation: slideUpFade 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.rate-delay-1 {
    animation-delay: 0.2s;
}
.rate-delay-2 {
    animation-delay: 0.4s;
}
.rate-delay-3 {
    animation-delay: 0.6s;
}

/* -------------------------------------------------------------
   8. Hamburger Button
   ------------------------------------------------------------- */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--mid-grey);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.3s;
    flex-shrink: 0;
}

.hamburger:hover {
    border-color: var(--accent);
}

.hamburger-bar {
    width: 20px;
    height: 1.5px;
    background: var(--paper);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}

.hamburger.open .hamburger-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.hamburger.open .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open .hamburger-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* -------------------------------------------------------------
   9. Mobile Menu Overlay
   ------------------------------------------------------------- */

.menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border: 1px solid var(--mid-grey);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-muted);
    transition:
        border-color 0.3s,
        color 0.3s;
    font-family: "JetBrains Mono", monospace;
    line-height: 1;
}

.menu-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

#mobileMenu {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 200;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 5rem 2rem 3rem 2rem;
    overflow-y: auto;
    gap: 0;
    transform: translateX(-100%);
    opacity: 0;
    transition:
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.3s ease;
    pointer-events: none;
}

#mobileMenu.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-link {
    display: block;
    font-family: "Oswald", sans-serif;
    font-size: clamp(2.2rem, 8vw, 3.5rem);
    color: var(--paper);
    text-decoration: none;
    line-height: 1.1;
    padding: 0.6rem 0;
    letter-spacing: -0.02em;
    transition: color 0.3s;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent);
}

.mobile-nav-divider {
    width: 100%;
    height: 1px;
    background: var(--mid-grey);
    margin: 1.5rem 0;
}

.mobile-nav-toggles {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
}

/* -------------------------------------------------------------
   10. Touch target minimum size (accessibility)
   ------------------------------------------------------------- */

a,
button,
[role="button"],
select,
input[type="checkbox"],
input[type="radio"] {
    min-height: 44px;
}

.nav-links a,
.mobile-nav-link,
.filter-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* -------------------------------------------------------------
   11. Responsive breakpoints
   ------------------------------------------------------------- */

/* Mobile: < 640px */
@media (max-width: 639px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none !important;
    }

    .rate-card {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    * {
        cursor: auto !important;
    }

    header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
    }

    h1 {
        word-break: break-word;
    }

    .meter-level {
        transition-duration: 300ms !important;
    }

    .pricing > div {
        flex-direction: column !important;
    }

    .schematic-node:hover {
        transform: none !important;
    }
}

/* Tablet: 640px – 1279px */
@media (min-width: 640px) and (max-width: 1279px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none !important;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    * {
        cursor: auto !important;
    }

    header {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
    }

    footer#comms {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 2rem !important;
    }
}

/* =============================================================
   12. Shared Utility Classes
   ============================================================= */

/* VU Meter level bar gradient */
.meter-level {
    background: linear-gradient(to top, #4ade80, #facc15, var(--tech));
}

/* Image overlay: right-side fade (index.html hero) */
.img-overlay-right {
    background: linear-gradient(
        to right,
        var(--bg) 0%,
        var(--bg) 20%,
        transparent 60%
    );
}

/* Image overlay: soft bottom-edge fade (index.html hero) */
.img-overlay-bottom-soft {
    background: linear-gradient(to top, var(--bg) 0%, transparent 30%);
}

/* Image overlay: standard top-fade */
.img-overlay-top {
    background: linear-gradient(to top, var(--bg) 0%, transparent 40%);
}

/* Image overlay: full top-fade (portfolio book-cover cards) */
.img-overlay-top-full {
    background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
}

/* Image overlay: short top-fade (portrait / generic covers) */
.img-overlay-top-short {
    background: linear-gradient(to top, var(--bg) 0%, transparent 80%);
}

/* Image overlay: bottom-direction fade (about.html timeline banner) */
.img-overlay-bottom {
    background: linear-gradient(to bottom, var(--bg) 0%, transparent 40%);
}

/* Footer "INITIATE SECURE COMMS:" label */
.footer-comms-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Marquee bullet separator — outlined dot via -webkit-text-stroke */
.marquee-bullet {
    -webkit-text-stroke: 2px var(--bg);
}

/* Staggered animation delays for index.html pipeline ping dots */
.ping-delay-1 {
    animation-delay: 0.3s;
}
.ping-delay-2 {
    animation-delay: 0.6s;
}
