/* ==========================================================================
   Effective AI — design system (dark)
   Tokens, base, layout primitives and components.
   See DESIGN_GUIDELINES.md. This file is the authoritative stylesheet;
   pages use the semantic classes below rather than the frozen Tailwind bundle.
   ========================================================================== */

:root {
    /* Ground & surfaces — one solid navy, no page gradient */
    --bg:        #0A1730;
    --bg-alt:    #0C1C3A;   /* faint band separation */
    --surface:   #10213F;
    --surface-2: #16294B;
    --line:      #23375C;
    --line-soft: rgba(255,255,255,.07);

    /* Text — near-white clarity layer */
    --text:      #EEF3FB;
    --text-soft: #A9B6CE;
    --muted:     #6E7E9E;

    /* Brand blue — used sparingly, flat */
    --blue:      #3B82F6;
    --blue-soft: #1E3A6B;

    /* Orange — the signal, ~10% */
    --orange:       #F97316;
    --orange-hover: #EA580C;

    /* Status (tuned for dark) */
    --pos: #34D399;
    --neg: #F87171;

    --radius-ctl: 8px;
    --radius-card: 12px;
    --shadow-card: 0 16px 40px rgba(0,0,0,.35);
    --maxw: 1200px;

    --font-body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-head: "Archivo", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: "Anton", "Archivo Narrow", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--bg);
    /* Atmosphere: faint engineering dot-grid + a single subtle blue depth wash.
       Texture, not a multi-stop page gradient. */
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,.038) 1px, transparent 0),
        radial-gradient(1100px 560px at 72% -8%, rgba(59,130,246,.07), transparent 62%);
    background-size: 34px 34px, 100% 100%;
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--orange); color: #fff; }

:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
    border-radius: 4px;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: var(--text); margin: 0; }

.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.text-orange { color: var(--orange); }
.text-blue { color: var(--blue); }

/* ---------- Layout primitives ------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 920px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) {
    .wrap, .wrap-narrow { padding: 0 32px; }
}

.section { padding: 80px 0; }
.section-sm { padding: 52px 0; }
@media (min-width: 768px) { .section { padding: 104px 0; } }

.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-alt { background: var(--bg-alt); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 600px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.split { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media (min-width: 920px) { .split { grid-template-columns: 7fr 5fr; gap: 56px; } }
.split-even { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: start; }
@media (min-width: 920px) { .split-even { grid-template-columns: 1fr 1fr; } }

.stack > * + * { margin-top: 24px; }

/* ---------- Type helpers ------------------------------------------------ */
.eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    font-family: var(--font-mono);
    text-transform: uppercase; letter-spacing: .18em; font-size: .72rem;
    font-weight: 500; color: var(--muted); margin: 0;
}
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--orange); display: inline-block; flex: none; }
.eyebrow.center { justify-content: center; }

.display {
    font-family: var(--font-display);
    font-weight: 400;
    text-transform: uppercase;
    font-size: clamp(2.7rem, 6.6vw, 5rem);
    line-height: .94; letter-spacing: .005em;
}
.h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 800; letter-spacing: -.03em; }
.h3 { font-size: 1.35rem; font-weight: 700; }
.accent { color: var(--orange); }

/* Oversized numeral / index device — the recurring industrial signature */
.idx { font-family: var(--font-display); font-weight: 400; color: var(--blue); line-height: .8; letter-spacing: .01em; }
.idx-lg { font-size: clamp(3rem, 6vw, 4.5rem); }

.lede { font-size: 1.2rem; line-height: 1.6; color: var(--text-soft); }
.lede-lg { font-size: 1.3rem; line-height: 1.55; color: var(--text-soft); }
.prose { color: var(--text-soft); }
.prose p + p { margin-top: 18px; }
.measure { max-width: 38rem; }

