@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* ── Reset & base ── */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Press Start 2P', system-ui;
    background-color: #0a0a0a;
    color: #eeeeee;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding-inline: 2rem;
}

/* ── Nav ── */

nav {
    background: #111111;
    border-bottom: 6px solid #ff6600;
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    color: #ffcc88;
    line-height: 1.2;
    flex-shrink: 0;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    list-style: none;
    justify-content: flex-end;
}

nav ul li {
    width: max-content;
}

nav ul li > a {
    color: #fff;
    text-decoration: none;
    font-size: 0.7rem;
    text-transform: uppercase;
    border-bottom: 2px solid #ffffff;
    transition: opacity 230ms, border-color 230ms;
    padding-block-end: 2px;
    padding-inline: 2px;
    white-space: nowrap;
}

nav ul li > a:hover {
    opacity: 0.5;
    border-bottom-color: transparent;
}

/* Hamburger — hidden on desktop */
.nav-toggle {
    display: none;
    background: none;
    border: 3px solid #ff6600;
    color: #ff6600;
    font-family: 'Press Start 2P', monospace;
    font-size: 1rem;
    width: 42px;
    height: 42px;
    cursor: pointer;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-toggle:hover {
    background: #ff6600;
    color: #000;
}

/* ── Hero ── */

.hero {
    min-height: 85vh;
    background: linear-gradient(180deg, #1c1c1c 0%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    padding-block: 4rem;
}

.hero h1, .hero h2, .hero h3,
.hero h4, .hero h5, .hero h6, .hero p {
    overflow-wrap: break-word;
}

.hero-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
    justify-content: space-between;
}

.hero-text {
    flex: 1 1 340px;
    min-width: 0;
}

.hero-text h1 {
    margin-top: 0.5em;
    font-size: clamp(1.8rem, 5vw, 3.6rem);
    line-height: 1.15;
    color: #ffcc88;
    margin-bottom: 20px;
}

.subtitle {
    font-size: clamp(0.65rem, 2vw, 1rem);
    color: #ffaa77;
    margin-bottom: 35px;
    line-height: 2.2;
}

/* ── Button ── */

.btn {
    display: inline-block;
    padding: 14px 28px;
    background: #ff6600;
    color: #000;
    font-family: 'Press Start 2P', monospace;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    border: 5px solid #000;
    font-size: 0.7rem;
    transition: background-color 230ms, color 230ms, border-color 230ms;
}

.btn:hover {
    background-color: #000000;
    color: #ff6600;
    border-color: #ff6600;
}

/* ── Bomb graphic ── */

.bom {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.bom-logo {
    width: 220px;
    height: 290px;
    background: linear-gradient(#ffcc33, #e6a000);
    border: 14px solid #111;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 15px 40px rgba(255, 102, 0, 0.5);
    animation: bomb-shake 1.4s infinite alternate;
}

.c4 {
    position: absolute;
    top: 22px;
    left: 24px;
    font-size: clamp(48px, 10vw, 82px);
    font-weight: 900;
    color: #000;
    transform: rotate(-14deg);
}

.status {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #ff3300;
    padding: 8px 28px;
    border: 5px solid #ff3300;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* ── Sections ── */

.section {
    padding: 80px 0;
}

.bg-dark {
    background-color: #111111;
}

section h2 {
    text-align: center;
    font-size: clamp(1.3rem, 4vw, 2.4rem);
    margin-bottom: 50px;
    color: #ff6600;
    overflow-wrap: break-word;
}

/* ── Idee ── */

.idee p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: clamp(0.6rem, 1.5vw, 1rem);
    line-height: 2.4;
}

/* ── Technisch ── */

.text-block p {
    max-width: 800px;
    margin: 0 auto;
    font-size: clamp(0.6rem, 1.5vw, 1rem);
    line-height: 2.4;
    text-align: center;
}

/* ── Puzzel grid & cards ── */

.puzzel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    background: #1a1a1a;
    padding: 24px;
    border: 4px solid #333;
}

.puzzel-card {
    background: #111;
    border: 6px solid #ff6600;
    padding: 24px;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.puzzel-card:hover {
    background: #1a1a1a;
    border-color: #ffaa00;
    box-shadow: 0 0 25px rgba(255, 102, 0, 0.6);
}

.puzzel-card h3 {
    font-size: 0.78rem;
    margin-bottom: 14px;
    color: #ffcc88;
    line-height: 1.7;
}

.puzzel-card p {
    font-size: 0.6rem;
    line-height: 2;
    color: #ccc;
    margin-bottom: 16px;
    flex: 1;
}

/* ── Bekijk Code knop ── */

.view-code-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.45rem;
    padding: 10px 14px;
    background: #ff6600;
    color: #000;
    border: 3px solid #000;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    align-self: flex-start;
}

.view-code-btn:hover {
    background: #000;
    color: #ff6600;
    border-color: #ff6600;
}

/* ── Modal ── */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #111;
    border: 6px solid #ff6600;
    max-width: 780px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 60px rgba(255, 102, 0, 0.4);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 4px solid #ff6600;
    background: #1a1a1a;
    gap: 12px;
}

.modal-title {
    font-size: 0.75rem;
    color: #ffcc88;
    overflow-wrap: anywhere;
}

.modal-close {
    background: none;
    border: 3px solid #ff6600;
    color: #ff6600;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    flex-shrink: 0;
}

.modal-close:hover {
    background: #ff6600;
    color: #000;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.code-label {
    font-size: 0.45rem;
    color: #ff6600;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.code-block {
    background: #0a0a0a;
    border: 3px solid #333;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #88ddaa;
    line-height: 1.8;
    white-space: pre;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.copy-btn {
    margin-top: 14px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.45rem;
    padding: 8px 14px;
    background: transparent;
    color: #ff6600;
    border: 3px solid #ff6600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.copy-btn:hover {
    background: #ff6600;
    color: #000;
}

.copy-btn.copied {
    border-color: #44ff88;
    color: #44ff88;
}

/* ── Warning ── */

.warning {
    background: #330000;
    border: 4px solid #ff3300;
    color: #ffaa77;
    padding: 20px;
    margin: 30px auto 0;
    max-width: 800px;
    text-align: center;
    font-size: 0.58rem;
    line-height: 2.2;
}

/* ── Hardware grid ── */

.hardware-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.item {
    background: #1f1f1f;
    padding: 22px 12px;
    text-align: center;
    border: 4px solid #ff6600;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.item.has-code {
    cursor: pointer;
}

.item.has-code:hover {
    background: #2a1a00;
    border-color: #ffaa00;
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.5);
}

.item-name {
    display: block;
    color: #ffcc88;
    font-size: 0.52rem;
    line-height: 1.9;
}

.item-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.38rem;
    padding: 6px 10px;
    background: #ff6600;
    color: #000;
    border: 2px solid #000;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.item-btn:hover {
    background: #000;
    color: #ff6600;
    border-color: #ff6600;
}

