/* =========================================
   1. CONFIGURATION & VARIABLES
   ========================================= */
:root {
    /* Color Palette - Military Green / Field Drab Orientation */
    --color-primary: #354F2B;      /* Deep Military Green */
    --color-primary-dark: #24381C; /* Darker Forest Green */
    --color-accent: #6B7F5F;       /* Sage/Foliage Green for accents */
    
    --color-text-main: #1C1C1C;    /* Near Black */
    --color-text-light: #4A4A4A;   /* Dark Gray */
    --color-text-inverse: #F2F2F2; /* Off-White text */
    
    --color-bg-white: #FFFFFF;
    --color-bg-light: #F4F5F0;     /* Very subtle warm gray/green tint */
    --color-bg-dark: #1A1C18;      /* Almost black */
    
    --color-border: #D4D6D0;       /* Neutral border */
    
    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'ui-monospace', 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', monospace;
    
    /* Layout & Spacing */
    --container-width: 1200px;
    --border-radius: 0px;          
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: 16px;
    background-color: var(--color-bg-white);
}

h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: var(--space-sm);
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--color-primary-dark); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin-bottom: var(--space-sm); max-width: 70ch; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: all 0.2s ease; }

/* =========================================
   3. UTILITY CLASSES
   ========================================= */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary { background-color: var(--color-primary); color: white; }
