/* =====================================================================
   Capital X — shared design system (light, minimalist, enterprise)
   Loaded after Tailwind (CDN). Tailwind handles layout/spacing; this
   file holds the reusable components: buttons, nav, cards, bands,
   forms, UI mockups, prose and motion.
   ===================================================================== */

:root {
    --brand: #D22E1E;
    --brand-600: #B02316;
    --brand-700: #8C1D13;
    --brand-100: #FDE4E1;
    --brand-50: #FEF3F2;
    --ink-900: #111726;
    --ink-800: #1C2335;
    --ink-700: #313A50;
    --ink-600: #465068;
    --ink-500: #5F6B84;
    --ink-400: #8590A6;
    --ink-300: #B0B7C6;
    --ink-200: #D5D9E2;
    --ink-100: #ECEEF2;
    --ink-50: #F6F7F9;
    --header-h: 4.5rem;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    color: var(--ink-900);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Anchored sections clear the sticky header (+ product sub-nav). */
[id] { scroll-margin-top: calc(var(--header-h) + 4rem); }

::selection { background: rgba(210, 46, 30, .15); }

.font-display { letter-spacing: -0.025em; }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Grid children may shrink below their content width (stops wide mockups
   from pushing single-column mobile layouts off-screen). */
.grid > * { min-width: 0; }

/* Stat blocks: number (dd) on top, label (dt) below, numbers aligned. */
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; }

.text-gradient {
    background: linear-gradient(95deg, #E8604F 0%, #D22E1E 45%, #B02316 100%);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------------------------------------------------------------
   Eyebrow labels & badges
   --------------------------------------------------------------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand);
}
.eyebrow::before {
    content: "";
    width: .5rem;
    height: .5rem;
    border-radius: 9999px;
    background: currentColor;
}
.eyebrow--plain::before { display: none; }
.eyebrow--white { color: #fff; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .3125rem .875rem .3125rem .3125rem;
    border-radius: 9999px;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--brand-700);
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
}
.badge-tag {
    padding: .125rem .5rem;
    border-radius: 9999px;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: #fff;
    background: var(--brand);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .375rem .875rem;
    border-radius: 9999px;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--ink-700);
    background: #fff;
    border: 1px solid var(--ink-200);
}

/* ---------------------------------------------------------------
   Buttons & links (pill shaped)
   --------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8125rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; transition: transform .2s; }
.btn:hover svg.arrow { transform: translateX(3px); }

.btn-primary {
    color: #fff;
    background: var(--brand);
    box-shadow: 0 8px 20px -10px rgba(210, 46, 30, .8);
}
.btn-primary:hover { background: var(--brand-600); }

.btn-outline {
    color: var(--ink-900);
    background: #fff;
    border-color: var(--ink-200);
}
.btn-outline:hover { border-color: var(--ink-900); }

.btn-white { color: var(--brand-600); background: #fff; }
.btn-white:hover { background: var(--brand-50); }

.btn-outline-white { color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-outline-white:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

.btn-sm { padding: .625rem 1.125rem; font-size: .875rem; }
.btn-lg { padding: 1rem 1.75rem; font-size: 1rem; }

.link-arrow {
    min-height: 2.25rem; /* comfortable tap target on touch screens */
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-weight: 600;
    color: var(--brand);
}
.link-arrow svg { width: 1rem; height: 1rem; transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------------------------------------------------------------
   Sections
   --------------------------------------------------------------- */
.hero-light {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(900px 460px at 90% -10%, rgba(210, 46, 30, .09), transparent 62%),
        radial-gradient(700px 360px at -5% 0%, rgba(17, 23, 38, .035), transparent 60%),
        #fff;
    border-bottom: 1px solid var(--ink-100);
}

/* Subtle dot pattern used as a decoration in heroes. */
.dots {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(rgba(17, 23, 38, .13) 1px, transparent 1.2px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent);
            mask-image: radial-gradient(closest-side, #000 30%, transparent);
}

/* Solid brand band (CTA banners), in the spirit of airline promo blocks. */
.band-brand {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(120deg, #D22E1E 0%, #C02717 55%, #A61F12 100%);
    border-radius: 2rem;
}
.band-brand::before,
.band-brand::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, .16);
}
.band-brand::before { width: 520px; height: 520px; right: -140px; top: -260px; }
.band-brand::after  { width: 360px; height: 360px; right: -60px; top: -180px; }

/* ---------------------------------------------------------------
   Cards & icon tiles
   --------------------------------------------------------------- */
.card {
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: 1.25rem;
    transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card-hover:hover {
    border-color: var(--ink-200);
    box-shadow: 0 24px 48px -28px rgba(17, 23, 38, .22);
    transform: translateY(-3px);
}
.card-soft {
    background: var(--ink-50);
    border-radius: 1.25rem;
}

.icon-tile {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border-radius: .875rem;
    color: var(--brand);
    background: var(--brand-50);
}
.icon-tile svg { width: 1.375rem; height: 1.375rem; }
.icon-tile--sm { width: 2.25rem; height: 2.25rem; border-radius: .625rem; }
.icon-tile--sm svg { width: 1rem; height: 1rem; }
.icon-tile--solid { color: #fff; background: var(--brand); }

.check-list li {
    position: relative;
    padding-left: 1.75rem;
}
.check-list li + li { margin-top: .625rem; }
.check-list.grid { row-gap: .625rem; }
.check-list.grid li + li { margin-top: 0; }
.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .2rem;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 9999px;
    background: var(--brand-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23D22E1E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E") center / .75rem no-repeat;
}

.step-num {
    font-family: "Inter Tight", Inter, sans-serif;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--brand);
}

/* ---------------------------------------------------------------
   Header & navigation
   --------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
            backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--ink-100);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .5rem .875rem;
    border-radius: 9999px;
    font-size: .9375rem;
    font-weight: 500;
    color: var(--ink-700);
    transition: color .15s, background-color .15s;
}
.nav-link:hover,
.nav-link[aria-expanded="true"] { color: var(--ink-900); background: var(--ink-50); }
.nav-link[aria-current="page"] { color: var(--brand); font-weight: 600; }
.nav-link .chev { width: .875rem; height: .875rem; transition: transform .2s; }

.has-dropdown { position: relative; }
.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 24rem;
    padding-top: .75rem;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 6px);
    transition: opacity .18s, transform .18s, visibility .18s;
}
.dropdown--wide { width: 40rem; }
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.is-open .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
.has-dropdown:hover .chev,
.has-dropdown.is-open .chev { transform: rotate(180deg); }

.dropdown-panel {
    padding: .5rem;
    border-radius: 1.25rem;
    background: #fff;
    border: 1px solid var(--ink-100);
    box-shadow: 0 30px 60px -24px rgba(17, 23, 38, .28);
}
.dropdown-item {
    display: flex;
    gap: .875rem;
    padding: .75rem;
    border-radius: .875rem;
    transition: background-color .15s;
}
.dropdown-item:hover { background: var(--ink-50); }

.mobile-panel {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 49;
    overflow-y: auto;
    background: #fff;
}
.mobile-panel.is-open { display: block; }
.mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--ink-900);
    border-bottom: 1px solid var(--ink-100);
}

/* Product sub-navigation (sticky under the main header) */
.subnav {
    position: sticky;
    top: var(--header-h);
    z-index: 40;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
            backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--ink-100);
}
.subnav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 3.25rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--ink-500);
    white-space: nowrap;
    transition: color .15s;
}
.subnav-link:hover,
.subnav-link.is-active { color: var(--ink-900); }
.subnav-link.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
}

