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

:root {
    color-scheme: dark;
    --bg: #0F1114;
    --surface: #161A20;
    --text: #E0E8F0;
    --muted: #8A9AB0;
    --accent: #5B9BD5;
    --accent-soft: rgba(91, 155, 213, 0.14);
    --line: rgba(224, 232, 240, 0.1);
}

body {
    font: 17px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.intro, .timeline, .outro { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ===== Шапка ===== */
.intro { padding-top: 40px; padding-bottom: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; }
.brand img { border-radius: 10px; }
.intro h1 { font-size: clamp(36px, 7vw, 64px); line-height: 1.05; letter-spacing: -0.02em; margin: 48px 0 16px; }
.lead { font-size: 20px; color: var(--muted); max-width: 640px; text-wrap: pretty; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; color: var(--muted); font-size: 14px; }
.facts b { display: block; color: var(--text); font-size: 22px; font-variant-numeric: tabular-nums; }

/* ===== Лента этапов ===== */
.timeline { padding-top: 56px; }
.stage { position: relative; padding: 0 0 64px 32px; border-left: 2px solid var(--line); }
.stage::before {
    content: ""; position: absolute; left: -7px; top: 6px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.stage:last-child { border-left-color: transparent; }

.meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.ver { background: var(--accent-soft); color: var(--accent); border-radius: 8px; padding: 1px 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stage h2 { font-size: clamp(24px, 3.5vw, 32px); line-height: 1.2; letter-spacing: -0.01em; margin: 6px 0 10px; }
.stage p { max-width: 720px; color: #C4CFDB; text-wrap: pretty; }

.stage-hero::before { width: 18px; height: 18px; left: -10px; top: 4px; background: linear-gradient(135deg, #7CB8E4, #B388FF); }
.stage-hero h2 { background: linear-gradient(90deg, #7CB8E4, #B388FF); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Скриншоты ===== */
.shots {
    display: flex; gap: 16px; margin-top: 24px;
    overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
    padding-bottom: 12px; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.shots figure { flex: 0 0 200px; scroll-snap-align: start; }
.shots figure.wide { flex-basis: 480px; }
.shot { position: relative; display: block; width: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: 20px; }
.shot img {
    display: block; width: 100%; height: auto; border-radius: 20px;
    outline: 1px solid rgba(255, 255, 255, 0.08); outline-offset: -1px;
    transition: transform 0.2s ease;
}
.shot:hover img { transform: translateY(-3px); }
.shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tag {
    position: absolute; top: 8px; right: 8px; z-index: 1;
    font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
    background: rgba(15, 17, 20, 0.8); color: var(--text);
    border-radius: 6px; padding: 2px 7px; backdrop-filter: blur(4px);
}
figcaption { margin-top: 8px; font-size: 13px; line-height: 1.4; color: var(--muted); }

/* ===== Подвал ===== */
.outro { padding-top: 8px; padding-bottom: 56px; color: var(--muted); font-size: 15px; }
.outro .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0; font-weight: 600; }
.outro .small { font-size: 13px; }

/* ===== Просмотр скриншота ===== */
dialog { margin: auto; border: 0; padding: 0; background: none; max-width: 100vw; max-height: 100vh; cursor: zoom-out; }
dialog::backdrop { background: rgba(0, 0, 0, 0.85); }
dialog img { display: block; max-height: 92vh; max-width: 92vw; border-radius: 24px; }
dialog.wide img { border-radius: 12px; }

@media (max-width: 600px) {
    body { font-size: 16px; }
    .intro, .timeline, .outro { padding: 0 16px; }
    .intro { padding-top: 24px; }
    .lead { font-size: 18px; }
    .stage { padding-left: 20px; padding-bottom: 48px; }
    .shots { margin-right: -16px; padding-right: 16px; }
    .shots figure { flex-basis: 160px; }
    .shots figure.wide { flex-basis: 300px; }
}

@media (prefers-reduced-motion: reduce) {
    .shot img { transition: none; }
}