.btn-primary:hover { background-color: var(--color-primary-dark); }
.btn-secondary { background-color: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-secondary:hover { background-color: var(--color-primary); color: white; }

.bg-light { background-color: var(--color-bg-light); }
.bg-white { background-color: var(--color-bg-white); }
.text-white { color: var(--color-text-inverse); }
.text-accent { color: var(--color-accent); }
.mt-large { margin-top: var(--space-md); }

/* =========================================
   4. COMPONENT STYLES
   ========================================= */

/* --- Header & Logo --- */
.site-header {
    background-color: var(--color-bg-white);
    border-bottom: 3px solid var(--color-primary);
    padding: var(--space-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-list {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.nav-list a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-main);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.nav-list a:hover { color: var(--color-primary); }
.nav-cta { padding: 8px 16px; background-color: var(--color-primary); color: white !important; border-radius: var(--border-radius); }
.nav-cta:hover { background-color: var(--color-primary-dark); }

/* =========================================
   HERO SECTION & CANVAS
   ========================================= */

.hero-section {
    padding: var(--space-xl) 0;
    background-color: var(--color-bg-white);
    position: relative; /* Required for canvas positioning */
    border-bottom: 1px solid var(--color-border);
    overflow: hidden; /* Prevents canvas from spilling out */
}

/* The Canvas sits on top of the background but behind the text */
#tactical-board {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
    opacity: 0.6; /* Subtle blend */
    pointer-events: none; /* Allows clicking through to buttons */
}

.hero-content {
    max-width: 850px;
    position: relative; 
    z-index: 2; /* Ensures text stays above canvas */
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* --- General Section Layouts --- */
.section { padding: var(--space-xl) 0; }
.section-header { margin-bottom: var(--space-lg); border-bottom: 1px solid var(--color-border); padding-bottom: var(--space-sm); display: flex; align-items: baseline; gap: var(--space-sm); }
.section-number { font-family: var(--font-mono); font-weight: 700; color: var(--color-primary); font-size: 1.25rem; }

/* --- Capabilities Grid --- */
.grid-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-md); }
.service-card { background: var(--color-bg-white); padding: var(--space-md); border: 1px solid var(--color-border); position: relative; display: flex; flex-direction: column; }
.service-card::after { content: ''; position: absolute; top: 0; left: 0; width: 0; height: 0; border-top: 20px solid var(--color-primary); border-right: 20px solid transparent; }
.service-card:hover { border-color: var(--color-primary); }
.card-content { flex-grow: 1; }
.service-card h3 { margin-bottom: var(--space-sm); color: var(--color-primary-dark); }
.service-card p { font-size: 0.95rem; color: var(--color-text-light); margin-bottom: var(--space-md); min-height: 4.5em; }
.tech-list { margin-top: auto; border-top: 1px solid #E5E5E5; padding-top: 8px; }
.tech-list li { font-size: 0.85rem; padding: 6px 0; border-bottom: 1px solid #F5F5F5; color: var(--color-text-main); display: flex; align-items: center; }
.tech-list li:last-child { border-bottom: none; }
.tech-list li::before { content: "›"; font-weight: bold; color: var(--color-primary); margin-right: 8px; font-size: 1.2em; line-height: 0; }

/* --- Partners & Certs --- */
.trust-layout { display: grid; grid-template-columns: 1.8fr 1.2fr; gap: var(--space-lg); }

.partner-logo-container {
    margin-bottom: var(--space-md);
}

/* UPDATED PARTNER LOGO SIZE */
.partner-logo-img {
    margin: 50px 0;
    max-height: 90px;
    max-width: 100%;
    width: auto;
    display: block;
    filter: grayscale(100%); 
    transition: filter 0.3s;
}

.partner-logo-img:hover { filter: grayscale(0%); }

.trust-sidebar h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-sm); color: var(--color-text-light); border-bottom: 2px solid var(--color-primary); display: inline-block; padding-bottom: 4px; }
.compliance-list li { margin-bottom: 12px; font-size: 0.95rem; padding-left: 14px; position: relative; border-bottom: 1px solid #eee; padding-bottom: 12px; }
.compliance-list li:last-child { border-bottom: none; }
.compliance-list li::before { content: ""; width: 6px; height: 6px; background-color: var(--color-primary); position: absolute; left: 0; top: 9px; }
.sub-detail { display: block; font-size: 0.85rem; color: #666; margin-top: 2px; }

/* --- Contact Section --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: var(--space-lg); }
.info-group { margin-bottom: var(--space-md); padding-bottom: var(--space-md); border-bottom: 1px solid #D4D6D0; }
.info-group h4 { color: var(--color-primary); font-size: 0.85rem; text-transform: uppercase; margin-bottom: var(--space-sm); }
.info-group p, .info-group address { font-style: normal; color: var(--color-text-main); font-size: 0.95rem; }
.big-email-link { font-size: 1.2rem; font-weight: 700; color: var(--color-primary-dark); text-decoration: underline; text-decoration-color: var(--color-primary); }
.big-email-link:hover { color: var(--color-primary); text-decoration: none; }
.info-group a.text-link { color: var(--color-primary); text-decoration: underline; }

/* Office & Registry Layout */
.office-registry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); margin-bottom: 0; }
.office-registry-grid .info-group { border-bottom: none; margin-bottom: 10px; padding-bottom: 0; }
.no-border { border-bottom: none !important; }

/* Map Embed */
.map-container { margin-top: 10px; margin-bottom: var(--space-md); border: 1px solid var(--color-border); background-color: #ddd; }
.map-container iframe { display: block; filter: grayscale(100%) contrast(1.1); transition: filter 0.3s ease; }
.map-container iframe:hover { filter: grayscale(0%); }

/* Encryption */
.pgp-block { background: #E5E7EB; padding: 15px; margin: 10px 0 5px 0; border: 1px solid #9CA3AF; border-radius: 2px; }
.pgp-label { display: block; font-size: 0.7rem; font-weight: 700; color: #374151; margin-bottom: 6px; letter-spacing: 0.05em; }
.pgp-code { font-family: var(--font-mono); color: #000000; font-weight: 600; font-size: 0.9rem; display: block; word-break: break-all; }
.pgp-download-link { font-size: 0.85rem; color: var(--color-primary); text-decoration: none; font-weight: 600; display: inline-block; transition: color 0.2s; }
.pgp-download-link:hover { color: var(--color-primary-dark); text-decoration: underline; }

/* --- Forms --- */
.technical-form label { display: block; margin-bottom: 8px; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; color: var(--color-text-light); }
.req { color: #B91C1C; }
.technical-form input, .technical-form textarea { width: 100%; padding: 14px; background-color: #FFFFFF; border: 1px solid #999; color: var(--color-text-main); font-family: var(--font-main); margin-bottom: 0; transition: border-color 0.2s, box-shadow 0.2s; }
.technical-form input:focus, .technical-form textarea:focus { outline: none; border-color: var(--color-primary); background-color: #F9FAFB; box-shadow: 0 0 0 2px rgba(53, 79, 43, 0.1); }
.technical-form input.input-error, .technical-form textarea.input-error { border-color: #B91C1C; background-color: #FEF2F2; }
.technical-form input.input-error:focus, .technical-form textarea.input-error:focus { border-color: #B91C1C; box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.1); }
.field-error { color: #B91C1C; font-size: 0.8rem; margin-top: 6px; font-weight: 500; display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); margin-bottom: var(--space-md); }
.form-group { margin-bottom: var(--space-md); }
.form-legal { margin-bottom: var(--space-md); color: #666; font-size: 0.85rem; }
.btn-full { width: 100%; }
.form-status { margin-top: 10px; font-size: 0.9rem; font-weight: 600; text-align: center; min-height: 24px; }
.form-status.error { color: #B91C1C; }

/* Success Banner */
.success-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border: 3px solid var(--color-primary-dark);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-content {
    text-align: center;
    color: white;
    max-width: 500px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 4px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: white;
    margin: 0 auto var(--space-md);
    animation: checkmarkPop 0.6s ease-out 0.3s both;
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-content h3 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.01em;
}

.success-content p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: var(--space-sm);
    max-width: 100%;
}

.success-note {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    margin: var(--space-sm) 0;
}

.success-contact {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.success-contact p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
}

.success-email {
    display: inline-block;
    background-color: white;
    color: var(--color-primary-dark);
    padding: 12px 24px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.success-email:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- Footer --- */
.site-footer { background-color: #0F100E; color: #6B7280; padding: var(--space-md) 0; font-size: 0.85rem; border-top: 1px solid #333; }
.footer-inner { display: flex; justify-content: space-between; }

/* =========================================
   5. RESPONSIVE ADJUSTMENTS
   ========================================= */
@media (max-width: 768px) {
    .header-inner { flex-direction: column; gap: var(--space-sm); }
    .nav-list { gap: var(--space-sm); flex-wrap: wrap; justify-content: center; }
    .trust-layout, .contact-grid, .form-row { grid-template-columns: 1fr; }
    h1 { font-size: 2rem; }
    .section { padding: var(--space-lg) 0; }
    .service-card p { min-height: auto; }
    .map-container iframe { height: 180px; }
}

@media (max-width: 500px) {
    .office-registry-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    #tactical-board {
        /* Lower global opacity on mobile for better text contrast */
        opacity: 0.4 !important;
    }
}