/* ---------------------------------------------------------------
   Client logo marquee
   --------------------------------------------------------------- */
.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 40s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding-right: 4rem;
}
@keyframes marquee { to { transform: translateX(-50%); } }

.client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 9rem;
    height: 3.25rem;
    filter: grayscale(1);
    opacity: .55;
    transition: filter .3s, opacity .3s;
}
.client-logo:hover { filter: none; opacity: 1; }
.client-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------------------------------------------------------------
   Forms
   --------------------------------------------------------------- */
.field-label {
    display: block;
    margin-bottom: .375rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--ink-700);
}
.field-label .opt { font-weight: 400; color: var(--ink-400); }
.field {
    display: block;
    width: 100%;
    padding: .75rem 1rem;
    font-size: .9375rem;
    color: var(--ink-900);
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: .875rem;
    transition: border-color .15s, box-shadow .15s;
}
.field::placeholder { color: var(--ink-400); }
.field:hover { border-color: var(--ink-300); }
.field:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(210, 46, 30, .12);
}
select.field {
    -webkit-appearance: none;
            appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235F6B84' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .875rem center;
    background-size: 1.125rem;
}
/* Required select still on its "Select ..." prompt: grey it like a placeholder. */
select.field:required:invalid { color: var(--ink-400); }
select.field option { color: var(--ink-900); }
textarea.field { resize: vertical; min-height: 7rem; }

.form-alert {
    display: flex;
    gap: .75rem;
    padding: .875rem 1rem;
    border-radius: .875rem;
    font-size: .875rem;
    color: var(--brand-700);
    background: var(--brand-50);
    border: 1px solid #FAC9C3;
}

/* ---------------------------------------------------------------
   UI mockups (illustrations of product screens, built in HTML)
   --------------------------------------------------------------- */
