/* Commerce Bridge marketing site — shared styles for /, /home, /platform, /integrations.
   Extracted from the former single-page home.twig so it's cached once across
   all marketing pages instead of re-shipped inline on every navigation. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --grad-a:  #667eea;
    --grad-b:  #764ba2;
    --navy:    #1a1035;
    --slate:   #2a2340;
    --ink:     #1e2233;
    --body:    #414763;
    --muted:   #6b7191;
    --light:   #f7f7fb;
    --white:   #ffffff;
    --border:  #e6e6f0;
}

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

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--body);
    background: var(--white);
    line-height: 1.65;
    overflow-x: hidden;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }

a { text-decoration: none; }

.grad-text {
    background: linear-gradient(120deg, var(--grad-a), var(--grad-b));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .85rem 1.6rem; border-radius: 10px;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    border: 1.5px solid transparent; transition: transform .18s, box-shadow .18s, background .18s, color .18s;
    min-height: 48px;
}
.btn-primary {
    background: linear-gradient(120deg, var(--grad-a), var(--grad-b));
    color: #fff; box-shadow: 0 8px 24px rgba(118,75,162,.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(118,75,162,.38); }
.btn-secondary {
    background: rgba(255,255,255,.08); color: #fff;
    border-color: rgba(255,255,255,.35);
}
.btn-secondary:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.btn-ghost {
    background: #fff; color: var(--grad-b); border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--grad-a); color: var(--grad-a); transform: translateY(-2px); }

/* ── NAV ── */
nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 66px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img.mark { height: 34px; width: auto; display: block; }
.nav-logo img.word { height: 30px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a { color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
    padding: .55rem 1.15rem; border-radius: 9px; min-height: 0;
    background: linear-gradient(120deg, var(--grad-a), var(--grad-b));
    color: #fff !important; font-weight: 600; font-size: .9rem;
}
.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ── HERO ── */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(150deg, #1a1035 0%, #3a2465 45%, #764ba2 100%);
    padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(4.5rem, 10vw, 8rem);
    text-align: center;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(102,126,234,.35) 0%, transparent 65%);
    pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-eyebrow {
    display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: #cbbef2;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
    padding: .4rem 1rem; border-radius: 100px; margin-bottom: 1.75rem;
}
.hero h1 {
    font-size: clamp(2.3rem, 5.5vw, 3.75rem); font-weight: 800; line-height: 1.1;
    letter-spacing: -.03em; color: #fff; max-width: 16ch; margin: 0 auto 1.5rem;
}
.hero p {
    font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: #d7d3ea;
    max-width: 58ch; margin: 0 auto 2.5rem; line-height: 1.6;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── SECTION SHELLS ── */
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(2.5rem, 5vw, 4rem); }
.section-label {
    font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    margin-bottom: .85rem;
}
.section-head h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: var(--ink);
    letter-spacing: -.03em; line-height: 1.15; margin-bottom: 1rem;
}
.section-head p { font-size: 1.1rem; color: var(--muted); }

/* ── MODULE GRID ── */
.modules { background: var(--light); }
.module-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.module-card {
    background: #fff; border: 1px solid var(--border); border-radius: 16px;
    padding: 2rem 1.85rem;
    transition: transform .22s, box-shadow .22s, border-color .22s;
}
.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 44px rgba(118,75,162,.14);
    border-color: transparent;
}
.module-card .m-bar {
    width: 42px; height: 4px; border-radius: 4px; margin-bottom: 1.15rem;
    background: linear-gradient(120deg, var(--grad-a), var(--grad-b));
}
.module-card h3 { font-size: 1.2rem; font-weight: 800; color: var(--ink); margin-bottom: .3rem; letter-spacing: -.01em; }
.module-card .m-tag {
    display: block; font-style: italic; font-weight: 600;
    font-size: .98rem; color: var(--grad-b); margin-bottom: .85rem;
}
.module-card p { font-size: .95rem; color: var(--body); line-height: 1.6; }

/* Home-page teaser tiles reuse .module-card's box styling but are real <a>
   links to /platform and /integrations (module-card itself stays a plain
   <div> where it's used as the literal 9-card grid on /platform). */
.teaser-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem;
}
.teaser-card { display: block; color: inherit; }
.teaser-card:hover { color: inherit; }

