/* LabelHub — сайт-визитка.
   Главный мотив — рамка разметки (bbox): уголки, подпись класса, пунктир.
   Фон и текст — спокойные нейтральные; цвет живёт в 3D-кадрах, демо и рамках.
   Фиолетовый — только главные кнопки, рамки и выделение.
   Цвета классов (car, truck, брак) используются только по смыслу.
   Все отступы кратны 4 px; размеры текста — 13, 15, 17 и заголовки. */

:root {
    --canvas: #F4F5F8;      /* фон: ровный свет стола */
    --paper: #FFFFFF;       /* панели */
    --field: #EEF0F4;       /* поля ввода */
    --ink: #151A3D;         /* основной текст */
    --ink-soft: #4A5070;    /* второстепенный */
    --muted: #7A8099;       /* приглушённый */
    --line: #E3E5EC;
    --brand: #4318FF;
    --brand-deep: #2B0FB8;
    --night: #111327;       /* закрытый контур */
    --night-raised: #1B1E36;
    --night-line: #262A45;
    --night-ink: #FFFFFF;
    --night-soft: #B4B8CC;
    --night-muted: #8A8FA8;
    --car: #05CD99;
    --truck: #FFAB00;
    --defect: #EE5D50;

    --display: 'Unbounded', 'Onest', system-ui, sans-serif;
    --text: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --fs-s: 13px;
    --fs-m: 15px;
    --fs-l: 17px;

    --gutter: clamp(16px, 4vw, 40px);
    --max: 1240px;
    --r-panel: 20px;
    --r-ctl: 10px;
    --r-chip: 6px;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
    font-family: var(--text);
    font-size: var(--fs-l);
    line-height: 1.6;
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--brand); color: #fff; }

/* Фокус — пунктирная рамка, как у выделенного объекта */
:focus-visible { outline: 2px dashed var(--brand); outline-offset: 4px; border-radius: 4px; }

.shell { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2 { font-family: var(--display); font-weight: 500; letter-spacing: -0.025em; line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 3.6vw, 3rem); max-width: 22ch; }
h3 { font-family: var(--text); font-weight: 600; font-size: 20px; line-height: 1.3; }
.lede { font-size: var(--fs-l); color: var(--ink-soft); max-width: 60ch; }

section { position: relative; padding: clamp(72px, 9vw, 128px) 0; }
.section-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 72px); }

