/* =====================================================
   SIWES DEFENSE WEBSITE
   Neo-Brutalist Engineering Theme
===================================================== */


/* =====================================================
   VARIABLES
===================================================== */

:root {
    --cream: #f4f0e6;
    --paper: #fffdf6;
    --black: #080808;
    --orange: #ff641f;
    --yellow: #ffd600;
    --blue: #1261ff;
    --light-blue: #dce7ff;

    --border: 4px solid var(--black);

    --shadow: 8px 8px 0 var(--black);
    --shadow-small: 5px 5px 0 var(--black);

    --mono: "Space Mono", monospace;
    --sans: Arial, Helvetica, sans-serif;
}


/* =====================================================
   RESET
===================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--cream);
    color: var(--black);
    font-family: var(--sans);
    overflow-x: hidden;

    /* Subtle blueprint / graph-paper texture */
    background-image:
        linear-gradient(
            rgba(0, 0, 0, 0.045) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.045) 1px,
            transparent 1px
        );

    background-size: 25px 25px;
}

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

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

button {
    font: inherit;
}


/* =====================================================
   TOP BAR
===================================================== */

.top-bar {
    min-height: 38px;
    background: var(--black);
    color: white;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 8px 5vw;

    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}


/* =====================================================
   HERO
===================================================== */

.hero {
    min-height: 90vh;
    padding: 7vw 5vw;

    border-bottom: var(--border);

    position: relative;
    overflow: hidden;
}