/* ── INTEGRATIONS STRIP / PAGE ── */
.integrations {
    background: linear-gradient(120deg, #241640, #3a2465);
    text-align: center; padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.integrations h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; margin-bottom: 2rem; letter-spacing: -.02em; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .85rem; max-width: 900px; margin: 0 auto; }
.chip {
    font-size: .95rem; font-weight: 600; color: #ece9f7;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
    padding: .6rem 1.25rem; border-radius: 100px; transition: background .2s, transform .2s;
}
.chip:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
/* Multiple labelled chip groups on the /integrations page (one per
   ConnectorCatalog category), stacked with breathing room between them. */
.chip-group + .chip-group { margin-top: 3rem; }

/* ── POSITIONING BAND ── */
.position { text-align: center; }
.position .wrap { max-width: 820px; }
.position h2 {
    font-size: clamp(1.9rem, 4.2vw, 2.8rem); font-weight: 800; letter-spacing: -.03em;
    line-height: 1.2; margin-bottom: 1.5rem; color: var(--ink);
}
.position p { font-size: clamp(1.05rem, 2.3vw, 1.25rem); color: var(--muted); line-height: 1.7; }

/* ── CLOSING CTA ── */
.closing {
    background: linear-gradient(150deg, #1a1035 0%, #4a2e7a 55%, #764ba2 100%);
    text-align: center; position: relative; overflow: hidden;
}
.closing::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse 65% 60% at 50% 100%, rgba(102,126,234,.35) 0%, transparent 65%);
    pointer-events: none;
}
.closing .wrap { position: relative; }
.closing h2 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); font-weight: 800; color: #fff; letter-spacing: -.03em; margin-bottom: 1.15rem; }
.closing p { font-size: 1.15rem; color: #d7d3ea; max-width: 56ch; margin: 0 auto 2.4rem; }
.closing-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ── */
footer { background: var(--navy); padding: 3rem 0; border-top: 1px solid rgba(255,255,255,.06); }
.footer-inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 1.25rem;
}
.footer-logo { display: flex; align-items: center; gap: 8px; }
.footer-logo img.mark { height: 30px; width: auto; display: block; }
.footer-logo img.word { height: 26px; width: auto; display: block; }
.footer-copy { font-size: .82rem; color: #7a729c; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: .82rem; color: #9a92bc; transition: color .2s; }
.footer-links a:hover { color: #fff; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .module-grid, .teaser-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute; top: 66px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--border);
        padding: .5rem clamp(1.25rem, 4vw, 3rem) 1rem;
        box-shadow: 0 8px 20px rgba(0,0,0,.08);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: .85rem 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
    .nav-links a:last-child { border-bottom: none; }
    .nav-links .nav-cta { justify-content: center; margin-top: .65rem; padding: .8rem; }
}
@media (max-width: 620px) {
    .module-grid, .teaser-grid { grid-template-columns: 1fr; }
    .hero-actions .btn, .closing-actions .btn { width: 100%; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ── MODULE CARD ICONS (replacing .m-bar with inline SVG) ── */
.module-card .m-icon {
    width: 28px; height: 28px; margin-bottom: 1.15rem;
    color: var(--grad-a);
    flex-shrink: 0;
    display: block;
}
.module-card .m-icon:hover {
    color: var(--grad-b);
    transition: color .2s;
}

/* ── TRUST SECTIONS ── */
.trust-sections { background: var(--light); }
.trust-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem;
}
.trust-card {
    background: #fff; border: 1px solid var(--border); border-radius: 16px;
    padding: 2rem 1.85rem;
    transition: transform .22s, box-shadow .22s, border-color .22s;
}
.trust-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 44px rgba(118,75,162,.14);
    border-color: transparent;
}
.trust-card h3 { font-size: 1.2rem; font-weight: 800; color: var(--ink); margin-bottom: 1rem; letter-spacing: -.01em; }
.trust-card p { font-size: .95rem; color: var(--body); line-height: 1.6; }

/* ── DEMO SECTION ── */
.demo-section {
    background: #fff;
    text-align: center;
    padding: clamp(3rem, 6vw, 5rem) 0;
}
.demo-section h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800;
    color: var(--ink); margin-bottom: 2rem; letter-spacing: -.02em;
}
.demo-gif {
    max-width: 100%; height: auto; border-radius: 12px;
    box-shadow: 0 12px 40px rgba(118,75,162,.16);
}

/* ── RESPONSIVE TRUST/DEMO ── */
@media (max-width: 768px) {
    .trust-grid { grid-template-columns: 1fr; }
}
