/* ============================================================
   GLOBUS OPERANDI — Defense & Dual-Use AI
   ============================================================ */

/* --- Reset --- */

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

:root {
    /* Backgrounds */
    --bg:              #06090f;
    --bg-card:         #0b0f17;
    --bg-card-hover:   #0f1420;

    /* Text — high contrast for readability */
    --text:            #c9cdd4;
    --text-bright:     #edf0f5;
    --text-muted:      #6e7685;

    /* Accent */
    --accent:          #c9a24e;
    --accent-dim:      rgba(201, 162, 78, 0.12);
    --accent-line:     rgba(201, 162, 78, 0.30);

    /* Borders */
    --rule:            rgba(255, 255, 255, 0.07);
    --rule-strong:     rgba(255, 255, 255, 0.12);

    /* Fonts */
    --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono:  'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

    /* Layout */
    --max-w:     1120px;
    --section-v: 120px;
}

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

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: var(--accent-dim);
    color: var(--text-bright);
}

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

/* --- Layout --- */

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 56px;
}

section {
    padding: var(--section-v) 0;
    position: relative;
}

/* --- Section headers with index number --- */

.section-header {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: 56px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--rule);
}

.section-index {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.section-title {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-bright);
    margin: 0;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 56px;
    height: 64px;
    display: flex;
    align-items: center;
    transition: background 0.4s ease, box-shadow 0.4s ease;
    background: transparent;
}

#main-nav.scrolled {
    background: rgba(6, 9, 15, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 var(--rule);
}

.nav-inner {
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    mix-blend-mode: lighten;
}

.nav-logo span {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    color: var(--text-bright);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-link {
    font-size: 0.76rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.nav-link:hover {
    color: var(--text-bright);
}

.nav-link--cta {
    color: var(--accent);
    font-weight: 500;
}

.nav-link--cta:hover {
    color: var(--text-bright);
}

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

#hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
}

#globe-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 70% at 50% 48%, transparent 0%, var(--bg) 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 780px;
    padding: 0 40px;
}

/* Staggered entrance */
.hero-content > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-content.loaded > * {
    opacity: 1;
    transform: translateY(0);
}

.hero-content.loaded > *:nth-child(1) { transition-delay: 0.1s; }
.hero-content.loaded > *:nth-child(2) { transition-delay: 0.35s; }
.hero-content.loaded > *:nth-child(3) { transition-delay: 0.55s; }
.hero-content.loaded > *:nth-child(4) { transition-delay: 0.75s; }

.hero-logo {
    display: block;
    margin: 0 auto 44px;
    width: 160px;
    height: 160px;
    object-fit: contain;
    mix-blend-mode: lighten;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--text-bright);
    margin-bottom: 24px;
}

.hero-supporting {
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 48px;
    line-height: 1.7;
}

/* Scroll hint */
.hero-scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeInHint 1s ease 1.6s forwards;
}

.hero-scroll-hint span {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.scroll-line {
    width: 1px;
    height: 36px;
    background: var(--accent);
    opacity: 0.35;
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes fadeInHint {
    to { opacity: 1; }
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.15; transform: scaleY(1); }
    50%      { opacity: 0.4;  transform: scaleY(1); }
}

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

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 15px 40px;
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.btn-primary {
    color: var(--bg);
    background: var(--accent);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
}

.btn-secondary {
    color: var(--text);
    background: transparent;
    border: 1px solid var(--rule-strong);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-bright);
}

/* ============================================================
   CAPABILITIES
   ============================================================ */

#capabilities {
    border-top: 1px solid var(--rule);
}

.capabilities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.capability-block {
    padding: 40px 36px;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent-line);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.capability-block:hover {
    background: var(--bg-card-hover);
    border-left-color: var(--accent);
}

.capability-index {
    display: block;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: 0.08em;
}

.capability-block h3 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: 12px;
    color: var(--text-bright);
    line-height: 1.4;
}

.capability-block p {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.7;
}

/* ============================================================
   DOCTRINE
   ============================================================ */

#doctrine {
    border-top: 1px solid var(--rule);
}

.doctrine-text {
    font-size: 1.2rem;
    line-height: 1.85;
    color: var(--text-bright);
    max-width: 700px;
    margin-bottom: 72px;
    font-weight: 300;
}

.principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.principle {
    padding: 32px 28px;
    background: var(--bg-card);
    border: 1px solid var(--rule);
    border-top: 2px solid var(--accent-line);
}

