/* VisionAI Software page (software2.html). Builds on css/styles.css. */

.sw {
  --sw-bg: #02030f;
  --sw-cyan: #6fbfe4;
  --sw-blue: #2f7bff;
  --sw-pass: #3df27a;
  --sw-fail: #ff2d55;
  --sw-line: rgba(111, 191, 228, .18);
  --sw-text: #c9d6e2;
  background: var(--sw-bg);
  color: #fff;
  font-family: var(--f-foot);
  overflow: hidden;
}
.sw-wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }
.sw h1, .sw h2, .sw h3 { font-family: var(--f-head); font-weight: 700; text-wrap: balance; }
.sw p { text-wrap: pretty; }
.sw-eyebrow { font: 700 13px/1 var(--f-head); letter-spacing: .22em; text-transform: uppercase; color: var(--sw-cyan); }

/* ---------- buttons / links ---------- */
.sw-cta { display: flex; flex-wrap: wrap; gap: 16px; }
.sw-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 26px;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; background: rgba(255, 255, 255, .04);
  color: #fff; font: 700 16px var(--f-head); text-decoration: none; white-space: nowrap;
  transition: transform .2s, background-color .2s, border-color .2s, box-shadow .2s;
}
.sw-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .1); border-color: #fff; }
.sw-btn-primary { border-color: transparent; background: linear-gradient(135deg, #2f7bff, #04449c); box-shadow: 0 10px 34px rgba(47, 123, 255, .45); }
.sw-btn-primary:hover { background: linear-gradient(135deg, #4d90ff, #0a55c0); border-color: transparent; box-shadow: 0 14px 44px rgba(47, 123, 255, .6); }
.sw-btn-primary span { transition: transform .2s; }
.sw-btn-primary:hover span { transform: translateX(4px); }
.sw-btn-ghost { border-color: transparent; background: none; color: var(--sw-cyan); padding: 0 8px; }
.sw-btn-ghost:hover { background: none; border-color: transparent; color: #fff; }
.sw-link { display: inline-flex; gap: 8px; color: var(--sw-cyan); font: 700 16px var(--f-head); text-decoration: none; }
.sw-link:hover { color: #fff; }
.sw-link span { transition: transform .2s; }
.sw-link:hover span { transform: translateX(4px); }
.sw a:focus-visible, .sw button:focus-visible { outline: 2px solid var(--sw-cyan); outline-offset: 3px; }

/* ---------- app window frame ---------- */
.sw-window {
  border: 1px solid var(--sw-line); border-radius: 12px; overflow: hidden; background: #050a1c;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 40px 90px rgba(0, 8, 40, .8), 0 0 120px rgba(47, 123, 255, .22);
}
.sw-window-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; background: #0a1228; border-bottom: 1px solid var(--sw-line); }
.sw-window-bar i { width: 10px; height: 10px; border-radius: 50%; background: #24304d; }
.sw-window-bar span { margin-left: 12px; padding: 4px 14px; border-radius: 20px; background: #050a1c; color: #7f93ad; font: 400 12px var(--f-foot); letter-spacing: .04em; }
.sw-window-body { position: relative; }
.sw-window-body img, .sw-window-body video { display: block; width: 100%; height: auto; }

/* ---------- hero ---------- */
.sw-hero {
  position: relative; padding: 96px 0 72px;
  background:
    radial-gradient(900px 520px at 78% 30%, rgba(47, 123, 255, .28), transparent 65%),
    radial-gradient(700px 500px at 8% 0%, rgba(4, 68, 156, .35), transparent 60%),
    var(--sw-bg);
}
.sw-hero::before {            /* faint engineering grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--sw-line) 1px, transparent 1px), linear-gradient(90deg, var(--sw-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 60% 30%, #000 10%, transparent 75%);
  opacity: .5;
}
.sw-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.sw-hero h1 { margin-top: 22px; font-size: clamp(40px, 4.6vw, 68px); line-height: 1.08; letter-spacing: -.02em; }
.sw-hero h1 span { display: block; background: linear-gradient(90deg, #8fd4f5, #2f7bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sw-sub { margin-top: 26px; max-width: 34em; font-size: 19px; line-height: 1.65; color: var(--sw-text); }
.sw-hero .sw-cta { margin-top: 38px; }

.sw-hero-visual { position: relative; perspective: 1600px; }
.sw-hero-visual .sw-window { transform: rotateY(var(--ry, -9deg)) rotateX(var(--rx, 4deg)); transform-origin: 30% 50%; transition: transform .25s ease-out; }
.sw-scan { position: absolute; left: 0; right: 0; top: 0; height: 90px; pointer-events: none; background: linear-gradient(rgba(111, 191, 228, 0), rgba(111, 191, 228, .22) 85%, rgba(160, 225, 255, .9)); border-bottom: 1px solid #bfeaff; animation: sw-scan 5.5s cubic-bezier(.5, 0, .5, 1) infinite; }
@keyframes sw-scan { 0% { transform: translateY(-100px); opacity: 0; } 12% { opacity: 1; } 70% { opacity: 1; } 82%, 100% { transform: translateY(520px); opacity: 0; } }

.sw-chip { position: absolute; display: flex; align-items: baseline; gap: 8px; padding: 12px 18px; border-radius: 10px; background: rgba(5, 10, 28, .88); border: 1px solid var(--sw-line); backdrop-filter: blur(8px); font: 700 13px var(--f-head); letter-spacing: .12em; box-shadow: 0 16px 40px rgba(0, 0, 0, .55); animation: sw-float 6s ease-in-out infinite; }
.sw-chip b { font-size: 26px; letter-spacing: 0; }
.sw-chip-pass { left: -26px; top: 16%; color: var(--sw-pass); border-color: rgba(61, 242, 122, .45); }
.sw-chip-fail { right: -14px; top: 46%; color: var(--sw-fail); border-color: rgba(255, 45, 85, .5); animation-delay: -2s; }
.sw-chip-done { left: 12%; bottom: -22px; color: var(--sw-cyan); animation-delay: -4s; }
@keyframes sw-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.sw-facts { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 96px; padding: 0; list-style: none; border: 1px solid var(--sw-line); border-radius: 12px; background: rgba(5, 10, 28, .6); backdrop-filter: blur(6px); }
.sw-facts li { padding: 26px 28px; border-left: 1px solid var(--sw-line); }
.sw-facts li:first-child { border-left: 0; }
.sw-facts strong { display: block; font: 700 28px/1.1 var(--f-head); }
.sw-facts span { display: block; margin-top: 8px; font-size: 15px; color: var(--sw-text); }

/* ---------- sections ---------- */
.sw-section { position: relative; padding: 120px 0; }
.sw-section h2 { margin-top: 18px; max-width: 18em; font-size: clamp(30px, 3.3vw, 46px); line-height: 1.15; letter-spacing: -.01em; }

/* how it works */
.sw-flow { background: linear-gradient(#02030f, #040a1f 50%, #02030f); }
.sw-flow-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; margin-top: 56px; align-items: start; }
.sw-steps { display: grid; gap: 12px; }
.sw-step { position: relative; display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; padding: 20px 22px 22px; text-align: left; border: 1px solid transparent; border-radius: 12px; background: none; color: #fff; cursor: pointer; overflow: hidden; transition: background-color .25s, border-color .25s; }
.sw-step:hover { background: rgba(255, 255, 255, .03); }
.sw-step[aria-selected="true"] { background: rgba(47, 123, 255, .1); border-color: rgba(47, 123, 255, .45); }
.sw-step-n { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--sw-line); border-radius: 50%; font: 700 17px var(--f-head); color: var(--sw-cyan); transition: background-color .25s, color .25s; }
.sw-step[aria-selected="true"] .sw-step-n { background: var(--sw-blue); border-color: var(--sw-blue); color: #fff; }
.sw-step-t { align-self: center; font: 700 20px var(--f-head); }
.sw-step-d { grid-column: 2; display: grid; grid-template-rows: 0fr; font-size: 15.5px; line-height: 1.55; color: var(--sw-text); opacity: 0; transition: grid-template-rows .35s, opacity .35s, margin .35s; overflow: hidden; }
.sw-step-d::before { content: ""; min-height: 0; }
.sw-step[aria-selected="true"] .sw-step-d { display: block; margin-top: 8px; opacity: 1; }
.sw-step:not([aria-selected="true"]) .sw-step-d { height: 0; }
.sw-step-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--sw-blue), var(--sw-cyan)); }
.sw-flow.auto .sw-step[aria-selected="true"] .sw-step-bar { animation: sw-bar var(--sw-step-ms, 6000ms) linear forwards; }
@keyframes sw-bar { to { width: 100%; } }
.sw-panels { aspect-ratio: 2 / 1; background: #02030f; }
.sw-panel { position: absolute; inset: 0; animation: sw-fade .45s ease; }
.sw-panel[hidden] { display: none; }
.sw-panel img, .sw-panel video { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
#sw-panel-2 img { object-position: center; }
@keyframes sw-fade { from { opacity: 0; transform: scale(1.015); } }

/* features */
.sw-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; }
.sw-card { position: relative; padding: 32px 30px 34px; border: 1px solid var(--sw-line); border-radius: 14px; background: linear-gradient(160deg, rgba(47, 123, 255, .1), rgba(5, 10, 28, .5) 55%); transition: transform .25s, border-color .25s, box-shadow .25s; }
.sw-card:hover { transform: translateY(-6px); border-color: rgba(111, 191, 228, .6); box-shadow: 0 24px 60px rgba(0, 20, 80, .55); }
.sw-card svg { width: 46px; height: 46px; fill: none; stroke: var(--sw-cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sw-card h3 { margin-top: 22px; font-size: 21px; line-height: 1.25; }
.sw-card p { margin-top: 12px; font-size: 15.5px; line-height: 1.65; color: var(--sw-text); }

/* multi-camera */
.sw-split { background: radial-gradient(800px 480px at 20% 50%, rgba(47, 123, 255, .16), transparent 70%); }
.sw-split-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 64px; align-items: center; }
.sw-split-copy p:not(.sw-eyebrow) { margin: 22px 0 28px; font-size: 17px; line-height: 1.7; color: var(--sw-text); }

/* applications */
.sw-apps { padding: 0 0 110px; text-align: center; }
.sw-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 26px auto 34px; max-width: 900px; }
.sw-tags span { padding: 11px 20px; border: 1px solid var(--sw-line); border-radius: 30px; background: rgba(255, 255, 255, .03); font-size: 15px; color: #e6eef6; }

/* final call to action */
.sw-final { padding: 0 0 130px; }
.sw-final-box { padding: 72px 48px; border: 1px solid rgba(111, 191, 228, .35); border-radius: 20px; text-align: center; background: radial-gradient(600px 300px at 50% 0%, rgba(47, 123, 255, .4), transparent 70%), #050a1c; }
.sw-final-box h2 { margin: 0 auto; }
.sw-final-box p { margin: 18px auto 36px; max-width: 34em; font-size: 18px; line-height: 1.6; color: var(--sw-text); }
.sw-final-box .sw-cta { justify-content: center; }

/* ---------- scroll reveal (only when JS is running) ---------- */
.js .sw .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .sw .reveal.in { opacity: 1; transform: none; }
.js .sw .sw-cards .reveal:nth-child(3n + 2) { transition-delay: .08s; }
.js .sw .sw-cards .reveal:nth-child(3n) { transition-delay: .16s; }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .sw-hero { padding-top: 64px; }
  .sw-hero-grid, .sw-flow-grid, .sw-split-grid { grid-template-columns: 1fr; }
  .sw-hero-visual { margin: 12px 20px 0; }
  .sw-hero-visual .sw-window { transform: none; }
  .sw-facts { grid-template-columns: repeat(2, 1fr); margin-top: 80px; }
  .sw-facts li:nth-child(3) { border-left: 0; }
  .sw-facts li:nth-child(n + 3) { border-top: 1px solid var(--sw-line); }
  .sw-cards { grid-template-columns: repeat(2, 1fr); }
  .sw-section { padding: 88px 0; }
  .sw-apps { padding: 0 0 88px; }
  .sw-split-grid { gap: 40px; }
}
@media (max-width: 640px) {
  .sw-wrap { width: calc(100% - 32px); }
  .sw-sub { font-size: 17px; }
  .sw-btn { flex: 1 1 100%; justify-content: center; }
  .sw-hero-visual { margin-inline: 4px; }
  .sw-chip { padding: 8px 12px; font-size: 11px; }
  .sw-chip b { font-size: 19px; }
  .sw-chip-pass { left: -6px; } .sw-chip-fail { right: -6px; }
  .sw-facts { grid-template-columns: 1fr; margin-top: 64px; }
  .sw-facts li { border-left: 0; border-top: 1px solid var(--sw-line); padding: 20px 22px; }
  .sw-facts li:first-child { border-top: 0; }
  .sw-cards { grid-template-columns: 1fr; }
  .sw-step { padding: 16px; }
  .sw-final-box { padding: 48px 22px; }
  .sw-window-bar span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sw-scan, .sw-chip { animation: none; }
  .sw-scan { display: none; }
  .js .sw .reveal { opacity: 1; transform: none; transition: none; }
  .sw-hero-visual .sw-window { transition: none; }
  .sw-flow.auto .sw-step[aria-selected="true"] .sw-step-bar { animation: none; width: 100%; }
}
