:root {
    --bg: #0D0E11;
    --fg: #E8E6E3;
    --accent: #D98E32;
    --muted: #6B6B6B;
    --surface: #16171B;
    --border: #242529;
    --border-2: rgba(255,255,255,0.12);
    --surface-2: #1C1F24;
    --fg-2: #8B909A;
    --accent-soft: rgba(217,142,50,0.55);
    --accent-glow: rgba(217,142,50,0.14);
    --font: 'Geist', system-ui, -apple-system, sans-serif;
    --mono: 'Geist Mono', ui-monospace, monospace;
    --ease: cubic-bezier(.22,1,.36,1);
}

html { scroll-behavior: smooth; }
::selection { background: var(--accent); color: var(--bg); }

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

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1rem; }

.header {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h1 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; }
.header h1 span { color: var(--accent); }

.header nav { display: flex; gap: 1.5rem; font-size: 0.85rem; align-items: center; }

.language-switcher {
    appearance: none;
    -webkit-appearance: none;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--fg);
    font-family: var(--mono);
    font-size: 0.72rem;
    padding: 0.3rem 1.6rem 0.3rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B6B6B'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 8px;
    min-width: 72px;
}
.language-switcher:hover { border-color: var(--accent); }
.language-switcher:focus { outline: none; border-color: var(--accent); }
.language-switcher option { background: var(--surface); color: var(--fg); }
.header nav a { color: var(--muted); }
.header nav a:hover { color: var(--fg); text-decoration: none; }

.feed { display: flex; gap: 2rem; padding-top: 1.5rem; }
.feed-main { flex: 1; min-width: 0; }
.feed-sidebar { width: 280px; flex-shrink: 0; }

.product-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.upvote-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.75rem;
    min-width: 48px;
    transition: border-color 0.15s;
}

.upvote-btn:hover { border-color: var(--accent); color: var(--accent); }
.upvote-btn .chevron { font-size: 0.9rem; line-height: 1; }

.product-info h3 { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.2rem; }
.product-info h3 a { color: var(--fg); }
.product-info .url { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-bottom: 0.3rem; }
.product-info .desc { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; }

.tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tag {
    background: var(--surface);
    color: var(--muted);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-family: var(--mono);
}

.category-chip {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 0.3rem 0.7rem;
    border-radius: 3px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font);
}
.category-chip:hover, .category-chip.active { border-color: var(--accent); color: var(--accent); }

.sidebar-section { margin-bottom: 2rem; }
.sidebar-section h4 { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }

input[type="text"], textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-family: var(--font);
    font-size: 0.9rem;
    width: 100%;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }

.btn {
    background: var(--accent);
    color: var(--bg);
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.9rem;
}
.btn:hover { opacity: 0.9; text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
    background: rgba(255,255,255,0.02);
    color: var(--fg);
    border: 1px solid var(--border-2);
    box-shadow: none;
}
.btn-ghost:hover { opacity: 1; border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.05); }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 0.95rem; border-radius: 10px; }

.search-box {
    position: relative;
    margin-bottom: 1rem;
}
.search-box input { padding-left: 2rem; }

.empty { color: var(--muted); text-align: center; padding: 3rem 0; font-size: 0.9rem; }

#blazor-error-ui {
    background: var(--surface);
    color: var(--fg);
    bottom: 0;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

@media (max-width: 768px) {
    .feed { flex-direction: column; }
    .feed-sidebar { width: 100%; }
}

/* =========================================================
   LANDING PAGE
   ========================================================= */
.mono { font-family: var(--mono); }
.landing { overflow-x: clip; }
.landing h1, .landing h2, .landing h3 { letter-spacing: -0.03em; font-weight: 600; }
.landing h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.1; max-width: 22ch; }
.landing p { color: var(--fg-2); }

.kicker {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.9rem;
}

.section { padding: clamp(4rem, 9vw, 7.5rem) 0; border-top: 1px solid var(--border); }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-sub { max-width: 58ch; margin-top: 1rem; font-size: 1.05rem; line-height: 1.6; }

