/* DRONE INTELLIGENCE CENTER | Editable stylesheet
   Start with section 01 for colors and sizes.
   Section 11 controls the main banner; section 12 controls its mobile version.
   Image path is relative to this CSS file.
   Save, upload to /var/www/mysite/style.css, then refresh with Ctrl+F5.
*/

/* ==================================================
   01 | QUICK SETTINGS — edit these values first
   ================================================== */
:root {
    color-scheme: dark;
    /* Page background */
    --bg: #090f19;
    /* Input and navigation background */
    --panel: #111c2a;
    /* Border color */
    --line: #26374a;
    /* Main teal accent */
    --accent: #66e3cf;
    /* Secondary text color */
    --muted: #a6b7ca;
    /* Main text color */
    --text: #f0f5fb;
    /* Maximum website width */
    --site-width: 1440px;
    /* Desktop banner height: minimum, responsive, maximum */
    --banner-height: clamp(440px,42vw,600px);
    /* Desktop headline size: minimum, responsive, maximum */
    --banner-title-size: clamp(48px,6.8vw,96px);
    /* Homepage headline highlight and glow */
    --banner-accent: #72f5df;
    /* Homepage banner height on small screens */
    --mobile-banner-height: 540px;
    /* Minimum news card width */
    --card-min-width: 310px;
}


/* ==================================================
   02 | BASE STYLES AND TYPOGRAPHY
   ================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 system-ui,sans-serif;
}


/* ==================================================
   03 | SITE WIDTH AND HEADER
   ================================================== */
.top,header,nav,main,footer {
    max-width: var(--site-width);
    margin: auto;
    padding: 20px 36px;
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--line);
}

.brand {
    font-weight: 850;
    letter-spacing: .08em;
}

.brand span {
    color: var(--accent);
}

.edition,small,.hero-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .15em;
    color: var(--accent);
}


/* ==================================================
   04 | SHARED BANNER — image, overlay and spacing
   ================================================== */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 410px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 58px 44px;
    background: linear-gradient(90deg,rgba(5,13,26,.92),rgba(5,13,26,.28) 65%,transparent),url("assets/drone.jpg") center right/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

h1 {
    font-size: clamp(44px,6vw,84px);
    line-height: .98;
    letter-spacing: -.055em;
    margin: 20px 0;
}

p {
    margin: 8px 0;
    color: var(--muted);
}

.hero p {
    color: #e0e9f3;
    font-size: 18px;
}

.hero-tag {
    margin-top: 22px;
    border: 1px solid #496775;
    border-radius: 5px;
    padding: 8px 12px;
    background: #0c1a2acc;
}

.credit {
    position: absolute;
    bottom: 10px;
    right: 14px;
    font-size: 10px;
    color: #d5deea;
    background: #09121bb0;
    padding: 3px 6px;
    border-radius: 4px;
}


/* ==================================================
   05 | SEARCH AND CONTROLS
   ================================================== */
.controls,nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.controls {
    margin-top: 24px;
}

button,input {
    font: inherit;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 12px 16px;
    background: var(--panel);
    color: inherit;
}

input {
    flex: 1;
    min-width: 180px;
}

button {
    cursor: pointer;
    font-size: 14px;
    font-weight: 650;
}

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

button[aria-pressed=true] {
    background: var(--accent);
    color: #09211e;
    border-color: var(--accent);
}

#status {
    font-size: 12px;
}

nav {
    padding-top: 0;
    padding-bottom: 12px;
}


/* ==================================================
   06 | NEWS SECTIONS AND CARDS
   ================================================== */
section {
    margin-bottom: 40px;
}

h2 {
    font-size: 25px;
    letter-spacing: -.025em;
    margin: 0;
    border-left: 3px solid var(--accent);
    padding-left: 12px;
}

.meta {
    font-size: 12px;
    color: var(--muted);
}

.warning {
    color: #ffc782;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,var(--card-min-width)),1fr));
    gap: 14px;
    margin-top: 16px;
}

article {
    border: 1px solid var(--line);
    background: linear-gradient(145deg,#152233,#101a27);
    padding: 22px;
    border-radius: 14px;
    transition: border-color .2s;
}

article:hover {
    border-color: #568a91;
}

article .meta:first-child {
    color: var(--accent);
    margin-bottom: 10px;
}

a {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    font-size: 17px;
    line-height: 1.4;
    display: block;
}

a:hover {
    text-decoration: underline;
    color: var(--accent);
}

article p {
    font-size: 14px;
}


/* ==================================================
   07 | FOOTER AND KEYBOARD ACCESSIBILITY
   ================================================== */
footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

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


/* 08 | MOBILE — shared layout */
@media (max-width:650px) {
    .top,header,nav,main,footer {
        padding: 14px 16px;
    }

    .edition {
        display: none;
    }

    .hero {
        min-height: 390px;
        padding: 28px 22px;
        background-position: 62% center;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-tag {
        font-size: 9px;
    }

    .credit {
        font-size: 9px;
    }

    .controls button {
        width: 100%;
    }

    nav button {
        font-size: 12px;
        padding: 9px 11px;
    }

}

/* ==================================================
   09 | PAGE NAVIGATION AND COMPACT BANNERS
   ================================================== */
.nav-link {
    font-size: 14px;
    padding: 10px 15px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--panel);
}

.nav-link[aria-current=page] {
    background: var(--accent);
    color: #09211e;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.more {
    font-size: 13px;
    color: var(--accent);
}

.hero.compact {
    min-height: 230px;
    padding: 32px 44px;
}

.hero.compact h1 {
    font-size: clamp(32px,5vw,58px);
}


/* 10 | MOBILE — navigation and compact banners */
@media (max-width:650px) {
    .hero.compact {
        padding: 24px;
        min-height: 200px;
    }

    .nav-link {
        font-size: 12px;
        padding: 9px 11px;
    }

}

/* ==================================================
   11 | HOMEPAGE BANNER — main visual settings
   ================================================== */
body[data-page="all"] .hero {
    min-height: var(--banner-height);
    padding: 64px 52px;
    border: 1px solid #527e94;
    border-radius: 24px;
    /* Gradient layers darken the image for readable text. Last layer is the drone photo. */
    background-image: linear-gradient(90deg,#06101ff5 0%,#06101fc9 27%,#06101f35 53%,transparent 75%),linear-gradient(0deg,#06101f80,transparent 35%),url("assets/drone.jpg");
    background-position: center,right center,right center;
    background-size: cover;
    box-shadow: 0 20px 65px #0007,0 0 36px #38d9e51a;
    isolation: isolate;
}

body[data-page="all"] .hero:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,#65fce2,#38bdf8 45%,#ff9c53 85%);
    z-index: 1;
}

body[data-page="all"] .hero h1 {
    font-size: var(--banner-title-size);
    font-weight: 900;
    line-height: .95;
    text-shadow: 0 4px 28px #0008;
    margin: 24px 0;
}

body[data-page="all"] .hero h1 span {
    color: var(--banner-accent);
}

body[data-page="all"] .hero small {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #a5fff0;
}

body[data-page="all"] .hero small:before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--banner-accent);
    box-shadow: 0 0 14px var(--banner-accent);
}

