@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&family=Space+Grotesk:wght@500;700&display=swap');

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

:root {
    --bg-900: #07101d;
    --bg-800: #0e1c31;
    --card: rgba(11, 28, 49, 0.84);
    --line: rgba(160, 198, 251, 0.22);
    --text-100: #f2f6fc;
    --text-300: #c0cee1;
    --text-500: #8fa4c2;
}

body {
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
    color: var(--text-100);
    background:
        radial-gradient(980px 540px at 10% -10%, rgba(73, 188, 255, 0.18), transparent 58%),
        radial-gradient(820px 440px at 100% -20%, rgba(71, 226, 182, 0.16), transparent 60%),
        linear-gradient(155deg, var(--bg-900), var(--bg-800));
    padding: 28px 18px 36px;
}

body.lightbox-open {
    overflow: hidden;
}

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.hero,
.section,
.trace-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
}

.hero,
.section { padding: clamp(20px, 3.8vw, 34px); }

.top-nav { display: flex; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(73, 188, 255, 0.5);
    color: #d6efff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.84rem;
    background: transparent;
}

.btn:hover { background: rgba(73, 188, 255, 0.14); }

.eyebrow {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(73, 188, 255, 0.44);
    color: #c7ebff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.9rem, 4.4vw, 3rem);
    letter-spacing: -0.02em;
    line-height: 1.08;
    margin-bottom: 12px;
}

h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    margin-bottom: 10px;
}

.hero p,
.section p {
    color: var(--text-300);
    line-height: 1.6;
    max-width: 74ch;
}

.section { display: grid; gap: 14px; }

.trace-list {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

.trace-card { overflow: hidden; }

.trace-card__compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--line);
}

.trace-card__panel {
    background: #0a1628;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trace-card__panel + .trace-card__panel {
    border-left: 1px solid var(--line);
}

.trace-card__panel-label {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    border: 1px solid rgba(160, 198, 251, 0.4);
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #d2e7ff;
    background: rgba(7, 16, 29, 0.78);
    font-weight: 700;
}

.trace-card__img,
.trace-card__embed {
    width: 100%;
    height: 320px;
    display: block;
    background: #0a1628;
}

.trace-card__img {
    object-fit: contain;
    object-position: center;
}

.trace-card__img-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.trace-card__img-link:hover .trace-card__img,
.trace-card__img-link:focus-visible .trace-card__img {
    filter: brightness(1.05);
}

.lightbox[hidden] {
    display: none;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 20px;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 10, 18, 0.85);
    backdrop-filter: blur(3px);
}

.lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(1000px, 100%);
    max-height: calc(100vh - 40px);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(8, 20, 35, 0.96);
    padding: 12px;
    display: grid;
    gap: 10px;
}

.lightbox__close {
    justify-self: end;
    border: 1px solid rgba(160, 198, 251, 0.4);
    border-radius: 10px;
    color: #d6efff;
    background: rgba(7, 16, 29, 0.88);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    padding: 7px 11px;
    cursor: pointer;
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
    background: rgba(73, 188, 255, 0.15);
}

.lightbox__img {
    width: 100%;
    max-height: calc(100vh - 170px);
    object-fit: contain;
    object-position: center;
    background: #0a1628;
    border-radius: 10px;
}

.lightbox__open-tab {
    justify-self: end;
}

.trace-card__embed { border: 0; }

.trace-card__body {
    padding: 14px;
    display: grid;
    gap: 10px;
}

.trace-card__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.08rem;
}

.trace-card__text {
    color: var(--text-300);
    font-size: 0.92rem;
    line-height: 1.5;
}

.footer {
    color: var(--text-500);
    text-align: center;
    font-size: 0.86rem;
    padding: 4px;
}

.empty {
    color: var(--text-500);
    font-size: 0.9rem;
    padding: 4px 0;
}

@media (max-width: 740px) {
    .trace-card__compare { grid-template-columns: 1fr; }
    .trace-card__panel + .trace-card__panel {
        border-left: 0;
        border-top: 1px solid var(--line);
    }
    .trace-card__img,
    .trace-card__embed { height: 280px; }
}
