/* Xerion public marketing shell - shared by index, pricing, all-tools, and
   any future marketing page. Interior app pages use app.css instead. */

:root {
    --blue:       #1a56db;
    --blue-dark:  #1344b8;
    --blue-faint: #eef4ff;
    --navy:       #0b1b33;
    --ink:        #101828;
    --ink-mid:    #475467;
    --ink-light:  #667085;
    --surface:    #f7f8fa;
    --card:       #ffffff;
    --border:     #e4e7ec;
    --hero-bg:    #0a1428;
    --radius-sm:  4px;
    --radius:     8px;
}
[data-theme="dark"] {
    --blue:       #5b8def;
    --blue-dark:  #7ba3f2;
    --blue-faint: rgba(91,141,239,0.14);
    --navy:       #0a1220;
    --ink:        #e8ecf3;
    --ink-mid:    #b0b8c8;
    --ink-light:  #808a9d;
    --surface:    #0b0e14;
    --card:       #151a24;
    --border:     #2a3140;
    --hero-bg:    #070d1a;
}
[data-theme="dark"] img[src*="logo.png"] { filter: brightness(0) invert(1); }
[data-theme="dark"] header { background: rgba(11,14,20,0.97); }

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

body {
    font-family: 'DM Sans', Arial, sans-serif;
    background: var(--surface);
    color: var(--ink);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.container { width: min(1120px, 92%); margin: 0 auto; }

/* ── HEADER ── */
header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}
header.scrolled { box-shadow: 0 1px 8px rgba(16,24,40,0.06); }

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 24px;
}

.brand { display: flex; align-items: center; }
.brand img { height: 38px; width: auto; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-mid);
}
.nav-links > a:not(.nav-cta),
.nav-drop > button {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}
.nav-links > a:not(.nav-cta):hover,
.nav-drop > button:hover { color: var(--ink); background: var(--surface); }

/* Company dropdown - CSS only, keyboard friendly */
.nav-drop { position: relative; }
.nav-drop > button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.nav-drop > button svg { transition: transform 0.15s; }
.nav-drop-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(16,24,40,0.1);
    padding: 6px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    /* Closing waits 0.18s before anything moves - the grace period. During
       it the menu is still visible AND interactive (visibility alone blocks
       events once hidden, so no pointer-events needed), so re-entering the
       menu or button cancels the close entirely. Fully hidden at 0.3s. */
    transition: opacity 0.12s ease 0.18s, transform 0.12s ease 0.18s, visibility 0s linear 0.3s;
}
/* Invisible bridge over the 6px gap between button and menu - without it,
   :hover breaks the moment the pointer crosses the gap. */
.nav-drop-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}
.nav-drop:hover > button svg,
.nav-drop:focus-within > button svg { transform: rotate(180deg); }
.nav-drop-menu a {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-mid);
}
.nav-drop-menu a:hover { background: var(--surface); color: var(--ink); }

.nav-cta {
    margin-left: 8px;
    padding: 9px 18px;
    background: var(--blue);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s;
}
.nav-cta:hover { background: var(--blue-dark); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--ink);
    margin-left: auto;
}

/* ── HERO ── */
.hero {
    background: var(--hero-bg);
    position: relative;
    overflow: hidden;
}
.hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    filter: blur(2px);
    transform: scale(1.03);
    opacity: 0.55;
    pointer-events: none;
    user-select: none;
}
/* Left-to-right scrim: text sits on the dark side, skyline reads on the right. */
.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg,
        rgba(10,20,40,0.96) 0%,
        rgba(10,20,40,0.88) 42%,
        rgba(10,20,40,0.45) 75%,
        rgba(10,20,40,0.3) 100%);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 1;
    padding: 104px 0 96px;
    max-width: 660px;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #8fb3e8;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 26px;
}
.hero-eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: #8fb3e8;
}

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-weight: 600;
    line-height: 1.12;
    color: #ffffff;
    margin-bottom: 22px;
    letter-spacing: -1px;
}
.hero h1 span { color: #7fa7ee; }

.hero-inner > p {
    font-size: 1.06rem;
    color: #b6c4d9;
    max-width: 560px;
    margin-bottom: 34px;
    line-height: 1.7;
}

.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.94rem;
    transition: background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary {
    background: transparent;
    color: #dbe5f2;
    border: 1px solid rgba(255,255,255,0.28);
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.55); }

/* Metrics bar - the hero's bottom edge */
.hero-stats {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255,255,255,0.14);
    background: rgba(8,15,30,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.hero-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.hero-stat {
    padding: 22px 28px 24px;
    border-left: 1px solid rgba(255,255,255,0.1);
}
.hero-stat:first-child { border-left: none; padding-left: 0; }
.hero-stat strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.3px;
}
.hero-stat span {
    font-size: 0.8rem;
    color: #92a5c0;
    letter-spacing: 0.3px;
}

/* ── SECTIONS ── */
section { padding: 88px 0; }

.section-heading { max-width: 720px; margin: 0 0 48px; text-align: left; }
.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 14px;
}
.section-label::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--blue);
}
.section-heading h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 12px;
    letter-spacing: -0.6px;
}
.section-heading p { color: var(--ink-light); font-size: 1rem; }