/* ---------- hero ---------- */
.hero {
    position: relative;
    padding: clamp(4rem, 12vw, 8.5rem) 0 clamp(3rem, 6vw, 5rem);
    min-height: min(92svh, 960px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-bg {
    position: absolute; inset: -6rem -50vw 0; pointer-events: none; z-index: -1;
    background:
        radial-gradient(900px 480px at 18% 0%, rgba(217,142,50,0.14), transparent 60%),
        radial-gradient(700px 400px at 85% 20%, rgba(255,255,255,0.035), transparent 60%),
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: auto, auto, 72px 72px, 72px 72px;
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 40% 30%, #000, transparent);
    mask-image: radial-gradient(ellipse 70% 70% at 40% 30%, #000, transparent);
}
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 0.55rem; align-self: flex-start;
    font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--fg-2); border: 1px solid var(--border); border-radius: 99px; padding: 0.45rem 0.95rem;
    background: rgba(255,255,255,0.02);
    animation: rise 0.9s var(--ease) 0.1s both;
}
.hero-eyebrow .dot, .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
    box-shadow: 0 0 10px var(--accent); animation: pulse 2.4s ease-in-out infinite;
}
.hero-title {
    font-size: clamp(2.75rem, 8.5vw, 6.5rem);
    line-height: 0.95;
    letter-spacing: -0.045em;
    font-weight: 700;
    margin: 1.75rem 0 1.5rem;
    max-width: 14ch;
    animation: rise 1s var(--ease) 0.25s both;
}
.hero-title span { color: var(--accent); }
.hero-sub {
    font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.55; max-width: 56ch;
    animation: rise 1s var(--ease) 0.4s both;
}
.hero-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 2.25rem; animation: rise 1s var(--ease) 0.55s both; }

