/* ============================================
   Dispatch Bot — HDG
   Shared Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Mono:wght@300;400;500&display=swap');

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

:root {
    --bg:       #080a0f;
    --surface:  #0d1017;
    --surface2: #141820;
    --border:   rgba(255, 255, 255, 0.06);
    --accent:   #5865f2;
    --accent2:  #eb459e;
    --accent3:  #57f287;
    --text:     #e8eaf0;
    --muted:    #6b7280;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Mono', monospace;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.7;
}

/* ── Noise overlay ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
}

/* ── NAV ── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: rgba(8, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: white;
    text-decoration: none;
}
.nav-logo span { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 1.8rem;
    list-style: none;
    align-items: center;
}
.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
    background: var(--accent) !important;
    color: white !important;
    padding: 0.45rem 1.1rem;
    border-radius: 4px;
    font-size: 0.72rem !important;
    letter-spacing: 0.08em !important;
    transition: opacity 0.2s !important;
}
.nav-cta:hover { opacity: 0.85 !important; }

.nav-back {
    font-size: 0.72rem;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.08em;
    transition: color 0.2s;
}
.nav-back:hover { color: var(--text); }

/* Language flag buttons */
.lang-toggle{display:flex;gap:8px;align-items:center;margin-left:12px}
.lang-toggle button{width:40px;height:34px;border-radius:8px;border:1px solid rgba(255,255,255,0.06);background:linear-gradient(180deg,#0f1724,#08101a);cursor:pointer;font-size:18px;display:inline-flex;align-items:center;justify-content:center;transition:transform .12s ease,box-shadow .12s ease,opacity .12s}
.lang-toggle button:hover{transform:translateY(-2px)}
.lang-toggle button:focus{outline:none;box-shadow:0 0 0 3px rgba(88,101,242,0.12)}
.lang-toggle button.active{box-shadow:0 6px 20px rgba(88,101,242,0.12);transform:translateY(-2px)}
@media(max-width:700px){.lang-toggle{margin-left:6px}.lang-toggle button{width:34px;height:30px;font-size:16px}}

/* ── BUTTONS ── */
.btn-primary {
    background: var(--accent);
    color: white;
    padding: 0.85rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: all 0.2s;
    border: 1px solid var(--accent);
    display: inline-block;
}
.btn-primary:hover {
    background: transparent;
    color: var(--accent);
}
.btn-secondary {
    color: var(--muted);
    padding: 0.85rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    border: 1px solid var(--border);
    transition: all 0.2s;
    display: inline-block;
}
.btn-secondary:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ── SECTION BASE ── */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 2.5rem;
}

.section-tag {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 1rem;
    color: white;
}

.section-sub {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.8;
    max-width: 500px;
    margin-bottom: 4rem;
}

/* ── FOOTER ── */
.footer-wrap {
    border-top: 1px solid var(--border);
}
footer {
    border-top: none;
    padding: 3rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.footer-logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    color: white;
}
.footer-logo span { color: var(--accent); }
.footer-meta {
    font-size: 0.65rem;
    color: var(--muted);
    margin-top: 0.35rem;
    line-height: 1.7;
}
.footer-meta a {
    color: var(--accent);
    text-decoration: none;
}
.footer-links {
    display: flex;
    gap: 1.8rem;
    list-style: none;
    flex-wrap: wrap;
}
.footer-links a {
    font-size: 0.7rem;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.04em;
}

/* ── REVEAL ANIMATION ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ── HERO ── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 8rem 2.5rem 4rem;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.hero-tag {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(88, 101, 242, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 2px;
    margin-bottom: 2rem;
    display: inline-block;
    animation: fadeUp 0.8s ease both;
}

.hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    color: white;
    animation: fadeUp 0.8s ease 0.1s both;
}
.hero h1 .line2 {
    display: block;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.25);
    color: transparent;
}
.hero h1 .accent { color: var(--accent); }

.hero-desc {
    font-size: 0.9rem;
    color: var(--muted);
    max-width: 480px;
    line-height: 1.85;
    margin-bottom: 2.5rem;
    animation: fadeUp 0.8s ease 0.2s both;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeUp 0.8s ease 0.3s both;
}

.hero-grid {
    position: absolute;
    right: -80px;
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    opacity: 0.06;
    background-image:
        linear-gradient(var(--accent) 1px, transparent 1px),
        linear-gradient(90deg, var(--accent) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    animation: fadeIn 1.5s ease both;
    pointer-events: none;
}

/* ── TERMINAL ── */
.terminal {
    background: #0a0c10;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    max-width: 520px;
    margin-top: 3rem;
    font-size: 0.78rem;
    animation: fadeUp 0.8s ease 0.5s both;
}
.terminal-bar {
    background: var(--surface2);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #ff5f56; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #27c93f; }
.terminal-title {
    font-size: 0.65rem;
    color: var(--muted);
    margin-left: 0.5rem;
    letter-spacing: 0.05em;
}
.terminal-body {
    padding: 1.5rem;
    line-height: 2;
}
.t-muted  { color: var(--muted); }
.t-accent { color: var(--accent); }
.t-green  { color: var(--accent3); }
.t-pink   { color: var(--accent2); }
.t-white  { color: white; }
.t-cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: var(--accent);
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

/* ── STATS ── */
.stats {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.stat {
    padding: 2.5rem 3rem;
    border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat-num {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.04em;
}
.stat-num span { color: var(--accent); }
.stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 0.3rem;
}

/* ── FEATURES GRID ── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}
.feature-card {
    background: var(--surface);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: background 0.3s;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.feature-card:hover { background: var(--surface2); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    display: block;
}
.feature-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.6rem;
    color: white;
}
.feature-desc {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.85;
}
.feature-tag {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    background: rgba(88, 101, 242, 0.1);
    color: var(--accent);
    border: 1px solid rgba(88, 101, 242, 0.2);
}

/* ── COMMANDS ── */
.commands-section {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.commands-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.command-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: border-color 0.2s;
}
.command-item:hover { border-color: rgba(88, 101, 242, 0.4); }
.command-name {
    font-size: 0.8rem;
    color: var(--accent3);
    white-space: nowrap;
    padding-top: 1px;
    min-width: 120px;
}
.command-desc {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ── STEPS ── */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2.5rem;
    counter-reset: steps;
}
.step {
    counter-increment: steps;
    position: relative;
}
.step::before {
    content: counter(steps, decimal-leading-zero);
    font-family: 'Syne', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(88, 101, 242, 0.12);
    display: block;
    line-height: 1;
    margin-bottom: 1rem;
}
.step-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    margin-bottom: 0.5rem;
}
.step-desc {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.8;
}

/* ── CTA ── */
.cta-section {
    text-align: center;
    padding: 8rem 2rem;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 300px;
    background: radial-gradient(ellipse, rgba(88, 101, 242, 0.1) 0%, transparent 70%);
    pointer-events: none;
}
.cta-section h2 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.5rem, 5vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 1.5rem;
    color: white;
}
.cta-section p {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 2.5rem;
}
.cta-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── DOC PAGES (ToS / Privacy) ── */
.doc-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 5rem 2.5rem 8rem;
}

