/* ETX Works marketing site components. Loaded after etx-aurora.css; reads its tokens only. */

/* ── Navbar ─────────────────────────────────────────────────────────────────
   Follows the page ground with the brand carried by the mark, the wordmark and
   a rule underneath. Not a solid navy bar (that fights dark mode). */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 1030;
    background-color: color-mix(in srgb, var(--etx-page-ground) 86%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--etx-line);
}
.site-nav .navbar { padding-block: .7rem; }
.site-nav .nav-link { color: var(--etx-ink-muted); font-weight: 500; padding-inline: .85rem !important; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--etx-heading); }
.site-nav .nav-link.active { position: relative; }
@media (min-width: 992px) {
    .site-nav .nav-link.active::after {
        content: ""; position: absolute; left: .85rem; right: .85rem; bottom: -.72rem;
        height: 2px; background: var(--etx-accent); border-radius: 2px;
    }
}
.brand-link { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-word { font-family: var(--etx-font-heading); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; color: var(--etx-heading); line-height: 1; }
.brand-word span { color: var(--etx-accent); }
.brand-sub { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--etx-ink-muted); margin-top: .2rem; }
.theme-btn { color: var(--etx-ink-muted); border: 1px solid var(--etx-line); background: var(--etx-surface); width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; border-radius: .6rem; }
.theme-btn:hover { color: var(--etx-heading); border-color: var(--etx-heading); }
.navbar-toggler { border-color: var(--etx-line); }
@media (max-width: 575.98px) {
    .brand-sub { display: none; }
    .site-nav .navbar > .container { flex-wrap: wrap; }
}

/* ── Type helpers ───────────────────────────────────────────────────────── */
.eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--etx-accent);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.display-title { font-size: clamp(2.3rem, 5.2vw, 3.9rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 800; }
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; }
.lead-copy { font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.65; color: var(--etx-ink-muted); max-width: 62ch; }
.text-accent { color: var(--etx-accent); }
.prose { max-width: 72ch; line-height: 1.75; }
.prose h2 { font-size: 1.45rem; margin-top: 2.25rem; }
.prose h3 { font-size: 1.15rem; margin-top: 1.5rem; }

/* ── Sections ───────────────────────────────────────────────────────────── */
.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section-alt { background-color: var(--etx-surface); border-block: 1px solid var(--etx-line); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(4rem, 8vw, 6rem); }
.hero::before {
    /* Engineering grid, fading out toward the edges */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(var(--etx-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--etx-line) 1px, transparent 1px);
    background-size: 44px 44px;
    opacity: .45;
    mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
}
.hero::after {
    content: ""; position: absolute; width: 720px; height: 720px; right: -220px; top: -260px; pointer-events: none;
    background: radial-gradient(circle, color-mix(in srgb, var(--etx-accent) 18%, transparent), transparent 65%);
}
.hero > .container { position: relative; z-index: 1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-actions .btn { padding: .8rem 1.35rem; font-size: 1rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; margin-top: 2.25rem; color: var(--etx-ink-muted); font-size: .92rem; }
.hero-meta i { color: var(--etx-accent); margin-right: .4rem; }

/* Hero diagram card */
.flow-card {
    background: var(--etx-surface);
    border: 1px solid var(--etx-line);
    border-radius: 1rem;
    box-shadow: var(--etx-shadow-lg);
    padding: 1.25rem;
}
.flow-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.flow-card-head .dots { display: flex; gap: 6px; }
.flow-card-head .dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--etx-surface-sunk); }
.flow-card-title { font-size: .8rem; font-weight: 600; color: var(--etx-ink-muted); letter-spacing: .04em; }
.flow-svg { width: 100%; height: auto; display: block; }
.flow-svg .edge { stroke: var(--etx-line); stroke-width: 2; fill: none; }
.flow-svg .edge-live { stroke: var(--etx-accent); stroke-width: 2; fill: none; stroke-dasharray: 6 6; animation: flow 1.6s linear infinite; }
.flow-svg .node rect { fill: var(--etx-surface-muted); stroke: var(--etx-line); }
.flow-svg .node.done rect { fill: var(--etx-accent-tint); stroke: var(--etx-accent); }
.flow-svg .node.live rect { fill: var(--etx-surface); stroke: var(--etx-accent); stroke-width: 2; }
.flow-svg .node text { fill: var(--etx-ink); font: 600 12px var(--etx-font-body); }
.flow-svg .node .sub { fill: var(--etx-ink-muted); font: 500 10px var(--etx-font-body); }
.flow-svg .tick { fill: var(--etx-accent); }
.flow-svg .pulse { fill: var(--etx-accent); animation: pulse 1.8s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes flow { to { stroke-dashoffset: -24; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .flow-svg .edge-live, .flow-svg .pulse { animation: none; } }
.flow-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .75rem; font-size: .78rem; color: var(--etx-ink-muted); }
.flow-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .4rem; vertical-align: -1px; border: 1px solid var(--etx-accent); }
.flow-legend .l-done::before { background: var(--etx-accent-tint); }
.flow-legend .l-live::before { background: var(--etx-surface); border-width: 2px; }
.flow-legend .l-next::before { background: var(--etx-surface-muted); border-color: var(--etx-line); }