.principle-numeral {
    display: block;
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 16px;
}

.principle p {
    font-size: 1.02rem;
    color: var(--text-bright);
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.5;
}

/* ============================================================
   DOMAINS
   ============================================================ */

#domains {
    border-top: 1px solid var(--rule);
}

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

.domain-item {
    padding: 28px 0;
    border-bottom: 1px solid var(--rule);
    display: flex;
    align-items: baseline;
    gap: 28px;
    transition: background 0.25s ease;
}

.domain-item:first-child {
    padding-top: 0;
}

.domain-index {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.06em;
    flex-shrink: 0;
    min-width: 28px;
}

.domain-item h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text-bright);
    min-width: 240px;
    flex-shrink: 0;
}

.domain-item p {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.65;
}

/* ============================================================
   RESEARCH
   ============================================================ */

#research {
    border-top: 1px solid var(--rule);
}

.research-content {
    max-width: 700px;
}

.research-content p {
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 28px;
}

.research-content p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   STRUCTURE
   ============================================================ */

#structure {
    border-top: 1px solid var(--rule);
}

.structure-text {
    font-size: 1.12rem;
    line-height: 1.85;
    color: var(--text);
    max-width: 700px;
    font-weight: 300;
}

/* ============================================================
   ENGAGEMENT
   ============================================================ */

#engagement {
    border-top: 1px solid var(--rule);
}

.engagement-notice {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 56px;
}

.engagement-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.cta-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-field label {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-field input {
    background: var(--bg-card);
    border: 1px solid var(--rule);
    padding: 14px 16px;
    font-family: var(--sans);
    font-size: 0.95rem;
    color: var(--text-bright);
    outline: none;
    transition: border-color 0.3s ease;
    border-radius: 0;
    -webkit-appearance: none;
}

.form-field input:focus {
    border-color: var(--accent);
}

.form-field input::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

.btn-submit {
    align-self: flex-start;
    margin-top: 8px;
}

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

#site-footer {
    border-top: 1px solid var(--rule);
    padding: 48px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-entity {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-name {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--text);
    text-transform: uppercase;
}

.footer-jurisdiction {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: color 0.25s ease;
}

.footer-links a:hover {
    color: var(--text-bright);
}

.footer-copyright {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ============================================================
   SECTION REVEAL
   ============================================================ */

section:not(#hero) .container > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

section:not(#hero).visible .container > * {
    opacity: 1;
    transform: translateY(0);
}

section:not(#hero).visible .container > *:nth-child(1) { transition-delay: 0s; }
section:not(#hero).visible .container > *:nth-child(2) { transition-delay: 0.1s; }
section:not(#hero).visible .container > *:nth-child(3) { transition-delay: 0.18s; }
section:not(#hero).visible .container > *:nth-child(4) { transition-delay: 0.26s; }

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

@media (max-width: 960px) {
    :root {
        --section-v: 88px;
    }

    .container {
        padding: 0 32px;
    }

    #main-nav {
        padding: 0 32px;
    }

    .nav-links {
        gap: 24px;
    }

    .nav-link:not(.nav-link--cta) {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-logo {
        width: 130px;
        height: 130px;
    }

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

    .principles {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .domain-item {
        flex-wrap: wrap;
    }

    .domain-item h3 {
        min-width: auto;
    }

    .engagement-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

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

@media (max-width: 640px) {
    :root {
        --section-v: 64px;
    }

    .container {
        padding: 0 20px;
    }

    #main-nav {
        padding: 0 20px;
        height: 56px;
    }

    .nav-logo-img {
        width: 26px;
        height: 26px;
    }

    .nav-logo span {
        font-size: 0.68rem;
        letter-spacing: 0.2em;
    }

    .hero-content {
        padding: 0 20px;
    }

    .hero-logo {
        width: 110px;
        height: 110px;
        margin-bottom: 32px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-supporting {
        font-size: 0.92rem;
    }

    .hero-supporting br {
        display: none;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 0.75rem;
        letter-spacing: 0.15em;
    }

    .capability-block {
        padding: 28px 24px;
    }

    .capability-block h3 {
        font-size: 0.95rem;
    }

    .doctrine-text {
        font-size: 1.05rem;
    }

    .principle {
        padding: 24px 20px;
    }

    .hero-scroll-hint {
        display: none;
    }
}
