/*
 * E-3 Systems Design System
 *
 * Business IT Solutions. Designed for Reliability.
 *
 * This file defines the common visual language used throughout
 * the custom E-3 Systems WordPress theme.
 */


/* ==========================================================
   1. BRAND TOKENS
   ========================================================== */

:root {
    /*
     * Official brand colors
     */
    --e3-navy-950: #03172f;
    --e3-navy-900: #052954;
    --e3-navy-800: #07376d;
    --e3-navy-700: #0a4787;

    --e3-blue-700: #0a4f91;
    --e3-blue-600: #0e5aa7;
    --e3-blue-500: #1774c6;
    --e3-blue-300: #8fc4f2;
    --e3-blue-100: #dcecff;
    --e3-blue-050: #eff6fc;

    --e3-red-700: #920f18;
    --e3-red-600: #b0121c;
    --e3-red-500: #d71920;
    --e3-red-100: #f9dfe1;

    /*
     * Neutral colors
     */
    --e3-ink-950: #111827;
    --e3-ink-900: #172033;
    --e3-ink-700: #334155;
    --e3-ink-600: #475569;
    --e3-ink-500: #64748b;

    --e3-gray-300: #cbd5e1;
    --e3-gray-200: #dce3ec;
    --e3-gray-100: #edf1f6;
    --e3-gray-050: #f5f7fa;

    --e3-white: #ffffff;

    /*
     * Semantic colors
     */
    --e3-success: #167346;
    --e3-warning: #8a5a00;
    --e3-danger: var(--e3-red-600);

    /*
     * Typography
     */
    --e3-font-heading:
        Montserrat,
        "Segoe UI",
        Arial,
        sans-serif;

    --e3-font-body:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    /*
     * Type scale
     */
    --e3-text-xs: 0.78rem;
    --e3-text-sm: 0.9rem;
    --e3-text-base: 1rem;
    --e3-text-md: 1.1rem;
    --e3-text-lg: 1.25rem;
    --e3-text-xl: 1.5rem;

    /*
     * Spacing scale
     */
    --e3-space-1: 0.25rem;
    --e3-space-2: 0.5rem;
    --e3-space-3: 0.75rem;
    --e3-space-4: 1rem;
    --e3-space-5: 1.25rem;
    --e3-space-6: 1.5rem;
    --e3-space-8: 2rem;
    --e3-space-10: 2.5rem;
    --e3-space-12: 3rem;
    --e3-space-16: 4rem;
    --e3-space-20: 5rem;
    --e3-space-24: 6rem;

    /*
     * Radius
     */
    --e3-radius-sm: 8px;
    --e3-radius-md: 14px;
    --e3-radius-lg: 20px;
    --e3-radius-xl: 28px;
    --e3-radius-pill: 999px;

    /*
     * Shadows
     */
    --e3-shadow-sm:
        0 5px 18px rgba(5, 41, 84, 0.06);

    --e3-shadow-md:
        0 14px 36px rgba(5, 41, 84, 0.10);

    --e3-shadow-lg:
        0 24px 60px rgba(5, 41, 84, 0.16);

    /*
     * Animation
     */
    --e3-transition-fast: 150ms ease;
    --e3-transition-normal: 220ms ease;

    /*
     * Layout
     */
    --e3-content-width: 1180px;
    --e3-reading-width: 820px;
}


/* ==========================================================
   2. TYPOGRAPHY
   ========================================================== */

body {
    color: var(--e3-ink-900);
    background: var(--e3-white);
    font-family: var(--e3-font-body);
    font-size: 17px;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--e3-navy-900);
    font-family: var(--e3-font-heading);
    font-weight: 800;
    text-wrap: balance;
}

h1 {
    letter-spacing: -0.045em;
}

h2 {
    letter-spacing: -0.035em;
}

h3 {
    letter-spacing: -0.015em;
}

p,
li {
    color: var(--e3-ink-700);
}

.e3-lead,
.e3-section-heading > p,
.e3-page-intro > p {
    color: var(--e3-ink-600);
    font-size: clamp(1.08rem, 2vw, 1.28rem);
    line-height: 1.75;
}


