/* Kleidos — design-system tokens */
:root {
    --bg: #000;
    --bg-elevated: #0a0a0a;
    --bg-mockup: #08080a;
    --surface: #0f0f0f;
    --surface-hover: #1a1a1a;
    --border: #1c1c1c;
    --text: #e0e0e0;
    --text-muted: #8899aa;
    --text-dim: #3a3a3a;
    --accent: #00D2FF;
    --accent-glow: rgba(0,210,255,.12);
    --warning: #FFD43B;
    --radius: 14px;
    --radius-sm: 8px;
    --tr: 0.2s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Header ── */
.site-header {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
}
.logo { display:flex; align-items:center; gap:.6rem; }
.logo img { width:34px; height:34px; }
.logo-name { font-size:1rem; font-weight:700; letter-spacing:-.02em; }

/* ── Hero ── */
.hero {
    text-align: center;
    padding: 4rem 1.5rem 3rem;
    max-width: 640px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .3rem .9rem;
    border-radius: 20px;
    background: rgba(0,210,255,.07);
    color: var(--accent);
    border: 1px solid rgba(0,210,255,.2);
    margin-bottom: 1.4rem;
}
.hero-title {
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    margin-bottom: 1.1rem;
    color: #fff;
}
.hero-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.8rem;
}
.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: center;
}
.feature-pill {
    font-size: .78rem;
    font-weight: 600;
    padding: .35rem .85rem;
    border-radius: 20px;
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ── Main / sections ── */
.main-content { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem 4rem; }

.section-devices { margin-bottom: 3rem; }
.section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .3rem; }
.section-sub { font-size: .88rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── Device grid ── */
.device-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    align-items: start;
}
@media (max-width:960px) { .device-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width:640px) { .device-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width:380px) { .device-grid { grid-template-columns: 1fr; } }

/* ── Device card ── */
.device-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-align: left;
    color: inherit;
    transition: all var(--tr);
    cursor: default;
}

.device-card.coming-soon { opacity: .85; }

/* ── Device mockup (SVG + screen overlay) ── */
.device-mockup {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--bg-mockup);
    /* aspect-ratio set inline from svgAR */
}

.device-svg-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

.device-screen-overlay {
    position: absolute;
    object-fit: cover;
    /* left/top/width/height set inline from screen percentages */
    border-radius: 1px;
    display: block;
}

/* ── Coming-soon badge ── */
.badge-soon {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .22rem .65rem;
    border-radius: 10px;
    background: rgba(0,0,0,.72);
    color: var(--warning);
    border: 1px solid rgba(255,212,59,.3);
    backdrop-filter: blur(6px);
    white-space: nowrap;
    pointer-events: none;
}

