/* ============================================================
 * Sociably marketing design system — v2.9.0
 * Dark Linear-inspired. Shared across index, use-cases, changelog.
 * Other marketing pages (about, compare, contact, perfex-crm-ai)
 * still use their inline light themes until redesigned.
 * ============================================================ */

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

:root {
    /* Surfaces */
    --bg:           #0a0a0a;
    --surface:      #141414;
    --surface-hi:   #1c1c1c;
    --border:       #262626;
    --border-hi:    #363636;

    /* Text */
    --text:         #fafafa;
    --text-dim:     #a1a1a1;
    --text-dimmer:  #6b6b6b;

    /* Accent + brand */
    --blue:         #3b82f6;
    --blue-dim:     #1d4ed8;
    --atrisk:       #ff623f;
    --watch:        #fe8b21;
    --healthy:      #50bd64;
    --dormant:      #8b8b8b;

    /* Typography */
    --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, monospace;

    /* Rhythm */
    --radius:    10px;
    --radius-lg: 16px;
    --transition: 0.18s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior:smooth; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 300;
}

a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text); }

/* ===== Nav ===== */
nav {
    position: fixed; top:0; left:0; right:0; z-index:100;
    background: rgba(10,10,10,0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 60px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display:flex; align-items:center; gap:10px; color:var(--text); }
.nav-logo:hover { color: var(--text); }
.nav-logo-mark {
    width:30px; height:30px; border-radius:50%;
    background: var(--surface); border:1px solid var(--border);
    display:flex; align-items:center; justify-content:center; color: var(--text);
}
.nav-logo-mark svg { width:16px; height:16px; }
.nav-wordmark { font-size:15px; font-weight:500; letter-spacing:-0.02em; }
.nav-right { display:flex; align-items:center; gap:4px; }
.nav-link {
    font-size:13px; color:var(--text-dim); font-weight:400;
    padding: 8px 14px; border-radius:6px;
    transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-cta {
    font-size:13px; font-weight:500;
    background: var(--text); color: var(--bg);
    padding: 9px 18px; border-radius: 8px;
    margin-left: 6px;
    transition: transform var(--transition), background var(--transition);
}
.nav-cta:hover { background: #fff; transform: translateY(-1px); color: var(--bg); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-sans); font-size: 14px; font-weight: 500;
    padding: 11px 22px; border-radius: 9px;
    cursor: pointer; text-decoration: none; border: 1px solid transparent;
    transition: all var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #fff; transform: translateY(-1px); color: var(--bg); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--border-hi); background: var(--surface-hi); }
.btn-lg { font-size: 15px; padding: 14px 28px; border-radius: 10px; }

/* ===== Layout ===== */
.container { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 32px; }
section { padding: 110px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }

/* Section label — the mono uppercase marker with trailing rule */
.section-label {
    font-size: 11px; font-family: var(--font-mono); font-weight: 500;
    color: var(--blue); letter-spacing: 0.1em; text-transform: uppercase;
    margin-bottom: 24px; display: flex; align-items: center; gap: 14px;
}
.section-label::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
    max-width: 56px;
}

/* ===== Typography ===== */
h1 {
    font-size: clamp(40px, 5.5vw, 68px);
    font-weight: 300;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--text);
    max-width: 860px;
    margin-bottom: 22px;
}
h1 em, h1 strong { font-style: normal; font-weight: 500; }
h2 {
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 300;
    letter-spacing: -0.028em;
    line-height: 1.12;
    margin-bottom: 18px;
    color: var(--text);
}
h2 em, h2 strong { font-style: normal; font-weight: 500; }
h3 {
    font-size: 20px; font-weight: 500; letter-spacing: -0.015em;
    margin-bottom: 10px; color: var(--text);
}

.lead {
    font-size: clamp(17px, 1.6vw, 20px);
    font-weight: 300;
    color: var(--text-dim);
    max-width: 640px;
    line-height: 1.6;
}
.section-sub {
    font-size: 17px; font-weight: 300;
    color: var(--text-dim);
    max-width: 560px;
    line-height: 1.6;
    margin-bottom: 56px;
}

/* ===== Hero ===== */
.hero {
    padding: 150px 0 100px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.hero::before {
    content: '';
    position: absolute; top: -240px; right: -160px;
    width: 720px; height: 720px;
    background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(59,130,246,0.1);
    color: var(--blue);
    font-size: 11px; font-weight: 500; font-family: var(--font-mono);
    padding: 5px 13px; border-radius: 20px;
    margin-bottom: 32px;
    border: 1px solid rgba(59,130,246,0.25);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 10px var(--blue); }
.hero-sub {
    font-size: clamp(17px, 1.7vw, 20px); font-weight: 300;
    color: var(--text-dim); max-width: 620px;
    line-height: 1.55; margin-bottom: 44px;
}
.hero-ctas { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-note {
    font-size: 12px; color: var(--text-dimmer);
    margin-top: 18px; font-family: var(--font-mono);
}

/* ===== Cards / Grids ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: border-color var(--transition), background var(--transition);
}
.card:hover { border-color: var(--border-hi); background: var(--surface-hi); }
.card-label {
    font-size: 10px; font-family: var(--font-mono);
    color: var(--blue); letter-spacing: 0.08em; text-transform: uppercase;
    margin-bottom: 16px; font-weight: 500;
}
.card-title { font-size: 17px; font-weight: 500; margin-bottom: 10px; }
.card-body { font-size: 14px; color: var(--text-dim); line-height: 1.65; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.grid-3 > * { background: var(--surface); padding: 36px 32px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

/* ===== Scroll fade-in ===== */
.fade-in { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== Footer ===== */
footer.marketing-footer {
    padding: 48px 32px 36px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 20px;
}
.footer-logo { display: flex; align-items: center; gap: 10px; color: var(--text); }
.footer-logo-mark {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; color: var(--text);
}
.footer-logo-mark svg { width: 14px; height: 14px; }
.footer-wordmark { font-size: 14px; font-weight: 500; letter-spacing: -0.02em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-link { font-size: 12px; color: var(--text-dim); }
.footer-link:hover { color: var(--text); }
.footer-copy { font-size: 11px; color: var(--text-dimmer); font-family: var(--font-mono); }

/* ===== Announcement bar (FOMO / beta scarcity) ===== */
#announcement-bar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 101;
    background: #fe8b21;
    color: #fff;
    font-size: 13px;
    font-family: var(--font-sans);
    font-weight: 400;
    text-align: center;
    padding: 9px 48px;
    min-height: 38px;
    display: flex; align-items: center; justify-content: center;
    gap: 6px; line-height: 1.4;
}
#announcement-bar strong { font-weight: 600; }
#announcement-bar .ab-sep { opacity: 0.55; margin: 0 2px; }
#announcement-bar a {
    color: #fff; text-decoration: underline; text-underline-offset: 2px;
    font-weight: 500; margin-left: 3px;
}
#announcement-bar a:hover { color: #fff; text-decoration: none; }
#announcement-bar code {
    background: rgba(0,0,0,0.18);
    padding: 1px 6px; border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
    color: #fff;
}
#announcement-bar .ab-close {
    position: absolute; top: 50%; right: 8px;
    transform: translateY(-50%);
    background: transparent; border: none; color: #fff;
    font-size: 20px; line-height: 1; cursor: pointer;
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    padding: 0; opacity: 0.85;
    transition: background 0.15s, opacity 0.15s;
}
#announcement-bar .ab-close:hover { background: rgba(0,0,0,0.18); opacity: 1; }
body.has-announcement nav { top: 38px; }
body.has-announcement { padding-top: 38px; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
    nav { padding: 0 20px; }
    .nav-link { display: none; }
    .nav-link.always-show { display: inline-flex; }
    .container, .container-narrow { padding: 0 24px; }
    section { padding: 72px 0; }
    .hero { padding: 120px 0 72px; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 12px; }
    .grid-3 > * { padding: 28px 24px; }
}
@media (max-width: 720px) {
    #announcement-bar { font-size: 12px; padding: 8px 40px; min-height: 34px; gap: 4px; flex-wrap: wrap; }
    body.has-announcement nav { top: 34px; }
    body.has-announcement { padding-top: 34px; }
}