/* ── Footer ── */

footer {
    background: #000;
    border-top: 6px solid #ff6600;
    padding: 60px 0 30px;
    color: #888;
}

.f-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 2rem;
    margin-bottom: 50px;
}

.f-label {
    font-size: 0.5rem;
    color: #ff6600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.f-team ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.f-team li {
    font-size: 0.6rem;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.f-team li::before {
    content: '>';
    color: #ff6600;
}

.f-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.f-bomb {
    width: 70px;
    height: 90px;
    background: #ffcc33;
    border: 5px solid #111;
    border-radius: 6px;
    position: relative;
    animation: bomb-shake 1.4s infinite alternate;
}

.f-bomb-c4 {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 22px;
    font-weight: 900;
    color: #000;
    transform: rotate(-12deg);
}

.f-bomb-led {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #ff3300;
    padding: 3px 10px;
    border: 2px solid #ff3300;
    font-size: 0.3rem;
    white-space: nowrap;
}

.f-title {
    font-size: 0.65rem;
    color: #ffcc88;
    text-align: center;
    line-height: 1.8;
}

.f-subtitle {
    font-size: 0.4rem;
    color: #ff6600;
    text-align: center;
    letter-spacing: 0.1em;
}

.f-info {
    text-align: right;
}

.f-info p {
    font-size: 0.5rem;
    color: #ccc;
    line-height: 2.2;
    margin-bottom: 12px;
}

.f-info span {
    color: #ff6600;
}

.f-divider {
    border: none;
    border-top: 2px dashed #222;
    margin-bottom: 24px;
}

.f-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.f-copy {
    font-size: 0.4rem;
    color: #444;
}

.f-copy span {
    color: #666;
}

.f-defuse {
    font-size: 0.4rem;
    color: #333;
    letter-spacing: 0.08em;
}

/* ── Embeds & Documentatie ── */

embed{
    margin-block-start: 1.5em;
    width: 100%;
    height: 70em;
}

div.documentation-btn-container:has(a.btn){
    padding-block-start: 1.5em;
    margin: 0 auto;
    display: block;
    text-align: center;
}

/* ── Animatie ── */

@keyframes bomb-shake {
    from { transform: rotate(-3deg); }
    to   { transform: rotate(3deg); }
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */

/* Tablet: ≤ 900px */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
    }

    .bom-logo {
        width: 180px;
        height: 240px;
    }

    .puzzel-grid {
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    }

    .hardware-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
}

