:root {
    --bg: #0a0a0c;
    --bg-elev: #12121a;
    --surface: #18182a;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f4f4f8;
    --muted: #9b9bb5;
    --accent: #ff6b4a;
    --accent-dim: #c94a32;
    --glow: rgba(255, 107, 74, 0.35);
    --radius: 14px;
    --radius-sm: 8px;
    --font: "Instrument Sans", system-ui, sans-serif;
    --font-display: "Syne", var(--font);
    --space: clamp(1rem, 3vw, 2rem);
    --max: 1100px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -30%, rgba(255, 107, 74, 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(100, 120, 255, 0.06), transparent);
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: var(--space);
    top: var(--space);
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: #111;
    z-index: 1000;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wrap {
    width: min(var(--max), 100% - var(--space) * 2);
    margin-inline: auto;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
}

.logo:hover {
    color: var(--accent);
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav a {
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
    color: var(--accent);
}

.nav__muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.main {
    padding-block: clamp(1.5rem, 4vw, 3rem);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: auto;
    padding: 2rem 0;
    color: var(--muted);
    font-size: 0.875rem;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
}

.site-footer a {
    color: var(--muted);
}

body {
    display: flex;
    flex-direction: column;
}

/* Hero */
.hero {
    padding-bottom: 3rem;
}

.hero__grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 900px) {
    .hero__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    color: var(--accent);
    margin: 0 0 0.75rem;
    font-weight: 600;
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
    margin: 0 0 1rem;
    letter-spacing: -0.03em;
}

.hero__lead {
    color: var(--muted);
    margin: 0 0 1.75rem;
    max-width: 42ch;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.mock-frame {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.mock-frame--hero .mock-frame__inner {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #2a2238 0%, #1a2a38 50%, #38221a 100%);
}

.mock-frame__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--muted);
}

.mock-frame__bar {
    display: flex;
    gap: 4px;
    margin-top: 0.75rem;
}

.mock-frame__bar span {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
}

.mock-frame__bar span:first-child {
    background: var(--accent);
    flex: 0.35;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn--primary {
    background: var(--accent);
    color: #0a0a0c;
}

.btn--primary:hover {
    background: #ff8566;
    text-decoration: none;
}

.btn--primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn--ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text);
}

.btn--ghost:hover {
    border-color: var(--muted);
    text-decoration: none;
}

.btn--text {
    background: none;
    border: none;
    color: var(--accent);
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.btn--text:hover {
    text-decoration: underline;
}

/* Section */
.section {
    padding: 2rem 0 4rem;
    border-top: 1px solid var(--border);
}

.section__title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin: 0 0 1rem;
}

.steps-list {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--muted);
    max-width: 55ch;
}

.steps-list li {
    margin-bottom: 0.5rem;
}

.steps-list strong {
    color: var(--text);
}

/* Flow */
.flow {
    padding-bottom: 3rem;
}

.flow__head {
    margin-bottom: 2rem;
}

.flow__title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin: 0 0 0.5rem;
}

.flow__subtitle {
    color: var(--muted);
    margin: 0 0 1.5rem;
    max-width: 60ch;
}

/* Stepper */
.stepper {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    counter-reset: step;
}

.stepper__item {
    flex: 1;
    min-width: 5rem;
    text-align: center;
    padding: 0.5rem 0.35rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--muted);
    position: relative;
}

.stepper__item.is-active {
    border-color: var(--accent);
    color: var(--text);
    box-shadow: 0 0 0 1px var(--glow);
}

.stepper__item.is-done {
    border-color: rgba(255, 107, 74, 0.35);
    color: var(--text);
}

.stepper__item span {
    display: block;
}

/* Panels */
.flow-panel {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 2rem);
    margin-bottom: 1rem;
}

.flow-panel[hidden] {
    display: none !important;
}

.flow-panel__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 0 0 0.35rem;
}

.flow-panel__hint {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 1.25rem;
}

.flow-panel__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Dropzone */
.dropzone[hidden] {
    display: none !important;
}

.dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 2px dashed rgba(255, 107, 74, 0.48);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.18s, border-style 0.18s, background 0.18s, box-shadow 0.18s;
    text-align: center;
    padding: 1.5rem 1.25rem;
    color: var(--muted);
    background: linear-gradient(165deg, rgba(28, 26, 44, 0.98) 0%, rgba(14, 14, 22, 0.99) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 10px 40px rgba(0, 0, 0, 0.45);
}

.dropzone:hover,
.dropzone:focus-within {
    border-color: rgba(255, 107, 74, 0.95);
    border-style: solid;
    background: linear-gradient(165deg, rgba(36, 32, 56, 0.99) 0%, rgba(20, 18, 34, 1) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 107, 74, 0.18),
        0 0 28px rgba(255, 107, 74, 0.14),
        0 12px 44px rgba(0, 0, 0, 0.5);
}

.dropzone.is-dragover {
    border-color: var(--accent);
    border-style: solid;
    background: linear-gradient(165deg, rgba(255, 107, 74, 0.14) 0%, rgba(14, 14, 22, 0.98) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 107, 74, 0.25),
        0 0 36px rgba(255, 107, 74, 0.2);
}

.dropzone--compact {
    min-height: 112px;
    padding: 1rem 1rem;
}

.dropzone__idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    max-width: 22rem;
    pointer-events: none;
}

.dropzone__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.12rem;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.dropzone__text {
    font-size: 0.88rem;
    color: #b8b8d0;
    line-height: 1.45;
}

.dropzone__icon {
    display: block;
    font-size: 2.1rem;
    margin-bottom: 0.15rem;
    line-height: 1;
    color: var(--accent);
    opacity: 0.95;
    text-shadow: 0 0 20px var(--glow);
}

.filters-replace-wrap {
    margin: 0 0 0.75rem;
}

.filters-replace-btn[hidden] {
    display: none !important;
}

#step1-panel.is-step1-dragover {
    border-radius: var(--radius);
    outline: 2px dashed rgba(255, 107, 74, 0.75);
    outline-offset: 3px;
}

.filters-upload.is-filters-dragover .pv-out-wrap {
    outline: 2px dashed rgba(255, 107, 74, 0.75);
    outline-offset: 3px;
    border-radius: var(--radius);
}

.dropzone__active[hidden] {
    display: none !important;
}

.preview {
    margin-top: 1rem;
}

.preview img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #000;
    display: block;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.pick-card {
    cursor: pointer;
}

.pick-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pick-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    min-height: 5.5rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pick-card input:focus-visible + .pick-card__body {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.pick-card input:checked + .pick-card__body {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--glow);
}

.pick-card__name {
    font-weight: 600;
    font-size: 0.95rem;
}

.pick-card__tag {
    font-size: 0.75rem;
    color: var(--muted);
}

/* Scenarios */
.scenario-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.scenario {
    cursor: pointer;
}

.scenario input {
    position: absolute;
    opacity: 0;
}

.scenario__body {
    display: block;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 0.15s;
}

.scenario input:checked + .scenario__body {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(255, 107, 74, 0.2);
}

.scenario input:focus-visible + .scenario__body {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.scenario__body strong {
    display: block;
    margin-bottom: 0.25rem;
}

.scenario__body span {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Progress */
.progress-block {
    margin-bottom: 1.5rem;
}

.progress-block__label {
    margin: 0 0 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.progress-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--surface);
    overflow: hidden;
    border: 1px solid var(--border);
}

.progress-bar__fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent));
    border-radius: inherit;
    transition: width 0.12s linear;
}

.progress-block__pct {
    margin: 0.35rem 0 0;
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Fake player */
.result-block__meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 1rem 0;
}

.result-block__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.result-player {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
    aspect-ratio: 16 / 9;
    max-width: 720px;
}

.result-player__poster {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.85);
}

.result-player__play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: none;
    background: rgba(255, 107, 74, 0.95);
    color: #0a0a0c;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, opacity 0.15s;
}

.result-player__play:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.result-player.is-playing .result-player__play {
    opacity: 0;
    pointer-events: none;
}

.result-player__chrome {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
}