.doc-tag {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(88, 101, 242, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 2px;
    display: inline-block;
    margin-bottom: 1.5rem;
}
.doc-tag-green {
    color: var(--accent3);
    border-color: rgba(87, 242, 135, 0.3);
}

.doc-container h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 0.8rem;
    color: white;
}
.doc-meta {
    font-size: 0.72rem;
    color: var(--muted);
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.doc-container h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    margin: 2.5rem 0 0.8rem;
    padding-left: 1rem;
    border-left: 2px solid var(--accent);
}
.doc-container h2.green { border-left-color: var(--accent3); }
.doc-container p {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 1rem;
    line-height: 1.9;
}
.doc-container ul {
    list-style: none;
    margin: 0.5rem 0 1.2rem;
    padding: 0;
}
.doc-container ul li {
    font-size: 0.82rem;
    color: var(--muted);
    padding: 0.3rem 0 0.3rem 1.4rem;
    position: relative;
    line-height: 1.7;
}
.doc-container ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);
}
.doc-container ul.green li::before { color: var(--accent3); }

.highlight-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: 4px;
    padding: 1.2rem 1.5rem;
    margin: 1.5rem 0;
}
.highlight-box.green { border-left-color: var(--accent3); }
.highlight-box p { margin: 0; font-size: 0.8rem; }

.contact-box {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem 2rem;
    margin-top: 3rem;
}
.contact-box p { margin: 0.2rem 0; font-size: 0.82rem; color: var(--muted); }
.contact-box a { color: var(--accent); text-decoration: none; }

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.75rem;
}
.data-table th {
    text-align: left;
    padding: 0.7rem 1rem;
    background: var(--surface2);
    color: white;
    font-family: 'Syne', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 0.7rem 1rem;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.6;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface); }

/* Rights grid */
.rights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}
.right-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem 1.2rem;
}
.right-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.4rem;
}
.right-desc {
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    nav { padding: 1rem 1.5rem; }
    .nav-links { display: none; }
    .hero { padding: 7rem 1.5rem 3rem; }
    .hero-grid { display: none; }
    .stats { grid-template-columns: 1fr; }
    .stat { border-right: none; border-bottom: 1px solid var(--border); }
    .stat:last-child { border-bottom: none; }
    .commands-grid { grid-template-columns: 1fr; }
    .rights-grid { grid-template-columns: 1fr; }
    .section { padding: 4rem 1.5rem; }
    .doc-container { padding: 5rem 1.5rem 5rem; }
    footer { flex-direction: column; text-align: center; padding: 2rem 1.5rem; }
    .footer-links { justify-content: center; }
}
