/* ==========================================================================
   Batchy & Friends — Pixel-Art Pastel Theme
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
    --purple: #C3A0FE;
    --lime: #C4FE8A;
    --cyan: #BFF6FD;
    --pink: #FE8AC9;
    --yellow: #F4FF70;
    --coral: #FF7A7A;
    --turquoise: #8AFFE3;
    --orange: #FEA878;
    --gold: #FEDB8A;
    --dark: #1a1a1a;

    --border: 3px solid #000;
    --radius: 0.5rem;
    --font: 'Sometype Mono', monospace;
}

/* ---------- 1. Reset + Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: #fff;
    color: #111;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ---------- 2. Container ---------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---------- 3. Header ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #000;
}

nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 1.75rem;
}

.nav-links a {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--pink);
}

/* ---------- 4. Hero ---------- */
.hero {
    text-align: center;
    padding: 5rem 1.5rem 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* Top badge — pixel-art chip */
.hero-badge {
    display: inline-block;
    background: var(--cyan);
    color: #000;
    padding: 0.35rem 1.15rem;
    border: 2px solid #000;
    border-radius: var(--radius);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    box-shadow: 3px 3px 0 #000;
}

/* Title — outlined pixel poster */
.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.1;
    margin-bottom: 0.6rem;
    color: var(--purple);
    -webkit-text-stroke: 2px #000;
    text-shadow:
        3px 3px 0 #000,
        6px 6px 0 var(--pink);
    text-transform: uppercase;
}

/* Subtitle — matching pixel chip */
.hero h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #000;
    border: 2px solid #000;
    display: inline-block;
    padding: 0.4rem 1.25rem;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 3px 3px 0 #000;
    letter-spacing: 0.02em;
}

/* Description — bold keywords as inline pastel highlights */
.hero > p {
    font-size: 1.05rem;
    color: #333;
    max-width: 620px;
    margin: 0 auto 2rem;
    line-height: 1.75;
}

.hero-highlight {
    font-weight: 700;
    color: #000;
    background: var(--turquoise);
    padding: 0.05rem 0.4rem;
    border-radius: 3px;
    border: 1.5px solid #000;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

/* ---------- Hero Carousel ---------- */
.hero-carousel {
    position: relative;
    max-width: 100%;
    border: 4px solid #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.18);
    padding: 6px;
    background: linear-gradient(135deg, var(--purple), var(--pink), var(--cyan), var(--lime));
}

.carousel-track {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #1a1a1a;
    border-radius: calc(var(--radius) - 4px);
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

/* Arrow buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 2rem;
    line-height: 1;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background 0.2s;
    z-index: 2;
    font-family: var(--font);
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-prev { left: 0.75rem; }
.carousel-next { right: 0.75rem; }

/* Dot indicators */
.carousel-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.carousel-dot.active {
    background: #fff;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* ---------- 8. Buttons (placed early — used across sections) ---------- */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s, background-color 0.2s;
    text-align: center;
    box-shadow: 3px 3px 0 #000;
}

.btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 #000;
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #000;
}

.btn-primary {
    background: var(--pink);
    color: #000;
}

.btn-primary:hover {
    background: #f575b5;
}

.btn-secondary {
    background: #fff;
    color: #000;
}

.btn-secondary:hover {
    background: #f0f0f0;
}

.btn-large {
    padding: 1rem 2.25rem;
    font-size: 1.15rem;
}

/* ---------- 5. Features Grid ---------- */
.features {
    padding: 4rem 1.5rem;
    background: #f8f8f8;
}

.features h2 {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    border: var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.92rem;
    font-weight: 400;
    color: #333;
    line-height: 1.55;
}

/* Assign a unique pastel background to each of the 8 cards */
.feature-card:nth-child(1) { background: var(--purple); }
.feature-card:nth-child(2) { background: var(--lime); }
.feature-card:nth-child(3) { background: var(--cyan); }
.feature-card:nth-child(4) { background: var(--pink); }
.feature-card:nth-child(5) { background: var(--yellow); }
.feature-card:nth-child(6) { background: var(--coral); }
.feature-card:nth-child(7) { background: var(--turquoise); }
.feature-card:nth-child(8) { background: var(--gold); }

/* ---------- DSP Nodes Showcase ---------- */
.dsp-nodes {
    padding: 4rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.dsp-nodes > h2 {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dsp-category {
    margin-bottom: 2rem;
}

.dsp-category:last-child {
    margin-bottom: 0;
}

.dsp-category-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #ddd;
    color: #111;
}

.dsp-nodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.85rem;
}

.dsp-node-card {
    border: var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dsp-node-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.dsp-node-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.dsp-node-card p {
    font-size: 0.8rem;
    color: #333;
    line-height: 1.45;
}

/* ---------- Node Settings Modal ---------- */
#node-modal {
    border: var(--border);
    border-radius: var(--radius);
    padding: 0;
    max-width: 700px;
    width: 90vw;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

#node-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    padding: 1.5rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    font-family: var(--font);
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
}

#modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-right: 2rem;
}

