/* AutoLinkX Demo — tokens mirrored from the app's static/css/base.css */

:root {
    --primary:        #ff6600;
    --primary-dark:   #e55a00;
    --primary-light:  #ff8533;

    --bg-main:        #0a0a0a;
    --bg-card:        #141414;
    --bg-card-hover:  #1a1a1a;
    --bg-glass:       rgba(20, 20, 20, 0.7);
    --bg-overlay:     rgba(0, 0, 0, 0.8);

    --text-main:      #ffffff;
    --text-secondary: #a3a3a3;
    --text-muted:     #737373;

    --border-color:   #262626;
    --border-focus:   #404040;

    --shadow-glow:    0 0 20px rgba(255, 102, 0, 0.15);

    --container:      1280px;
    --header-height:  76px;
    --radius-sm:      0.375rem;
    --radius-md:      0.5rem;
    --radius-lg:      1rem;
    --radius-full:    9999px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

section[id] { scroll-margin-top: calc(var(--header-height) + 1rem); }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--border-focus); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #525252; }

[x-cloak] { display: none !important; }

.alx-container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* ─── Header ─── */
.alx-header {
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}
.alx-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}
.alx-logo .mark {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.9rem;
}
.alx-nav { display: flex; align-items: center; gap: 0.35rem; }
.alx-nav a {
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s, background-color 0.2s;
}
.alx-nav a:hover { color: var(--text-main); background: var(--bg-card); }
.alx-nav a.active { color: var(--primary); background: rgba(255, 102, 0, 0.1); }

/* ─── Buttons ─── */
.alx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.3rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.alx-btn-primary { background: var(--primary); color: #fff; }
.alx-btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(255, 102, 0, 0.3); }
.alx-btn-outline { background: transparent; color: var(--text-main); border-color: var(--border-focus); }
.alx-btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.alx-btn-ghost { background: var(--bg-card); color: var(--text-secondary); }
.alx-btn-ghost:hover { background: var(--bg-card-hover); color: var(--text-main); }
.alx-btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }

/* ─── Hero ─── */
.alx-hero {
    position: relative;
    padding: 5.5rem 0 4.5rem;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}
.alx-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 78% 42%, rgba(255, 102, 0, 0.17), transparent),
        radial-gradient(ellipse 55% 45% at 12% 82%, rgba(255, 133, 51, 0.09), transparent);
}
.alx-hero > * { position: relative; }
.alx-hero h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); line-height: 1.08; letter-spacing: -0.035em; }
.alx-hero .highlight {
    background: linear-gradient(120deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.alx-hero p { color: var(--text-secondary); font-size: 1.03rem; max-width: 34rem; }

/* ─── Category chips ─── */
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background-color 0.2s, transform 0.15s;
}
.cat-chip:hover { border-color: var(--primary); color: var(--text-main); transform: translateY(-2px); }
.cat-chip.is-on { background: rgba(255, 102, 0, 0.12); border-color: var(--primary); color: var(--primary); }

/* ─── Stats ─── */
.stat-num { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stat-cap { font-size: 0.83rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.09em; font-weight: 600; }

/* ─── Cards ─── */
.alx-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.alx-card:hover { transform: translateY(-4px); border-color: var(--border-focus); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45); }
.car-thumb { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-card-hover); display: block; }
.car-title { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.015em; }
.car-price { font-size: 1.3rem; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; }
.car-meta { font-size: 0.78rem; color: var(--text-muted); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.badge-primary { background: rgba(255, 102, 0, 0.14); color: var(--primary-light); }
.badge-muted   { background: var(--bg-card-hover); color: var(--text-muted); border: 1px solid var(--border-color); }
.badge-green   { background: rgba(16, 185, 129, 0.14); color: #4ade80; }

/* ─── Forms ─── */
.alx-field { display: block; }
.alx-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}
.alx-input {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.alx-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.15); }
.alx-input::placeholder { color: #525252; }
select.alx-input { cursor: pointer; }
select.alx-input option { background: var(--bg-card); }

/* ─── Filter panel ─── */
.filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.1rem;
}

/* ─── Detail spec table ─── */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--border-color); }
.spec-table tr:last-child { border-bottom: 0; }
.spec-table th {
    text-align: left;
    padding: 0.7rem 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    width: 44%;
}
.spec-table td { padding: 0.7rem 0; font-size: 0.88rem; font-weight: 500; }

/* ─── Reveal on scroll (matches the real site's fade-in) ─── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ─── Misc ─── */
.skeleton { background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 37%, var(--bg-card) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: var(--radius-md); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.htmx-indicator { opacity: 0; transition: opacity 0.2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

.demo-tag { font-size: 0.7rem; color: var(--text-muted); border-left: 2px solid var(--border-color); padding-left: 0.6rem; }

.divider { height: 1px; background: var(--border-color); border: 0; margin: 3rem 0; }

.alx-footer { border-top: 1px solid var(--border-color); background: var(--bg-card); margin-top: 4rem; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    * { animation-duration: 0.01ms !important; }
}
