/* ==========================================================================
   Neo Technologies — Neo OS, Neo Tab ordering, web platforms
   Loaded after neo.css and built on its tokens (light + dark).
   ========================================================================== */

/* ---------- Featured apps: 3 or 4 cards ---------- */
@media (min-width: 1025px) {
    .spot-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}
@media (min-width: 641px) and (max-width: 1199px) {
    .spot-grid:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
}
.spot-card { container-type: inline-size; }
@container (max-width: 320px) {
    .spot-top { margin-bottom: 22px; }
    .spot-icon { width: 76px; height: 76px; border-radius: 21px; }
    .spot-card h3 { font-size: 1.4rem; }
    .spot-actions { flex-direction: column; }
    .spot-actions .btn { flex: none; width: 100%; }
}

/* Web platforms (no store download): "Open" instead of "Download" */
.app-meta .is-web, .spot-meta .is-web { color: var(--ink-2); font-weight: 600; }

/* Gradient text for light sections (neo.css .text-grad is tuned for dark) */
.text-grad-brand {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Neo OS ---------- */
.neoos { background: var(--bg); border-top: 1px solid var(--line); overflow: hidden; }
.neoos-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.neoos-copy h2 { margin: 16px 0 14px; font-size: clamp(2rem, 3.6vw, 3rem); }
.neoos-copy > p { color: var(--muted); font-size: 1.1rem; max-width: 32rem; }

.os-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; margin: 32px 0 36px; }
.os-points li { display: flex; align-items: flex-start; gap: 14px; }
.os-point-icon {
    width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--brand-ink); background: rgba(99, 102, 241, .1);
    border: 1px solid rgba(99, 102, 241, .18);
}
.os-point-icon .i { width: 20px; height: 20px; }
.os-points strong { display: block; margin-bottom: 2px; font-family: var(--font-display); font-size: 1.02rem; letter-spacing: -.015em; }
.os-points span { color: var(--muted); font-size: .93rem; line-height: 1.5; }
.neoos-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.os-stage {
    position: relative; isolation: isolate; overflow: hidden;
    padding: 52px 40px; border-radius: 40px;
    background: var(--night); color: var(--night-ink);
    box-shadow: var(--sh-3);
}
.os-stage::before {
    content: ""; position: absolute; inset: -20%; z-index: -2;
    background:
        radial-gradient(40% 45% at 0% 0%, rgba(99, 102, 241, .55), transparent 70%),
        radial-gradient(40% 45% at 100% 100%, rgba(236, 72, 153, .38), transparent 70%),
        radial-gradient(30% 35% at 85% 15%, rgba(139, 92, 246, .4), transparent 70%);
}
.os-stage::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 25%, transparent 80%);
    mask-image: radial-gradient(ellipse 75% 70% at 50% 50%, #000 25%, transparent 80%);
}
.os-stack { position: relative; display: grid; gap: 22px; }
.os-layer {
    position: relative; display: flex; align-items: center; gap: 16px;
    padding: 18px 20px; border-radius: 22px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.os-layer + .os-layer::before {
    content: ""; position: absolute; left: 50%; top: -23px; height: 22px;
    border-left: 2px dashed rgba(196, 181, 253, .45);
}
.os-layer-ico {
    width: 44px; height: 44px; flex: 0 0 auto; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #c7d2fe; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
}
.os-layer-label { display: grid; gap: 2px; min-width: 0; }
.os-layer-label b { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -.015em; color: #fff; }
.os-layer-label small { font-size: .8rem; color: var(--night-muted); }
.os-apps { display: flex; margin-left: auto; padding-left: 8px; }
.os-apps img, .os-apps .icon-fallback {
    width: 38px; height: 38px; margin-left: -8px; border-radius: 11px; object-fit: cover;
    border: 2px solid #141a3d; background: rgba(255, 255, 255, .1);
    box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .6);
    font-size: .9rem;
}
.os-layer.is-core {
    padding: 26px 22px;
    background: linear-gradient(135deg, rgba(99, 102, 241, .42), rgba(139, 92, 246, .28) 55%, rgba(236, 72, 153, .3));
    border-color: rgba(196, 181, 253, .5);
    box-shadow: 0 30px 60px -28px rgba(139, 92, 246, .9), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.os-layer.is-core .os-layer-label b { font-size: 1.5rem; letter-spacing: -.03em; }
.os-core-mark { width: 56px; height: 56px; flex: 0 0 auto; filter: drop-shadow(0 10px 22px rgba(139, 92, 246, .6)); }
.os-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-left: auto; }
.os-chip {
    padding: 5px 10px; border-radius: 999px; white-space: nowrap;
    font-size: .74rem; font-weight: 600; color: #fff;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18);
}
.os-devices { display: flex; align-items: flex-end; gap: 6px; margin-left: auto; color: #c7d2fe; }
.os-devices .i { width: 30px; height: 30px; stroke-width: 1.6; }
.os-devices .i + .i { width: 22px; height: 22px; }

/* ---------- Neo Tab ---------- */
.neotab-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Order Neo devices (contact form) ---------- */
.order-card {
    display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    margin-top: 96px; overflow: hidden; text-align: left;
    border-radius: 36px; background: var(--surface);
    border: 1px solid var(--line); box-shadow: var(--sh-2);
    scroll-margin-top: calc(var(--nav-h) + 16px);
}
.order-info {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column;
    padding: 48px 44px;
    background: var(--night); color: var(--night-ink);
}
.order-info::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(75% 50% at 0% 0%, rgba(99, 102, 241, .5), transparent 70%),
        radial-gradient(75% 50% at 100% 100%, rgba(236, 72, 153, .32), transparent 70%);
}
.order-info > .eyebrow { align-self: flex-start; }
.order-info h3 { margin: 18px 0 12px; font-size: clamp(1.7rem, 2.6vw, 2.2rem); color: #fff; }
.order-info > p { color: var(--night-muted); }
.order-steps { display: grid; gap: 16px; margin: 30px 0 34px; list-style: none; counter-reset: step; }
.order-steps li { display: flex; align-items: center; gap: 14px; font-weight: 500; color: rgba(238, 240, 255, .92); }
.order-steps li::before {
    counter-increment: step; content: counter(step);
    width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 800; font-size: .9rem; color: #fff;
    background: var(--grad); box-shadow: 0 10px 20px -10px rgba(236, 72, 153, .8);
}
.kc-contact {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 26px; padding: 14px 16px; border-radius: 18px;
    color: #fff; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
    transition: background-color .2s, border-color .2s, transform .2s;
}
.kc-contact:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .26); transform: translateY(-1px); }
.kc-contact-ico {
    width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; background: var(--grad); box-shadow: 0 10px 20px -10px rgba(139, 92, 246, .9);
}
.kc-contact-text { display: grid; gap: 1px; min-width: 0; flex: 1; }
.kc-contact-text small { font-size: .8rem; color: var(--night-muted); }
.kc-contact-text b { font-family: var(--font-display); font-size: 1.08rem; letter-spacing: -.01em; }
.kc-contact > .i { opacity: .7; transition: transform .2s; }
.kc-contact:hover > .i { transform: translateX(3px); opacity: 1; }
.kc-inline { color: var(--brand-ink); font-weight: 600; }
.kc-inline:hover { text-decoration: underline; text-underline-offset: 3px; }