.section-head { max-width: 720px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 { margin-bottom: 14px; }
.section-head .sub { font-size: 1.15rem; color: var(--text-soft); margin: 0; }

/* ---------- Buttons ----------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 44px; padding: 0 20px; border-radius: var(--radius-ctl);
    font-family: var(--font-body); font-weight: 500; font-size: .95rem;
    cursor: pointer; border: 1px solid transparent;
    transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.btn-lg { height: 52px; padding: 0 26px; font-size: 1.02rem; }
.btn-sm { height: 40px; padding: 0 16px; font-size: .9rem; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-hover); }
.btn-secondary { background: transparent; border-color: var(--line); color: var(--text); }
.btn-secondary:hover { background: var(--surface-2); border-color: #34507F; }
.btn .arrow, .link .arrow { transition: transform .15s; }
.btn:hover .arrow, .link:hover .arrow { transform: translateX(3px); }

.link {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--blue); font-weight: 500; transition: color .15s;
}
.link:hover { color: #6AA0F8; }

/* ---------- Cards ------------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 30px;
}
.card-hover { transition: background .18s, border-color .18s, transform .18s; }
.card-hover:hover { background: var(--surface-2); border-color: #34507F; transform: translateY(-2px); }
a.card { display: block; color: inherit; }

.card h3 { margin-bottom: 12px; }
.card p { margin: 0; color: var(--text-soft); }

/* ---------- Icon tiles -------------------------------------------------- */
.icon-tile {
    width: 56px; height: 56px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(59,130,246,.12);
    border: 1px solid rgba(59,130,246,.28);
    flex: none;
}
.icon-tile img { width: 26px; height: 26px; filter: brightness(0) invert(1); }
.icon-tile.sm { width: 44px; height: 44px; border-radius: 10px; }
.icon-tile.sm img { width: 20px; height: 20px; }
.icon-tile.lg { width: 64px; height: 64px; border-radius: 14px; }
.icon-tile.lg img { width: 30px; height: 30px; }

/* ---------- Tags / pills ------------------------------------------------ */
.tag {
    display: inline-flex; align-items: center;
    padding: 5px 12px; border-radius: 6px;
    font-family: var(--font-mono);
    font-size: .68rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
    color: var(--text-soft); background: var(--surface-2); border: 1px solid var(--line);
}
.tag-accent { color: var(--orange); background: rgba(249,115,22,.1); border-color: rgba(249,115,22,.3); }

/* ---------- Check list -------------------------------------------------- */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks.cols { grid-template-columns: 1fr; }
@media (min-width: 700px) { .checks.cols { grid-template-columns: repeat(2, 1fr); } }
.checks li { position: relative; padding-left: 30px; color: var(--text-soft); font-size: .95rem; line-height: 1.5; }
.checks li::before {
    content: ""; position: absolute; left: 0; top: 1px;
    width: 18px; height: 18px; border-radius: 5px;
    background: rgba(249,115,22,.14); border: 1px solid rgba(249,115,22,.4);
}
.checks li::after {
    content: ""; position: absolute; left: 6px; top: 5px;
    width: 5px; height: 9px; border: solid var(--orange);
    border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ---------- Stats / KPI ------------------------------------------------- */
.kpi-num { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 4.6vw, 3.6rem); line-height: .9; letter-spacing: .01em; font-variant-numeric: tabular-nums; color: var(--text); }
.kpi-num .unit { color: var(--orange); }
.kpi-cap { font-family: var(--font-mono); color: var(--muted); font-size: .78rem; letter-spacing: .04em; margin-top: 12px; }

/* ---------- Numbered steps --------------------------------------------- */
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 22px; }
.step-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.step-num {
    width: 28px; height: 28px; border-radius: 999px; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: var(--blue-soft); border: 1px solid rgba(59,130,246,.4);
    color: #fff; font-size: .8rem; font-weight: 600; font-family: var(--font-display);
}
.step h4 { font-size: 1rem; }
.step p { margin: 0 0 0 40px; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.step .dur { display: block; margin: 8px 0 0 40px; color: var(--orange); font-family: var(--font-mono); font-size: .76rem; font-weight: 500; letter-spacing: .03em; }

/* ---------- Callouts ---------------------------------------------------- */
.callout { border-left: 2px solid var(--orange); padding-left: 24px; font-size: 1.2rem; line-height: 1.55; color: var(--text-soft); font-style: italic; }
.callout-box { background: var(--surface-2); border: 1px solid var(--line); border-left: 2px solid var(--orange); border-radius: var(--radius-card); padding: 18px 22px; color: var(--text-soft); font-style: italic; }

/* ---------- Feature row (services) ------------------------------------- */
.feature { display: flex; gap: 28px; align-items: flex-start; }
.feature .body { flex: 1; }
.feature h2 { margin-bottom: 14px; }
@media (max-width: 640px) { .feature { flex-direction: column; gap: 18px; } }

/* ---------- Team cards -------------------------------------------------- */
.team-card { text-align: center; }
.hex-photo, .hex-frame { clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); }
.hex-frame { padding: 3px; background: linear-gradient(160deg, var(--blue), var(--blue-soft)); width: 112px; height: 112px; margin: 0 auto 22px; }
.hex-photo { width: 100%; height: 100%; object-fit: cover; }
.team-card .role { color: var(--orange); font-size: .85rem; font-weight: 600; margin: 4px 0 14px; }
.team-card .bio { color: var(--text-soft); font-size: .88rem; line-height: 1.55; margin: 0; }

