/* ==========================================================================
   SocBy - shared styles
   ========================================================================== */

:root {
    --brand: #5b6cff;
    --brand-2: #8a5cf6;
    --brand-soft: #eef0ff;
    --ink: #0f1330;
    --ink-2: #3b4163;
    --muted: #6b7194;
    --line: #e6e8f2;
    --bg: #f7f8fc;
    --surface: #ffffff;
    --footer: #0b0e24;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 19, 48, .06), 0 1px 3px rgba(15, 19, 48, .04);
    --shadow: 0 10px 30px -12px rgba(15, 19, 48, .18);
    --gradient: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    --max: 1160px;
    --nav-h: 72px;
}

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

* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-2);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--brand); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-2); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; letter-spacing: -.02em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.skip-link {
    position: absolute; left: -9999px; top: 8px; z-index: 100;
    background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; color: #fff; }

:focus-visible { outline: 3px solid rgba(91, 108, 255, .45); outline-offset: 2px; border-radius: 6px; }

/* ---------- Navbar ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    height: var(--nav-h);
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(230, 232, 242, .8);
}
.nav .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; box-shadow: var(--shadow-sm); }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
    display: inline-block; padding: 8px 14px; border-radius: 999px;
    color: var(--ink-2); font-weight: 500; font-size: .95rem;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--brand-soft); }

.nav-toggle {
    display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px;
    background: #fff; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: .2s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: .98rem;
    transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 10px 24px -10px rgba(91, 108, 255, .8); }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px -10px rgba(91, 108, 255, .9); }
.btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .28); }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .18); }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden; color: #fff;
    background: radial-gradient(1200px 600px at 85% -10%, rgba(138, 92, 246, .55), transparent 60%),
                radial-gradient(900px 500px at -10% 110%, rgba(91, 108, 255, .55), transparent 60%),
                #0d1033;
    padding: 110px 0 120px;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .14; mix-blend-mode: screen; }
.hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.3fr .9fr; align-items: center; gap: 56px; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); color: #dfe2ff;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, .2); }

.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.75rem); font-weight: 800; margin: 22px 0 18px; letter-spacing: -.035em; }
.hero h1 .grad { background: linear-gradient(90deg, #a5b4ff, #d8b4fe); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.15rem; color: #c9cdf2; max-width: 560px; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual { display: flex; justify-content: center; }
.hero-logo-wrap {
    position: relative; width: 300px; height: 300px; border-radius: 40px; padding: 18px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .04));
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6);
    animation: float 6s ease-in-out infinite;
}
.hero-logo-wrap::before {
    content: ""; position: absolute; inset: -40px; z-index: -1; border-radius: 50%;
    background: var(--gradient); filter: blur(70px); opacity: .55;
}
.hero-logo-wrap img { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.kicker {
    display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--brand); background: var(--brand-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.about-grid h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 800; margin: 12px 0 18px; }
.about-grid p { margin-bottom: 16px; font-size: 1.05rem; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stat {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow-sm);
}
.stat strong { display: block; font-size: 1.15rem; color: var(--ink); margin: 12px 0 4px; }
.stat span { color: var(--muted); font-size: .95rem; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.card {
    position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 32px; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d6daf5; }
.card h3 { font-size: 1.2rem; margin: 20px 0 10px; }
.card p { color: var(--muted); }

.icon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand);
}
.icon svg { width: 26px; height: 26px; }
.icon.solid { background: var(--gradient); color: #fff; box-shadow: 0 10px 20px -10px rgba(91, 108, 255, .9); }

/* Transparency */
.trust {
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
    background: linear-gradient(135deg, #10143a 0%, #1d1650 100%); color: #c9cdf2;
    border-radius: 24px; padding: 56px; position: relative; overflow: hidden;
}
.trust::before {
    content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%;
    background: var(--gradient); filter: blur(90px); opacity: .45;
}
.trust > * { position: relative; }
.trust h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 14px; }
.trust p { margin-bottom: 12px; }
.trust-links { display: grid; gap: 12px; }
.trust-link {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 20px; border-radius: 14px; color: #fff;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
    transition: background .2s, transform .2s;
}
.trust-link:hover { color: #fff; background: rgba(255, 255, 255, .13); transform: translateX(4px); }
.trust-link small { display: block; color: #aab0e0; font-size: .85rem; }
.trust-link b { font-weight: 600; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact-card { text-align: left; }
.contact-card a, .contact-card p.value { color: var(--ink); font-weight: 600; word-break: break-word; }
.contact-card a:hover { color: var(--brand); }
.contact-card .label { display: block; color: var(--muted); font-size: .9rem; margin: 18px 0 4px; }

/* ---------- Legal pages ---------- */
.page-hero {
    background: radial-gradient(900px 400px at 90% -20%, rgba(138, 92, 246, .45), transparent 60%),
                radial-gradient(700px 400px at -10% 120%, rgba(91, 108, 255, .45), transparent 60%),
                #0d1033;
    color: #c9cdf2; padding: 72px 0 64px;
}
.page-hero .crumbs { font-size: .9rem; margin-bottom: 14px; color: #aab0e0; }
.page-hero .crumbs a { color: #dfe2ff; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; margin-bottom: 12px; letter-spacing: -.03em; }
.page-hero .meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.page-hero .meta span {
    font-size: .85rem; padding: 6px 12px; border-radius: 999px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: #dfe2ff;
}

.legal { display: grid; grid-template-columns: 260px 1fr; gap: 48px; padding: 56px 24px 96px; align-items: start; }

.toc {
    position: sticky; top: calc(var(--nav-h) + 24px);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px; box-shadow: var(--shadow-sm);
    max-height: calc(100vh - var(--nav-h) - 48px); overflow: auto;
}
.toc h2 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; counter-reset: toc; }
.toc li a {
    display: block; padding: 7px 10px; border-radius: 8px; font-size: .92rem; color: var(--ink-2); line-height: 1.4;
}
.toc li a:hover { background: var(--brand-soft); color: var(--ink); }

.doc {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 48px 56px; box-shadow: var(--shadow-sm); min-width: 0;
}
.doc .summary {
    display: flex; gap: 16px; align-items: flex-start;
    background: var(--brand-soft); border: 1px solid #dde1ff; border-radius: 14px; padding: 20px 22px; margin-bottom: 36px;
}
.doc .summary .icon { flex-shrink: 0; background: #fff; width: 44px; height: 44px; }
.doc .summary p { margin: 0; color: var(--ink); }
.doc > p { margin-bottom: 16px; }
.doc h2 {
    font-size: 1.4rem; font-weight: 750; margin: 44px 0 14px; padding-top: 8px;
    display: flex; align-items: baseline; gap: 12px;
}
.doc h2 .num {
    flex-shrink: 0; font-size: .85rem; font-weight: 700; color: var(--brand); background: var(--brand-soft);
    border-radius: 8px; padding: 2px 9px; position: relative; top: -2px;
}
.doc h3 { font-size: 1.08rem; margin: 22px 0 8px; }
.doc section > p { margin-bottom: 14px; }
.doc ul { margin: 0 0 16px 0; padding-left: 0; list-style: none; }
.doc ul li { position: relative; padding-left: 26px; margin-bottom: 9px; }
.doc ul li::before {
    content: ""; position: absolute; left: 6px; top: .68em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
}
.doc strong { color: var(--ink); }

.table-wrap { overflow-x: auto; margin: 8px 0 18px; border: 1px solid var(--line); border-radius: 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.doc th, .doc td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { background: #fafbff; color: var(--ink); font-weight: 650; }
.doc tr:last-child td { border-bottom: 0; }
.doc td a { word-break: break-all; }

.callout {
    border-left: 4px solid var(--brand); background: #fafbff; border-radius: 0 12px 12px 0;
    padding: 16px 20px; margin: 8px 0 18px;
}
.callout p { margin: 0; }

.contact-box {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 10px;
}
.contact-box div { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.contact-box span { display: block; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.contact-box b, .contact-box a { color: var(--ink); font-weight: 600; word-break: break-word; }

/* ---------- Footer ---------- */
.footer { background: var(--footer); color: #a8adcf; padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 56px; }
.footer .brand { color: #fff; margin-bottom: 16px; }
.footer .brand:hover { color: #fff; }
.footer p { font-size: .95rem; }
.footer h4 { color: #fff; font-size: .95rem; font-weight: 700; margin-bottom: 18px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer a { color: #a8adcf; font-size: .95rem; }
.footer a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 3px; color: #8b93ff; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08); padding: 22px 0; font-size: .9rem;
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
}
.footer-bottom nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.hero .container > *, .about-grid > *, .trust > * { min-width: 0; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .hero-logo-wrap { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .legal { grid-template-columns: 1fr; }
    .toc { position: static; max-height: none; }
    .toc ol { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
}

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .nav-links {
        position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch;
        background: #fff; border-bottom: 1px solid var(--line); padding: 12px 16px 18px; gap: 2px;
        box-shadow: var(--shadow); display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a { border-radius: 10px; padding: 12px 14px; }

    .hero { padding: 72px 0 84px; }
    .hero .container { grid-template-columns: 1fr; text-align: center; gap: 48px; }
    .hero p.lead { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-visual { order: -1; }
    .hero-logo-wrap { width: 200px; height: 200px; border-radius: 32px; padding: 12px; }
    .hero-logo-wrap img { border-radius: 22px; }

    .section { padding: 72px 0; }
    .about-grid, .trust { grid-template-columns: 1fr; }
    .trust { padding: 36px 26px; }
    .grid-3, .contact-grid { grid-template-columns: 1fr; }

    .doc { padding: 32px 22px; }
    .contact-box { grid-template-columns: 1fr; }
    .toc ol { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; }
}
