/* ===== Software page (software.html) =====
   Page-only pieces on top of styles.css and seo-landing.css: the stats band,
   the app-window screenshot frame, the software cards and the R&D list. */
.sw-y { color: var(--gold, #f5c518); }

/* Hero: one line per idea on wide screens */
.sw-hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
.sw-hero .srv-hero-sub { max-width: 640px; }
.sw-platforms .section-title, .sw-firmware .section-title, .sw-lab .section-title { text-wrap: balance; }

/* ---------- Stats band ---------- */
.sw-stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #0c0c0c; }
.sw-stats dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.sw-stats dl > div { padding: 1.6rem 1.4rem; border-left: 1px solid var(--border); display: flex; flex-direction: column-reverse; gap: 0.35rem; }
.sw-stats dl > div:first-child { border-left: 0; }
.sw-stats dd { margin: 0; font-family: 'Orbitron', sans-serif; font-size: clamp(1.35rem, 2.6vw, 2rem); font-weight: 800; color: #fff; letter-spacing: 0.02em; line-height: 1; }
.sw-stats dt { font-family: 'Rajdhani', sans-serif; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: #9a9a9a; line-height: 1.35; }
.sw-stats dt b { color: #f5c518; font-weight: 700; }

/* ---------- App window frame for real screenshots ---------- */
.sw-window { margin: 0; border: 1px solid rgba(255,255,255,0.14); border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(245,197,24,0.06); }
.sw-window-bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.55rem 0.8rem; background: #1a1a1a; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sw-window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a3a; }
.sw-window-bar i:nth-child(1) { background: #ff5f57; } .sw-window-bar i:nth-child(2) { background: #febc2e; } .sw-window-bar i:nth-child(3) { background: #28c840; }
.sw-window-bar span { margin-left: 0.5rem; font-family: 'Inter', sans-serif; font-size: 0.72rem; color: #a8a8a8; letter-spacing: 0.02em; }
.sw-window img { display: block; width: 100%; height: auto; }
.sw-window figcaption { font-family: 'Inter', sans-serif; font-size: 0.76rem; line-height: 1.6; color: #8f8f8f; padding: 0.85rem 1rem; background: #0d0d0d; border-top: 1px solid var(--border); }

/* ---------- Software cards ---------- */
.sw-platforms, .sw-firmware { padding: 6rem 0; }
.sw-firmware { background: #0c0c0c; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.sw-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sw-card { position: relative; display: flex; flex-direction: column; background: var(--bg-card, #111); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; transition: border-color .3s, transform .3s; }
.sw-card:hover { border-color: rgba(245,197,24,0.45); transform: translateY(-3px); }
.sw-card-img { position: relative; aspect-ratio: 16 / 9; background: #0b0b0b; overflow: hidden; }
.sw-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.22,.8,.24,1); }
.sw-card:hover .sw-card-img img { transform: scale(1.04); }
.sw-card-img.is-contain img { object-fit: contain; }
.sw-card-body { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.5rem 1.5rem 1.6rem; flex: 1; }
.sw-card-tag { font-family: 'Rajdhani', sans-serif; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #f5c518; }
.sw-card h3 { margin: 0; font-family: 'Orbitron', sans-serif; font-size: 1.15rem; font-weight: 800; letter-spacing: 0.06em; color: #fff; }
.sw-card p { margin: 0; font-family: 'Inter', sans-serif; font-size: 0.88rem; line-height: 1.75; color: var(--text-dim, #a8a8a8); }
.sw-card ul { list-style: none; margin: 0.2rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.sw-card li { position: relative; padding-left: 1.2rem; font-family: 'Inter', sans-serif; font-size: 0.82rem; line-height: 1.55; color: #d6d6d6; }
.sw-card li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; background: #f5c518; border-radius: 1px; }
.sw-card-go { margin-top: auto; padding-top: 0.6rem; display: inline-flex; align-items: center; gap: 0.5rem; font-family: 'Rajdhani', sans-serif; font-size: 0.92rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #fff; }
.sw-card-go svg { transition: transform .25s; color: #f5c518; }
.sw-card-go:hover svg { transform: translateX(4px); }
/* the whole card is clickable through its link */
.sw-card-go::after { content: ''; position: absolute; inset: 0; }
.sw-card-go:focus-visible { outline: none; }
.sw-card:has(.sw-card-go:focus-visible) { outline: 2px solid #f5c518; outline-offset: 3px; }
.sw-status { position: absolute; top: 0.8rem; left: 0.8rem; z-index: 1; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.65rem; border-radius: 2px; background: rgba(10,10,10,0.82); border: 1px solid rgba(255,255,255,0.18); font-family: 'Rajdhani', sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #e6e6e6; }
.sw-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #f5c518; }
.sw-status.is-live::before { background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,0.8); }

/* ---------- How we build ---------- */
.sw-process .srv-step p a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.35); text-underline-offset: 3px; }

/* ---------- R&D list ---------- */
.sw-lab { padding: 6rem 0; }
.sw-lab-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.sw-lab-list li { background: #0d0d0d; padding: 1.8rem 1.6rem; display: flex; flex-direction: column; gap: 0.7rem; }
.sw-lab-list .sw-status { position: static; align-self: flex-start; }
.sw-lab-list h3 { margin: 0.2rem 0 0; font-family: 'Orbitron', sans-serif; font-size: 1.02rem; font-weight: 800; letter-spacing: 0.06em; color: #fff; }
.sw-lab-list p { margin: 0; font-family: 'Inter', sans-serif; font-size: 0.86rem; line-height: 1.75; color: var(--text-dim, #a8a8a8); }

/* ECU repair section heading spacing */
#ecu-repair { scroll-margin-top: 80px; }
.sw-ecu-head { padding-top: 6rem; }
.faq-group { font-family: 'Rajdhani', sans-serif; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: #f5c518; margin: 2rem 0 0.6rem; }
.faq-group:first-child { margin-top: 0; }

@media (max-width: 1024px) {
    .sw-grid.is-3, .sw-lab-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sw-stats dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sw-stats dl > div:nth-child(3) { border-left: 0; }
    .sw-stats dl > div:nth-child(n+3) { border-top: 1px solid var(--border); }
    .sw-lab-list > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
/* Tablets: an odd last card sits centred rather than alone at the left */
@media (min-width: 721px) and (max-width: 1024px) {
    .sw-grid.is-3 > .sw-card:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 0.75rem); }
}
/* Narrower desktops: keep the hero copy on the dark side of the photo */
@media (min-width: 901px) and (max-width: 1200px) {
    .sw-hero .srv-hero-sub { max-width: calc(40vw - 1rem); }
}
@media (max-width: 380px) {
    .sw-stats dd { font-size: 1.2rem; }
}
@media (max-width: 720px) {
    .sw-grid, .sw-grid.is-3, .sw-lab-list { grid-template-columns: minmax(0, 1fr); }
    .sw-platforms, .sw-firmware, .sw-lab { padding: 4rem 0; }
    .sw-ecu-head { padding-top: 4rem; }
    .sw-stats dl > div { padding: 1.2rem 1rem; }
    .sw-card-body { padding: 1.25rem 1.2rem 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
    .sw-card, .sw-card-img img, .sw-card-go svg { transition: none; }
    .sw-card:hover, .sw-card:hover .sw-card-img img { transform: none; }
}