.hero-terminal {
    margin-top: clamp(2.5rem, 6vw, 4.5rem);
    max-width: 760px;
    border: 1px solid var(--border-2);
    border-radius: 14px;
    background: linear-gradient(180deg, #121316, #0E0F12);
    box-shadow: 0 40px 90px -40px rgba(0,0,0,0.9), 0 0 0 6px rgba(255,255,255,0.015), 0 0 80px -30px var(--accent-glow);
    overflow: hidden;
    animation: rise 1.2s var(--ease) 0.7s both;
}
.term-bar { display: flex; align-items: center; gap: 6px; padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-2); }
.term-bar span { margin-left: auto; font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.hero-terminal pre, .code-card pre {
    margin: 0; padding: 1.15rem 1.25rem; overflow-x: auto;
    font-family: var(--mono); font-size: 0.82rem; line-height: 1.65; color: var(--fg);
}
.hero-terminal .c, .code-card .c { color: var(--muted); }
.hero-terminal .k, .code-card .k { color: var(--accent); }
.hero-terminal .s { color: var(--fg-2); }
.hero-terminal .v { color: #E6C07B; }
.hero-terminal .ok { color: #7FB77E; }
.code-card .f { color: #E8E6E3; font-weight: 500; }
.code-card .t { color: #9AB7D3; }

/* ---------- stats ---------- */
.stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
    background: var(--surface);
}
.stat { padding: 1.75rem 1.5rem; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat-n { font-size: clamp(1.9rem, 3.5vw, 2.75rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--fg); }
.stat-l { margin-top: 0.6rem; font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em; }

/* ---------- steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.step { background: var(--bg); padding: 2rem 1.75rem 2.25rem; position: relative; transition: background 0.3s; }
.step:hover { background: var(--surface); }
.step-n { font-size: 0.8rem; color: var(--accent); margin-bottom: 2.5rem; }
.step h3 { font-size: 1.2rem; margin-bottom: 0.65rem; }
.step p { font-size: 0.93rem; line-height: 1.6; }
.step .mono { color: var(--fg); font-size: 0.85em; background: var(--surface-2); padding: 0.05em 0.35em; border-radius: 4px; }

/* ---------- agents ---------- */
.agents-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.agents-copy p { font-size: 1.02rem; line-height: 1.65; margin: 1.25rem 0 1.5rem; }
.checks { list-style: none; margin-bottom: 1.75rem; display: grid; gap: 0.65rem; }
.checks li { position: relative; padding-left: 1.6rem; font-size: 0.95rem; color: var(--fg); }
.checks li::before {
    content: ""; position: absolute; left: 0; top: 0.42em; width: 12px; height: 7px;
    border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.checks .mono { color: var(--fg-2); font-size: 0.88em; }
.code-card {
    border: 1px solid var(--border-2); border-radius: 14px; overflow: hidden;
    background: linear-gradient(180deg, #121316, #0E0F12);
    box-shadow: 0 30px 70px -40px rgba(0,0,0,0.9);
}
.code-tabs { display: flex; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 0.72rem; }
.code-tabs span { padding: 0.7rem 1rem; color: var(--muted); border-right: 1px solid var(--border); }
.code-tabs span.active { color: var(--fg); background: rgba(255,255,255,0.03); box-shadow: inset 0 -1px 0 var(--accent); }

/* ---------- flags ---------- */
.flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 0.5rem; }
.flag {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.6rem; align-items: center;
    padding: 0.65rem 0.8rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
    transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.flag:hover { transform: translateY(-2px); border-color: var(--accent-soft); background: var(--surface-2); }
.flag-e { grid-row: 1 / 3; font-size: 1.35rem; line-height: 1; }
.flag-c { font-size: 0.7rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
.flag-n { font-size: 0.78rem; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.bento-card {
    position: relative; padding: 1.75rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface);
    transition: transform 0.3s var(--ease), border-color 0.3s; overflow: hidden;
}
.bento-card:hover { transform: translateY(-3px); border-color: var(--border-2); }
.bento-card.span-2 { grid-column: span 2; }
.bento-card.accent { background: linear-gradient(135deg, rgba(217,142,50,0.12), var(--surface) 55%); border-color: rgba(217,142,50,0.3); }
.bento-icon {
    display: inline-block; font-size: 0.72rem; color: var(--accent); letter-spacing: 0.04em;
    border: 1px solid rgba(217,142,50,0.35); border-radius: 6px; padding: 0.3rem 0.55rem; margin-bottom: 1.5rem; background: rgba(217,142,50,0.06);
}
.bento-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.bento-card p { font-size: 0.92rem; line-height: 1.6; }

/* ---------- testimonials ---------- */
.testimonials-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
    background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
}
.testimonial {
    background: var(--bg); padding: 1.75rem; display: flex; flex-direction: column; gap: 1rem;
    transition: background 0.3s;
}
.testimonial:hover { background: var(--surface); }
.testimonial.accent { background: linear-gradient(135deg, rgba(217,142,50,0.08), var(--bg) 55%); }
.testimonial-stars { color: var(--accent); font-size: 0.9rem; letter-spacing: 2px; }
.testimonial-text { font-size: 0.92rem; line-height: 1.65; color: var(--fg-2); flex: 1; }
.testimonial-author { display: flex; align-items: center; gap: 0.75rem; margin-top: auto; }
.testimonial-avatar {
    width: 36px; height: 36px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: var(--accent); flex-shrink: 0;
}
.testimonial-name { font-size: 0.88rem; font-weight: 500; }
.testimonial-role { font-size: 0.7rem; color: var(--muted); margin-top: 0.15rem; }

/* ---------- seo details ---------- */
.seo-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
    background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
}
.seo-item { background: var(--bg); padding: 1.75rem; transition: background 0.3s; }
.seo-item:hover { background: var(--surface); }
.seo-item h3 { font-size: 0.82rem; color: var(--accent); margin-bottom: 0.75rem; font-weight: 400; }
.seo-item p { font-size: 0.9rem; line-height: 1.6; color: var(--fg-2); }

/* ---------- geo coverage ---------- */
.geo-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
    background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
}
.geo-region { background: var(--bg); padding: 1.75rem; transition: background 0.3s; }
.geo-region:hover { background: var(--surface); }
.geo-region h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.geo-langs {
    font-size: 0.75rem; color: var(--accent); letter-spacing: 0.12em; margin-bottom: 0.6rem;
    padding: 0.35rem 0; border-bottom: 1px solid var(--border);
}
.geo-region p { font-size: 0.85rem; color: var(--fg-2); line-height: 1.55; }

/* ---------- cta ---------- */
.cta {
    margin: clamp(2rem, 5vw, 4rem) 0; padding: clamp(2.5rem, 6vw, 4.5rem);
    border: 1px solid var(--border-2); border-radius: 18px;
    background:
        radial-gradient(600px 300px at 0% 0%, rgba(217,142,50,0.18), transparent 60%),
        var(--surface);
}
.cta h2 { max-width: 20ch; font-size: clamp(1.6rem, 3.6vw, 2.5rem); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 3.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-logo { font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.footer-logo span { color: var(--accent); }
.footer-brand p { font-size: 0.88rem; max-width: 34ch; line-height: 1.6; }
.footer-col h4 { font-size: 0.72rem; font-family: var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.9rem; }
.footer-col a { display: block; color: var(--fg-2); font-size: 0.9rem; margin-bottom: 0.5rem; }
.footer-col a:hover { color: var(--fg); text-decoration: none; }
.footer-bottom { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: 0.72rem; color: var(--muted); }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
    .hero *, .flag, .bento-card { animation: none !important; transition: none !important; }
}

@media (max-width: 960px) {
    .agents-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .bento { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2) { border-right: 0; }
    .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .seo-grid { grid-template-columns: repeat(2, 1fr); }
    .geo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .bento { grid-template-columns: 1fr; }
    .bento-card.span-2 { grid-column: span 1; }
    .hero-actions .btn { width: 100%; justify-content: center; text-align: center; }
    .flags { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .seo-grid { grid-template-columns: 1fr; }
    .geo-grid { grid-template-columns: 1fr; }
}
