/* =========================================================================
   AegisUA — shared stylesheet
   A Geminexus brand. Built on the Geminexus "services" design system
   (Unbounded · IBM Plex Sans · JetBrains Mono) with the AegisUA teal identity.
   Dependency-free, accessible (WCAG 2.1 AA), bilingual (UK / EN).
   ========================================================================= */

:root {
    --accent:        #0E5A4E;  /* deep teal  — links & accents on light */
    --accent-bright: #16A38C;  /* bright teal — hero accents, buttons   */
    --accent-deep:   #0a3f37;
    --bg:            #fbfbf9;
    --surface:       #ffffff;
    --surface-2:     #f3f5f1;
    --ink:           #14181c;
    --ink-soft:      #4a5258;
    --ink-faint:     #6b7178;
    --rule:          #e4e2dc;
    --hero-bg:       #14181c;
    --hero-bg-2:     #181d22;
    --maxw:          1040px;
    --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --display: 'Unbounded', var(--sans);
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }

body {
    font-family: var(--sans);
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a { color: inherit; }
img, svg { display: block; max-width: 100%; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.lang-only { } /* visually identical span hook for foreign-script terms */

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
}
.skip-link:focus {
    position: fixed;
    left: 12px;
    top: 12px;
    z-index: 200;
    padding: 10px 18px;
    background: var(--accent-bright);
    color: #06120f;
    text-decoration: none;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.86rem;
    font-weight: 500;
}

/* ====================== STICKY TOPBAR ====================== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(20, 24, 28, 0.92);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    height: 60px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
}
.brand svg { width: 26px; height: 26px; }
.brand .wordmark {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.16rem;
    letter-spacing: -0.01em;
    color: #fff;
}
.topnav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    font-size: 0.92rem;
}
.topnav a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
}
.topnav a:hover { color: #fff; }
.topnav a.active { color: var(--accent-bright); }

.lang-switch {
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.lang-switch a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: color 0.15s;
    padding: 2px 2px;
}
.lang-switch a:hover { color: var(--accent-bright); }
.lang-switch .current,
.lang-switch .current:hover { color: rgba(255, 255, 255, 0.55); cursor: default; }
.lang-switch .sep { color: rgba(255, 255, 255, 0.25); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 5px;
    padding: 11px 20px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.btn-primary { background: var(--accent-bright); color: #06120f; }
.btn-primary:hover { background: #1cc0a4; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.btn-ghost:hover { border-color: var(--accent-bright); color: var(--accent-bright); }
.btn-sm { padding: 8px 16px; font-size: 0.88rem; }
.topbar .btn { flex-shrink: 0; }

/* ====================== HERO ====================== */
.hero {
    background:
        radial-gradient(900px 360px at 88% -8%, rgba(22, 163, 140, 0.22), transparent 60%),
        linear-gradient(180deg, var(--hero-bg-2), var(--hero-bg));
    color: #fff;
    padding: 84px 0 76px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 34px 34px;
    pointer-events: none;
    mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 92%);
}
.hero-inner { position: relative; max-width: 820px; }