.hero-grid {
    max-width: 1400px;
    margin: auto;

    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 7vw;

    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.eyebrow,
.section-tag {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.eyebrow::before {
    content: "▶ ";
    color: var(--orange);
}

.hero h1 {
    font-family: var(--mono);
    font-size: clamp(4rem, 9vw, 9rem);
    line-height: 0.82;
    letter-spacing: -0.08em;
    margin-bottom: 40px;

    text-transform: uppercase;
}

.hero h1 span {
    color: var(--orange);
    -webkit-text-stroke: 2px var(--black);
    text-shadow: 5px 5px 0 var(--black);
}

.name-box {
    display: inline-flex;
    flex-direction: column;

    border: var(--border);
    background: var(--yellow);

    padding: 15px 20px;

    box-shadow: var(--shadow-small);

    transform: rotate(-1deg);
}

.name-box .label {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 5px;
}

.name-box strong {
    font-family: var(--mono);
    font-size: clamp(16px, 2vw, 25px);
}

.subtitle {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 18px;
    margin-top: 30px;
}

.tagline {
    display: inline-block;

    margin-top: 15px;

    font-family: var(--mono);
    font-weight: 700;

    border-left: 5px solid var(--blue);
    padding-left: 12px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;

    margin-top: 35px;
}


/* =====================================================
   BUTTONS
===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 58px;
    padding: 15px 22px;

    border: var(--border);

    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;

    box-shadow: var(--shadow-small);

    transition:
        transform 0.1s ease,
        box-shadow 0.1s ease;
}

.btn-orange {
    background: var(--orange);
}

.btn-blue {
    background: var(--blue);
    color: white;
}

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

.btn:active {
    transform: translate(5px, 5px);
    box-shadow: none;
}


/* =====================================================
   HERO ENGINEERING DIAGRAM
===================================================== */

.hero-diagram {
    min-height: 500px;

    border: var(--border);
    background: var(--paper);

    position: relative;

    box-shadow: var(--shadow);

    transform: rotate(2deg);
}

.diagram-label {
    position: absolute;
    top: 0;
    left: 0;

    background: var(--black);
    color: white;

    padding: 10px 14px;

    font-family: var(--mono);
    font-size: 10px;
}

.diagram-box {
    position: absolute;

    width: 70%;
    height: 60%;

    top: 20%;
    left: 15%;

    border: 3px solid var(--black);
}

.central-box {
    position: absolute;

    width: 140px;
    height: 140px;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    border: var(--border);

    background: var(--yellow);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    box-shadow: 6px 6px 0 var(--black);

    font-family: var(--mono);
}

.central-box span {
    font-size: 12px;
}

.central-box strong {
    font-size: 27px;
}

.circuit-line {
    position: absolute;
    background: var(--black);
}

.line-1 {
    width: 35%;
    height: 3px;
    top: 25%;
    left: 0;
}

.line-2 {
    width: 3px;
    height: 30%;
    top: 25%;
    right: 25%;
}

.line-3 {
    width: 30%;
    height: 3px;
    bottom: 25%;
    right: 0;
}

.node {
    width: 14px;
    height: 14px;

    border: 3px solid var(--black);

    background: var(--orange);

    position: absolute;
}

.node-1 {
    top: calc(25% - 7px);
    left: -8px;
}

.node-2 {
    top: calc(25% - 7px);
    right: calc(25% - 7px);
}

.node-3 {
    bottom: calc(25% - 7px);
    right: -8px;
}

.crosshair {
    position: absolute;

    width: 45px;
    height: 45px;

    bottom: 25px;
    right: 25px;

    border: 2px solid var(--black);
}

.crosshair span:first-child {
    position: absolute;

    width: 100%;
    height: 2px;

    top: 50%;

    background: var(--black);
}

.crosshair span:last-child {
    position: absolute;

    width: 2px;
    height: 100%;

    left: 50%;

    background: var(--black);
}

.dimension {
    position: absolute;

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
}

.dimension-top {
    top: 14%;
    left: 50%;
    transform: translateX(-50%);
}

.dimension-side {
    left: 8%;
    top: 45%;
    line-height: 1.5;
}


/* =====================================================
   GENERAL SECTIONS
===================================================== */

main {
    max-width: 1500px;
    margin: auto;
}

.section {
    padding: 120px 5vw;
    position: relative;
}

.section-number {
    position: absolute;

    top: 55px;
    left: 5vw;

    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;

    border: 2px solid var(--black);
    padding: 6px 10px;

    background: var(--yellow);
}

.section-heading {
    margin-bottom: 60px;
}

.section-heading h2,
.takeaway-title h2 {
    font-family: var(--mono);
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 0.88;
    letter-spacing: -0.07em;
}


/* =====================================================
   OVERVIEW
===================================================== */

.overview {
    display: grid;
    grid-template-columns: 0.7fr 1fr;
    gap: 6vw;
    align-items: end;
}

.overview .section-heading {
    grid-column: 1 / 2;
}

.overview-content {
    grid-column: 2 / 3;
    border-left: 6px solid var(--orange);
    padding-left: 30px;
}

.overview-content p {
    font-size: 19px;
    line-height: 1.6;
    max-width: 700px;
    margin-bottom: 25px;
}

.overview-content .lead {
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 700;
}


/* =====================================================
   TRAINING CARDS
===================================================== */

.training {
    padding: 0 5vw 120px;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.training-card {
    min-height: 400px;

    border: var(--border);

    padding: 25px;

    position: relative;

    box-shadow: var(--shadow);

    display: flex;
    flex-direction: column;

    transition: transform 0.15s ease;
}

.training-card:hover {
    transform: translateY(-8px);
}

.training-card.software {
    background: var(--orange);
}

.training-card.cad {
    background: var(--yellow);
}

.training-card.solar {
    background: var(--light-blue);
}

.training-card.iot {
    background: var(--blue);
    color: white;
}

.card-number {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
}

.card-icon {
    font-family: var(--mono);
    font-size: 60px;
    margin: 35px 0 25px;
}

.training-card h3 {
    font-family: var(--mono);
    font-size: 25px;
    line-height: 1;
}

.training-card p {
    margin-top: 20px;
    line-height: 1.5;
}

.card-footer {
    margin-top: auto;
    padding-top: 20px;

    border-top: 3px solid currentColor;

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
}


/* =====================================================
   GRIDWATCH FEATURE
===================================================== */

.project-highlight {
    margin: 0 5vw 120px;

    border: var(--border);

    background: var(--black);
    color: white;

    box-shadow: 12px 12px 0 var(--orange);

    padding: 60px;

    position: relative;
}

.project-label {
    position: absolute;
    top: 0;
    right: 0;

    background: var(--orange);
    color: var(--black);

    padding: 10px 15px;

    border-left: var(--border);
    border-bottom: var(--border);

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
}

.project-content {
    display: grid;
    grid-template-columns: 1.5fr 0.5fr;
    gap: 60px;
    align-items: center;
}

.project-content h2 {
    font-family: var(--mono);
    font-size: clamp(4rem, 9vw, 9rem);
    line-height: 0.8;
    letter-spacing: -0.08em;
}

.project-content h2 span {
    color: var(--orange);
}

.project-description {
    max-width: 700px;

    font-size: 18px;
    line-height: 1.6;

    margin: 35px 0;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-list span {
    border: 2px solid white;
    padding: 8px 12px;

    font-family: var(--mono);
    font-size: 10px;
}

.project-status {
    border: 3px solid white;
    padding: 25px;

    background: var(--yellow);
    color: var(--black);
}

.status-top {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
}

.project-status strong {
    display: block;

    font-family: var(--mono);
    font-size: 65px;

    margin: 20px 0;
}

.progress {
    width: 100%;
    height: 20px;

    border: 3px solid var(--black);

    background: white;
}

.progress-fill {
    height: 100%;
    width: 80%;

    background: var(--blue);
}

.project-status small {
    display: block;
    margin-top: 12px;

    font-family: var(--mono);
    font-size: 9px;
}


/* =====================================================
   GALLERY
===================================================== */

.gallery-section {
    padding-bottom: 100px;
}

.gallery-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;
}

.gallery-item {
    background: var(--paper);

    border: var(--border);

    box-shadow: var(--shadow-small);

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;

    overflow: hidden;
}

.gallery-item:hover {
    transform: translate(4px, 4px);
    box-shadow: 1px 1px 0 var(--black);
}

.gallery-item img {
    width: 100%;
    height: 270px;

    object-fit: cover;

    border-bottom: var(--border);
}

.gallery-item figcaption {
    min-height: 55px;

    padding: 12px;

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.gallery-item figcaption span {
    color: var(--orange);
}

.gallery-large {
    grid-column: span 2;
}


/* =====================================================
   TAKEAWAYS
===================================================== */

.takeaways {
    margin: 40px 5vw 120px;

    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 70px;

    border-top: var(--border);
    border-bottom: var(--border);

    padding: 80px 0;
}

.takeaway-list {
    display: flex;
    flex-direction: column;
}

.takeaway {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 20px;

    padding: 25px 0;

    border-bottom: 2px solid var(--black);

    font-size: 18px;
    line-height: 1.5;
}

.takeaway strong {
    font-family: var(--mono);
    color: var(--blue);
}


/* =====================================================
   DOWNLOADS
===================================================== */

.downloads {
    margin: 0 5vw 120px;

    border: var(--border);

    background: var(--orange);

    padding: 70px;

    box-shadow: 12px 12px 0 var(--black);

    text-align: center;
}

.download-warning {
    display: inline-block;

    background: var(--black);
    color: white;

    padding: 9px 14px;

    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;

    margin-bottom: 30px;
}

.downloads h2 {
    font-family: var(--mono);

    font-size: clamp(3rem, 7vw, 7rem);

    line-height: 0.85;
    letter-spacing: -0.08em;

    margin-bottom: 25px;
}

.downloads > p {
    font-family: var(--mono);
    font-size: 14px;
    margin-bottom: 45px;
}

.download-buttons {
    max-width: 900px;
    margin: auto;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.download-btn {
    min-height: 120px;

    border: var(--border);

    padding: 20px;

    display: grid;
    grid-template-columns: 50px 1fr 30px;

    align-items: center;
    gap: 15px;

    text-align: left;

    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;

    box-shadow: var(--shadow);

    transition:
        transform 0.1s ease,
        box-shadow 0.1s ease;
}

.download-btn.orange {
    background: var(--yellow);
}

.download-btn.blue {
    background: var(--blue);
    color: white;
}

.download-btn:hover {
    transform: translate(6px, 6px);
    box-shadow: 2px 2px 0 var(--black);
}

.download-btn:active {
    transform: translate(8px, 8px);
    box-shadow: none;
}

.download-btn small {
    display: block;

    font-size: 9px;

    margin-bottom: 8px;

    opacity: 0.7;
}

.download-icon {
    font-size: 35px;
}

.arrow {
    font-size: 25px;
}


/* =====================================================
   LIGHTBOX
===================================================== */

.lightbox {
    position: fixed;

    inset: 0;

    z-index: 9999;

    background: rgba(0, 0, 0, 0.94);

    display: none;

    align-items: center;
    justify-content: center;

    padding: 30px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 1100px;
    width: 100%;

    border: var(--border);

    background: var(--paper);

    box-shadow: 12px 12px 0 var(--orange);

    padding: 12px;
}

.lightbox-content img {
    width: 100%;
    max-height: 75vh;

    object-fit: contain;

    border: 3px solid var(--black);
}

#lightbox-caption {
    padding: 15px 5px 5px;

    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
}

.lightbox-close {
    position: absolute;

    top: 25px;
    right: 30px;

    width: 55px;
    height: 55px;

    background: var(--orange);

    border: var(--border);

    box-shadow: var(--shadow-small);

    font-size: 35px;
    line-height: 1;

    cursor: pointer;
}

.lightbox-close:hover {
    transform: translate(4px, 4px);
    box-shadow: 1px 1px 0 var(--black);
}


/* =====================================================
   FOOTER
===================================================== */

footer {
    background: var(--black);
    color: white;

    padding: 35px 5vw;
}

.footer-main {
    max-width: 1400px;
    margin: auto;

    display: flex;
    justify-content: space-between;
    gap: 20px;

    padding-bottom: 25px;

    border-bottom: 2px solid #555;

    font-family: var(--mono);
    font-size: 12px;
}

.footer-bottom {
    max-width: 1400px;
    margin: auto;

    display: flex;
    justify-content: space-between;

    padding-top: 20px;

    font-family: var(--mono);
    font-size: 9px;

    color: #aaa;
}


/* =====================================================
   SCROLL REVEAL
===================================================== */

.reveal {
    opacity: 0;

    transform: translateY(40px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* =====================================================
   RESPONSIVE — TABLET
===================================================== */

@media (max-width: 1000px) {

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

    .hero-diagram {
        min-height: 400px;
    }

    .training {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-content {
        grid-template-columns: 1fr;
    }

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

}


/* =====================================================
   RESPONSIVE — MOBILE
===================================================== */

@media (max-width: 650px) {

    .top-bar {
        font-size: 8px;
        gap: 10px;
    }

    .top-bar span:nth-child(2) {
        display: none;
    }

    .hero {
        min-height: auto;
        padding-top: 70px;
        padding-bottom: 80px;
    }

    .hero h1 {
        font-size: clamp(3.3rem, 18vw, 6rem);
    }

    .name-box strong {
        font-size: 14px;
    }

    .hero-diagram {
        min-height: 330px;
    }

    .central-box {
        width: 110px;
        height: 110px;
    }

    .central-box strong {
        font-size: 21px;
    }

    .section {
        padding-top: 90px;
        padding-bottom: 80px;
    }

    .overview {
        display: block;
    }

    .overview-content {
        margin-top: 40px;
    }

    .overview-content .lead {
        font-size: 18px;
    }

    .training {
        grid-template-columns: 1fr;
        padding-bottom: 80px;
    }

    .training-card {
        min-height: 350px;
    }

    .project-highlight {
        margin-bottom: 90px;
        padding: 35px 25px;
        box-shadow: 7px 7px 0 var(--orange);
    }

    .project-content h2 {
        font-size: 4rem;
    }

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

    .gallery-large {
        grid-column: auto;
    }

    .gallery-item img {
        height: 240px;
    }

    .takeaways {
        margin-bottom: 90px;
        gap: 40px;
    }

    .downloads {
        margin-bottom: 80px;
        padding: 45px 20px;

        box-shadow: 7px 7px 0 var(--black);
    }

    .download-buttons {
        grid-template-columns: 1fr;
    }

    .download-btn {
        min-height: 100px;
    }

    .footer-main,
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
    }

}


/* =====================================================
   ACCESSIBILITY
===================================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    * {
        transition: none !important;
    }

}