/* ==========================================================================
   OmnixNexus — Corporate Design System
   Palette derived from the OmnixNexus logo: deep navy, teal, gold accents,
   complemented with sophisticated neutrals.
   ========================================================================== */

:root {
    /* Brand */
    --on-navy: #0F2C52;
    --on-navy-900: #0A1F3C;
    --on-navy-700: #14396B;
    --on-teal: #2A9D8F;
    --on-teal-deep: #1F7A8C;
    --on-gold: #E9A100;
    --on-gold-soft: #F4C33D;
    --on-slate: #457B9D;

    /* Neutrals */
    --on-ink: #14181F;
    --on-body: #313A46;
    --on-muted: #6A7382;
    --on-line: #E4E8EE;
    --on-cloud: #F5F7FA;
    --on-cloud-2: #EEF2F7;
    --on-white: #FFFFFF;

    /* Typography */
    --on-font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
    --on-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* System */
    --on-container: 1200px;
    --on-radius: 6px;
    --on-radius-lg: 10px;
    --on-shadow-sm: 0 1px 3px rgba(15, 44, 82, 0.06), 0 1px 2px rgba(15, 44, 82, 0.04);
    --on-shadow: 0 10px 30px rgba(15, 44, 82, 0.08);
    --on-shadow-lg: 0 24px 60px rgba(15, 44, 82, 0.14);
    --on-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--on-font-body);
    color: var(--on-body);
    background: var(--on-white);
    margin: 0;
    line-height: 1.65;
    font-size: 1.02rem;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .display {
    font-family: var(--on-font-head);
    color: var(--on-navy);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.01em;
    margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }

p { margin: 0 0 1.1rem; }

a { color: var(--on-teal-deep); text-decoration: none; transition: color 0.2s var(--on-ease); }
a:hover { color: var(--on-navy); }

img { max-width: 100%; height: auto; }

.container-on {
    width: 100%;
    max-width: var(--on-container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }

.eyebrow {
    font-family: var(--on-font-body);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--on-teal-deep);
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--on-gold);
    display: inline-block;
}

.lead { font-size: 1.18rem; color: var(--on-muted); max-width: 62ch; }

.section-head { max-width: 760px; margin-bottom: 3rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.text-gold { color: var(--on-gold); }
.text-teal { color: var(--on-teal); }
.bg-cloud { background: var(--on-cloud); }
.bg-navy { background: var(--on-navy); color: rgba(255,255,255,0.85); }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }

