/*
 * Elglide apex landing page (elglide.com).
 * Brand tokens mirror the pilot app's marketing.css so apex + pilot read
 * as one brand. A real palette/logo swap is a one-file change here.
 */

:root {
    --brand-primary: #0d6efd;
    --brand-primary-dark: #0a58ca;
    --brand-text: #1c2024;
    --brand-muted: #6c757d;
    --brand-bg: #ffffff;
    --brand-bg-soft: #f6f8fb;
    --brand-border: #eef0f3;

    --shell-max: 64rem;
    --shell-pad: 1.25rem;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--brand-text);
    background: var(--brand-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: var(--brand-primary-dark); }

.shell {
    width: 100%;
    max-width: var(--shell-max);
    margin: 0 auto;
    padding-left: var(--shell-pad);
    padding-right: var(--shell-pad);
}

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
    border-bottom: 1px solid var(--brand-border);
    background: #fff;
}

.site-header .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brand-text);
}

.wordmark img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-nav .quiet-link {
    font-size: 0.95rem;
    color: var(--brand-muted);
}
.site-nav .quiet-link:hover { color: var(--brand-primary); }
.site-nav .quiet-link[aria-current="page"] { color: var(--brand-text); font-weight: 600; }

/* ── Header layout: nav beside the wordmark, auth cluster right ─────── */

.site-header { position: relative; }

.header-left {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--brand-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0;
}
.nav-link:hover { color: var(--brand-primary); }
.nav-link[aria-current="page"] { color: var(--brand-text); font-weight: 600; }
.nav-link .caret { width: 14px; height: 14px; }

/* ── "Docs" mega-menu (Fivetran-style panel) ─────────────────────────
   The Docs nav item is a real link (→ docs hub) so touch and no-CSS
   users just navigate; pointer/keyboard users get the panel on
   hover / focus. Groups mirror the docs hub. */

.nav-mega .mega-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: min(58rem, calc(100vw - 2.5rem));
    background: #fff;
    border: 1px solid var(--brand-border);
    border-top: 0;
    border-radius: 0 0 0.75rem 0.75rem;
    box-shadow: 0 18px 36px rgba(16, 24, 40, 0.10);
    padding: 1.35rem 0.5rem 1.3rem;
    grid-template-columns: 1fr 1.15fr 1fr;
    z-index: 60;
}
/* invisible bridge across the header's bottom padding so the pointer
   can travel from the Docs link into the panel without it closing */
.nav-mega .mega-panel::before {
    content: "";
    position: absolute;
    top: -1.1rem;
    left: 0;
    right: 0;
    height: 1.1rem;
}
@media (hover: hover) {
    .nav-mega:hover .mega-panel { display: grid; }
}
.nav-mega:focus-within .mega-panel { display: grid; }

.mega-col {
    padding: 0 1.3rem;
    border-right: 1px solid var(--brand-border);
}
.mega-col:last-child { border-right: 0; }

.mega-group {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--brand-muted);
    margin: 0 0.5rem 0.6rem;
}

.mega-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.5rem 0.5rem;
    border-radius: 0.5rem;
}
.mega-item:hover { background: var(--brand-bg-soft); }

.mega-item svg {
    width: 18px;
    height: 18px;
    flex: none;
    margin-top: 0.15rem;
    stroke: var(--brand-primary);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mega-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-text);
    line-height: 1.35;
}
.mega-item:hover .mega-name { color: var(--brand-primary); }

.mega-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--brand-muted);
    line-height: 1.4;
    margin-top: 0.05rem;
}

@media (max-width: 720px) {
    .header-left { gap: 1.1rem; }
    .site-nav { gap: 1rem; }
}

/* Compact header CTA — persistent path to conversion from any page
   (mirrors the pilot marketing header's "Book a Demo" button). */