/* Строки заголовков раскрываются из-под маски */
.line-mask { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line-mask > span { display: inline-block; }

/* ---------- кнопки ---------- */
.btn {
    --bg: var(--brand); --bg-hover: var(--brand-deep); --fg: #fff; --fg-hover: #fff;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 52px; padding: 0 24px; border-radius: var(--r-ctl);
    background: var(--bg); color: var(--fg); border: 1px solid transparent;
    font-weight: 500; font-size: var(--fs-m); text-decoration: none; cursor: pointer;
    transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.btn:hover { background: var(--bg-hover); color: var(--fg-hover); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-ghost { --bg: transparent; --bg-hover: var(--ink); --fg: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; background: var(--bg); color: var(--fg); }

/* ---------- шапка ---------- */
.topbar {
    position: fixed; inset: 0 0 auto 0; z-index: 40;
    transition: background-color .3s var(--ease), box-shadow .3s var(--ease), transform .4s var(--ease);
}
.topbar.scrolled { background: rgba(244, 245, 248, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.topbar.hidden { transform: translateY(-100%); }
.topbar.on-night { background: rgba(17, 19, 39, .8); box-shadow: 0 1px 0 var(--night-line); color: var(--night-ink); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 500; font-size: 18px; text-decoration: none; }
.logo-mark { width: 24px; height: 24px; }
.topnav { display: flex; gap: 4px; }
.topnav a {
    position: relative; padding: 8px 12px; font-size: var(--fs-m); font-weight: 500; text-decoration: none; color: inherit; opacity: .72;
    transition: opacity .2s var(--ease);
}
.topnav a:hover { opacity: 1; }
/* при наведении пункт меню получает уголки рамки */
.topnav a::before, .topnav a::after {
    content: ''; position: absolute; width: 8px; height: 8px; opacity: 0;
    border: 0 solid currentColor; transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.topnav a::before { left: 2px; top: 2px; border-left-width: 1.5px; border-top-width: 1.5px; transform: translate(2px, 2px); }
.topnav a::after { right: 2px; bottom: 2px; border-right-width: 1.5px; border-bottom-width: 1.5px; transform: translate(-2px, -2px); }
.topnav a:hover::before, .topnav a:hover::after { opacity: 1; transform: none; }
.topbar .btn { min-height: 44px; padding: 0 20px; }
@media (max-width: 960px) { .topnav { display: none; } }
@media (max-width: 420px) { .topbar .btn { padding: 0 16px; } .logo { font-size: 16px; } }

/* ---------- первый экран ---------- */
.hero { min-height: 100svh; padding: 120px 0 64px; display: flex; align-items: center; overflow: hidden; background: var(--canvas); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: center; width: 100%; }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 4.4rem); max-width: 13ch; }

/* Заголовок, обведённый рамкой разметки: главный момент загрузки */
.annotated { position: relative; display: inline-block; padding: 12px 16px 16px; margin: 0 0 0 -16px; }
.annotated .bbox { position: absolute; inset: 0; pointer-events: none; }
.annotated .e { position: absolute; background: var(--brand); }
.annotated .e-t, .annotated .e-b { left: 0; right: 0; height: 2px; }
.annotated .e-l, .annotated .e-r { top: 0; bottom: 0; width: 2px; }
.annotated .e-t { top: 0; transform-origin: left; } .annotated .e-b { bottom: 0; transform-origin: right; }
.annotated .e-r { right: 0; transform-origin: top; } .annotated .e-l { left: 0; transform-origin: bottom; }
.annotated .handle { position: absolute; width: 8px; height: 8px; background: var(--paper); border: 2px solid var(--brand); border-radius: 2px; }
.annotated .h-tl { left: -3px; top: -3px; } .annotated .h-tr { right: -3px; top: -3px; }
.annotated .h-bl { left: -3px; bottom: -3px; } .annotated .h-br { right: -3px; bottom: -3px; }
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 8px; border-radius: var(--r-chip);
    font-size: var(--fs-s); font-weight: 600; line-height: 1.2; color: #fff; background: var(--brand);
    white-space: nowrap;
}
.annotated .tag { position: absolute; left: -2px; bottom: 100%; margin-bottom: 0; border-radius: var(--r-chip) var(--r-chip) var(--r-chip) 0; }
.tag .conf { font-weight: 400; opacity: .8; }

.hero .lede { margin-top: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-terms { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; list-style: none; font-size: var(--fs-m); color: var(--ink-soft); }
.hero-terms li { display: flex; align-items: center; gap: 8px; }
.hero-terms li::before { content: ''; width: 10px; height: 10px; border: 2px solid var(--car); border-radius: 2px; }

.hero-stage { position: relative; height: min(72vh, 640px); margin-right: calc(var(--gutter) * -1); }
.hero-stage canvas { width: 100% !important; height: 100% !important; }
.hero-stage .fallback { position: absolute; inset: 10% 6%; display: none; }
.hero-stage.no-webgl .fallback { display: block; }
.stage-hint { position: absolute; right: var(--gutter); bottom: 8px; font-size: var(--fs-s); color: var(--muted); }

@media (max-width: 960px) {
    .hero { padding-top: 104px; align-items: flex-start; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-stage { height: 46vh; min-height: 300px; margin: 8px calc(var(--gutter) * -1) 0; order: 2; }
    .stage-hint { display: none; }
}

/* ---------- факты ---------- */
.facts { padding: 0 0 clamp(64px, 9vw, 120px); }
.facts-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); list-style: none; }
.fact { position: relative; padding: 24px 0 0; }
.fact::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.fact::after { content: ''; position: absolute; left: 0; top: -1px; height: 2px; width: 32px; background: var(--ink); }
.fact h3 { margin-bottom: 8px; font-size: var(--fs-l); }
.fact p { font-size: var(--fs-m); color: var(--ink-soft); }
@media (max-width: 860px) { .facts-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .facts-row { grid-template-columns: 1fr; } }

/* ---------- процесс: горизонтальная лента на десктопе ---------- */
.process { padding-bottom: clamp(60px, 8vw, 100px); }
.process-pin { overflow: hidden; }
.track { --edge: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); display: flex; gap: 20px; padding: 0 var(--edge); width: max-content; list-style: none; }
.step {
    position: relative; width: clamp(280px, 30vw, 380px); min-height: 328px; padding: 32px;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-panel);
    display: flex; flex-direction: column;
}
.step-num { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--muted); margin-bottom: auto; }
.step h3 { margin: 40px 0 12px; }
.step p { font-size: var(--fs-m); color: var(--ink-soft); }
.step.free { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.free .step-num { color: rgba(255, 255, 255, .72); }
.step.free p { color: rgba(255, 255, 255, .84); }
.progress { height: 2px; margin: 32px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 0; background: var(--line); position: relative; }
.progress span { position: absolute; inset: 0; background: var(--brand); transform-origin: left; transform: scaleX(0); }
@media (max-width: 1023px) {
    .track { flex-direction: column; width: auto; }
    .step { width: auto; min-height: 0; padding: 24px; }
    .step h3 { margin-top: 24px; }
    .step-num { font-size: 32px; }
    .progress { display: none; }
}

/* ---------- инструкция: интерактивная рамка ---------- */
.rules-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.frame-panel { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 12px; transition: border-color .2s var(--ease); }
.frame-panel svg { width: 100%; height: auto; border-radius: 8px; }
.verdict { display: flex; align-items: center; gap: 12px; margin-top: 16px; min-height: 32px; }
.frame-panel svg#demo-svg { touch-action: none; cursor: crosshair; -webkit-user-select: none; user-select: none; }
.frame-panel.drawing { border-color: var(--brand); }
.demo-side { display: grid; align-content: center; min-height: 100%; }
.demo-state h3 { margin-bottom: 12px; }
.demo-tip { margin: 12px 0 24px; color: var(--ink-soft); font-size: var(--fs-m); }
.only-touch { display: none; }
@media (hover: none) { .only-touch { display: inline; } .only-mouse { display: none; } }
.demo-score { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
#demo-iou { font-family: var(--display); font-weight: 500; font-size: clamp(2.6rem, 5vw, 3.6rem); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.demo-score-label { color: var(--ink-soft); font-size: var(--fs-m); }
.demo-notes { list-style: none; display: grid; gap: 8px; margin: 16px 0 24px; font-size: var(--fs-m); }
.demo-notes li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: baseline; }
.demo-notes li::before { content: ''; width: 10px; height: 10px; border-radius: 2px; border: 2px solid var(--n-c, var(--car)); transform: translateY(1px); }
.demo-notes li.bad { --n-c: var(--defect); }
.demo-notes li.bad::before { border-style: dashed; }
.rules-note { margin-top: clamp(32px, 4vw, 48px); max-width: 70ch; color: var(--ink-soft); }
@media (max-width: 900px) { .rules-grid { grid-template-columns: 1fr; } }

/* ---------- закрытый контур: тёмная сцена ---------- */
.contour { color: var(--night-soft); }
.contour h2 { color: var(--night-ink); }
.contour .lede { color: var(--night-soft); }
.contour-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.contour-viz { position: relative; }
.contour-viz svg { width: 100%; height: auto; overflow: visible; }
.claim { font-family: var(--display); font-weight: 500; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.3; color: var(--night-ink); margin-bottom: 16px; max-width: 24ch; }
.contour-text p { max-width: 56ch; }
.contour-text p + p { margin-top: 12px; }
.guards { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; margin-top: clamp(48px, 6vw, 80px); }
.guards li { padding-top: 16px; border-top: 1px solid var(--night-line); }
.guards b { display: block; color: var(--night-ink); font-weight: 600; margin-bottom: 4px; }
.guards span { font-size: var(--fs-m); color: var(--night-muted); }
@media (max-width: 900px) { .contour-grid, .guards { grid-template-columns: 1fr; } }

/* ---------- задачи и форматы ---------- */
.tasks-list { list-style: none; border-top: 1px solid var(--line); }
.task-row {
    display: grid; grid-template-columns: minmax(150px, .8fr) minmax(0, 2fr) minmax(130px, .9fr); gap: 24px; align-items: baseline;
    padding: 24px 4px; border-bottom: 1px solid var(--line); position: relative;
}
.task-row::before { content: ''; position: absolute; inset: -1px -12px; border-radius: 12px; background: var(--paper); opacity: 0; transition: opacity .2s var(--ease); z-index: -1; }
.task-row:hover::before { opacity: 1; }
.task-row h3 { font-size: var(--fs-l); }
.task-row p { color: var(--ink-soft); font-size: var(--fs-m); }
.task-row .fmts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.fmt { font: 500 12px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; padding: 2px 8px; border-radius: var(--r-chip); border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 760px) {
    .task-row { grid-template-columns: 1fr; gap: 8px; }
    .task-row .fmts { justify-content: flex-start; }
}

.export { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.export p { color: var(--ink-soft); margin-top: 12px; max-width: 46ch; }
.code-panel { background: var(--night); color: #D7DAE6; border-radius: var(--r-panel); overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--night-line); position: relative; }
.tab { position: relative; z-index: 1; padding: 8px 16px; border: 0; background: transparent; color: var(--night-muted); border-radius: 12px; cursor: pointer; font-weight: 500; font-size: var(--fs-m); transition: color .2s var(--ease); }
.tab[aria-selected="true"] { color: var(--night-ink); }
.tab:hover { color: var(--night-ink); }
.tab-ink { position: absolute; z-index: 0; top: 8px; height: calc(100% - 16px); border-radius: 12px; background: var(--night-raised); box-shadow: inset 0 0 0 1px var(--night-line); }
.code-path { padding: 16px 20px 0; font: var(--fs-s)/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: var(--night-muted); }
.code-panel pre { padding: 12px 20px 24px; font: var(--fs-s)/1.7 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; overflow-x: auto; min-height: 248px; }
@media (max-width: 860px) { .export { grid-template-columns: 1fr; } }

/* ---------- вопросы ---------- */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 80px); }
.faq-list { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
    padding: 24px 0; font-weight: 500; font-size: var(--fs-l);
}
.qa summary::-webkit-details-marker { display: none; }
.qa .plus { flex: none; position: relative; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; transition: transform .3s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease); }
.qa .plus::before, .qa .plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.qa .plus::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .3s var(--ease); }
.qa summary:hover .plus { border-color: var(--ink-soft); }
.qa[open] .plus { background: var(--ink); border-color: var(--ink); color: #fff; transform: rotate(180deg); }
.qa[open] .plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.qa .answer { overflow: hidden; }
.qa .answer p { padding: 0 48px 24px 0; color: var(--ink-soft); max-width: 66ch; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } .qa .answer p { padding-right: 0; } }