/* ==========================================================
   3. LINKS AND FOCUS STATES
   ========================================================== */

a {
    color: var(--e3-blue-700);
    transition:
        color var(--e3-transition-fast),
        background-color var(--e3-transition-fast),
        border-color var(--e3-transition-fast),
        transform var(--e3-transition-fast);
}

a:hover {
    color: var(--e3-red-600);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--e3-blue-300);
    outline-offset: 3px;
}


/* ==========================================================
   4. SECTION KICKERS
   ========================================================== */

.e3-kicker {
    display: block;
    margin-bottom: var(--e3-space-4);
    color: var(--e3-blue-700);
    font-family: var(--e3-font-heading);
    font-size: var(--e3-text-xs);
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.4;
    text-transform: uppercase;
}

.e3-section .e3-kicker,
.e3-content .e3-kicker,
.e3-page-intro .e3-kicker {
    color: var(--e3-blue-700);
}

.e3-section .e3-kicker::after,
.e3-content .e3-kicker::after,
.e3-page-intro .e3-kicker::after {
    display: block;
    width: 44px;
    height: 3px;
    margin-top: 11px;
    background: var(--e3-red-600);
    border-radius: var(--e3-radius-pill);
    content: "";
}

.e3-hero .e3-kicker,
.e3-section-dark .e3-kicker {
    color: #c9e2ff;
}

.e3-hero .e3-kicker::after,
.e3-section-dark .e3-kicker::after {
    background: var(--e3-red-500);
}


/* ==========================================================
   5. BUTTON SYSTEM
   ========================================================== */

.e3-button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: var(--e3-space-2);
    padding: 13px 24px;
    border: 2px solid transparent;
    border-radius: var(--e3-radius-pill);
    font-family: var(--e3-font-heading);
    font-size: var(--e3-text-sm);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform var(--e3-transition-normal),
        box-shadow var(--e3-transition-normal),
        background-color var(--e3-transition-normal),
        border-color var(--e3-transition-normal),
        color var(--e3-transition-normal);
}

.e3-button:hover {
    transform: translateY(-2px);
}

.e3-button:active {
    transform: translateY(0);
}

.e3-button-primary {
    color: var(--e3-white);
    background: var(--e3-red-600);
    box-shadow:
        0 8px 20px rgba(176, 18, 28, 0.24);
}

.e3-button-primary:hover {
    color: var(--e3-white);
    background: var(--e3-red-700);
    box-shadow:
        0 12px 26px rgba(176, 18, 28, 0.30);
}

.e3-button-light {
    color: var(--e3-navy-900);
    background: var(--e3-white);
    box-shadow: var(--e3-shadow-sm);
}

.e3-button-light:hover {
    color: var(--e3-navy-950);
    background: var(--e3-blue-050);
}

.e3-button-outline {
    color: var(--e3-white);
    border-color: rgba(255, 255, 255, 0.64);
    background: transparent;
}

.e3-button-outline:hover {
    color: var(--e3-navy-900);
    border-color: var(--e3-white);
    background: var(--e3-white);
}


/* ==========================================================
   6. CARD SYSTEM
   ========================================================== */

.e3-card,
.e3-process-card,
.e3-download-card {
    border: 1px solid var(--e3-gray-200);
    background: var(--e3-white);
    border-radius: var(--e3-radius-lg);
    box-shadow: var(--e3-shadow-sm);
}

.e3-card {
    padding: clamp(26px, 4vw, 36px);
}

.e3-card h3,
.e3-process-card h3,
.e3-download-card h3 {
    color: var(--e3-navy-900);
}

.e3-card p,
.e3-process-card p,
.e3-download-card p {
    color: var(--e3-ink-600);
}

.e3-service-card {
    border-top: 4px solid var(--e3-blue-600);
}

.e3-service-card:hover {
    border-color: var(--e3-blue-500);
    box-shadow: var(--e3-shadow-md);
}

.e3-card-number {
    background: var(--e3-red-600);
}


/* ==========================================================
   7. FEATURE PANELS
   ========================================================== */

.e3-feature-panel {
    border-left: 5px solid var(--e3-red-600);
    background: var(--e3-blue-050);
}

.e3-feature-panel h3 {
    color: var(--e3-navy-900);
}

.e3-feature-panel p {
    color: var(--e3-ink-600);
}


/* ==========================================================
   8. LAYOUT AND SECTION RHYTHM
   ========================================================== */

.e3-container {
    width: min(
        calc(100% - 40px),
        var(--e3-content-width)
    );
}

.e3-section {
    padding-block: clamp(
        var(--e3-space-16),
        8vw,
        var(--e3-space-24)
    );
}

.e3-section-soft {
    background: var(--e3-gray-050);
}

.e3-section-heading {
    max-width: 780px;
    margin-bottom: clamp(
        var(--e3-space-10),
        5vw,
        var(--e3-space-16)
    );
}

.e3-content {
    color: var(--e3-ink-700);
}

.e3-content > p,
.e3-content > ul,
.e3-content > ol,
.e3-content > h2,
.e3-content > h3 {
    max-width: var(--e3-reading-width);
}


/* ==========================================================
   9. HEADER AND NAVIGATION
   ========================================================== */

.site-header {
    border-bottom-color: rgba(203, 213, 225, 0.8);
    background: rgba(255, 255, 255, 0.96);
}

.e3-menu a {
    color: var(--e3-navy-900);
}

.e3-menu a:hover,
.e3-menu .current-menu-item > a {
    color: var(--e3-red-600);
}


/* ==========================================================
   10. HERO
   ========================================================== */

.e3-hero {
    background:
        radial-gradient(
            circle at 82% 18%,
            rgba(23, 116, 198, 0.78),
            transparent 36%
        ),
        linear-gradient(
            135deg,
            var(--e3-navy-950) 0%,
            var(--e3-navy-900) 62%,
            var(--e3-navy-700) 100%
        );
}

.e3-hero h1 {
    color: var(--e3-white);
}

.e3-hero-copy {
    color: #dcecff;
}


/* ==========================================================
   11. DARK SECTIONS
   ========================================================== */

.e3-section-dark {
    color: var(--e3-white);
    background:
        linear-gradient(
            140deg,
            var(--e3-navy-950),
            var(--e3-navy-900)
        );
}

.e3-section-dark h2,
.e3-section-dark h3 {
    color: var(--e3-white);
}

.e3-section-dark p {
    color: #c9d9ec;
}


/* ==========================================================
   12. NOTICES AND STATUS LABELS
   ========================================================== */

.e3-notice {
    color: #5f4300;
    border-color: #e5c662;
    background: #fff8dc;
}

.e3-status-label {
    color: var(--e3-red-700);
    border-color: rgba(176, 18, 28, 0.30);
    background: rgba(176, 18, 28, 0.08);
}


/* ==========================================================
   13. REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* ==========================================================
   14. RESPONSIVE REFINEMENTS
   ========================================================== */

@media (max-width: 900px) {
    .e3-container {
        width: min(
            calc(100% - 32px),
            var(--e3-content-width)
        );
    }
}

@media (max-width: 620px) {
    body {
        font-size: 16px;
    }

    .e3-container {
        width: min(
            calc(100% - 26px),
            var(--e3-content-width)
        );
    }

    .e3-button {
        min-height: 50px;
        padding-inline: 20px;
    }

    .e3-kicker {
        letter-spacing: 0.12em;
    }
}


/* ==========================================================
   PHASE 10 — HOMEPAGE VISUAL POLISH
   ========================================================== */

.e3-headline-accent {
    color: var(--e3-red-500);
}