.btn-nav {
    display: inline-block;
    background: var(--brand-primary);
    color: #fff;
    padding: 0.45rem 0.9rem;
    border-radius: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
}
.btn-nav:hover { background: var(--brand-primary-dark); color: #fff; }

/* ── Hero ───────────────────────────────────────────────────────────── */

/* Natural-flow hero (page scrolls). Bullet list + closing para below the
   lead push total height past viewport on most screens; the viewport-
   filling flex variant was removed when those were absorbed from pilot. */
.hero {
    background: linear-gradient(180deg, var(--brand-bg-soft) 0%, var(--brand-bg) 100%);
    padding: 3.5rem 0 3rem;
}

.hero h1 {
    font-size: clamp(2rem, 4.2vw + 0.5rem, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 1.25rem;
    max-width: 36rem;
}

.hero .lead {
    font-size: 1.125rem;
    color: var(--brand-muted);
    max-width: 38rem;
    margin: 0 0 1.75rem;
    line-height: 1.55;
}

/* Bullet list — verbatim from pilot's Pages/Index.cshtml. Check-mark
   uses ::before to keep the markup as a plain <ul>/<li>. */
.hero-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: grid;
    gap: 0.6rem;
    max-width: 48rem;
}
.hero-features li {
    position: relative;
    padding-left: 1.75rem;
    color: var(--brand-text);
    line-height: 1.5;
    font-size: 0.98rem;
}
.hero-features li::before {
    content: "\2713";       /* check mark */
    position: absolute;
    left: 0;
    top: 0;
    color: var(--brand-primary);
    font-weight: 700;
}
.hero-features li strong { color: var(--brand-text); }

.hero-closing {
    color: var(--brand-muted);
    max-width: 48rem;
    margin: 0 0 1.75rem;
    font-size: 0.98rem;
    line-height: 1.55;
}

.cta-row { margin: 0; }

.btn-primary {
    display: inline-block;
    background: var(--brand-primary);
    color: #fff;
    padding: 0.85rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.12s ease, transform 0.12s ease;
}
.btn-primary:hover {
    background: var(--brand-primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 720px) {
    .hero { padding: 2.5rem 0 2.25rem; }
    .hero-features li { font-size: 0.95rem; }
}

/* ── Platform flyer ──────────────────────────────────────────────────
   Architecture diagram exported from Elglide_Platform_Flyer.drawio.
   Lives below the hero CTA — "tell me more" content for users who
   scrolled past the primary pitch. Section background matches the
   hero gradient base so the page reads as one continuous surface. */

.platform-flyer {
    background: var(--brand-bg-soft);
    padding: 2.5rem 0 3rem;
    border-top: 1px solid var(--brand-border);
}

.platform-flyer img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 0.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    background: #fff;
}

@media (max-width: 720px) {
    .platform-flyer { padding: 1.75rem 0 2rem; }
}

/* ── Compare page (/compare.html) ───────────────────────────────────
   Elglide-vs-Fivetran comparison. Mirrors the pilot app's
   /Docs/Compare (_CompareContent.cshtml + marketing.css .vs-*) — if the
   claims change there, change them here too. */

.page-hero {
    background: linear-gradient(180deg, var(--brand-bg-soft) 0%, var(--brand-bg) 100%);
    padding: 2.75rem 0 1.5rem;
}

.page-hero h1 {
    font-size: clamp(1.75rem, 3vw + 0.5rem, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
}

.page-hero .lead {
    font-size: 1.05rem;
    color: var(--brand-muted);
    max-width: 48rem;
    margin: 0;
    line-height: 1.55;
}

.compare-body { padding: 1.5rem 0 3rem; }

.vs-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 0 0 2rem;
}
@media (max-width: 720px) {
    .vs-cards { grid-template-columns: 1fr; }
}

.vs-card {
    background: var(--brand-bg-soft);
    border: 1px solid var(--brand-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
}
.vs-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--brand-text);
}
.vs-card p {
    margin: 0;
    color: var(--brand-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.vs-section-h {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.vs-tablewrap {
    overflow-x: auto;
    border: 1px solid #c9d2dd;
    border-radius: 0.75rem;
    background: #fff;
    margin: 0 0 1rem;
}

.vs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}
.vs-table th,
.vs-table td {
    text-align: left;
    vertical-align: top;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #c9d2dd;
    color: var(--brand-text);
    line-height: 1.5;
}
/* Uniform grid: 1px rule between every column (group rows span full width,
   so :not(:last-child) skips them). */
.vs-table th:not(:last-child),
.vs-table td:not(:last-child) { border-right: 1px solid #c9d2dd; }
.vs-table tr:last-child td { border-bottom: 0; }
.vs-table thead th {
    background: var(--brand-bg-soft);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-muted);
    border-bottom: 2px solid #c9d2dd;
}
.vs-table .vs-feature { width: 24%; }
.vs-table .vs-col { width: 38%; }
.vs-table tbody td:first-child { font-weight: 600; }
.vs-table thead th.vs-elglide {
    background: var(--brand-primary);
    color: #fff;
    border-bottom-color: var(--brand-primary-dark);
}
.vs-table td.vs-elglide { background: #f3f8ff; font-weight: 400; }
.vs-table .vs-group {
    background: #eef2f7;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5b6470;
    padding: 0.5rem 1rem;
}
.vs-table code {
    font-size: 0.82em;
    background: var(--brand-bg-soft);
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
}

.vs-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 0.45rem;
    vertical-align: -0.2rem;
}
.vs-yes { background: #1d9e75; color: #fff; }
.vs-no { background: #fceaea; color: #a32d2d; }
.vs-note {
    display: block;
    color: var(--brand-muted);
    font-size: 0.82rem;
    margin-top: 0.2rem;
}

.vs-disclaimer {
    color: var(--brand-muted);
    font-size: 0.78rem;
    line-height: 1.5;
    max-width: 52rem;
    margin: 0 0 2rem;
}

.compare-cta { margin: 0; }

/* ── Book a Demo (/demo.html) ───────────────────────────────────────
   Form card + pitch column. Mirrors the (retired) pilot /BookDemo page;
   posts to the /api/prospects Pages Function. */

.demo-body { padding: 0.5rem 0 3rem; }

.demo-grid {
    display: grid;
    grid-template-columns: minmax(0, 26rem) 1fr;
    gap: 2.5rem;
    align-items: start;
}
@media (max-width: 720px) {
    .demo-grid { grid-template-columns: 1fr; }
}

.form-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.field {
    display: block;
    margin: 0 0 0.85rem;
}
.field span {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.field em {
    color: #a32d2d;
    font-style: normal;
}
.field input,
.field select {
    width: 100%;
    padding: 0.5rem 0.65rem;
    font: inherit;
    font-size: 0.95rem;
    color: var(--brand-text);
    background: #fff;
    border: 1px solid #c9d2dd;
    border-radius: 0.4rem;
}
.field input:focus,
.field select:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 0;
    border-color: var(--brand-primary);
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--brand-muted);
    margin: 0 0 1.1rem;
}
.checkbox-row input { margin-top: 0.2rem; }

.btn-block {
    display: block;
    width: 100%;
    border: 0;
    cursor: pointer;
    text-align: center;
    font: inherit;
    font-weight: 600;
}

.form-note {
    font-size: 0.8rem;
    color: var(--brand-muted);
    text-align: center;
    margin: 0.75rem 0 0;
}

.alert-error {
    background: #fceaea;
    border: 1px solid #e7b3b3;
    color: #a32d2d;
    border-radius: 0.5rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    margin: 0 0 1rem;
}

/* Honeypot — visually removed but still in the form for bots. */
.hp-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.demo-pitch h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0.25rem 0 1rem;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
    border-top: 1px solid var(--brand-border);
    background: #fff;
}

.site-footer .shell {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: var(--brand-muted);
    font-size: 0.9rem;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--brand-muted);
    font-size: 0.9rem;
}
.footer-nav a:hover { color: var(--brand-primary); }

@media (max-width: 540px) {
    .footer-row { flex-direction: column; align-items: flex-start; }
}