/* ── Device info ── */
.device-info {
    padding: .85rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.device-name {
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.device-chip {
    display: inline-block;
    font-size: .62rem;
    font-weight: 600;
    padding: .1rem .4rem;
    border-radius: 3px;
    background: var(--accent-glow);
    color: var(--accent);
    letter-spacing: .03em;
}
.device-specs {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: .2rem;
}
.spec { display:flex; flex-direction:column; align-items:center; }
.spec-label { color:var(--text-dim); font-size:.58rem; text-transform:uppercase; letter-spacing:.05em; }
.spec-value { color:var(--text); font-weight:600; font-size:.68rem; }
.device-desc { font-size:.7rem; color:var(--text-muted); line-height:1.35; }

/* ── Browser warning ── */
.browser-warning {
    max-width: 1100px;
    margin: 0 auto 1.5rem;
    padding: .8rem 1.5rem;
    background: rgba(255,212,59,.07);
    border: 1px solid rgba(255,212,59,.22);
    border-radius: var(--radius-sm);
    color: var(--warning);
    font-size: .84rem;
    text-align: center;
    display: none;
}
.browser-warning.visible { display:block; }

/* ── Steps ── */
.step { margin-bottom: 2rem; transition: opacity var(--tr); }
.step.disabled { opacity:.25; pointer-events:none; filter:grayscale(.5); }
.step-header { display:flex; align-items:center; gap:.75rem; margin-bottom:1rem; }
.step-number {
    width:28px; height:28px;
    display:inline-flex; align-items:center; justify-content:center;
    border-radius:50%;
    background:var(--surface); border:1.5px solid var(--border);
    color:var(--text-muted); font-size:.78rem; font-weight:700;
    flex-shrink:0; transition:all var(--tr);
}
.step:not(.disabled) .step-number { background:var(--accent); border-color:var(--accent); color:var(--bg); }
.step-header h2 { font-size:1rem; font-weight:600; }

/* ── Version area ── */
.version-area { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:1.25rem; }
.version-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.5rem; margin-bottom:1rem; }
.version-device-label { font-size:.84rem; color:var(--text-muted); }
.version-device-label strong { color:var(--text); }
.prerelease-toggle { display:flex; align-items:center; gap:.4rem; font-size:.78rem; color:var(--text-muted); cursor:pointer; }
.prerelease-toggle input { accent-color:var(--accent); }
.version-select {
    width:100%; padding:.62rem .85rem;
    background:var(--bg); color:var(--text);
    border:1px solid var(--border); border-radius:var(--radius-sm);
    font-size:.88rem; font-family:inherit; cursor:pointer; appearance:none;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%238b949e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat:no-repeat; background-position:right 12px center;
}
.version-select:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-glow); }
.release-meta { display:flex; align-items:center; gap:1rem; margin-top:.75rem; font-size:.78rem; color:var(--text-muted); }
.release-meta a { color:var(--accent); text-decoration:none; }
.release-meta a:hover { text-decoration:underline; }
.no-releases { padding:1.5rem; text-align:center; color:var(--text-muted); font-size:.88rem; }
.no-releases code { background:var(--bg); padding:.1rem .35rem; border-radius:3px; font-size:.85em; }

/* ── Flash area ── */
.flash-area { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:2rem; text-align:center; }
.flash-area p { margin-bottom:.5rem; font-size:.88rem; }
.flash-area .hint { font-size:.78rem; color:var(--text-muted); margin-bottom:1.25rem; }
.flash-btn {
    background:var(--accent); color:#000;
    border:none; padding:.85rem 2.5rem;
    font-size:1rem; font-weight:700; border-radius:var(--radius-sm);
    cursor:pointer; transition:all var(--tr);
}
.flash-btn:hover { opacity:.9; transform:translateY(-1px); }
.flash-summary {
    display:inline-flex; align-items:center; gap:.5rem;
    margin-bottom:1rem; font-size:.82rem;
    padding:.35rem .8rem; border-radius:6px;
    background:var(--accent-glow); color:var(--accent);
}

/* ── Help ── */
.help-section { max-width:1100px; margin:0 auto; padding:0 1.5rem 2rem; }
.help-section details { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); margin-bottom:.6rem; padding:.8rem 1rem; }
.help-section summary { cursor:pointer; font-weight:600; color:var(--accent); font-size:.86rem; }
.help-section details[open] summary { margin-bottom:.6rem; }
.help-section ul { padding-left:1.25rem; font-size:.82rem; color:var(--text-muted); }
.help-section li { margin-bottom:.3rem; }
.help-section code { background:var(--bg); padding:.1rem .3rem; border-radius:3px; font-size:.85em; }
.help-section a { color:var(--accent); }

/* ── Footer ── */
.site-footer {
    text-align:center; padding:1.5rem 1rem;
    border-top:1px solid var(--border);
    color:var(--text-dim); font-size:.78rem;
    display:flex; align-items:center; justify-content:center; gap:1rem;
}
.site-footer a { color:var(--text-muted); text-decoration:none; }
.site-footer a:hover { color:var(--accent); }

/* ── Loader ── */
.loading-spinner {
    display:inline-block; width:14px; height:14px;
    border:2px solid var(--border); border-top-color:var(--accent);
    border-radius:50%; animation:spin .6s linear infinite;
    vertical-align:middle; margin-right:.4rem;
}
@keyframes spin { to { transform:rotate(360deg); } }

::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }
