/* ============================================================
   AlgoCharting — Landing Page & Public Page Styles
   ============================================================ */

:root {
    --lp-primary: #4a6fa5;
    --lp-accent: #3498db;
    --lp-success: #27ae60;
    --lp-danger: #e74c3c;
    --lp-dark: #1a1a2e;
    --lp-dark-mid: #16213e;
    --lp-dark-light: #1f2b45;
    --lp-gradient: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    --lp-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Global ---- */
html { scroll-behavior: smooth; }

body {
    font-family: var(--lp-font);
    color: #1e293b;
    overflow-x: hidden;
}

/* ---- Navbar ---- */
.navbar {
    padding: .75rem 0;
    transition: background .3s, box-shadow .3s, padding .3s;
    background: transparent;
}
.navbar-scrolled {
    background: rgba(26, 26, 46, .97) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,.25);
    padding: .5rem 0;
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.35rem;
    color: #fff !important;
}
.navbar .nav-link {
    color: rgba(255,255,255,.8) !important;
    font-weight: 500;
    font-size: .9rem;
    transition: color .2s;
}
.navbar .nav-link:hover { color: #fff !important; }
.nav-piped .nav-item + .nav-item .nav-link::before {
    content: '|';
    color: rgba(255,255,255,.3);
    margin-right: .75rem;
    font-weight: 300;
}
.btn-cta {
    background: var(--lp-gradient);
    color: #fff !important;
    border: none;
    font-weight: 600;
    padding: .45rem 1.25rem;
    border-radius: 6px;
    transition: transform .2s, box-shadow .2s;
}
.btn-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(52,152,219,.4);
    color: #fff;
}
.btn-cta-lg {
    padding: .75rem 2rem;
    font-size: 1.05rem;
    border-radius: 8px;
}

/* ---- Hero ---- */
.hero-section {
    background: linear-gradient(135deg, var(--lp-dark) 0%, var(--lp-dark-mid) 50%, var(--lp-dark-light) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 7rem 0 5rem;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(52,152,219,.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}
.hero-title .text-gradient {
    background: linear-gradient(135deg, #3498db, #27ae60);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,.7);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 2rem;
}

/* Terminal mockup */
.terminal-card {
    background: #0d1117;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,.5);
    border: 1px solid rgba(255,255,255,.08);
}
.terminal-header {
    background: #161b22;
    padding: .6rem 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }
.terminal-body {
    padding: 1.25rem;
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    font-size: .78rem;
    line-height: 1.8;
    color: #c9d1d9;
    min-height: 220px;
}
.terminal-body .t-green { color: #3fb950; }
.terminal-body .t-blue { color: #58a6ff; }
.terminal-body .t-yellow { color: #d29922; }
.terminal-body .t-red { color: #f85149; }
.terminal-body .t-muted { color: #6e7681; }

/* ---- Trust Bar ---- */
.trust-bar {
    background: #fff;
    padding: 3rem 0;
    border-bottom: 1px solid #e2e8f0;
}
.trust-item {
    text-align: center;
    padding: 1rem;
}
.trust-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--lp-primary);
    line-height: 1;
    margin-bottom: .25rem;
}
.trust-label {
    font-size: .85rem;
    color: #64748b;
    font-weight: 500;
}

/* ---- Section Common ---- */
.lp-section {
    padding: 5rem 0;
}
.lp-section-dark {
    background: linear-gradient(135deg, var(--lp-dark) 0%, var(--lp-dark-mid) 100%);
    color: #fff;
}
.section-badge {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--lp-accent);
    margin-bottom: .75rem;
}
.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.section-subtitle {
    font-size: 1.05rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 3rem;
}
.lp-section-dark .section-subtitle { color: rgba(255,255,255,.6); }

/* ---- Feature Cards ---- */
.feature-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0,0,0,.08);
    border-color: var(--lp-accent);
}
.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
}
.feature-icon.blue   { background: rgba(52,152,219,.1); color: #3498db; }
.feature-icon.green  { background: rgba(39,174,96,.1);  color: #27ae60; }
.feature-icon.purple { background: rgba(142,68,173,.1); color: #8e44ad; }
.feature-icon.orange { background: rgba(243,156,18,.1); color: #f39c12; }
.feature-icon.red    { background: rgba(231,76,60,.1);  color: #e74c3c; }
.feature-icon.teal   { background: rgba(23,162,184,.1); color: #17a2b8; }
.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: .5rem;
}
.feature-card p {
    font-size: .9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* ---- How It Works ---- */
.step-card {
    text-align: center;
    position: relative;
    padding: 0 1rem;
}
.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--lp-gradient);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    position: relative;
    z-index: 1;
}
.step-connector {
    position: absolute;
    top: 28px;
    left: 60%;
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, var(--lp-accent), rgba(52,152,219,.2));
}
.step-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: .5rem;
}
.step-card p {
    font-size: .9rem;
    color: #64748b;
    line-height: 1.6;
}

/* ---- Markets Section ---- */
.market-card {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
}
.market-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.market-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.market-card li {
    padding: .5rem 0;
    font-size: .9rem;
    color: rgba(255,255,255,.75);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.market-card li i { color: var(--lp-success); font-size: .8rem; }

/* ---- FAQ ---- */
.faq-section .accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px !important;
    margin-bottom: .75rem;
    overflow: hidden;
}
.faq-section .accordion-button {
    font-weight: 600;
    font-size: .95rem;
    padding: 1.1rem 1.25rem;
    background: #fff;
    color: #1e293b;
    box-shadow: none;
}
.faq-section .accordion-button:not(.collapsed) {
    background: #f8fafc;
    color: var(--lp-primary);
}
.faq-section .accordion-body {
    font-size: .9rem;
    color: #64748b;
    line-height: 1.7;
    padding-top: 0;
}

/* ---- CTA Section ---- */
.cta-section {
    padding: 5rem 0;
}
.cta-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: .75rem;
}
.cta-section p {
    color: rgba(255,255,255,.65);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

/* ---- Footer ---- */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 3rem 0 1.5rem;
}
.site-footer h5,
.site-footer h6 {
    color: #e2e8f0;
    font-weight: 600;
    margin-bottom: 1rem;
}
.footer-links li { margin-bottom: .4rem; }
.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: .88rem;
    transition: color .2s;
}
.footer-links a:hover { color: #fff; }

/* ---- Signup Page ---- */
.signup-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 3rem;
    background: linear-gradient(135deg, var(--lp-dark) 0%, var(--lp-dark-mid) 100%);
}
.signup-card {
    background: #fff;
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 15px 40px rgba(0,0,0,.3);
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}
.signup-card .form-control {
    padding: .75rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    font-size: .9rem;
}
.signup-card .form-control:focus {
    border-color: var(--lp-accent);
    box-shadow: 0 0 0 3px rgba(52,152,219,.15);
}
.password-strength {
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    margin-top: .4rem;
    overflow: hidden;
}
.password-strength-bar {
    height: 100%;
    border-radius: 2px;
    width: 0;
    transition: width .3s, background .3s;
}

/* ---- Legal Pages (Terms, Privacy) ---- */
.legal-page {
    padding: 7rem 0 4rem;
    background: #f8fafc;
    min-height: 100vh;
}
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid #e2e8f0;
}
.legal-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: .25rem;
}
.legal-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #f1f5f9;
}
.legal-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #334155;
    margin-top: 1.25rem;
    margin-bottom: .5rem;
}
.legal-content p,
.legal-content li {
    font-size: .9rem;
    color: #475569;
    line-height: 1.75;
}
.legal-content ul {
    padding-left: 1.25rem;
}
.legal-content li {
    margin-bottom: .35rem;
}
.legal-content a {
    color: var(--lp-accent);
    text-decoration: none;
}
.legal-content a:hover {
    text-decoration: underline;
}