.modal-image-wrapper {
    border: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #f0f0f0;
}

.modal-image {
    width: 100%;
    height: auto;
    display: block;
}

.modal-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 280px;
    color: #888;
    font-size: 0.95rem;
    font-family: var(--font);
}

/* ---------- Visual Nodes Section ---------- */
.visual-nodes {
    padding: 4rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.visual-nodes h2 {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.visual-nodes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.visual-node-card {
    border: var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.visual-node-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.visual-node-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.visual-node-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.visual-node-card p {
    font-size: 0.85rem;
    color: #333;
    line-height: 1.5;
}

/* ---------- 6. Deep Features — Node Graph Style ---------- */
.deep-features {
    padding: 4rem 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

/* SVG cable layer behind nodes */
.node-cables {
    position: absolute;
    top: 0;
    left: -50px;
    width: calc(100% + 100px);
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}

.node-cables path {
    fill: none;
    stroke: #000;
    stroke-width: 3;
    stroke-linecap: round;
}

/* Individual graph node container */
.graph-node {
    position: relative;
    z-index: 1;
    background: #fff;
    border: var(--border);
    border-radius: var(--radius);
    margin-bottom: 3rem;
    overflow: visible;
}

.graph-node:last-of-type {
    margin-bottom: 0;
}

/* Alternating horizontal offset for graph feel */
.graph-node:nth-child(odd) {
    margin-left: 0;
    margin-right: 15%;
}

.graph-node:nth-child(even) {
    margin-left: 15%;
    margin-right: 0;
}

/* Colored header bar — like a real node title bar */
.node-header {
    background: var(--node-color);
    padding: 0.65rem 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
}

/* Node body with image + text */
.node-body {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem;
    align-items: center;
}

.node-body .placeholder-img {
    flex: 0 0 45%;
    max-width: 45%;
    aspect-ratio: 16 / 9;
    background: #e8e8e8;
    border: 2px solid #ccc;
    border-radius: calc(var(--radius) - 2px);
    display: block;
    position: relative;
    overflow: hidden;
    object-fit: cover;
}

/* Fallback overlay text when the image fails to load */
.node-body .placeholder-img[alt]::after {
    content: attr(alt);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    color: #888;
    font-size: 0.8rem;
    text-align: center;
    padding: 0.75rem;
}

.deep-feature-text {
    flex: 1;
}

.deep-feature-text p {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
}

/* Connection dots — input (left) and output (right) */
.node-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid #000;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.node-dot-in {
    left: -9px;
}

.node-dot-out {
    right: -9px;
}

/* Dot fill on hover */
.graph-node:hover .node-dot {
    background: var(--node-color);
    transition: background 0.2s;
}

/* ---------- 7. Buy Section ---------- */
.buy-section {
    padding: 4rem 1.5rem;
    text-align: center;
    background: var(--lime);
    border-top: var(--border);
    border-bottom: var(--border);
}

/* Price card — centered container with visual emphasis */
.price-card {
    display: inline-block;
    background: #fff;
    border: var(--border);
    border-radius: var(--radius);
    padding: 2rem 3rem 1.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.price-card h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.price-badge {
    display: inline-block;
    background: var(--pink);
    border: 2px solid #000;
    border-radius: 2rem;
    padding: 0.3rem 1rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.buy-section .price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.price-original {
    font-size: 1.75rem;
    text-decoration: line-through;
    opacity: 0.4;
    font-weight: 500;
}

.price-current {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.price-note {
    font-size: 0.85rem;
    color: #555;
    font-weight: 500;
}

.buy-inclusions {
    max-width: 380px;
    margin: 0 auto 2rem;
    text-align: left;
}

.buy-inclusions li {
    padding: 0.45rem 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.buy-inclusions li::before {
    content: "\2713\0020"; /* checkmark + space */
    font-weight: 700;
    color: #000;
}

.buy-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-disabled {
    background: #ccc;
    color: #777;
    border-color: #999;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
    box-shadow: 3px 3px 0 #999;
}

.btn-disabled:hover {
    transform: none;
    box-shadow: 3px 3px 0 #999;
}

.coming-soon {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
    margin-top: 0.15rem;
}

/* ---------- 9. Footer ---------- */
footer {
    background: var(--dark);
    color: #fff;
    padding: 3.5rem 1.5rem 1.5rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto 2rem;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-column a {
    color: #fff;
    opacity: 0.7;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.footer-column a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    font-size: 0.82rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0.5;
    max-width: 1100px;
    margin: 0 auto;
}

/* ---------- Mobile Nav Toggle ---------- */
.nav-toggle {
    display: none; /* always hidden checkbox */
}

.nav-toggle-label {
    display: none; /* hidden on desktop */
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle-label span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ---------- Lightbox ---------- */
img[data-enlargeable] {
    cursor: zoom-in;
}

#lightbox {
    border: none;
    border-radius: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.92);
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    margin: 0;
    cursor: zoom-out;
}

#lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox::backdrop {
    background: transparent;
}

#lightbox img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    font-family: var(--font);
    line-height: 1;
    padding: 0.25rem 0.5rem;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

/* ---------- Skip Link (Accessibility) ---------- */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 200;
    transition: top 0.3s;
}
.skip-link:focus {
    top: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .nav-toggle-label {
        display: flex;
    }

    nav {
        position: relative;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #000;
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    .nav-links li {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-toggle:checked ~ .nav-links {
        display: flex;
    }

    /* Hamburger animation when open */
    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .hero h1 {
        font-size: 2.25rem;
        -webkit-text-stroke: 1.5px #000;
        text-shadow:
            2px 2px 0 #000,
            4px 4px 0 var(--pink);
    }

    .hero h2 {
        font-size: 1.05rem;
        padding: 0.3rem 0.9rem;
    }


    .feature-grid {
        grid-template-columns: 1fr;
    }

    .visual-nodes-grid {
        grid-template-columns: 1fr;
    }

    .dsp-nodes-grid {
        grid-template-columns: 1fr;
    }

    .graph-node:nth-child(odd),
    .graph-node:nth-child(even) {
        margin-left: 0;
        margin-right: 0;
    }

    .node-body {
        flex-direction: column;
    }

    .node-body .placeholder-img {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .node-cables {
        display: none;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-columns {
        grid-template-columns: 1fr;
    }

    .buy-buttons {
        flex-direction: column;
        align-items: center;
    }

    .price-card {
        padding: 1.5rem 1.5rem 1.25rem;
        margin-bottom: 1.5rem;
    }

    .price-card h2 {
        font-size: 1.75rem;
    }

    .price-current {
        font-size: 2.75rem;
    }
}
