/* ============================================================
   SCOTT RIGGLE // HUD — Tony Stark interface
   ============================================================ */

:root {
    --bg: #04060c;
    --panel: rgba(13, 22, 38, 0.55);
    --panel-strong: rgba(10, 18, 32, 0.85);
    --line: rgba(79, 248, 255, 0.35);
    --line-dim: rgba(79, 248, 255, 0.14);
    --cyan: #4ff8ff;
    --cyan-soft: rgba(79, 248, 255, 0.6);
    --blue: #2e6bff;
    --magenta: #ff2e88;
    --amber: #ffb545;
    --text: #a9d4de;
    --text-dim: rgba(169, 212, 222, 0.55);
    --font-head: 'Orbitron', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

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

html, body { height: 100%; }

body {
    background:
        radial-gradient(1200px 700px at 50% 42%, rgba(30, 80, 140, 0.20), transparent 62%),
        radial-gradient(900px 600px at 18% -10%, rgba(47, 107, 255, 0.14), transparent 60%),
        radial-gradient(900px 600px at 82% 110%, rgba(47, 107, 255, 0.10), transparent 60%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ---------- Global overlays ---------- */

/* scanlines */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.28) 0,
        rgba(0, 0, 0, 0.28) 1px,
        transparent 1px,
        transparent 3px
    );
}

/* vignette */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 91;
    pointer-events: none;
    background: radial-gradient(140% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

/* ---------- Viewport corner frame ---------- */

.frame {
    position: fixed;
    inset: 14px;
    z-index: 40;
    pointer-events: none;
}

.corner {
    position: absolute;
    width: 34px;
    height: 34px;
}

.corner.tl { top: 0;    left: 0;   border-top: 2px solid var(--cyan-soft);    border-left: 2px solid var(--cyan-soft); }
.corner.tr { top: 0;    right: 0;  border-top: 2px solid var(--cyan-soft);    border-right: 2px solid var(--cyan-soft); }
.corner.bl { bottom: 0; left: 0;   border-bottom: 2px solid var(--cyan-soft); border-left: 2px solid var(--cyan-soft); }
.corner.br { bottom: 0; right: 0;  border-bottom: 2px solid var(--cyan-soft); border-right: 2px solid var(--cyan-soft); }

.corner.tl::after, .corner.tr::after, .corner.bl::after, .corner.br::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border-style: solid;
    border-color: rgba(79, 248, 255, 0.12);
    animation: cornerPulse 4s ease-in-out infinite;
}

.corner.tl::after  { top: 5px;    left: 5px;   border-width: 1px 0 0 1px; }
.corner.tr::after  { top: 5px;    right: 5px;  border-width: 1px 1px 0 0; }
.corner.bl::after  { bottom: 5px; left: 5px;   border-width: 0 0 1px 1px; }
.corner.br::after  { bottom: 5px; right: 5px;  border-width: 0 1px 1px 0; }

@keyframes cornerPulse {
    0%, 100% { opacity: 0.35; }
    50%      { opacity: 1; }
}

/* ---------- Scan sweep line ---------- */

.sweep {
    position: fixed;
    left: 0;
    right: 0;
    height: 140px;
    z-index: 45;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(79, 248, 255, 0.05) 45%,
        rgba(79, 248, 255, 0.09) 50%,
        rgba(79, 248, 255, 0.05) 55%,
        transparent
    );
    animation: sweep 9s linear infinite;
}

@keyframes sweep {
    0%   { top: -20%; }
    100% { top: 120%; }
}

/* ---------- Ambient rings ---------- */

.rings {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    display: grid;
    place-items: center;
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(79, 248, 255, 0.10);
}

.ring-a { width: 560px; height: 560px; animation: spin 60s linear infinite; }
.ring-b { width: 900px; height: 900px; animation: spin 100s linear infinite reverse; border-style: solid; border-color: rgba(79, 248, 255, 0.05); }
.ring-c { width: 1300px; height: 1300px; animation: spin 140s linear infinite; }

.ring-a::after {
    content: "";
    position: absolute;
    top: 50%; left: 0;
    width: 8px; height: 8px;
    margin-top: -4px;
    border-radius: 50%;
    background: var(--cyan-soft);
    box-shadow: 0 0 12px var(--cyan-soft);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Shared elements ---------- */

.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
    margin-right: 7px;
    vertical-align: middle;
}

.bracket { color: var(--cyan-soft); }

/* ============================================================
   HEADER HUD
   ============================================================ */

.hud-top {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 30px 46px 10px;
}