.mock {
    overflow: hidden;
    font-size: .8125rem;
    color: var(--ink-900);
    background: #fff;
    border: 1px solid #E6E9EF;
    border-radius: 1.25rem;
    box-shadow: 0 40px 80px -44px rgba(17, 23, 38, .35), 0 1px 2px rgba(17, 23, 38, .05);
}
.mock-bar {
    display: flex;
    align-items: center;
    gap: .375rem;
    padding: .625rem .875rem;
    background: var(--ink-50);
    border-bottom: 1px solid var(--ink-100);
}
.mock-bar i {
    display: block;
    width: .5rem;
    height: .5rem;
    border-radius: 9999px;
    background: var(--ink-200);
}
.mock-title {
    margin-left: .5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .6875rem;
    color: var(--ink-500);
}
.mock-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .625rem .875rem;
    border-bottom: 1px solid var(--ink-100);
}
.mock-row:last-child { border-bottom: 0; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .125rem .5rem;
    border-radius: 9999px;
    font-size: .6875rem;
    font-weight: 600;
    white-space: nowrap;
}
.pill::before {
    content: "";
    width: .375rem;
    height: .375rem;
    border-radius: 9999px;
    background: currentColor;
    opacity: .8;
}
.pill-green { color: #157347; background: #E7F6EE; }
.pill-amber { color: #935400; background: #FFF3DD; }
.pill-blue  { color: #1D4ED8; background: #EAF0FF; }
.pill-red   { color: #B02316; background: #FEF3F2; }
.pill-gray  { color: #465068; background: #F1F3F6; }

.bar-track { height: .375rem; border-radius: 9999px; background: var(--ink-100); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: var(--brand); }

.live-dot {
    position: relative;
    display: inline-block;
    width: .5rem;
    height: .5rem;
    border-radius: 9999px;
    background: #22C55E;
}
.live-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

/* Items in hero mockups appear one after another. */
.feed-item { animation: feed-in .6s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes feed-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------
   Long-form content (legal pages, blog posts)
   --------------------------------------------------------------- */
.prose-x {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--ink-700);
}
.prose-x > :first-child { margin-top: 0; }
.prose-x h2 {
    margin: 2.75rem 0 1rem;
    font-family: "Inter Tight", Inter, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.015em;
    color: var(--ink-900);
}
.prose-x h3 {
    margin: 2rem 0 .75rem;
    font-size: 1.1875rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink-900);
}
.prose-x h4 { margin: 1.5rem 0 .5rem; font-weight: 600; color: var(--ink-900); }
.prose-x p { margin: 0 0 1.25rem; }
.prose-x ul, .prose-x ol { margin: 0 0 1.5rem; padding-left: 1.375rem; }
.prose-x ul { list-style: disc; }
.prose-x ol { list-style: decimal; }
.prose-x li { margin: .5rem 0; padding-left: .25rem; }
.prose-x li::marker { color: var(--brand); }
.prose-x a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose-x strong, .prose-x b { font-weight: 600; color: var(--ink-900); }
.prose-x blockquote {
    margin: 2rem 0;
    padding: .25rem 0 .25rem 1.25rem;
    font-size: 1.125rem;
    font-style: italic;
    color: var(--ink-600);
    border-left: 3px solid var(--brand);
}
.prose-x img { max-width: 100%; height: auto; margin: 2rem 0; border-radius: 1rem; }
.prose-x hr { margin: 2.5rem 0; border: 0; border-top: 1px solid var(--ink-100); }
.prose-x code { padding: .125rem .375rem; font-size: .875em; border-radius: .375rem; background: var(--ink-50); }
.prose-x pre { overflow-x: auto; margin: 0 0 1.5rem; padding: 1rem 1.25rem; border-radius: 1rem; background: var(--ink-50); border: 1px solid var(--ink-100); }
.prose-x pre code { padding: 0; background: none; }
.prose-x table { width: 100%; margin: 0 0 1.5rem; border-collapse: collapse; font-size: .9375rem; }
.prose-x th, .prose-x td { padding: .625rem .75rem; text-align: left; border-bottom: 1px solid var(--ink-100); }
.prose-x th { font-weight: 600; color: var(--ink-900); background: var(--ink-50); }
.prose-x iframe, .prose-x video { max-width: 100%; border-radius: 1rem; }

/* ---------------------------------------------------------------
   WhatsApp floating button
   --------------------------------------------------------------- */
.wa-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 45;
    display: flex;
    align-items: center;
    gap: .625rem;
}
.wa-float-btn {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    color: #fff;
    background: #25D366;
    box-shadow: 0 12px 28px -8px rgba(17, 23, 38, .35);
    transition: transform .2s;
}
.wa-float-btn:hover { transform: scale(1.06); }
.wa-float-btn svg { width: 1.75rem; height: 1.75rem; }
.wa-float-tip {
    padding: .5rem .75rem;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--ink-900);
    white-space: nowrap;
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: 9999px;
    box-shadow: 0 8px 24px -8px rgba(17, 23, 38, .25);
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .2s, transform .2s;
    pointer-events: none;
}
.wa-float:hover .wa-float-tip { opacity: 1; transform: none; }
@media (max-width: 640px) {
    .wa-float { right: 1rem; bottom: 1rem; }
    .wa-float-btn { width: 3rem; height: 3rem; }
    .wa-float-btn svg { width: 1.5rem; height: 1.5rem; }
}

/* ---------------------------------------------------------------
   Motion
   --------------------------------------------------------------- */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-visible,
.reveal-all [data-reveal] { opacity: 1; transform: none; }

/* Above-the-fold hero content animates without waiting for JS. */
.rise { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js [data-reveal], .rise, .feed-item { opacity: 1; transform: none; transition: none; animation: none; }
    .marquee-track, .live-dot::after { animation: none; }
}