/* ---------- заявка ---------- */
.request-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); }
.request-panel h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.request-panel .lede { margin-top: 16px; }
.direct { margin-top: 28px; font-size: var(--fs-m); color: var(--ink-soft); }
.direct a { display: inline-block; margin-top: 4px; font-weight: 500; color: var(--brand); text-decoration: none; font-size: var(--fs-l); }
.direct a:hover { text-decoration: underline; }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label { font-size: var(--fs-m); font-weight: 500; }
.field .req { color: var(--defect); }
.control {
    width: 100%; min-height: 52px; padding: 14px 16px; border-radius: var(--r-ctl);
    background: var(--field); border: 1px solid transparent; color: var(--ink); font: inherit; font-size: 16px;
    transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.control:hover { border-color: var(--line); }
.control:focus { outline: none; border-color: var(--brand); background: #fff; }
.control[aria-invalid="true"] { border-color: var(--defect); }
textarea.control { min-height: 120px; resize: vertical; }
select.control { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234A5070' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .two { grid-template-columns: 1fr; } }
.consent { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; margin: 8px 0 12px; font-size: var(--fs-m); line-height: 1.5; color: var(--ink-soft); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--brand); cursor: pointer; }
.consent a { color: var(--brand); }
.consent .opt { color: var(--muted); }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.form-state { font-size: var(--fs-m); font-weight: 500; }
.form-state.ok { color: #039570; }
.form-state.err { color: #C93D31; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.field label .opt { font-weight: 400; color: var(--muted); }
/* Поле файлов — пунктирная рамка, как у незакреплённой разметки */
.drop {
    position: relative; display: grid; gap: 4px; padding: 16px; border-radius: var(--r-ctl);
    background: var(--field); border: 1.5px dashed #C3C7D4; cursor: pointer; transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.drop:hover, .drop.over { border-color: var(--brand); background: #fff; }
.drop:focus-within { border-color: var(--brand); border-style: solid; background: #fff; }
.drop-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.field .drop-title { font-size: var(--fs-m); font-weight: 500; color: var(--brand); }
.drop-hint { font-size: var(--fs-s); font-weight: 400; line-height: 1.5; color: var(--muted); }
.file-list { list-style: none; display: grid; gap: 4px; margin: 0; padding: 0; }
.file-list:empty { display: none; }
.file-list li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: var(--r-ctl); background: #fff; border: 1px solid var(--line); font-size: var(--fs-m); }
.file-list .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .fsize { color: var(--muted); font-variant-numeric: tabular-nums; }
.file-list button { width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-soft); font-size: 20px; line-height: 1; cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease); }
.file-list button:hover, .file-list button:focus-visible { background: var(--field); color: var(--defect); }
@media (max-width: 900px) { .request-panel { grid-template-columns: 1fr; } }

/* ---------- подвал ---------- */
footer { padding: 56px 0 40px; font-size: var(--fs-m); color: var(--ink-soft); }
.foot { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; gap: 28px; }
.foot-col { display: grid; gap: 8px; align-content: start; }
.foot a { text-decoration: none; transition: color .2s var(--ease); }
.foot a:hover { color: var(--brand); }
.legal-id { font-size: var(--fs-s); color: var(--muted); line-height: 1.6; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; } }

/* ---------- cookie ---------- */
.cookie {
    position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; margin: 0 auto; max-width: 760px;
    display: none; gap: 12px 20px; align-items: center; flex-wrap: wrap;
    padding: 16px 20px; border-radius: 16px; background: var(--ink); color: #E4E6EE;
    box-shadow: 0 16px 40px -16px rgba(17, 19, 39, .45);
}
.cookie.show { display: flex; }
.cookie p { flex: 1 1 340px; font-size: var(--fs-s); line-height: 1.5; }
.cookie a { color: #fff; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie .btn { min-height: 44px; padding: 0 16px; font-size: var(--fs-s); }
.cookie .btn-ghost { --fg: #fff; --bg-hover: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); }
.cookie .btn-ghost:hover { border-color: rgba(255, 255, 255, .32); }

/* ---------- фон-переход в тёмный контур ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; background: var(--night); opacity: 0; pointer-events: none; }

/* Пока скрипты не загрузились, элементы видимы; анимации включаются классом */
.js-motion [data-reveal] { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .js-motion [data-reveal] { opacity: 1; }
}

/* Тёмный контур: без анимаций раздел сам по себе тёмный, с анимациями темнеет вся страница */
.contour { background: var(--night); }
.js-motion:not(.static-contour) .contour { background: transparent; }

/* Стартовое состояние первого экрана, чтобы не мигало до запуска скриптов */
.js-motion .annotated .line-mask > span, .js-motion .annotated .e { opacity: 0; }
.js-motion .annotated .handle, .js-motion .annotated .tag, .js-motion [data-hero-in] { opacity: 0; }

@media (max-width: 600px) {
    .annotated { margin-left: 0; padding: 8px 12px 12px; }
    .annotated .tag { font-size: 12px; }
}

/* Панели приподняты мягкой нейтральной тенью */
.step, .frame-panel, .request-panel {
    box-shadow: 0 1px 2px rgba(17, 19, 39, .04), 0 12px 32px -20px rgba(17, 19, 39, .18);
}

/* ================= световой стол ================= */

/* Первый экран: ровная сетка стола, под «фонариком» курсора проступает разметка */
.lighttable { position: absolute; inset: 0; z-index: 0; pointer-events: none; --lx: 70%; --ly: 40%; }
.lt-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(21, 26, 61, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(21, 26, 61, .05) 1px, transparent 1px);
    background-size: 56px 56px; background-position: center;
    -webkit-mask-image: radial-gradient(70% 80% at 65% 45%, #000 20%, transparent 80%);
    mask-image: radial-gradient(70% 80% at 65% 45%, #000 20%, transparent 80%);
}
.lt-reveal {
    position: absolute; inset: 0;
    -webkit-mask-image: radial-gradient(240px circle at var(--lx) var(--ly), #000 30%, transparent 100%);
    mask-image: radial-gradient(240px circle at var(--lx) var(--ly), #000 30%, transparent 100%);
}
.lt-box { position: absolute; border: 1.5px dashed var(--c); border-radius: 2px; background: color-mix(in srgb, var(--c) 6%, transparent); }
.lt-box span {
    position: absolute; left: -1.5px; bottom: 100%; padding: 2px 6px; border-radius: 4px 4px 4px 0;
    background: var(--c); color: #fff; font: 500 11px/1.4 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; white-space: nowrap;
}
.hero .shell { position: relative; z-index: 1; }

/* Под 3D-стопкой — ровная белая подсветка стола, без цвета и бликов */
.hero-stage::before {
    content: ''; position: absolute; inset: 14% 6% 8% 12%; z-index: -1; border-radius: 50%;
    background: radial-gradient(closest-side, #FFFFFF, rgba(255, 255, 255, 0));
}

@media (hover: none) {
    .lt-reveal { -webkit-mask-image: radial-gradient(180px circle at var(--lx) var(--ly), #000 30%, transparent 100%); mask-image: radial-gradient(180px circle at var(--lx) var(--ly), #000 30%, transparent 100%); }
}