body[data-page="all"] .hero-tag {
    background: #102b36e8;
    border-color: #53b6bc;
    color: #b9fff3;
}


/* 12 | MOBILE — homepage banner */
@media (max-width:650px) {
    body[data-page="all"] .hero {
        min-height: var(--mobile-banner-height);
        padding: 230px 24px 38px;
        justify-content: flex-end;
        /* Gradient layers darken the image for readable text. Last layer is the drone photo. */
        background-image: linear-gradient(0deg,#06101f 8%,#06101fe8 35%,transparent 77%),url("assets/drone.jpg");
        background-size: cover,auto 330px;
        background-position: center,70% top;
        background-repeat: no-repeat;
    }

    body[data-page="all"] .hero h1 {
        font-size: clamp(43px,10vw,62px);
    }

    body[data-page="all"] .hero p {
        font-size: 15px;
    }

}
/* 13 | Layered intelligence dashboard */
body {background: radial-gradient(ellipse at 50% 0,#182d43 0,transparent 55%),var(--bg);}
.top {padding-block:14px;}
body[data-page="all"] .hero {min-height:clamp(300px,30vw,440px);padding:36px 44px;}
body[data-page="all"] .hero h1 {font-size:clamp(44px,6vw,80px);}
nav {position:sticky;top:0;z-index:5;background:#090f19f5;backdrop-filter:blur(12px);padding-top:12px;border-bottom:1px solid var(--line);}
#health {max-width:var(--site-width);margin:auto;padding:16px 36px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;}
.health-card {background:#142235;border:1px solid var(--line);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:5px;box-shadow:0 8px 20px #0003;}
.health-label,.health-state {font-size:12px;}.health-state.current{color:var(--accent)}.health-state.stale,.health-state.unavailable,.health-state.waiting{color:#ffc782;}
body[data-page="all"] #feed {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;}
#feed section {min-width:0;background:#101b29;border:1px solid var(--line);border-radius:18px;padding:22px;margin:0;box-shadow:0 12px 30px #0004;}
#feed section[data-group="latest"] {grid-column:1/-1;background:linear-gradient(145deg,#172c40,#101b29);}
body[data-page="all"] section:not([data-group="latest"]) .cards {grid-template-columns:1fr;gap:8px;}
body[data-page="all"] section:not([data-group="latest"]) article {padding:14px;border-radius:9px;}
section[data-group="latest"] .cards {grid-template-columns:repeat(3,minmax(0,1fr));}
section[data-group="latest"] article:first-child {grid-row:span 2;background:linear-gradient(145deg,#214456,#152638);border-color:#477b85;}
section[data-group="latest"] article:first-child a {font-size:24px;}
#feed {padding-bottom:36px;}
@media(max-width:900px){#health{grid-template-columns:repeat(3,minmax(0,1fr));}section[data-group="latest"] .cards{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:650px){#health{padding:12px 16px;grid-template-columns:repeat(2,minmax(0,1fr));}body[data-page="all"] #feed,section[data-group="latest"] .cards{grid-template-columns:1fr;}body[data-page="all"] .hero{min-height:420px;padding:190px 24px 30px;}#feed section{padding:16px;}nav{position:static;}}

/* 14 | Category imagery — explicit image elements on every page */
.hero.compact { min-height:clamp(300px,30vw,440px); background:#06101f; isolation:isolate; }
.hero.compact .category-banner { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:right center; z-index:-2; }
.hero.compact::before { content:""; position:absolute; inset:0; background:linear-gradient(90deg,#06101fe8, #06101f70 42%, transparent 85%); z-index:-1; }
.health-card {overflow:hidden; padding-top:0;}
.health-card .category-thumb {display:block; width:calc(100% + 28px); max-width:none; margin:0 -14px 6px; aspect-ratio:16/10; object-fit:cover; border-bottom:1px solid var(--line);}
.health-card:hover {border-color:var(--accent);}
@media(max-width:650px){.hero.compact{min-height:300px;justify-content:flex-end;} .hero.compact::before{background:linear-gradient(0deg,#06101ff5, #06101f40 65%,transparent);} }
