/* start.css — pradžios puslapis (pradzia.html).
   Naudoja tuos pačius žetonus kaip app.css; čia tik tai, ko programoje nėra. */

body.start {
    background: var(--ink-900);
    color: var(--paper);
    font-family: var(--f-sans);
    min-height: 100vh;
    overflow-y: auto;
}

/* Programoje #app dengia visą langą; pradžios puslapyje jo nėra, tad grąžinam slinkimą */
body.start #grain { pointer-events: none; }

/* ── Viršutinė juosta ──────────────────────────────────────────────────── */
.s-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
    height: var(--bar-h);
    padding: 0 clamp(16px, 4vw, 34px);
    background: var(--ink-850);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
}
.s-bar .brand { text-decoration: none; color: inherit; }
.s-bar-right { display: flex; align-items: center; gap: 10px; }
.s-who {
    font-family: var(--f-mono); font-size: 11px;
    color: var(--mut); letter-spacing: -.01em;
}
.s-who b { color: var(--paper-d); font-weight: 500; }

/* ── Turinys ───────────────────────────────────────────────────────────── */
.s-main {
    max-width: 1040px;
    margin: 0 auto;
    padding: clamp(48px, 9vw, 104px) clamp(18px, 5vw, 34px) 96px;
    display: flex; flex-direction: column;
    gap: clamp(52px, 8vw, 88px);
}

.s-hero { display: flex; flex-direction: column; gap: 20px; max-width: 40rem; }

.s-eyebrow {
    margin: 0;
    font-family: var(--f-mono); font-size: 10.5px;
    letter-spacing: .19em; text-transform: uppercase;
    color: var(--mut-2);
}

/* Geist, o NE serifinis --f-disp: Instrument Serif neturi tvarkingų lietuviškų nosinių —
   „Įvedi“ ir „programą“ uodegėlės atsikabina ir nuslenka į šoną. Serifą paliekam tik
   skaičiams (.big), kur nosinių nebūna. */
.s-h1 {
    margin: 0;
    font-family: var(--f-sans); font-weight: 500;
    font-size: clamp(2.2rem, 5.4vw, 3.5rem);
    line-height: 1.08; letter-spacing: -.032em;
    text-wrap: balance;
}

.s-lead {
    margin: 0;
    font-size: 15.5px; line-height: 1.68;
    color: var(--paper-d);
    max-width: 34rem;
}

.s-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; align-items: center; }
.s-cta .s-note { font-size: 12px; color: var(--mut-2); }

/* Antrinė nuoroda — be mygtuko rėmelio */
.s-link {
    background: none; border: 0; padding: 8px 2px;
    font-family: var(--f-sans); font-size: 13px;
    color: var(--mut); cursor: pointer;
    border-bottom: 1px solid var(--line-str);
    border-radius: 0;
    transition: color var(--t-fast) var(--e-out), border-color var(--t-fast) var(--e-out);
}
.s-link:hover { color: var(--paper); border-color: var(--arc-line); }

/* ── Keturios kortelės ─────────────────────────────────────────────────── */
.s-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(214px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}
.s-card {
    background: var(--ink-800);
    padding: 22px 20px 24px;
    display: flex; flex-direction: column; gap: 8px;
}
.s-k {
    font-family: var(--f-mono); font-size: 10.5px;
    letter-spacing: .16em; color: var(--mut-2);
}
.s-card h3 {
    margin: 2px 0 0; font-size: 14.5px; font-weight: 500;
    letter-spacing: -.01em; color: var(--paper);
}
.s-card p {
    margin: 0; font-size: 12.5px; line-height: 1.62; color: var(--mut);
}

/* ── Langas ────────────────────────────────────────────────────────────── */
.s-modal {
    position: fixed; inset: 0; z-index: 60;
    background: rgba(6, 6, 5, .74);
    backdrop-filter: blur(3px);
    display: grid; place-items: center;
    padding: 20px;
    animation: sfade .18s var(--e-out) both;
}
.s-modal[hidden] { display: none; }
@keyframes sfade { from { opacity: 0 } to { opacity: 1 } }

