/* ============================================
   AegisEdge: aegisedge.net
   Sophisticated quantum / edge computing theme
   ============================================ */

:root {
    --bg-deep: #0a0b0f;
    --bg-charcoal: #12121a;
    --accent-cyan: #00d4ff;
    --accent-teal: #00b8b8;
    --accent-glow: rgba(0, 212, 255, 0.4);
    --text-primary: #e8eef2;
    --text-muted: #8a9ba8;
    --border-subtle: rgba(255, 255, 255, 0.06);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background: dark image + overlay + animated grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background: url('../media/background-dark.png') center center / cover no-repeat;
    background-color: var(--bg-deep);
}

.bg-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        180deg,
        rgba(10, 11, 15, 0.7) 0%,
        rgba(10, 11, 15, 0.4) 40%,
        rgba(10, 11, 15, 0.8) 100%
    );
    pointer-events: none;
}

/* Subtle animated grid (quantum / circuit aesthetic) */
.particle-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.15;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.15) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 70%);
}

/* ========== Header ========== */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    position: relative;
    z-index: 10;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.site-nav {
    display: flex;
    gap: 1.5rem;
}
.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}
.site-nav a:hover {
    color: var(--accent-teal);
}

.domain {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ========== Hero ========== */
.hero {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 180px);
    padding: 2rem;
}

.hero-content {
    max-width: 720px;
    text-align: center;
}

/* index.html: Athena shield emblem – change max-width to resize (e.g. 200px = smaller) */
.hero-emblem {
    max-width: 200px;
    width: 100%;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
}

.hero-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.hero-title .brand {
    color: var(--accent-cyan);
    text-shadow: 0 0 20px var(--accent-glow);
}

.hero-title .separator {
    color: var(--text-muted);
    font-weight: 400;
}

.hero-title .tagline {
    font-weight: 500;
}

.hero-tagline {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent-teal);
    margin: 0 0 0.75rem;
    letter-spacing: 0.02em;
}

.hero-subheader {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0 0 1.5rem;
}

.hero-quote {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--accent-teal);
    margin: 1.5rem 0 1rem;
    opacity: 0.95;
}

.hero-intro {
    font-size: 1.1rem;
    color: var(--text-primary);
    opacity: 0.95;
    margin: 0 0 1.25rem;
    line-height: 1.75;
}

.hero-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

/* ========== Footer ========== */
.site-footer {
    position: relative;
    z-index: 1;
    padding: 1.5rem 2rem;
    text-align: center;
}

.site-footer p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.site-footer a {
    color: var(--accent-teal);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent-cyan);
}

/* ========== Page content (Product, etc.) ========== */
.page-main {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    padding-bottom: 4rem;
}

.page-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}
.page-title .accent {
    color: var(--accent-cyan);
}
.page-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0 0 2.5rem;
}

.section {
    margin-bottom: 2.5rem;
}
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-teal);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.section p {
    color: var(--text-primary);
    opacity: 0.95;
    margin: 0 0 1rem;
    line-height: 1.7;
}
.section p.lead {
    font-size: 1.1rem;
}
.section .highlight {
    color: var(--accent-teal);
    font-weight: 500;
}

/* Problem / Solution table */
.ps-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}
.ps-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: rgba(0, 184, 184, 0.15);
    color: var(--accent-teal);
    font-weight: 600;
    border: 1px solid var(--border-subtle);
}
.ps-table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    opacity: 0.95;
}
.ps-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

/* Capability grid */
.cap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.cap-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 1.25rem;
}
.cap-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin: 0 0 0.5rem;
}
.cap-card p {
    font-size: 0.9rem;
    color: var(--text-primary);
    opacity: 0.9;
    margin: 0;
    line-height: 1.5;
}

/* Innovation list */
.innovation-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}
.innovation-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    opacity: 0.95;
}
.innovation-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-teal);
}

/* Technology page: ordered list */
.tech-ol {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    counter-reset: tech;
}
.tech-ol li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    opacity: 0.95;
    line-height: 1.6;
}
.tech-ol li::before {
    content: counter(tech);
    counter-increment: tech;
    position: absolute;
    left: 0;
    width: 1.5rem;
    font-weight: 600;
    color: var(--accent-teal);
    font-family: 'JetBrains Mono', monospace;
}
.tech-list {
    margin-top: 0.5rem;
}

/* Business model table */
.bm-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}
.bm-table th {
    text-align: left;
    padding: 0.6rem 1rem;
    background: rgba(0, 184, 184, 0.12);
    color: var(--accent-teal);
    font-weight: 600;
    border: 1px solid var(--border-subtle);
}
.bm-table td {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    opacity: 0.95;
}

/* Contact block */
.contact-block {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 184, 184, 0.08);
    border: 1px solid rgba(0, 184, 184, 0.25);
    border-radius: 8px;
}
.contact-block .section-title {
    border-bottom: none;
    margin-bottom: 0.75rem;
}
.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    font-size: 0.95rem;
}
.contact-links a {
    color: var(--accent-teal);
    text-decoration: none;
}
.contact-links a:hover {
    color: var(--accent-cyan);
}

/* Download block (e.g. Technical Brief) */
.download-block {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 184, 184, 0.06);
    border: 1px solid rgba(0, 184, 184, 0.2);
    border-radius: 8px;
}
.download-block .section-title {
    border-bottom: none;
    margin-bottom: 0.5rem;
}
.download-link {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(0, 184, 184, 0.2);
    color: var(--accent-teal);
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid rgba(0, 184, 184, 0.4);
    transition: background 0.2s, color 0.2s;
}
.download-link:hover {
    background: rgba(0, 184, 184, 0.3);
    color: var(--accent-cyan);
}

/* Optional: hero image placeholder for product page */
.section-figure {
    margin: 1.5rem 0;
    text-align: center;
}
.section-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}
.section-figure figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}
/* product.html (and technology.html): main hero image – change max-width to resize */
.hero-figure {
    margin: 0 0 2.5rem;
}
.hero-figure img {
    max-width: 300px;
    margin: 0 auto;
}
/* product.html: inline Node image in Company Overview – change max-width to resize */
.section-figure--inline {
    max-width: 260px;
    margin: 1.5rem 0;
}
.section-figure--inline img {
    width: 100%;
}

/* product.html: Form factor grid (portable + wearable) – smaller cards = lower minmax first value */
.form-factor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 1.25rem 0;
}
.form-factor-card {
    margin: 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
    padding-bottom: 1rem;
}
/* max-height limits how tall the form-factor images get; remove or increase to allow larger */
.form-factor-card img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-subtle);
}
.form-factor-card figcaption {
    font-size: 0.9rem;
    color: var(--text-primary);
    opacity: 0.9;
    padding: 0.75rem 1rem 0;
    line-height: 1.4;
}
.form-factor-card figcaption strong {
    color: var(--accent-teal);
}

/* ========== Responsive ========== */
@media (max-width: 640px) {
    .site-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    .site-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    .hero-title {
        flex-direction: column;
    }
    .cap-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== Cookie consent (Google Analytics) ========== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1rem 1.5rem;
    background: var(--bg-charcoal);
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cookie-consent--hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.cookie-consent__inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}

.cookie-consent__text {
    margin: 0;
    flex: 1 1 280px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.cookie-consent__actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-consent__btn {
    padding: 0.5rem 1.25rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.cookie-consent__btn--accept {
    background: var(--accent-cyan);
    color: var(--bg-deep);
}

.cookie-consent__btn--accept:hover {
    background: var(--accent-teal);
    color: var(--bg-deep);
}

.cookie-consent__btn--decline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.cookie-consent__btn--decline:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}