/* ── SERVICE CARDS ── */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }

.service-card {
    background: var(--card);
    padding: 32px 28px;
    transition: background 0.15s;
}
.service-card:hover { background: var(--surface); }

.service-icon {
    width: 40px; height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--blue);
    background: var(--card);
}
.service-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.02rem;
    margin-bottom: 8px;
    color: var(--ink);
    font-weight: 600;
}
.service-card p { color: var(--ink-light); font-size: 0.92rem; line-height: 1.65; }

/* ── ABOUT ── */
.about-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }

.about-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    height: 100%;
}
.about-accent {
    width: 28px; height: 1px;
    background: var(--blue);
    margin-bottom: 18px;
}
.about-box h3 {
    font-family: 'Outfit', sans-serif;
    margin-bottom: 14px;
    font-size: 1.12rem;
    color: var(--ink);
    font-weight: 600;
}
.about-box p { color: var(--ink-light); margin-bottom: 14px; font-size: 0.95rem; }

.about-box ul { list-style: none; padding: 0; }
.about-box li {
    margin-bottom: 11px;
    padding-left: 20px;
    position: relative;
    font-size: 0.95rem;
    color: var(--ink-mid);
}
.about-box li::before {
    content: '';
    position: absolute;
    left: 0; top: 0.62em;
    width: 8px; height: 1px;
    background: var(--blue);
}

/* ── CTA ── */
.cta-band {
    background: var(--navy);
    padding: 76px 0;
}
.cta-band h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: #fff;
    letter-spacing: -0.6px;
}
.cta-band .cta-lead { max-width: 620px; margin-bottom: 30px; color: #9fb0c8; font-size: 1rem; }
.cta-band .section-label { color: #7fa7ee; }
.cta-band .section-label::before { background: #7fa7ee; }

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 26px;
    background: var(--blue);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.97rem;
    transition: background 0.15s;
}
.cta-btn:hover { background: var(--blue-dark); }

/* ── FOOTER ── */
footer {
    border-top: 1px solid var(--border);
    background: var(--card);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 56px 0 44px;
}
.footer-brand img { height: 34px; margin-bottom: 14px; }
.footer-brand p { color: var(--ink-light); font-size: 0.88rem; max-width: 280px; line-height: 1.65; }
.footer-col h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 16px;
}
.footer-col a {
    display: block;
    color: var(--ink-light);
    font-size: 0.9rem;
    padding: 4px 0;
}
.footer-col a:hover { color: var(--blue); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--ink-light);
    font-size: 0.85rem;
}
.footer-bottom .legal { display: flex; gap: 18px; }
.footer-bottom a:hover { color: var(--blue); }

/* ── REVEAL ── */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .services, .about-wrap { grid-template-columns: 1fr; }
    .hero-inner { padding: 68px 0 64px; }
    .hero-stats-row { grid-template-columns: 1fr 1fr; }
    .hero-stat { padding: 16px 20px; border-left: none; }
    .hero-stat:first-child { padding-left: 20px; }
    .nav { flex-wrap: wrap; padding: 10px 0; min-height: auto; align-items: center; }
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        width: 100%;
        padding: 10px 0 12px;
        font-size: 0.98rem;
    }
    .nav-links.open { display: flex; }
    .nav-drop-menu {
        display: flex;
        position: static;
        border: none;
        box-shadow: none;
        background: none;
        padding: 0 0 0 14px;
        min-width: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }
    .nav-drop-menu::before { display: none; }
    .nav-drop > button { width: 100%; text-align: left; justify-content: space-between; display: flex; }
    .nav-cta { margin: 8px 0 0; text-align: center; justify-content: center; display: flex; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; padding: 44px 0 36px; }
}
@media (max-width: 600px) {
    .hero h1 { font-size: 2.05rem; }
    .section-heading h2, .cta-band h2 { font-size: 1.6rem; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ── Shared interior-page additions ── */
.nav-links > a.current { color: var(--ink); font-weight: 600; }

/* Navy page band: interior page hero without the photo */
.page-band {
    background: var(--navy);
    padding: 72px 0 64px;
}
.page-band .hero-eyebrow { color: #8fb3e8; }
.page-band .hero-eyebrow::before { background: #8fb3e8; }
.page-band h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 3.4vw, 2.9rem);
    font-weight: 600;
    line-height: 1.14;
    color: #ffffff;
    letter-spacing: -0.8px;
    margin-bottom: 16px;
}
.page-band h1 span { color: #7fa7ee; }
.page-band .band-sub {
    font-size: 1.02rem;
    color: #b6c4d9;
    max-width: 620px;
    line-height: 1.7;
}

/* Hairline-divided info grid (2-up), matches the .services treatment */
.grid-2-lined {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}
.grid-2-lined > div { background: var(--card); padding: 28px; }
.grid-2-lined h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}
.grid-2-lined p { color: var(--ink-light); font-size: 0.93rem; line-height: 1.65; }
@media (max-width: 720px) { .grid-2-lined { grid-template-columns: 1fr; } }