/* ── Proof strip ────────────────────────────────────────────────────────── */
.proof { border-block: 1px solid var(--etx-line); background: var(--etx-surface); }
.proof-item { padding: 1.75rem 1rem; text-align: center; }
.proof-num { font-family: var(--etx-font-heading); font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 800; color: var(--etx-heading); letter-spacing: -.03em; line-height: 1; }
.proof-label { margin-top: .45rem; font-size: .88rem; color: var(--etx-ink-muted); }
@media (min-width: 768px) { .proof-item + .proof-item { border-left: 1px solid var(--etx-line); } }

/* ── Feature / service cards ────────────────────────────────────────────── */
.feature {
    height: 100%;
    background: var(--etx-surface);
    border: 1px solid var(--etx-line);
    border-radius: var(--etx-radius);
    padding: 1.75rem;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.feature:hover { border-color: color-mix(in srgb, var(--etx-accent) 55%, var(--etx-line)); transform: translateY(-2px); box-shadow: var(--etx-shadow); }
.feature h3 { font-size: 1.15rem; margin: 1.1rem 0 .5rem; }
.feature p { color: var(--etx-ink-muted); margin-bottom: 0; line-height: 1.65; }
.feature ul { color: var(--etx-ink-muted); padding-left: 1.1rem; margin: .75rem 0 0; line-height: 1.7; }
.icon-tile {
    width: 46px; height: 46px; border-radius: .7rem; display: grid; place-items: center;
    font-size: 1.3rem; color: var(--etx-accent); background: var(--etx-accent-tint);
    border: 1px solid color-mix(in srgb, var(--etx-accent) 25%, transparent);
}

/* ── Split / checklist ──────────────────────────────────────────────────── */
.check-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.check-list li { display: flex; gap: .8rem; padding: .55rem 0; line-height: 1.6; }
.check-list i { color: var(--etx-accent); font-size: 1.15rem; line-height: 1.5; flex: none; }
.check-list strong { color: var(--etx-heading); }

.quote-panel {
    background: var(--etx-surface); border: 1px solid var(--etx-line); border-radius: 1rem; padding: 2rem;
    box-shadow: var(--etx-shadow); position: relative;
}
.quote-panel .big-q { font-family: var(--etx-font-heading); font-size: 1.35rem; line-height: 1.45; font-weight: 700; color: var(--etx-heading); letter-spacing: -.01em; }

/* ── Process steps ──────────────────────────────────────────────────────── */
.steps { counter-reset: step; }
.step {
    position: relative; height: 100%;
    background: var(--etx-surface); border: 1px solid var(--etx-line); border-radius: var(--etx-radius);
    padding: 1.75rem 1.5rem 1.5rem;
}
.step-num {
    font-family: var(--etx-font-mono); font-size: .8rem; font-weight: 700; color: var(--etx-accent);
    letter-spacing: .08em;
}
.step h3 { font-size: 1.1rem; margin: .6rem 0 .5rem; }
.step p { color: var(--etx-ink-muted); margin: 0; line-height: 1.65; }
.step-out { margin-top: 1rem; padding-top: .85rem; border-top: 1px dashed var(--etx-line); font-size: .86rem; color: var(--etx-ink-muted); }
.step-out strong { color: var(--etx-ink); }

/* ── CTA band: a ground that carries white text ─────────────────────────── */
.cta-band {
    position: relative; overflow: hidden;
    background: var(--etx-brand-surface);
    color: var(--etx-on-brand-surface);
    border-radius: 1.25rem;
    padding: clamp(2.25rem, 5vw, 3.5rem);
}
.cta-band::after {
    content: ""; position: absolute; inset: auto -120px -180px auto; width: 460px; height: 460px; border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 212, 191, .28), transparent 65%); pointer-events: none;
}
.cta-band h2 { color: var(--etx-on-brand-surface); font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.03em; font-weight: 800; }
.cta-band p { color: rgba(255, 255, 255, .8); max-width: 56ch; font-size: 1.08rem; }
.cta-band .btn-light { --bs-btn-color: #0f2742; font-weight: 700; }
.cta-band .btn-ghost { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.4); --bs-btn-hover-bg: rgba(255,255,255,.1); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: #fff; }

/* ── Inner page header ──────────────────────────────────────────────────── */
.page-head { padding-block: clamp(3rem, 6vw, 4.75rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--etx-line); position: relative; overflow: hidden; }
.page-head::after {
    content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -300px; pointer-events: none;
    background: radial-gradient(circle, color-mix(in srgb, var(--etx-accent) 14%, transparent), transparent 65%);
}
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -.035em; font-weight: 800; }