.s-dialog {
    position: relative;
    width: min(410px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--ink-800);
    border: 1px solid var(--line-str);
    border-radius: 14px;
    padding: 22px 22px 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
    animation: srise .22s var(--e-out) both;
}
@keyframes srise { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

.s-close {
    position: absolute; top: 12px; right: 12px;
    width: 28px; height: 28px; padding: 0;
    background: none; border: 0; border-radius: 8px;
    color: var(--mut); font-size: 19px; line-height: 1;
    cursor: pointer;
}
.s-close:hover { background: var(--ink-700); color: var(--paper); }

.s-tabs {
    display: flex; gap: 2px;
    background: var(--ink-900);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 18px;
    width: fit-content;
}
.s-tab {
    background: none; border: 0; border-radius: 7px;
    padding: 6px 13px;
    font-family: var(--f-sans); font-size: 12px;
    color: var(--mut); cursor: pointer;
    transition: background var(--t-fast) var(--e-out), color var(--t-fast) var(--e-out);
}
.s-tab:hover { color: var(--paper-d); }
.s-tab.active { background: var(--ink-700); color: var(--paper); }

.s-dlg-t { margin: 0 0 5px; font-size: 19px; font-weight: 500; letter-spacing: -.015em; }
.s-dlg-s { margin: 0 0 18px; font-size: 12.5px; line-height: 1.55; color: var(--mut); }

#form { display: flex; flex-direction: column; gap: 13px; }
#form .field { margin: 0; }
.s-help { margin: 5px 0 0; font-size: 11px; color: var(--mut-2); }

.s-err {
    margin: 0; padding: 9px 11px;
    background: rgba(224, 112, 95, .1);
    border: 1px solid rgba(224, 112, 95, .32);
    border-radius: 8px;
    font-size: 12.5px; line-height: 1.5; color: var(--fail);
}
.s-err[hidden] { display: none; }

.s-submit { width: 100%; justify-content: center; margin-top: 3px; }
.s-submit[disabled] { opacity: .55; cursor: progress; }

.s-fine {
    margin: 16px 0 0; padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 11px; line-height: 1.55; color: var(--mut-2);
}

@media (max-width: 560px) {
    .brand-sub { display: none; }
    .s-grid { border-radius: 10px; }
}


/* ── Dvi programos: konstruktorius ir lankstymas ── */
.s-apps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
    gap: 14px;
    margin-top: 34px;
}
.s-app {
    display: block;
    padding: 20px 22px;
    border: 1px solid var(--line, #2a2a27);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, .02);
    transition: border-color .2s, transform .2s, background .2s;
}
.s-app:hover { border-color: var(--accent, #7fc4de); transform: translateY(-2px); background: rgba(255, 255, 255, .05); }
.s-app-k {
    display: block;
    font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--muted, #8a8a84); margin-bottom: 9px;
}
.s-app b { display: block; font-size: 17px; margin-bottom: 7px; font-weight: 600; }
.s-app p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted, #8a8a84); }
.s-app-main { border-color: var(--accent, #7fc4de); background: rgba(127, 196, 222, .06); }
.s-app-main .s-app-k { color: var(--accent, #7fc4de); }

/* ═══════════════════ „Ką darysi?" pasirinkimas ═══════════════════ */

#ch-bg {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(6, 6, 8, .74);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: grid; place-items: center; padding: 26px;
    animation: chIn .22s ease both;
}
@keyframes chIn { from { opacity: 0 } to { opacity: 1 } }
#ch-win {
    width: min(1000px, 100%); max-height: 90vh; overflow-y: auto;
    background: #131316;
    border: 1px solid #26262e;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    animation: chUp .34s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes chUp { from { opacity: 0; transform: translateY(18px) scale(.985) } to { opacity: 1; transform: none } }

.ch-head { padding: 26px 30px 6px; position: relative; }
.ch-head h2 { margin: 0 0 6px; font-size: 24px; font-weight: 640; letter-spacing: -.02em; color: #f2f1ee; }
.ch-head p { margin: 0; font-size: 13.5px; color: #76746f; line-height: 1.55; max-width: 560px; }
.ch-x {
    position: absolute; right: 24px; top: 24px;
    width: 30px; height: 30px; border-radius: 8px;
    border: 1px solid #26262e; background: #191920;
    color: #76746f; cursor: pointer; font-size: 17px; line-height: 1;
}
.ch-x:hover { color: #f2f1ee; border-color: #3d3d48; }

.ch-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px; padding: 20px 30px 30px;
}
.ch-card {
    display: flex; flex-direction: column; gap: 8px;
    padding: 20px; border-radius: 14px;
    border: 1px solid #26262e;
    background: linear-gradient(180deg, #191920, #131318);
    text-decoration: none; color: inherit;
    position: relative; overflow: hidden;
    transition: transform .2s cubic-bezier(.32,.72,0,1), border-color .2s, box-shadow .2s;
}
.ch-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.06) 50%, transparent 60%);
    transform: translateX(-120%); transition: transform .7s cubic-bezier(.32,.72,0,1);
}
.ch-card:hover::before { transform: translateX(120%); }
.ch-card:hover {
    transform: translateY(-4px);
    border-color: #b87d2c;
    box-shadow: 0 14px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(240,165,63,.14);
}
.ch-ico {
    width: 42px; height: 42px; border-radius: 11px;
    border: 1px solid #2c2c36; background: #101014;
    display: grid; place-content: center; color: #f0a53f; margin-bottom: 4px;
}
.ch-ico svg { width: 21px; height: 21px; }
.ch-k {
    font-size: 9px; font-weight: 700; letter-spacing: .15em;
    text-transform: uppercase; color: #76746f;
}
.ch-card b { font-size: 15.5px; font-weight: 630; line-height: 1.32; color: #f2f1ee; }
.ch-card p { margin: 0; font-size: 12.5px; line-height: 1.6; color: #a8a7a2; flex: 1; }
.ch-go {
    font-size: 12px; font-weight: 640; color: #f0a53f; margin-top: 4px;
    transition: transform .2s cubic-bezier(.32,.72,0,1);
}
.ch-card:hover .ch-go { transform: translateX(3px); }

.ch-card.ch-assemble { border-color: #3a3222; background: linear-gradient(180deg, #1d1a14, #14120f); }
.ch-card.ch-panel { opacity: .82; }
.ch-card.ch-panel:hover { opacity: 1; }