/* ---------- Footprint / flags ------------------------------------------ */
.flag-card { text-align: center; }
.flag-card img { width: 56px; height: 56px; object-fit: contain; margin: 0 auto 16px; }
.flag-card .place { font-weight: 600; color: var(--text); margin: 0 0 4px; }
.flag-card .role { color: var(--orange); font-size: .85rem; font-weight: 600; margin: 0 0 2px; }
.flag-card .region { color: var(--muted); font-size: .78rem; margin: 0; }

/* ---------- Logo wall --------------------------------------------------- */
.logo-wall { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 28px; }
@media (min-width: 768px) { .logo-wall { gap: 40px; } }
.logo-wall .logo-item { height: 40px; display: flex; align-items: center; opacity: .65; filter: grayscale(1) brightness(1.6); transition: opacity .2s, filter .2s; }
.logo-wall .logo-item:hover { opacity: 1; filter: grayscale(0) brightness(1); }
.logo-wall img { height: 100%; width: auto; object-fit: contain; max-width: 130px; }
.logo-wall .logo-item.boxed img { background: #fff; border-radius: 6px; padding: 4px; }

/* ---------- Page hero (inner pages) ------------------------------------ */
.page-hero { padding: 140px 0 56px; }
.page-hero .eyebrow { margin-bottom: 20px; }
.page-hero h1 { margin-bottom: 22px; }
.page-hero .lede { max-width: 46rem; }
@media (min-width: 768px) { .page-hero { padding: 164px 0 72px; } }

/* ---------- Home hero --------------------------------------------------- */
.home-hero { padding: 96px 0 64px; }
@media (min-width: 920px) { .home-hero { padding: 120px 0 96px; } }
.home-hero h1 { margin: 22px 0 0; }
.home-hero .lede { margin-top: 24px; max-width: 38rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.trust { margin-top: 44px; }
.trust-label { font-family: var(--font-mono); text-transform: uppercase; font-size: .72rem; letter-spacing: .16em; color: var(--muted); margin-bottom: 16px; }
.trust-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-family: var(--font-mono); font-weight: 500; font-size: .9rem; color: var(--text-soft); letter-spacing: .04em; }

/* Data artifact card */
.artifact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 26px; }
.artifact-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.artifact-title { font-weight: 600; font-size: .95rem; color: var(--text); font-family: var(--font-body); }
.artifact-tag { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 500; }
.artifact-sub { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.artifact-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.delta { display: inline-flex; align-items: baseline; gap: 6px; color: var(--orange); font-weight: 600; font-size: .95rem; }

/* Signature: hero data line draws itself in on load */
.draw-line { stroke-dasharray: 460; stroke-dashoffset: 460; animation: drawLine 1.6s cubic-bezier(.4,0,.2,1) .5s forwards; }
.draw-dot { opacity: 0; animation: fadeDot .4s ease-out 2s forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes fadeDot { to { opacity: 1; } }

/* ---------- Header / nav ------------------------------------------------ */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    background: rgba(10,23,48,.82);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.nav-logo img { height: 38px; }
.nav-links { display: none; align-items: center; gap: 30px; }
@media (min-width: 980px) { .nav-links { display: flex; } }
.nav-link { color: var(--text-soft); font-weight: 500; font-size: .95rem; transition: color .15s; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-toggle { display: inline-flex; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle img { width: 24px; height: 24px; filter: brightness(0) invert(1); }
@media (min-width: 980px) { .nav-toggle { display: none; } }
.mobile-menu { display: none; border-top: 1px solid var(--line); padding: 12px 0 18px; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 12px 0; color: var(--text-soft); font-weight: 500; }
.mobile-menu a:hover { color: var(--text); }
@media (min-width: 980px) { .mobile-menu { display: none !important; } }

/* ---------- Footer ------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 36px; color: var(--text-soft); }
.site-footer .cols { display: grid; grid-template-columns: 1fr; gap: 36px; margin-bottom: 40px; }
@media (min-width: 768px) { .site-footer .cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h4 { font-family: var(--font-body); font-size: .95rem; color: var(--text); margin: 0 0 16px; }
.site-footer img.flogo { height: 30px; margin-bottom: 16px; }
.site-footer .ftag { color: var(--text-soft); margin: 0; max-width: 30rem; }
.site-footer .flinks { display: grid; gap: 10px; }
.site-footer .flinks a { color: var(--text-soft); font-size: .95rem; transition: color .15s; }
.site-footer .flinks a:hover { color: var(--text); }
.social-btn { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line); transition: background .15s, border-color .15s; }
.social-btn:hover { background: var(--blue-soft); border-color: var(--blue); }
.social-btn img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
.acknowledgement { border-top: 1px solid var(--line); padding-top: 32px; text-align: center; max-width: 760px; margin: 0 auto; }
.acknowledgement h4 { margin-bottom: 8px; }
.acknowledgement p { font-size: .85rem; line-height: 1.6; color: var(--muted); margin: 0; }
.copyright { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 28px; text-align: center; color: var(--muted); font-size: .85rem; }
.legal-links { margin-top: 12px; display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.legal-links a { color: var(--muted); text-decoration: none; }
.legal-links a:hover { color: var(--text); }

/* ---------- Forms ------------------------------------------------------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 32px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: .85rem; font-weight: 500; color: var(--text-soft); margin-bottom: 8px; }
.field input, .field textarea {
    width: 100%; padding: 12px 14px;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-ctl);
    color: var(--text); font-family: var(--font-body); font-size: .95rem;
    transition: border-color .15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); }
.field textarea { resize: vertical; }

.contact-method { display: flex; align-items: flex-start; gap: 16px; }
.contact-method h3 { font-family: var(--font-body); font-size: 1rem; margin: 0 0 4px; color: var(--text); }
.contact-method p, .contact-method a { color: var(--text-soft); margin: 0; }
.contact-method a:hover { color: var(--blue); }

/* ---------- Motion ------------------------------------------------------ */
.animate-fade-in { opacity: 0; transform: translateY(16px); animation: fadeInUp .7s cubic-bezier(.2,0,0,1) forwards; }
.animate-on-scroll { opacity: 0; transform: translateY(24px); transition: opacity .6s cubic-bezier(.2,0,0,1), transform .6s cubic-bezier(.2,0,0,1); }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .animate-fade-in, .animate-on-scroll { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
    .btn, .link, .card-hover { transition: none !important; }
    .draw-line { stroke-dashoffset: 0 !important; animation: none !important; }
    .draw-dot { opacity: 1 !important; animation: none !important; }
}