/* ── Contact options ────────────────────────────────────────────────────── */
.contact-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1.4rem; border: 1px solid var(--etx-line); border-radius: var(--etx-radius); background: var(--etx-surface); height: 100%; }
.contact-card h3 { font-size: 1.05rem; margin: 0 0 .25rem; }
.contact-card p { margin: 0; color: var(--etx-ink-muted); }
.chat-preview { border: 1px solid var(--etx-line); background: var(--etx-surface); border-radius: 1rem; padding: 1.25rem; box-shadow: var(--etx-shadow); }
.bubble { max-width: 85%; padding: .65rem .9rem; border-radius: 1rem; margin-bottom: .6rem; line-height: 1.5; font-size: .95rem; }
.bubble.them { background: var(--etx-surface-muted); border: 1px solid var(--etx-line); border-bottom-left-radius: .3rem; }
.bubble.me { margin-left: auto; background: var(--etx-brand-surface); color: var(--etx-on-brand-surface); border-bottom-right-radius: .3rem; }
.bubble-meta { font-size: .75rem; color: var(--etx-ink-muted); margin: -.25rem 0 .75rem; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
    margin-top: auto;
    background: var(--etx-surface);
    border-top: 3px solid var(--etx-accent);
    padding-block: 3.5rem 2rem;
    font-size: .93rem;
}
.site-footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--etx-ink-muted); margin-bottom: 1rem; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: var(--etx-ink); text-decoration: none; }
.site-footer a:hover { color: var(--etx-link); text-decoration: underline; }
.footer-legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--etx-line); color: var(--etx-ink-muted); font-size: .84rem; }
.footer-legal a { color: var(--etx-ink-muted); }

/* ── Accordion ──────────────────────────────────────────────────────────── */
.accordion {
    --bs-accordion-bg: var(--etx-surface);
    --bs-accordion-border-color: var(--etx-line);
    --bs-accordion-btn-color: var(--etx-heading);
    --bs-accordion-active-color: var(--etx-heading);
    --bs-accordion-active-bg: var(--etx-accent-tint);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--etx-focus-ring) 45%, transparent);
}
.accordion-button { font-weight: 600; font-family: var(--etx-font-heading); }

/* ── Flash ──────────────────────────────────────────────────────────────── */
.flash { margin-top: 1rem; }