.order-note {
    display: flex; align-items: center; gap: 8px;
    margin-top: auto; padding-top: 22px; border-top: 1px solid var(--night-line);
    font-size: .85rem; color: var(--night-muted);
}
.order-note .i { width: 16px; height: 16px; }

.order-body { position: relative; padding: 44px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .field-full { grid-column: 1 / -1; }

.field select, .field textarea {
    width: 100%; border-radius: 14px;
    border: 1px solid var(--line-2); background-color: var(--bg); color: var(--ink);
    outline: none; transition: border-color .2s, box-shadow .2s;
}
.field select {
    height: 50px; padding: 0 44px 0 16px; cursor: pointer;
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239097ba' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; background-size: 16px;
}
.field textarea { display: block; min-height: 116px; padding: 13px 16px; line-height: 1.5; resize: vertical; }
.field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: var(--ring); }
.field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }

.qty {
    display: flex; align-items: stretch; height: 50px; overflow: hidden;
    border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg);
    transition: border-color .2s, box-shadow .2s;
}
.qty:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.field.has-error .qty { border-color: var(--danger); }
.qty input {
    flex: 1; min-width: 0; height: 100%; padding: 0 4px;
    border: 0; border-radius: 0; background: transparent;
    text-align: center; font-weight: 600;
    -moz-appearance: textfield; appearance: textfield;
}
.qty input:focus, .qty input:focus-visible { box-shadow: none; border-radius: 0; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn {
    width: 48px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--muted); transition: color .2s, background-color .2s;
}
.qty-btn:hover { color: var(--brand-ink); background: var(--surface-2); }
.qty-btn .i { width: 18px; height: 18px; }

.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.order-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 6px; }
.order-submit p { flex: 1 1 200px; font-size: .84rem; color: var(--muted); }

.order-success {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 420px; text-align: center; outline: none;
}
.order-success:focus, .order-success:focus-visible { box-shadow: none; }
.order-success-badge {
    width: 66px; height: 66px; margin-bottom: 18px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 16px 30px -12px rgba(16, 185, 129, .7);
    animation: pop-in .5s cubic-bezier(.2, .8, .2, 1.2) both;
}
.order-success-badge .i { width: 30px; height: 30px; stroke-width: 2.6; }
.order-success h4 { margin-bottom: 8px; font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -.02em; }
.order-success p { max-width: 26rem; margin-bottom: 22px; color: var(--muted); }
.order-success b { color: var(--ink); }
.order-ref { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .neoos-grid { grid-template-columns: 1fr; gap: 56px; }
    .neoos-copy { text-align: center; }
    .neoos-copy > p { margin: 0 auto; }
    .os-points { max-width: 640px; margin-left: auto; margin-right: auto; text-align: left; }
    .neoos-actions, .neotab-actions { justify-content: center; }
    .os-stage { max-width: 640px; width: 100%; margin: 0 auto; }
    .order-card { grid-template-columns: 1fr; margin-top: 72px; }
    .order-note { margin-top: 0; }
}

@media (max-width: 760px) {
    .os-points { grid-template-columns: 1fr; gap: 18px; }
    .os-stage { padding: 30px 18px; border-radius: 28px; }
    .os-layer { flex-wrap: wrap; padding: 16px; }
    .os-apps, .os-chips, .os-devices { margin-left: 0; width: 100%; justify-content: flex-start; padding-left: 8px; }
    .os-chips { padding-left: 0; }
    .os-layer + .os-layer::before { left: 36px; }
    .order-card { margin-top: 56px; border-radius: 28px; }
    .order-info { padding: 32px 22px; }
    .order-body { padding: 30px 22px; }
    .form-grid { grid-template-columns: 1fr; }
    .order-submit .btn { width: 100%; }
    .order-success { min-height: 340px; }
}