/* Mobile: ≤ 640px */
@media (max-width: 640px) {
    .container {
        padding-inline: 1rem;
    }

    /* Sticky nav hamburger */
    .nav-toggle {
        display: flex;
    }

    nav .container {
        flex-wrap: wrap;
    }

    nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        background: #0e0e0e;
        border-top: 3px solid #333;
        padding: 0.25rem 0;
    }

    nav ul.open {
        display: flex;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li > a {
        display: block;
        padding: 12px 1rem;
        border-bottom: none;
        border-top: 1px solid #222;
        font-size: 0.58rem;
        text-align: right;
    }

    nav ul li > a:hover {
        opacity: 1;
        background: #1a1a1a;
        color: #ff6600;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding-block: 2.5rem;
    }

    .hero-text h1 {
        font-size: clamp(1.3rem, 7vw, 2rem);
    }

    .subtitle {
        font-size: 0.62rem;
    }

    .bom-logo {
        width: 140px;
        height: 185px;
    }

    .status {
        font-size: 0.5rem;
        padding: 5px 14px;
        border-width: 3px;
        bottom: 28px;
    }

    /* Sections */
    .section {
        padding: 50px 0;
    }

    section h2 {
        font-size: 1.1rem;
        margin-bottom: 28px;
    }

    /* Puzzel */
    .puzzel-grid {
        grid-template-columns: 1fr;
        padding: 14px;
        gap: 14px;
    }

    /* Hardware */
    .hardware-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .item {
        padding: 16px 8px;
    }

    .item-name {
        font-size: 0.44rem;
    }

    /* Modal */
    .modal {
        max-height: 95vh;
        border-width: 4px;
    }

    .modal-title {
        font-size: 0.6rem;
    }

    .code-block {
        font-size: 0.62rem;
        padding: 12px;
    }

    .modal-body {
        padding: 14px;
    }

    /* Footer */
    .f-top {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2.5rem;
    }

    .f-team ul {
        align-items: center;
    }

    .f-info {
        text-align: center;
    }

    .f-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .f-label {
        text-align: center;
    }
}

/* Very small: ≤ 380px */
@media (max-width: 380px) {
    .hardware-grid {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 1.15rem;
    }

    .puzzel-card h3 {
        font-size: 0.68rem;
    }

    nav ul li > a {
        font-size: 0.52rem;
    }
}