.eyebrow {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent-bright);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.eyebrow::before {
    content: '';
    width: 26px;
    height: 1px;
    background: var(--accent-bright);
    flex-shrink: 0;
}
.hero h1 {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2.1rem, 5.2vw, 3.35rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    max-width: 16ch;
}
.hero .subtitle {
    font-size: 1.14rem;
    color: rgba(255, 255, 255, 0.74);
    max-width: 60ch;
    line-height: 1.6;
    margin-bottom: 34px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.trustline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 26px;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.02em;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 22px;
}
.trustline span { display: inline-flex; align-items: center; gap: 8px; }
.trustline span::before {
    content: '';
    width: 5px; height: 5px;
    background: var(--accent-bright);
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* ====================== MAIN / SECTIONS ====================== */
main { display: block; }
.section { padding: 76px 0; border-bottom: 1px solid var(--rule); }
.section:last-of-type { border-bottom: none; }
.section.alt { background: var(--surface-2); }

.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-label {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--accent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-head.center .section-label { justify-content: center; }
.section-label::before {
    content: '';
    width: 24px; height: 1px; background: var(--accent);
}
.section-title {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(1.5rem, 3.2vw, 2.05rem);
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin-bottom: 16px;
}
.section-sub {
    font-size: 1.06rem;
    color: var(--ink-soft);
    line-height: 1.6;
}

/* ---------- Lead (intro section) ---------- */
.lead {
    font-size: 1.22rem;
    line-height: 1.6;
    color: var(--ink);
    max-width: 760px;
}
.lead strong { color: var(--accent); font-weight: 600; }
.lead a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(14, 90, 78, 0.4);
    text-underline-offset: 3px;
}
.lead a:hover { text-decoration-color: var(--accent); }

/* ---------- Dual-audience paths ---------- */
.paths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 40px; }
.path {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 30px 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.path .path-tag {
    font-family: var(--mono);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
}
.path h3 {
    font-family: var(--display);
    font-weight: 500;
    font-size: 1.24rem;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.path p { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.55; }

/* ---------- Cards (service pillars / how-we-work) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 30px 26px;
    display: flex;
    flex-direction: column;
}
.card .tag {
    font-family: var(--mono);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 14px;
    display: inline-block;
}
.card h3 {
    font-family: var(--display);
    font-weight: 500;
    font-size: 1.18rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 12px;
}
.card > p { color: var(--ink-soft); font-size: 0.97rem; line-height: 1.55; margin-bottom: 16px; }
.card ul { list-style: none; margin-top: auto; }
.card ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 9px;
    font-size: 0.93rem;
    line-height: 1.5;
    color: var(--ink-soft);
}
.card ul li:last-child { margin-bottom: 0; }
.card ul li::before {
    content: '';
    position: absolute;
    left: 2px; top: 0.55em;
    width: 8px; height: 8px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg) translateY(-2px);
}

/* ---------- Sectors grid ---------- */
.sectors {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 8px;
    overflow: hidden;
}
.sector {
    background: var(--surface);
    padding: 26px 26px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sector .ico {
    width: 30px; height: 30px;
    color: var(--accent);
    margin-bottom: 6px;
}
.sector h3 {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ink);
}
.sector p { color: var(--ink-soft); font-size: 0.94rem; line-height: 1.55; }
.sector.wide { grid-column: 1 / -1; }
.sector .badge {
    align-self: flex-start;
    margin-top: 4px;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(22, 163, 140, 0.1);
    border: 1px solid rgba(22, 163, 140, 0.28);
    padding: 3px 9px;
    border-radius: 999px;
}

/* ---------- Process steps ---------- */
.steps { list-style: none; counter-reset: step; }
.steps > li {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 22px;
    padding: 24px 0;
    border-bottom: 1px solid var(--rule);
}
.steps > li:last-child { border-bottom: none; }
.steps .step-num {
    font-family: var(--display);
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--accent);
    width: 46px; height: 46px;
    border: 1px solid var(--rule);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.steps h3 {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 1.08rem;
    color: var(--ink);
    margin-bottom: 6px;
}
.steps p { color: var(--ink-soft); font-size: 0.97rem; line-height: 1.55; }

/* ---------- Why / checklist grid ---------- */
.why {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 8px;
    overflow: hidden;
}
.why li {
    background: var(--surface);
    padding: 22px 24px 22px 50px;
    font-size: 0.98rem;
    line-height: 1.5;
    color: var(--ink-soft);
    position: relative;
}
.why li strong { color: var(--ink); font-weight: 600; }
.why li::before {
    content: '';
    position: absolute;
    left: 24px; top: 25px;
    width: 9px; height: 9px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
}

/* ---------- Callout ---------- */
.callout {
    color: var(--ink-soft);
    line-height: 1.6;
    font-size: 1rem;
    padding: 24px 26px;
    background: var(--surface);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    margin-top: 36px;
}
.callout strong { color: var(--ink); font-weight: 600; }

/* ---------- Stat strip ---------- */
.stats {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 40px;
}
.stats li { background: var(--surface); padding: 26px 22px; text-align: center; }
.stats .n {
    font-family: var(--display);
    font-weight: 500;
    font-size: 1.7rem;
    letter-spacing: -0.01em;
    color: var(--accent);
    display: block;
    margin-bottom: 6px;
}
.stats .t { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.4; }

/* ---------- FAQ ---------- */
.faq { list-style: none; border-top: 1px solid var(--rule); max-width: 820px; }
.faq > li { border-bottom: 1px solid var(--rule); }
.faq summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 0;
    cursor: pointer;
    list-style: none;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 1.06rem;
    color: var(--ink);
    line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .chevron {
    margin-left: auto;
    flex-shrink: 0;
    color: var(--ink-faint);
    transition: transform 0.18s, color 0.18s;
}
.faq summary:hover { color: var(--accent); }
.faq summary:hover .chevron { color: var(--accent); }
.faq details[open] .chevron { transform: rotate(180deg); }
.faq .answer { padding: 0 0 24px; color: var(--ink-soft); font-size: 0.99rem; line-height: 1.65; max-width: 70ch; }
.faq .answer a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- CTA block ---------- */
.cta-block {
    background:
        radial-gradient(420px 240px at 92% 0%, rgba(22, 163, 140, 0.28), transparent 65%),
        var(--ink);
    color: #fff;
    padding: 56px 46px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}
.cta-block h2 {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.015em;
    margin-bottom: 14px;
    max-width: 18ch;
}
.cta-block p {
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.06rem;
    line-height: 1.6;
    max-width: 56ch;
    margin-bottom: 30px;
}
.contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.contact-grid a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 0.92rem;
    color: #fff;
    text-decoration: none;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.contact-grid a:hover { background: var(--accent-bright); border-color: var(--accent-bright); color: #06120f; }
.contact-grid a.primary { background: var(--accent-bright); border-color: var(--accent-bright); color: #06120f; font-weight: 600; }
.contact-grid a.primary:hover { background: #1cc0a4; }
.contact-grid svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ====================== FOOTER ====================== */
footer.site {
    background: var(--hero-bg);
    color: rgba(255, 255, 255, 0.7);
    padding: 56px 0 40px;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 0.92rem; line-height: 1.6; color: rgba(255, 255, 255, 0.6); max-width: 38ch; }
.footer-col h2 {
    font-family: var(--mono);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
    font-weight: 500;
}
.footer-col a, .footer-col span {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.92rem;
    margin-bottom: 10px;
    transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent-bright); }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    align-items: center;
    padding-top: 26px;
    font-family: var(--mono);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.02em;
}
.footer-bottom .lang-switch { color: rgba(255, 255, 255, 0.5); }

/* ====================== FOCUS / MOTION ====================== */
a:focus-visible, button:focus-visible, summary:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--accent-bright);
    outline-offset: 3px;
    border-radius: 3px;
}
.topbar a:focus-visible, .hero a:focus-visible, .btn:focus-visible,
.cta-block a:focus-visible, footer.site a:focus-visible {
    outline-color: #fff;
}

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

/* ====================== RESPONSIVE ====================== */
@media (max-width: 900px) {
    .footer-top { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
    .topnav { display: none; }
    .cards, .cards.two { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
    html { scroll-padding-top: 64px; }
    .topbar-inner { height: 56px; gap: 12px; }
    .brand .wordmark { font-size: 1.05rem; }
    .section { padding: 56px 0; }
    .hero { padding: 60px 0 56px; }
    .paths, .sectors, .why { grid-template-columns: 1fr; }
    .cta-block { padding: 40px 26px; }
    .steps > li { grid-template-columns: 42px 1fr; gap: 16px; }
    .steps .step-num { width: 38px; height: 38px; font-size: 0.95rem; }
    .lead { font-size: 1.1rem; }
}
@media (max-width: 420px) {
    .stats { grid-template-columns: 1fr; }
}