/* ------------------------- Buttons ------------------------- */
.btn-on {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--on-font-body);
    font-weight: 600;
    font-size: 0.98rem;
    padding: 0.85rem 1.7rem;
    border-radius: var(--on-radius);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.25s var(--on-ease);
    line-height: 1;
    text-decoration: none;
}
.btn-primary-on { background: var(--on-navy); color: #fff; }
.btn-primary-on:hover { background: var(--on-navy-900); color: #fff; transform: translateY(-2px); box-shadow: var(--on-shadow); }
.btn-gold-on { background: var(--on-gold); color: var(--on-navy); }
.btn-gold-on:hover { background: var(--on-gold-soft); color: var(--on-navy); transform: translateY(-2px); box-shadow: var(--on-shadow); }
.btn-outline-on { border-color: var(--on-navy); color: var(--on-navy); background: transparent; }
.btn-outline-on:hover { background: var(--on-navy); color: #fff; }
.btn-ghost-light { border-color: rgba(255,255,255,0.4); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* ------------------------- Navbar ------------------------- */
.on-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: box-shadow 0.3s var(--on-ease), border-color 0.3s var(--on-ease);
}
.on-nav.scrolled { box-shadow: var(--on-shadow-sm); border-bottom-color: var(--on-line); }
.on-nav .container-on { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; min-height: 84px; flex-wrap: nowrap; }
.on-brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.on-brand img { height: 64px; width: auto; display: block; }
.on-menu { display: flex; align-items: center; gap: 0.15rem; list-style: none; margin: 0 auto; padding: 0; flex-wrap: nowrap; }
.on-menu a {
    color: var(--on-body);
    font-weight: 500;
    font-size: 0.94rem;
    padding: 0.5rem 0.7rem;
    border-radius: var(--on-radius);
    position: relative;
    white-space: nowrap;
}
.on-menu a::after {
    content: "";
    position: absolute;
    left: 0.7rem; right: 0.7rem; bottom: 0.3rem;
    height: 2px;
    background: var(--on-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.28s var(--on-ease);
}
.on-menu a:hover, .on-menu a.active { color: var(--on-navy); }
.on-menu a:hover::after, .on-menu a.active::after { transform: scaleX(1); }
.on-nav-actions { display: flex; align-items: center; gap: 0.75rem; flex: 0 0 auto; }
.on-nav-actions .btn-on { white-space: nowrap; }
.on-burger { display: none; background: none; border: none; padding: 0.5rem; cursor: pointer; color: var(--on-navy); }
.on-burger svg { width: 26px; height: 26px; }

/* Mobile menu */
.on-mobile {
    position: fixed;
    inset: 84px 0 0 0;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.35s var(--on-ease);
    z-index: 1029;
    padding: 1.5rem;
    overflow-y: auto;
}
.on-mobile.open { transform: translateX(0); }
.on-mobile a { display: block; padding: 0.95rem 0.5rem; font-size: 1.12rem; color: var(--on-navy); border-bottom: 1px solid var(--on-line); font-family: var(--on-font-head); }
.on-mobile .btn-on { margin-top: 1.5rem; width: 100%; justify-content: center; }

/* Slightly smaller links on mid-width screens to keep everything on one row */
@media (max-width: 1200px) {
    .on-menu a { font-size: 0.88rem; padding: 0.5rem 0.55rem; }
    .on-brand img { height: 54px; }
}

@media (max-width: 1080px) {
    .on-menu, .on-nav-actions .btn-on { display: none; }
    .on-burger { display: inline-flex; }
    .on-brand img { height: 58px; }
}

/* ------------------------- Hero ------------------------- */
.on-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--on-navy-900) 0%, var(--on-navy) 55%, var(--on-navy-700) 100%);
    color: #fff;
    padding: clamp(4.5rem, 9vw, 8rem) 0 clamp(4rem, 8vw, 7rem);
}
.on-hero h1 { color: #fff; }
.on-hero .lead { color: rgba(255,255,255,0.82); }
.on-hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3.5rem; align-items: center; }
.on-hero-eyebrow { color: var(--on-gold-soft); }
.on-hero-eyebrow::before { background: var(--on-gold); }
.on-hero-text { margin: 1.5rem 0 1rem; font-size: 1.28rem; color: rgba(255,255,255,0.9); font-family: var(--on-font-head); }
.on-hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.on-hero-visual { position: relative; }
.on-hero-canvas { width: 100%; height: auto; display: block; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.35)); }
.on-hero-orbit { position: absolute; inset: 0; opacity: 0.5; pointer-events: none; }
@media (max-width: 900px) {
    .on-hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .on-hero-visual { order: -1; max-width: 420px; }
}

/* ------------------------- Stats ------------------------- */
.on-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.on-stat { padding: 1.5rem 0; border-top: 3px solid var(--on-gold); }
.on-stat .num { font-family: var(--on-font-head); font-size: clamp(2rem, 4vw, 2.9rem); color: var(--on-navy); font-weight: 600; line-height: 1; }
.on-stat .label { color: var(--on-muted); font-size: 0.95rem; margin-top: 0.5rem; }
@media (max-width: 700px) { .on-stats { grid-template-columns: repeat(2, 1fr); } }

/* ------------------------- Cards / grids ------------------------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.75rem; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Leadership team: 4 across on desktop, 2 per row on tablet, 1 on mobile */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.75rem; }
@media (max-width: 992px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }

/* Sector grid: 3 per row, but the last (partial) row is centered so an odd
   count (e.g. 7 sectors) never leaves a lonely left-aligned card. */
.sector-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.75rem; }
.sector-grid > * { flex: 0 1 calc((100% - 3.5rem) / 3); min-width: 280px; }
@media (max-width: 992px) { .sector-grid > * { flex-basis: calc((100% - 1.75rem) / 2); } }
@media (max-width: 620px) { .sector-grid > * { flex-basis: 100%; } }