.hud-id {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hud-id .mark {
    color: var(--cyan);
    text-shadow: 0 0 14px var(--cyan);
    font-size: 22px;
    animation: pulse 2.4s ease-in-out infinite;
}

.hud-id h1 {
    font-family: var(--font-head);
    font-weight: 900;
    letter-spacing: 0.28em;
    font-size: 19px;
    color: var(--cyan);
    text-shadow: 0 0 12px rgba(79, 248, 255, 0.55), 0 0 40px rgba(79, 248, 255, 0.25);
}

.hud-id p {
    font-size: 11px;
    letter-spacing: 0.34em;
    color: var(--text-dim);
    margin-top: 2px;
}

.hud-sys {
    display: flex;
    gap: 26px;
    font-size: 12px;
    letter-spacing: 0.16em;
    color: var(--cyan-soft);
}

.sys-item { white-space: nowrap; }
.sys-item.warn .dot { color: var(--amber); box-shadow: 0 0 8px var(--amber); }
.sys-item .dot { color: var(--cyan); }

@keyframes pulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 14px var(--cyan); }
    50%      { opacity: 0.55; text-shadow: 0 0 4px var(--cyan); }
}

/* ============================================================
   SIDE RAILS
   ============================================================ */

.rail {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 190px;
    padding: 14px;
}

.rail-left { left: 34px; border-left: 1px solid var(--line-dim); }
.rail-right { right: 34px; text-align: right; border-right: 1px solid var(--line-dim); }

.readouts { list-style: none; }

.readouts li {
    padding: 7px 0;
    border-bottom: 1px dashed rgba(79, 248, 255, 0.08);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 8px;
}

.readouts .label {
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--text-dim);
    grid-column: 1 / -1;
    margin-bottom: 4px;
}

.bar {
    display: block;
    height: 4px;
    background: rgba(79, 248, 255, 0.10);
    position: relative;
    overflow: hidden;
}

.bar i {
    display: block;
    height: 100%;
    width: var(--p);
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    box-shadow: 0 0 8px var(--cyan-soft);
    animation: barGlow 2.6s ease-in-out infinite;
}

@keyframes barGlow {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.35); }
}

.readouts .value {
    font-size: 13px;
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(79, 248, 255, 0.5);
    margin-left: 8px;
}

/* right dial */

.dial {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 0 18px auto;
}

.dial-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--line);
    border-top-color: var(--cyan);
    border-right-color: rgba(79, 248, 255, 0.08);
    animation: spin 4s linear infinite;
}

.dial-ring::before,
.dial-ring::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(79, 248, 255, 0.18);
}
.dial-ring::before { inset: 8px; }
.dial-ring::after { inset: 20px; border-style: solid; border-color: rgba(79, 248, 255, 0.08); }

.dial-core {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    text-align: center;
}

.dial-core b {
    font-family: var(--font-head);
    font-size: 26px;
    color: var(--cyan);
    text-shadow: 0 0 16px var(--cyan-soft);
    line-height: 1;
}

.dial-core span {
    font-size: 9px;
    letter-spacing: 0.34em;
    color: var(--text-dim);
    margin-top: 6px;
}

.rail-read {
    padding: 7px 0;
    border-top: 1px dashed rgba(79, 248, 255, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    font-size: 11px;
    letter-spacing: 0.14em;
}

.rail-read span { color: var(--text-dim); }
.rail-read b { color: var(--text); font-weight: 400; }

/* ============================================================
   STAGE / CARDS
   ============================================================ */

.stage {
    position: relative;
    z-index: 10;
    max-width: 1140px;
    margin: 0 auto;
    padding: 26px 46px 60px;
}

.stage-head {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 18px;
    margin-bottom: 26px;
}

.stage-head h2 {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.4em;
    color: var(--text);
    text-shadow: 0 0 10px rgba(79, 248, 255, 0.3);
}

.stage-count {
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--cyan-soft);
    border: 1px solid var(--line-dim);
    padding: 3px 10px;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 30px;
    align-items: start;
    justify-items: center;
}

.card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    border: 1px solid var(--line-dim);
    backdrop-filter: blur(6px);
    clip-path: polygon(
        18px 0, 100% 0, 100% calc(100% - 18px),
        calc(100% - 18px) 100%, 0 100%, 0 18px
    );
    opacity: 0;
    transform: translateY(14px);
    animation: cardIn 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
    animation-delay: calc(var(--i, 0) * 0.16s);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

@keyframes cardIn {
    to { opacity: 1; transform: translateY(0); }
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background:
        linear-gradient(90deg, transparent 49.9%, rgba(79, 248, 255, 0.05) 50%, transparent 50.1%),
        linear-gradient(0deg,  transparent 49.9%, rgba(79, 248, 255, 0.05) 50%, transparent 50.1%);
    background-size: 100% 100%;
}

