/*
 * Wave 12: design token layer for the public marketing surface only (nav,
 * homepage, footer). Never imported by the authenticated app (app.css) — see
 * base_public.html.twig, which links this file directly instead of going
 * through the shared importmap('app') JS/CSS bundle.
 *
 * Tokens sit ON TOP of the SB UI Kit Pro theme (public/ui-kit/css/styles.css)
 * — they don't replace it. --marketing-accent reuses the theme's own
 * --bs-primary (#0061f2) so there is exactly ONE accent color site-wide,
 * never a second competing brand color.
 */
:root {
    --marketing-accent: #0061f2;
    --marketing-ink: #1b2a4a;
    --marketing-muted: #5c6b8a;
    --marketing-bg-alt: #f6f4f0; /* warm neutral, not flat white, for alternating sections */
    --marketing-border: #e7e2d9;

    /* Type scale — hero display down to caption. Applied via utility classes
       below rather than overriding Bootstrap's h1-h6 globally (those are
       still used inside cards/admin-adjacent partials this file never loads). */
    --marketing-fs-display: clamp(2.25rem, 1.7rem + 2.2vw, 3.25rem);
    --marketing-fs-h2: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
    --marketing-fs-h3: 1.25rem;
    --marketing-fs-body: 1.0625rem;
    --marketing-fs-small: 0.9375rem;
    --marketing-fs-caption: 0.8125rem;

    --marketing-space-section: clamp(3.5rem, 3rem + 2vw, 6rem);
    --marketing-nav-height: 84px;
}

/* ---------- Type scale utilities ---------- */
.marketing-display { font-size: var(--marketing-fs-display); font-weight: 700; line-height: 1.15; color: var(--marketing-ink); }
.marketing-h2 { font-size: var(--marketing-fs-h2); font-weight: 700; color: var(--marketing-ink); }
.marketing-h3 { font-size: var(--marketing-fs-h3); font-weight: 600; color: var(--marketing-ink); }
.marketing-body { font-size: var(--marketing-fs-body); }
.marketing-small { font-size: var(--marketing-fs-small); }
.marketing-caption { font-size: var(--marketing-fs-caption); color: var(--marketing-muted); }
.marketing-muted { color: var(--marketing-muted); }

/* ---------- Section rhythm ---------- */
.marketing-section { padding-top: var(--marketing-space-section); padding-bottom: var(--marketing-space-section); }
.marketing-section-alt { background-color: var(--marketing-bg-alt); }
.marketing-prose { max-width: 640px; }

/* ---------- Sticky nav + condensed state ----------
   The nav's own box height (min-height) never changes between states, so
   condensing never reflows content below it (CLS-safe) — only internal
   padding/shadow/transform animate. */
.navbar-costiva {
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: var(--marketing-nav-height);
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid transparent;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.navbar-costiva .navbar-costiva-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--marketing-nav-height);
    transition: min-height 0.2s ease;
}
.navbar-costiva.is-condensed {
    box-shadow: 0 2px 12px rgba(27, 42, 74, 0.08);
    border-bottom-color: var(--marketing-border);
}
.navbar-costiva.is-condensed .navbar-costiva-inner {
    min-height: calc(var(--marketing-nav-height) - 18px);
}
.navbar-costiva.is-condensed .navbar-brand-mark {
    transform: scale(0.92);
}
.navbar-brand-mark { transition: transform 0.2s ease; display: inline-block; }

@media (prefers-reduced-motion: reduce) {
    .navbar-costiva,
    .navbar-costiva .navbar-costiva-inner,
    .navbar-brand-mark,
    .loop-connector path,
    .loop-connector-mini path {
        transition: none !important;
        animation: none !important;
    }
}

.navbar-costiva .navbar-nav .nav-item {
    margin-right: 0.5rem;
}
.navbar-costiva .navbar-nav .nav-link {
    padding: 0.5rem 0.85rem;
    color: var(--marketing-ink);
}

/* ---------- Free Tools mega-dropdown ---------- */
.nav-tools-dropdown { min-width: 560px; padding: 1.25rem; }
.nav-tools-dropdown .dropdown-header { padding-left: 0; font-weight: 700; color: var(--marketing-accent); }
.nav-tools-dropdown .dropdown-item { white-space: normal; padding: 0.35rem 0; }
.nav-tools-dropdown .nav-tool-purpose { display: block; font-size: var(--marketing-fs-caption); color: var(--marketing-muted); }

/* ---------- Mobile off-canvas ---------- */
.marketing-offcanvas .offcanvas-body { display: flex; flex-direction: column; }
.marketing-offcanvas-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--marketing-border); }
body.marketing-offcanvas-open { overflow: hidden; }

/* ---------- Hero screenshot composition ---------- */
.hero-shot-frame {
    position: relative;
    border-radius: 12px;
    box-shadow: 0 30px 60px -20px rgba(27, 42, 74, 0.35);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--marketing-border);
}
.hero-shot-frame .browser-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: #eef0f4;
    border-bottom: 1px solid var(--marketing-border);
}
.hero-shot-frame .browser-chrome span {
    width: 10px; height: 10px; border-radius: 50%; background: #d5d9e0; display: inline-block;
}
.hero-shot-frame img { display: block; width: 100%; height: auto; }
.hero-shot-overlay {
    position: absolute;
    width: 62%;
    right: -6%;
    bottom: -12%;
    border-radius: 10px;
    box-shadow: 0 18px 40px -12px rgba(27, 42, 74, 0.4);
    border: 1px solid var(--marketing-border);
    overflow: hidden;
    background: #fff;
}
.hero-shot-overlay img { display: block; width: 100%; height: auto; }
@media (max-width: 991.98px) {
    .hero-shot-overlay { display: none; }
}

/* ---------- Loop signature element ---------- */
.loop-step { text-align: center; position: relative; z-index: 1; }
.loop-connector {
    position: absolute;
    top: 38px; /* vertical center of the 80px (icon-stack-xl) circles above */
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 0;
}
.loop-connector path {
    stroke-dasharray: 800;
    stroke-dashoffset: 0;
}
.loop-connector:not(.is-drawn) path {
    /* Only hidden-then-drawn once JS confirms the observer is attached —
       never relies on JS to become visible at all (see loop_connector_controller.js). */
    animation: none;
}
.loop-connector.js-armed:not(.is-drawn) path { stroke-dashoffset: 800; transition: stroke-dashoffset 1.1s ease; }
.loop-connector.js-armed.is-drawn path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s ease; }

/* ---------- Stat strip (honest numbers only) ---------- */
.marketing-stat-strip { color: var(--marketing-muted); font-size: var(--marketing-fs-small); }
.marketing-stat-strip strong { color: var(--marketing-ink); }

/* ---------- Tool card badge ---------- */
.tool-card-badge {
    display: inline-block;
    font-size: var(--marketing-fs-caption);
    font-weight: 600;
    color: var(--marketing-accent);
    background: rgba(0, 97, 242, 0.08);
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
}