.e3-button-icon {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.e3-home-services {
    background: var(--e3-white);
}

.e3-service-showcase {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.e3-service-feature {
    position: relative;
    min-height: 315px;
    padding: 30px 22px;
    text-align: center;
    border: 1px solid var(--e3-gray-200);
    background: var(--e3-white);
    border-radius: var(--e3-radius-md);
    box-shadow: var(--e3-shadow-sm);
    transition:
        transform var(--e3-transition-normal),
        box-shadow var(--e3-transition-normal),
        border-color var(--e3-transition-normal);
}

.e3-service-feature:hover {
    transform: translateY(-6px);
    border-color: var(--e3-blue-300);
    box-shadow: var(--e3-shadow-md);
}

.e3-service-icon {
    display: flex;
    width: 68px;
    height: 68px;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--e3-blue-600);
}

.e3-service-icon svg {
    width: 64px;
    height: 64px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.e3-service-feature h3 {
    min-height: 56px;
    margin-bottom: 11px;
    font-size: 1.08rem;
    line-height: 1.25;
}

.e3-service-rule {
    display: block;
    width: 32px;
    height: 3px;
    margin: 0 auto 17px;
    background: var(--e3-red-500);
    border-radius: var(--e3-radius-pill);
}

.e3-service-feature p {
    margin-bottom: 0;
    color: var(--e3-ink-600);
    font-size: 0.93rem;
    line-height: 1.65;
}

.e3-trust-strip {
    padding: 30px 0;
    background:
        linear-gradient(
            120deg,
            var(--e3-navy-950),
            var(--e3-navy-900)
        );
}

.e3-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.e3-trust-item {
    display: flex;
    min-height: 76px;
    align-items: center;
    gap: 18px;
    padding: 0 28px;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.e3-trust-item:last-child {
    border-right: 0;
}

.e3-trust-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    color: #62b5f5;
}

.e3-trust-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.e3-trust-item strong {
    display: block;
    margin-bottom: 3px;
    color: var(--e3-white);
    font-family: var(--e3-font-heading);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

.e3-trust-item span {
    display: block;
    color: #cedced;
    font-size: 0.93rem;
}

@media (max-width: 1120px) {
    .e3-service-showcase {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .e3-trust-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 25px;
    }

    .e3-trust-item:nth-child(2) {
        border-right: 0;
    }
}

@media (max-width: 720px) {
    .e3-service-showcase {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .e3-trust-grid {
        grid-template-columns: 1fr;
    }

    .e3-trust-item {
        border-right: 0;
    }
}

@media (max-width: 480px) {
    .e3-service-showcase {
        grid-template-columns: 1fr;
    }

    .e3-service-feature {
        min-height: auto;
    }
}


/* ==========================================================
   PHASE 11 — FOOTER REDESIGN
   ========================================================== */

.site-footer {
    padding: 78px 0 28px;
    color: #cbd9e9;
    background:
        radial-gradient(
            circle at 15% 0,
            rgba(14, 90, 167, 0.30),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            var(--e3-navy-950),
            #020f20
        );
}

.e3-footer-main {
    display: grid;
    grid-template-columns:
        minmax(280px, 1.55fr)
        minmax(150px, 0.75fr)
        minmax(150px, 0.75fr)
        minmax(220px, 0.95fr);
    gap: clamp(34px, 5vw, 72px);
}

.e3-footer-logo {
    display: block;
    width: 128px;
    margin-bottom: 28px;
}

.e3-footer-logo img {
    display: block;
    width: 100%;
    height: auto;
    filter:
        brightness(0)
        invert(1);
}

.e3-footer-brand h2 {
    max-width: 520px;
    margin-bottom: 20px;
    color: var(--e3-white);
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    line-height: 1.12;
}

.e3-footer-brand p {
    max-width: 530px;
    margin-bottom: 0;
    color: #bfd0e3;
}

.e3-footer-column h3 {
    margin-bottom: 22px;
    color: var(--e3-white);
    font-size: 0.93rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.e3-footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.e3-footer-links li {
    margin-bottom: 12px;
}

.e3-footer-links a {
    color: #cbd9e9;
    text-decoration: none;
}

.e3-footer-links a:hover {
    color: var(--e3-white);
}

.e3-footer-location {
    margin-bottom: 18px;
    color: #cbd9e9;
}

.e3-footer-phone {
    display: block;
    margin-bottom: 24px;
    color: var(--e3-white);
    font-family: var(--e3-font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
}

.e3-footer-phone:hover {
    color: #9dcfff;
}

.e3-footer-contact .e3-button {
    min-height: 48px;
    padding-inline: 21px;
}

.e3-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 65px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.e3-footer-bottom p {
    margin: 0;
    color: #91a7c0;
    font-size: 0.88rem;
}

@media (max-width: 980px) {
    .e3-footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .site-footer {
        padding-top: 62px;
    }

    .e3-footer-main {
        grid-template-columns: 1fr;
    }

    .e3-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 48px;
    }
}


/* ==========================================================
   CONTACT CALLOUT CONTRAST FIX
   ========================================================== */

.e3-callout {
    color: #ffffff;
}

.e3-callout h2,
.e3-callout h3 {
    color: #ffffff;
}

.e3-callout p,
.e3-callout li {
    color: #dce8f5;
}

.e3-callout a:not(.e3-button) {
    color: #ffffff;
}


/* ==========================================================
   CONTACT CALLOUT CONTRAST FIX
   ========================================================== */

.e3-callout {
    color: #ffffff;
}

.e3-callout h2,
.e3-callout h3 {
    color: #ffffff;
}

.e3-callout p,
.e3-callout li {
    color: #dce8f5;
}

.e3-callout a:not(.e3-button) {
    color: #ffffff;
}




/* ==========================================================
   E-3 HOMEPAGE HERO — ENTERPRISE IMAGE
   ========================================================== */

.e3-hero {
    position: relative;
    display: flex;
    min-height: 640px;
    align-items: center;
    overflow: hidden;
    background:
        linear-gradient(
            90deg,
            rgba(3, 23, 47, 0.97) 0%,
            rgba(3, 23, 47, 0.92) 35%,
            rgba(3, 23, 47, 0.48) 58%,
            rgba(3, 23, 47, 0.08) 100%
        ),
        url("../images/hero-enterprise_c.png")
        center right / cover no-repeat;
}

.e3-hero-grid {
    grid-template-columns: minmax(0, 760px) 1fr;
    align-items: center;
}

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

/*
 * The enterprise equipment is already contained in the
 * background artwork, so hide the old network-diagram SVG.
 */
.e3-hero-illustration,
.e3-hero-logo {
    display: none;
}

.e3-hero h1 {
    max-width: 760px;
}

.e3-hero-copy {
    max-width: 700px;
}

@media (max-width: 900px) {
    .e3-hero {
        min-height: 620px;
        background-position: 66% center;
    }

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

    .e3-hero-content {
        max-width: 680px;
    }
}

@media (max-width: 620px) {
    .e3-hero {
        min-height: auto;
        padding-block: 82px;
        background:
            linear-gradient(
                90deg,
                rgba(3, 23, 47, 0.97) 0%,
                rgba(3, 23, 47, 0.93) 100%
            ),
            url("../images/hero-enterprise_c.png")
            68% center / cover no-repeat;
    }
}


/* ==========================================================
   E-3 HERO LAYOUT REFINEMENT
   ========================================================== */

.e3-hero {
    min-height: 610px;
    padding-block: 58px 64px;
    background-position: center right;
}

.e3-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 52%) minmax(0, 48%);
    align-items: center;
}

.e3-hero-content {
    max-width: 720px;
}

.e3-hero h1 {
    max-width: 720px;
    margin-bottom: 24px;
    font-size: clamp(3.1rem, 4.7vw, 4.65rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.e3-hero-copy {
    max-width: 625px;
    margin-bottom: 30px;
    font-size: clamp(1.05rem, 1.45vw, 1.18rem);
    line-height: 1.65;
}

.e3-hero .e3-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 0;
}

@media (max-width: 1050px) {
    .e3-hero {
        min-height: 600px;
        background-position: 63% center;
    }

    .e3-hero-grid {
        grid-template-columns: minmax(0, 60%) minmax(0, 40%);
    }

    .e3-hero h1 {
        font-size: clamp(2.9rem, 5.6vw, 4.2rem);
    }
}

@media (max-width: 760px) {
    .e3-hero {
        min-height: auto;
        padding-block: 72px;
        background-position: 67% center;
    }

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

    .e3-hero-content {
        max-width: 100%;
    }

    .e3-hero h1 {
        font-size: clamp(2.65rem, 11vw, 4rem);
    }

    .e3-hero-copy {
        max-width: 100%;
    }
}