.card:hover {
    border-color: var(--line);
    box-shadow: 0 0 34px rgba(79, 248, 255, 0.16), inset 0 0 34px rgba(79, 248, 255, 0.05);
}

/* mini corner ticks on card */
.card-frame span {
    position: absolute;
    width: 14px;
    height: 14px;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.card:hover .card-frame span { opacity: 1; }

.card-frame span:nth-child(1) { top: 6px;    left: 6px;   border-top: 2px solid var(--cyan);    border-left: 2px solid var(--cyan); }
.card-frame span:nth-child(2) { top: 6px;    right: 6px;  border-top: 2px solid var(--cyan);    border-right: 2px solid var(--cyan); }
.card-frame span:nth-child(3) { bottom: 6px; left: 6px;   border-bottom: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.card-frame span:nth-child(4) { bottom: 6px; right: 6px;  border-bottom: 2px solid var(--cyan); border-right: 2px solid var(--cyan); }

.card-shot {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-bottom: 1px solid var(--line-dim);
}

.card-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(1.1);
    transition: transform 0.6s ease, filter 0.6s ease;
}

.card:hover .card-shot img {
    transform: scale(1.045);
    filter: saturate(1.3) brightness(1.08);
}

/* scanning line on the image */
.card-scan {
    position: absolute;
    left: 0;
    right: 0;
    height: 42px;
    z-index: 2;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(79, 248, 255, 0.10),
        rgba(79, 248, 255, 0.22),
        rgba(79, 248, 255, 0.10),
        transparent
    );
    animation: cardScan 4.2s linear infinite;
}

.card:hover .card-scan { animation-duration: 1.6s; }

@keyframes cardScan {
    0%   { top: -30%; }
    100% { top: 120%; }
}

.card-body {
    padding: 14px 18px 18px;
    position: relative;
    z-index: 2;
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-tag {
    font-size: 11px;
    letter-spacing: 0.3em;
    color: var(--text-dim);
    border: 1px solid var(--line-dim);
    padding: 3px 9px;
}

.card-status {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    letter-spacing: 0.26em;
    padding: 3px 9px;
}

.st-online { color: var(--cyan); border: 1px solid rgba(79, 248, 255, 0.35); }
.st-online .dot { color: var(--cyan); }
.st-standby { color: var(--amber); border: 1px solid rgba(255, 181, 69, 0.35); }
.st-standby .dot { color: var(--amber); }
.st-offline { color: var(--magenta); border: 1px solid rgba(255, 46, 136, 0.35); }
.st-offline .dot { color: var(--magenta); }

.card h3 {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: 0.18em;
    color: var(--cyan);
    text-shadow: 0 0 14px rgba(79, 248, 255, 0.4);
}

.card-sub {
    font-size: 12px;
    letter-spacing: 0.22em;
    color: var(--text);
    margin: 5px 0 10px;
}

.card-desc {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 18px;
    min-height: 2.6em;
}

.card-launch {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 500;
    letter-spacing: 0.26em;
    font-size: 12px;
    color: var(--cyan);
    border: 1px solid var(--line);
    background: rgba(79, 248, 255, 0.06);
    padding: 12px 16px;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
    overflow: hidden;
}

.card-launch::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.12) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.55s ease;
}

.card:hover .card-launch::before { transform: translateX(120%); }

.card-launch:hover {
    background: rgba(79, 248, 255, 0.16);
    box-shadow: 0 0 22px rgba(79, 248, 255, 0.35);
    color: #eaffff;
}

.launch-icon {
    font-size: 13px;
    transition: transform 0.25s ease;
}

.card-launch:hover .launch-icon { transform: translateX(4px); }

/* ============================================================
   FOOTER HUD
   ============================================================ */

.hud-bottom {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 46px 26px;
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--text-dim);
}

.boot { color: var(--cyan-soft); }

.cursor {
    display: inline-block;
    color: var(--cyan);
    margin-left: 6px;
    animation: cursorBlink 1s steps(1) infinite;
}

@keyframes cursorBlink { 50% { opacity: 0; } }

.build { text-align: right; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1080px) {
    .rail-left  { display: none; }
    .rail-right { display: none; }
}

@media (max-width: 720px) {
    .frame { inset: 8px; }
    .hud-top { flex-direction: column; align-items: flex-start; padding: 24px 22px 8px; gap: 12px; }
    .hud-sys { flex-wrap: wrap; gap: 12px 18px; }
    .stage { padding: 20px 18px 50px; }
    .hud-bottom { flex-direction: column; align-items: flex-start; padding: 14px 22px 24px; }
    .build { text-align: left; }
    .cards { grid-template-columns: 1fr; }
    .ring-b, .ring-c { display: none; }
}