.result-player__scrub {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.result-player__scrub span {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: inherit;
    transition: width 0.1s linear;
}

.result-player.is-playing .result-player__scrub span {
    animation: player-progress 15s linear forwards;
}

@keyframes player-progress {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* Filters layout */
.filters-layout {
    display: grid;
    gap: 2rem;
}

@media (min-width: 800px) {
    .filters-layout {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: start;
    }
}

.filters-canvas-wrap {
    margin-top: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #050508;
}

.filters-canvas {
    position: relative;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filters-canvas__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: filter 0.25s ease;
}

.filters-canvas__ph {
    color: var(--muted);
    padding: 2rem;
    text-align: center;
}

.filters-canvas__ph.is-hidden {
    display: none;
}

/* CSS filters for demo presets */
.filters-canvas--warm .filters-canvas__img {
    filter: sepia(0.25) saturate(1.2) contrast(1.05) brightness(1.05);
}

.filters-canvas--cool .filters-canvas__img {
    filter: saturate(0.9) hue-rotate(15deg) contrast(1.05) brightness(0.98);
}

.filters-canvas--matte .filters-canvas__img {
    filter: contrast(0.92) saturate(0.85) brightness(1.08);
}

.filters-canvas--pop .filters-canvas__img {
    filter: saturate(1.35) contrast(1.15) brightness(1.02);
}

.filters-canvas--fade .filters-canvas__img {
    filter: contrast(0.9) saturate(0.75) brightness(1.1);
}

.filters-canvas--noir .filters-canvas__img {
    filter: grayscale(1) contrast(1.2) brightness(0.95);
}

.preset-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.preset-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.preset-chip:hover {
    border-color: var(--muted);
}

.preset-chip[aria-selected="true"] {
    border-color: var(--accent);
    background: rgba(255, 107, 74, 0.12);
}

.preset-chip__swatch {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.preset-chip__swatch--none {
    background: linear-gradient(135deg, #888, #ddd);
}

.preset-chip__swatch--warm {
    background: linear-gradient(135deg, #ffb347, #ff6b4a);
}

.preset-chip__swatch--cool {
    background: linear-gradient(135deg, #4a90d9, #6b7cff);
}

.preset-chip__swatch--matte {
    background: #a89f94;
}

.preset-chip__swatch--pop {
    background: linear-gradient(135deg, #ff0, #f0f);
}

.preset-chip__swatch--fade {
    background: linear-gradient(135deg, #c4b8a8, #8a8078);
}

.preset-chip__swatch--noir {
    background: #222;
}

.filters-hint {
    color: var(--muted);
    font-size: 0.9rem;
}

.filters-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.toast {
    margin-top: 1rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--muted);
}

.legal {
    max-width: 640px;
}

.legal__title {
    font-family: var(--font-display);
    font-size: 2rem;
    margin: 0 0 1rem;
}

.legal__body {
    color: var(--muted);
    margin-bottom: 2rem;
}

.prose p {
    margin: 0 0 1rem;
}

.prose p:last-child {
    margin-bottom: 0;
}

/* Профили 2–3: выдача как photolive_next / ocrphotospace */
.pv-out-wrap {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-elev);
}

.pv-out-wrap--filters {
    margin-top: 0.75rem;
}

.pv-out-inner.pv-vb {
    filter: blur(10px);
    -webkit-filter: blur(10px);
    user-select: none;
    pointer-events: none;
}

.pv-blur-cta {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: linear-gradient(180deg, rgba(255, 107, 74, 0.08) 0%, rgba(10, 10, 12, 0.94) 100%);
    z-index: 3;
}

.pv-blur-cta.is-on {
    display: flex;
}

.pv-blur-cta__btn {
    display: block;
    width: 100%;
    max-width: 22rem;
    text-align: center;
    padding: 1rem 1.2rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: #111 !important;
    text-decoration: none !important;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    box-shadow: 0 12px 40px var(--glow);
    border: 0;
}

.pv-blur-cta__sub {
    margin: 0.65rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
}

.pv-blur-cta__alt {
    margin: 1rem 0 0;
    font-size: 0.82rem;
    text-align: center;
    max-width: 22rem;
}

.pv-blur-cta__alt a {
    color: var(--accent);
    font-weight: 600;
}

.pv-actions--hidden {
    display: none !important;
}

.foot-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.15rem;
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    justify-content: center;
}

.foot-nav a {
    color: var(--muted);
    text-decoration: none;
}

.foot-nav a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.site-footer__copy {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
}