.card-on {
    background: #fff;
    border: 1px solid var(--on-line);
    border-radius: var(--on-radius-lg);
    padding: 2rem;
    transition: transform 0.3s var(--on-ease), box-shadow 0.3s var(--on-ease), border-color 0.3s var(--on-ease);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.card-on:hover { transform: translateY(-5px); box-shadow: var(--on-shadow); border-color: transparent; }
.card-icon { width: 52px; height: 52px; border-radius: var(--on-radius); display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--on-navy); background: var(--on-cloud-2); margin-bottom: 1.25rem; }

/* Sector cards */
.sector-card { position: relative; overflow: hidden; }
.sector-card .num { font-family: var(--on-font-head); font-size: 1rem; color: var(--on-gold); letter-spacing: 0.1em; font-weight: 600; }
.sector-card.primary { border-color: var(--on-navy); box-shadow: var(--on-shadow); }
.sector-card.primary::before { content: "Primary Sector"; position: absolute; top: 1.25rem; right: -2.4rem; background: var(--on-gold); color: var(--on-navy); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.28rem 2.4rem; transform: rotate(45deg); }
.sector-card .accent-bar { height: 4px; width: 48px; border-radius: 2px; margin: 1rem 0 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.chip { font-size: 0.78rem; color: var(--on-body); background: var(--on-cloud); border: 1px solid var(--on-line); border-radius: 100px; padding: 0.3rem 0.8rem; }

.link-arrow { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; margin-top: auto; padding-top: 1.25rem; }
.link-arrow i { transition: transform 0.25s var(--on-ease); }
.card-on:hover .link-arrow i, .link-arrow:hover i { transform: translateX(4px); }

/* ------------------------- Capabilities ------------------------- */
.cap-filter { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2.5rem; justify-content: center; }
.cap-filter button { font-family: var(--on-font-body); font-weight: 600; font-size: 0.9rem; padding: 0.55rem 1.2rem; border-radius: 100px; border: 1.5px solid var(--on-line); background: #fff; color: var(--on-body); cursor: pointer; transition: all 0.2s var(--on-ease); }
.cap-filter button.active, .cap-filter button:hover { background: var(--on-navy); border-color: var(--on-navy); color: #fff; }
.cap-group { margin-bottom: 1rem; }
.cap-item { display: flex; align-items: flex-start; gap: 0.9rem; padding: 1.1rem; border: 1px solid var(--on-line); border-radius: var(--on-radius); background: #fff; transition: box-shadow 0.25s var(--on-ease); }
.cap-item:hover { box-shadow: var(--on-shadow-sm); }
.cap-item i { color: var(--on-teal-deep); font-size: 1.25rem; margin-top: 0.15rem; }

/* ------------------------- Convergence ------------------------- */
.converge-nodes { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin: 2rem 0; }
.converge-nodes .node { padding: 0.6rem 1.2rem; border: 1.5px solid rgba(255,255,255,0.28); border-radius: 100px; font-weight: 600; font-size: 0.92rem; color: #fff; }
.converge-nodes .sep { color: var(--on-gold-soft); align-self: center; }

/* ------------------------- Insights ------------------------- */
.insight-card img, .project-card .media { border-radius: var(--on-radius); }
.meta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; font-size: 0.85rem; color: var(--on-muted); margin-bottom: 0.75rem; }
.badge-cat { background: var(--on-cloud-2); color: var(--on-navy); font-weight: 600; padding: 0.25rem 0.7rem; border-radius: 100px; font-size: 0.78rem; }
.media { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--on-cloud-2); display: block; }

/* ------------------------- Forms ------------------------- */
.form-on label { font-weight: 600; color: var(--on-navy); font-size: 0.92rem; margin-bottom: 0.4rem; display: block; }
.form-on .field { margin-bottom: 1.25rem; }
.form-on input, .form-on select, .form-on textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--on-line);
    border-radius: var(--on-radius);
    font-family: var(--on-font-body);
    font-size: 1rem;
    color: var(--on-ink);
    background: #fff;
    transition: border-color 0.2s var(--on-ease), box-shadow 0.2s var(--on-ease);
}
.form-on input:focus, .form-on select:focus, .form-on textarea:focus {
    outline: none;
    border-color: var(--on-teal);
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15);
}
.form-on textarea { min-height: 140px; resize: vertical; }
.field-validation-error, .text-danger { color: #C0392B; font-size: 0.85rem; }
.input-validation-error { border-color: #C0392B !important; }
.form-check { display: flex; align-items: flex-start; gap: 0.6rem; }
.form-check input { width: auto; margin-top: 0.3rem; }

.alert-on { padding: 1rem 1.25rem; border-radius: var(--on-radius); margin-bottom: 1.5rem; border: 1px solid; }
.alert-success-on { background: #E9F7F3; border-color: #A7DED3; color: #12634F; }
.alert-error-on { background: #FCEDEC; border-color: #F1C4C0; color: #A02820; }

/* ------------------------- Footer ------------------------- */
.on-footer { background: var(--on-navy-900); color: rgba(255,255,255,0.72); padding: 4rem 0 0; }
.on-footer h4 { color: #fff; font-family: var(--on-font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 1.1rem; }
.on-footer a { color: rgba(255,255,255,0.72); font-size: 0.94rem; display: block; padding: 0.3rem 0; }
.on-footer a:hover { color: #fff; }
.on-footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2rem; }
.on-footer-brand img { display: block; height: auto; width: 150px; max-width: 100%; margin-bottom: 1.1rem; background: #fff; padding: 14px 18px; border-radius: var(--on-radius); }
.on-footer-tag { font-family: var(--on-font-head); color: var(--on-gold-soft); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.8rem; }
.on-footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 3rem; padding: 1.5rem 0; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; font-size: 0.88rem; }
.on-footer-bottom a { display: inline; }
@media (max-width: 900px) { .on-footer-grid { grid-template-columns: 1fr 1fr; } .on-footer-brand { grid-column: 1 / -1; } }

/* ------------------------- Page header ------------------------- */
.page-hero { background: linear-gradient(160deg, var(--on-navy-900), var(--on-navy)); color: #fff; padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: rgba(255,255,255,0.82); }
.breadcrumb-on { display: flex; gap: 0.5rem; font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 1.25rem; list-style: none; padding: 0; }
.breadcrumb-on a { color: rgba(255,255,255,0.8); }
.breadcrumb-on li:not(:last-child)::after { content: "/"; margin-left: 0.5rem; color: rgba(255,255,255,0.4); }

/* ------------------------- Difference / values ------------------------- */
.value-pill { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.15rem; border: 1.5px solid var(--on-line); border-radius: 100px; font-weight: 600; color: var(--on-navy); background: #fff; }
.value-pill i { color: var(--on-gold); }

.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li { position: relative; padding: 0.4rem 0 0.4rem 1.75rem; }
.list-check li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; color: var(--on-teal); }

/* ------------------------- Skip link + focus ------------------------- */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--on-navy); color: #fff; padding: 0.75rem 1.25rem; z-index: 2000; border-radius: 0 0 var(--on-radius) 0; }
.skip-link:focus { left: 0; color: #fff; }
:focus-visible { outline: 3px solid var(--on-gold); outline-offset: 2px; border-radius: 2px; }

/* ------------------------- Animations ------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--on-ease), transform 0.7s var(--on-ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

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

/* ------------------------- Utilities ------------------------- */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}
.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--on-line);
    border-radius: var(--on-radius);
    font-family: var(--on-font-body);
    font-size: 1rem;
}
.form-control:focus { outline: none; border-color: var(--on-teal); box-shadow: 0 0 0 3px rgba(42,157,143,0.15); }

/* ------------------------- Admin tables ------------------------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: #fff; border: 1px solid var(--on-line); border-radius: var(--on-radius); overflow: hidden; }
.admin-table th, .admin-table td { padding: 0.75rem 0.9rem; text-align: left; border-bottom: 1px solid var(--on-line); vertical-align: top; }
.admin-table thead th { background: var(--on-navy); color: #fff; font-family: var(--on-font-body); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.admin-table tbody tr:nth-child(even) { background: var(--on-cloud); }
.admin-table tbody tr:hover { background: var(--on-cloud-2); }
.btn-ghost-dark { background: #fff; }
.btn-ghost-dark:hover { background: var(--on-cloud); }
