/* ══════════════════════════════════════════════════════════════════
   AgenticTrade — Public Pages Shared Stylesheet
   Design: Schoger 18 principles — Inter, rings, pill buttons
   ══════════════════════════════════════════════════════════════════ */

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

/* ── Design Tokens ── */
:root {
    --bg-deep: #060a13;
    --bg: #0b1120;
    --bg-card: #111827;
    --bg-card-hover: #162036;
    --border: #1e2a3a;
    --border-light: #2a3a52;
    --text: #e8edf5;
    --text-dim: #7a8ba8;
    --text-muted: #4a5a72;
    --accent: #22d3ee;
    --accent-glow: rgba(34, 211, 238, 0.15);
    --accent2: #a78bfa;
    --accent2-glow: rgba(167, 139, 250, 0.15);
    --green: #34d399;
    --green-dim: rgba(52, 211, 153, 0.12);
    --orange: #fbbf24;
    --pink: #f472b6;
    --red: #f87171;
    --max-width: 1200px;
    /* Schoger rings — replaces solid borders on containers */
    --ring: 0 0 0 1px rgba(255, 255, 255, 0.08);
    --ring-hover: 0 0 0 1px rgba(255, 255, 255, 0.14);
    --ring-inset: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* ── Base ── */
body {
    font-family: "Inter", "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-deep);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #67e8f9; }

img { max-width: 100%; height: auto; }

p { text-wrap: pretty; }

/* ── Animated Background ── */
.bg-effects {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0;
    background:
        radial-gradient(ellipse 800px 800px at 80% 20%, rgba(34,211,238,0.06), transparent),
        radial-gradient(ellipse 600px 600px at 20% 80%, rgba(167,139,250,0.05), transparent);
}

.page-content { position: relative; z-index: 1; }

/* ── Navigation ── */
.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    background: rgba(6, 10, 19, 0.85);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}
.brand:hover { color: var(--text); text-decoration: none; }

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
}

.brand-sep { color: var(--text-muted); font-weight: 300; margin: 0 2px; }
.brand-sub { color: var(--text-dim); font-weight: 400; font-size: 14px; }

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }

/* Nav CTA — pill */
.nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #000;
    transition: opacity 0.2s;
}
.nav-cta:hover { color: #000; opacity: 0.9; }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

/* ── Content Containers ── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}

.section {
    padding: 80px 0;
}

/* Well-styled container — Schoger inset ring, ultra-light bg */
.section-alt {
    background: rgba(255, 255, 255, 0.02);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06),
                inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

/* ── Typography — tighter tracking on large text, text-wrap ── */
h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    text-wrap: balance;
}
h2 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    text-wrap: balance;
}
h3 {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}
h4 { font-size: 18px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }

.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 45ch;
    margin-bottom: 40px;
    line-height: 1.7;
}

/* ── Eyebrow Label — monospace, uppercase, wide tracking ── */
.eyebrow {
    font-family: "SF Mono", "Fira Code", "JetBrains Mono", Menlo, monospace;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: block;
}

/* ── Buttons — pill shape, equal height ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 32px;
    border-radius: 9999px;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #000;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    box-shadow: 0 4px 25px rgba(34, 211, 238, 0.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 35px rgba(34, 211, 238, 0.4);
    color: #000;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 32px;
    border-radius: 9999px;
    font-size: 15px;
    font-weight: 600;
    background: transparent;
    color: var(--accent);
    border: none;
    box-shadow: inset 0 0 0 1.5px rgba(34, 211, 238, 0.35);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}
.btn-secondary:hover {
    box-shadow: inset 0 0 0 1.5px var(--accent), 0 4px 20px rgba(34, 211, 238, 0.15);
    color: var(--accent);
}

/* ── Cards — outer ring replaces solid border ── */
.card {
    background: var(--bg-card);
    border: none;
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--ring);
    transition: all 0.25s ease;
}
.card:hover {
    box-shadow: var(--ring-hover), 0 8px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* ── Code Blocks — outer ring ── */
.code-block {
    background: var(--bg-card);
    border: none;
    border-radius: 12px;
    padding: 24px 28px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.7;
    box-shadow: var(--ring);
}

code {
    font-family: "SF Mono", "Fira Code", "JetBrains Mono", Menlo, monospace;
}

.kw { color: var(--accent2); }
.str { color: var(--green); }
.cmt { color: var(--text-muted); }
.fn { color: var(--accent); }
.num { color: var(--orange); }

/* ── Tables ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.data-table th {
    text-align: left;
    padding: 14px 20px;
    background: var(--bg-card);
    color: var(--text-dim);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
}

.data-table tr:hover td {
    background: rgba(17, 24, 39, 0.5);
}

.data-table .highlight {
    color: var(--accent);
    font-weight: 700;
}

/* ── FAQ ── */
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
}

.faq-q {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.faq-a {
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.7;
    max-width: 65ch;
}

/* ── Canvas Grid — subtle full-width section divider ── */
.canvas-grid {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 0;
    padding: 0;
}

/* ── Section Header Inline — title + subtitle on same line ── */
.section-header-inline {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.section-header-inline h2 { margin-bottom: 0; }
.section-header-inline p {
    color: var(--text-dim);
    font-size: 18px;
    margin-bottom: 0;
}

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 48px 32px 32px;
    background: var(--bg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text);
}

.footer-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
    max-width: 300px;
}

/* Footer heading as eyebrow style */
.footer-heading {
    font-family: "SF Mono", "Fira Code", "JetBrains Mono", Menlo, monospace;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Small text line-height doubled for readability */
.footer-links a {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

.footer-bottom {
    max-width: var(--max-width);
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 2;
}

/* ── Badges — pill shape ── */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-green { background: var(--green-dim); color: var(--green); }
.badge-accent { background: var(--accent-glow); color: var(--accent); }

/* ── Utilities ── */
.text-center { text-align: center; }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }
.mt-40 { margin-top: 40px; }

/* ── Responsive ── */
@media (max-width: 900px) {
    h1 { font-size: 36px; }
    h2 { font-size: 26px; }
    .container { padding: 0 20px; }
    .section { padding: 60px 0; }
    .topnav { padding: 12px 16px; flex-wrap: wrap; }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        margin-top: 12px;
        border-top: 1px solid var(--border);
        padding-top: 12px;
    }
    .nav-links.show { display: flex; }
    .nav-links a { padding: 10px 0; border-bottom: 1px solid var(--border); }
    .nav-links a.hide-mobile { display: none; }
    .nav-toggle { display: block; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 640px) {
    h1 { font-size: 28px; }
    h2 { font-size: 22px; }
    .section { padding: 48px 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .btn-primary { height: 42px; padding: 0 24px; font-size: 14px; }
    .btn-secondary { height: 42px; padding: 0 24px; font-size: 14px; }
}

@media (max-width: 480px) {
    h1 { font-size: 24px; }
    .container { padding: 0 16px; }
    .section { padding: 40px 0; }
    .topnav { padding: 10px 12px; }
    .btn-primary { width: 100%; }
    .btn-secondary { width: 100%; }
}