/* ---- Contact Page ---- */
.contact-page {
    padding: 7rem 0 4rem;
    background: #f8fafc;
    min-height: 100vh;
}
.contact-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid #e2e8f0;
}
.contact-card .form-control,
.contact-card .form-select {
    padding: .75rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    font-size: .9rem;
}
.contact-card .form-control:focus,
.contact-card .form-select:focus {
    border-color: var(--lp-accent);
    box-shadow: 0 0 0 3px rgba(52,152,219,.15);
}
.contact-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid #e2e8f0;
}
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
}
.contact-info-item:not(:last-child) {
    border-bottom: 1px solid #f1f5f9;
}
.contact-info-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.contact-info-icon.blue   { background: rgba(52,152,219,.1); color: #3498db; }
.contact-info-icon.green  { background: rgba(39,174,96,.1);  color: #27ae60; }
.contact-info-icon.purple { background: rgba(142,68,173,.1); color: #8e44ad; }
.contact-info-icon.orange { background: rgba(243,156,18,.1); color: #f39c12; }
.contact-info-item h5 {
    font-size: .95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: .2rem;
}
.contact-info-item p {
    font-size: .85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}
.contact-info-item a {
    color: var(--lp-accent);
    text-decoration: none;
}
.contact-info-item a:hover { text-decoration: underline; }
.contact-info-card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}
.contact-info-card ul a {
    color: #475569;
    text-decoration: none;
    font-size: .88rem;
    transition: color .2s;
}
.contact-info-card ul a:hover { color: var(--lp-accent); }

/* ---- About Page ---- */
.about-hero {
    background: linear-gradient(135deg, var(--lp-dark) 0%, var(--lp-dark-mid) 100%);
    padding: 8rem 0 4rem;
}
.about-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.about-stat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}
.about-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--lp-primary);
    line-height: 1;
    margin-bottom: .25rem;
}
.about-stat-label {
    font-size: .85rem;
    color: #64748b;
    font-weight: 500;
}
.exchange-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    height: 100%;
    transition: transform .25s, box-shadow .25s;
}
.exchange-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0,0,0,.08);
}
.exchange-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(52,152,219,.1);
    color: var(--lp-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}
.exchange-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: .5rem;
}
.exchange-card p {
    font-size: .9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(26,26,46,.98);
        padding: 1rem;
        border-radius: 10px;
        margin-top: .5rem;
    }
    .navbar .d-flex { margin-top: 1rem; }
    .step-connector { display: none; }
}
@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    .hero-section { padding: 6rem 0 3rem; min-height: auto; }
    .section-title { font-size: 1.8rem; }
    .terminal-card { margin-top: 2rem; }
}
@media (max-width: 576px) {
    .hero-title { font-size: 1.8rem; }
    .trust-number { font-size: 1.5rem; }
    .signup-card { padding: 1.5rem; }
}
