/* robotics.css — подключайте после style.css. Совместим с текущей разметкой. */

.rb {
    --ink: #202622;
    --muted: #636b64;
    --paper: #fafbf8;
    --surface: #ffffff;
    --soft: #f0f3ed;
    --line: #dfe5dc;
    --signal: #ca4825;
    --signal-hover: #b93d1c;
    --mint: #e6efe4;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --header-height: 84px;
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 16px/1.65 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

.rb *, .rb *::before, .rb *::after { box-sizing: border-box; }
.rb ::selection { background: #f7d9c9; color: var(--ink); }
.rb .container { width: min(1200px, calc(100% - 80px)); max-width: 1200px; margin-inline: auto; padding-inline: 0; }
.rb a { color: inherit; text-decoration: none; }
.rb button, .rb input, .rb select { font: inherit; }
.rb button, .rb a, .rb input, .rb select { -webkit-tap-highlight-color: transparent; }
.rb button { cursor: pointer; }
.rb svg { display: block; max-width: 100%; }
.rb h1, .rb h2, .rb h3, .rb h4, .rb .logo {
    margin: 0;
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.045em;
}
.rb p { margin: 0 0 24px; color: var(--muted); }
.rb [id] { scroll-margin-top: calc(var(--header-height) + 24px); }
.rb :is(a, button, input, select):focus-visible { outline: 3px solid var(--signal); outline-offset: 5px; }
.rb button:disabled { cursor: not-allowed; opacity: .5; }

/* Шапка */
.rb header {
    position: sticky;
    inset: 0 0 auto;
    z-index: 50;
    height: var(--header-height);
    background: rgba(250, 251, 248, .96);
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition: border-color .25s ease, background-color .25s ease;
}
@supports (backdrop-filter: blur(16px)) {
    .rb header { background: rgba(250, 251, 248, .84); backdrop-filter: blur(16px); }
}
.rb header.scrolled { background-color: rgba(250, 251, 248, .96); border-color: var(--line); }
.rb .header-container { height: 100%; display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.rb .logo { display: inline-block; font-size: 26px; letter-spacing: -.065em; white-space: nowrap; }
.rb .logo span { color: var(--signal); }
.rb nav ul { display: flex; align-items: center; gap: 32px; padding: 0; margin: 0; list-style: none; }
.rb nav ul li { margin: 0; }
.rb nav ul a { position: relative; display: inline-flex; padding: 12px 0; color: var(--muted); font-size: 13px; font-weight: 500; transition: color .2s ease; }
.rb nav ul a::after { content: ''; position: absolute; bottom: 7px; left: 0; right: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.rb nav ul a:hover { color: var(--ink); }
.rb nav ul a:hover::after { transform: scaleX(1); }
.rb nav li:last-child a { min-height: 42px; padding: 9px 18px; color: var(--ink); border: 1px solid var(--line); border-radius: 7px; }
.rb nav li:last-child a::after { display: none; }
.rb nav li:last-child a:hover { border-color: #aab6a5; }
.rb .mobile-menu-btn { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); font-size: 18px; }
.rb .mobile-menu-btn i { display: none; }
.rb .mobile-menu-btn::before { content: ''; width: 18px; height: 13px; border-block: 1.5px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat; }

/* Кнопки: один акцент, короткий отклик */
.rb .btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 54px;
    padding: 15px 24px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--signal);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    text-transform: none;
    letter-spacing: -.01em;
    box-shadow: none;
    transition: background-color .2s ease, border-color .2s ease, transform .25s var(--ease);
}
.rb .btn::after { content: '↗'; display: inline-block; font-size: 19px; line-height: 1; transition: transform .25s var(--ease); }
.rb .btn:hover:not(:disabled) { background: var(--signal-hover); color: #fff; transform: translateY(-2px); box-shadow: none; }
.rb .btn:hover:not(:disabled)::after { transform: translate(2px, -2px); }
.rb .btn:active:not(:disabled) { transform: translateY(0); }

/* Первый экран */
.rb .rb-hero { position: relative; overflow: clip; padding: 82px 0 104px; background: var(--paper); }
.rb .rb-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(36px, 5vw, 80px); }
.rb .rb-hero h1 { max-width: 620px; margin: 0 0 30px; font-size: clamp(48px, 5.65vw, 78px); line-height: 1.03; letter-spacing: -.065em; text-wrap: balance; }
.rb .rb-lead { max-width: 400px; margin-bottom: 32px; font-size: 17px; line-height: 1.75; }
.rb .rb-hero .btn { min-height: 56px; }
.rb .rb-scene {
    width: 100%;
    height: auto;
    overflow: hidden;
    border: 1px solid #d8e3d4;
    border-radius: 24px;
    background: #e7eee2;
    box-shadow: 0 24px 64px -44px rgba(32, 38, 34, .4);
}
.rb .rb-tilt-frame { min-width: 0; perspective: 1000px; transition: transform .6s var(--ease); }
/* Перекрашиваем существующую SVG без замены её разметки. */
.rb .rb-scene > rect { fill: #e7eee2; }
.rb .rb-scene > g:first-of-type { fill: #c5d4bc; }
.rb .rb-scene > polygon { fill: #fff; fill-opacity: .34; stroke: #fff; stroke-opacity: .9; }
.rb .rb-scene .rb-box > rect:first-child { stroke: var(--signal); }
.rb .rb-scene .rb-box > rect:nth-child(2), .rb .rb-scene .rb-box > circle { fill: var(--signal); }
.rb .rb-scene > g:nth-of-type(3) > rect:first-child { stroke: #41644b; }
.rb .rb-scene > g:nth-of-type(3) > rect:nth-child(2) { fill: #41644b; }
.rb .rb-scene .rb-drone { stroke: var(--ink); }
.rb .rb-scene .rb-drone > rect { fill: var(--ink); }
.rb .rb-scene .rb-drone g { stroke: var(--ink); }

/* Секции и карточки */
.rb .rb-section { padding: 96px 0; }
.rb #tracks { border-top: 1px solid var(--line); }
.rb .rb-h2 { margin-bottom: 48px; font-size: clamp(32px, 3.3vw, 44px); text-align: center; text-wrap: balance; }
.rb .rb-h2::after { display: none; }
.rb .rb-h2.left { text-align: left; margin-bottom: 24px; }
.rb .rb-tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; counter-reset: track; }
.rb .rb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: clamp(24px, 3.2vw, 44px);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: none;
    counter-increment: track;
    transition: transform .35s var(--ease), border-color .25s ease, box-shadow .35s var(--ease);
}
.rb .rb-card::before { content: '0' counter(track); display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 30px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.rb .rb-card h3 { max-width: 380px; margin-bottom: 20px; font-size: clamp(25px, 2.25vw, 31px); line-height: 1.2; }
.rb .rb-card > p { font-size: 14px; line-height: 1.8; }
.rb .rb-list { margin: 0 0 28px; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.rb .rb-list li { margin: 0 0 8px; padding-left: 5px; }
.rb .rb-list li::marker { color: #93a28d; font-size: 10px; }
.rb .rb-score { width: 100%; margin: 0 0 32px; border-collapse: collapse; border-spacing: 0; font-size: 12px; line-height: 1.6; }
.rb .rb-score caption { padding-bottom: 12px; color: var(--ink); font-size: 13px; font-weight: 500; text-align: left; }
.rb .rb-score td { padding: 12px 0; border-top: 1px solid #edf0e9; background: transparent; color: var(--muted); vertical-align: top; }
.rb .rb-score td:first-child { width: 48px; padding-right: 12px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rb .rb-score .plus { color: #37734b; }
.rb .rb-score .minus { color: #ac4537; }
.rb .rb-card .btn { align-self: flex-start; margin-top: auto; border-color: var(--line); background: #fff; color: var(--ink); font-size: 13px; }
.rb .rb-card .btn:hover:not(:disabled) { border-color: var(--ink); background: var(--ink); color: #fff; }

/* Арена */
.rb .rb-alt { border-block: 1px solid var(--line); background: var(--soft); }
.rb .rb-arena { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.rb .rb-arena p { max-width: 380px; margin-bottom: 0; font-size: 15px; line-height: 1.85; }
.rb .rb-map { width: 100%; height: auto; padding: 24px; border: 1px solid #dbe2d6; border-radius: 16px; background: #fff; box-shadow: none; }
.rb .rb-map > rect:first-child { stroke: #a9b5a2; stroke-width: 1; }
.rb .rb-map > rect:nth-of-type(2), .rb .rb-map > rect:nth-of-type(3) { fill: #343f35; }
.rb .rb-map > rect:nth-of-type(4), .rb .rb-map > rect:nth-of-type(5) { fill: #91ad85; }
.rb .rb-map > text:not(:last-child) { font-size: 10px; transform: translateX(-4px); }
.rb .rb-map > text:last-child { fill: #65745e; font-size: 10px; }
.rb .rb-map > g:first-of-type { fill: var(--signal); }
.rb .rb-map > g:nth-of-type(2) { fill: #c5a84e; }

/* Форма */
.rb .rb-note { margin: -28px 0 40px; text-align: center; font-size: 14px; }
.rb .rb-form { max-width: 760px; margin-inline: auto; padding: clamp(24px, 4.4vw, 56px); border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: none; }
.rb .form-group { margin-bottom: 22px; }
.rb .form-group label { display: block; margin-bottom: 8px; color: #4f5b50; font-size: 12px; font-weight: 500; line-height: 1.5; }
.rb .form-control { display: block; width: 100%; min-width: 0; height: auto; min-height: 50px; padding: 13px 14px; border: 1px solid #d9e0d5; border-radius: 7px; background: #fdfefb; color: var(--ink); font-size: 15px; line-height: 1.5; box-shadow: none; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.rb select.form-control { padding-right: 36px; text-overflow: ellipsis; }
.rb .form-control::placeholder { color: #889184; }
.rb .form-control:hover { border-color: #acb9a6; }
.rb .form-control:focus { outline: none; border-color: #6f8e65; background: #fff; box-shadow: 0 0 0 3px #e9efe5; }
.rb .rb-sub { margin: 38px 0 22px; padding-top: 30px; border-top: 1px solid var(--line); font-size: 22px; letter-spacing: -.03em; }
.rb .team-member { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 105px; gap: 0 16px; margin: 0 0 16px; padding: 24px; border: 1px solid #e3e8df; border-radius: 10px; background: #f6f8f2; }
.rb .team-member h4 { grid-column: 1 / -1; margin: 0 40px 22px 0; color: #455240; font-size: 14px; line-height: 1.5; letter-spacing: -.01em; }
.rb .team-member .form-group:first-of-type { grid-column: 1 / -1; }
.rb .team-member .form-group { min-width: 0; margin-bottom: 16px; }
.rb .team-member .form-group:last-child, .rb .team-member .form-group:nth-last-child(2) { margin-bottom: 0; }
.rb .team-member .form-control { background: #fff; }
.rb .add-member-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; font-weight: 500; transition: color .2s ease; }
.rb .add-member-btn i { display: none; }
.rb .add-member-btn::before { content: '+'; color: var(--signal); font-size: 19px; font-weight: 400; line-height: 1; }
.rb .add-member-btn:hover:not(:disabled) { color: var(--signal); background: transparent; }
.rb .rb-counter { display: inline-block; margin-left: 14px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.rb .rb-remove { position: absolute; top: 16px; right: 16px; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #788173; font-size: 16px; transition: background-color .2s ease, color .2s ease; }
.rb .rb-remove:hover { background: #fbe7df; color: var(--signal); }
.rb #drone-form > .btn[type='submit'] { width: 100%; margin-top: 32px; }
.rb .is-submitting .btn[type='submit']::after { content: ''; width: 16px; height: 16px; border: 2px solid #ffffff60; border-top-color: #fff; border-radius: 50%; animation: rb-spin .8s linear infinite; }
.rb .is-submitting .btn[type='submit'] { cursor: progress; opacity: .8; }
.rb .form-control:disabled { opacity: .7; cursor: wait; }

/* Уведомления */
.rb .rb-notifications { position: fixed; z-index: 100; top: calc(var(--header-height) + 16px); right: 24px; display: grid; gap: 12px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.rb .rb-notification { display: flex; align-items: flex-start; gap: 16px; padding: 18px 16px 18px 20px; border: 1px solid var(--line); border-left: 3px solid #56815a; border-radius: 10px; background: #fff; color: var(--ink); font-size: 13px; line-height: 1.6; box-shadow: 0 12px 40px #20262212; pointer-events: auto; animation: rb-toast-in .25s var(--ease) both; }
.rb .rb-notification--error { border-left-color: var(--signal); }
.rb .rb-notification__text { flex: 1; min-width: 0; margin: 0; color: var(--ink); }
.rb .rb-notification__close { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; margin: -6px -4px -6px 0; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 22px; }
.rb .rb-notification__close:hover { background: var(--soft); }

/* Подвал */
.rb footer { padding: 48px 0 28px; border-top: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.rb .footer-content { display: flex; justify-content: space-between; gap: 32px; margin-bottom: 32px; }
.rb .footer-logo p { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.rb .footer-bottom { padding-top: 24px; border-top: 1px solid var(--line); text-align: left; }
.rb .footer-bottom p { margin: 0; color: #65715e; font-size: 11px; }

/* Движение включается JS: без JS контент всегда виден. */
.rb.rb-js .rb-hero h1 { animation: rb-enter .7s var(--ease) both; }
.rb.rb-js .rb-lead { animation: rb-enter .7s .07s var(--ease) both; }
.rb.rb-js .rb-hero .btn { animation: rb-enter .7s .14s var(--ease) both; }
.rb.rb-js .rb-tilt-frame .rb-scene { animation: rb-enter .9s .12s var(--ease) both; }
.rb.rb-js .rb-scene .rb-drone { animation: rb-hover 7s ease-in-out infinite; }
.rb.rb-js .rb-scene > polygon { animation: rb-scan 6s ease-in-out infinite; }
.rb.rb-js #additional-members > .team-member { animation: rb-enter .28s var(--ease) both; }
.rb .rb-reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s var(--ease), transform .65s var(--ease); transition-delay: var(--rb-delay, 0s); }
.rb .rb-reveal.is-visible { opacity: 1; transform: none; }
.rb .rb-card.rb-reveal.is-visible { transition: opacity .65s var(--ease), transform .35s var(--ease), border-color .25s ease, box-shadow .35s var(--ease); transition-delay: 0s; }
@keyframes rb-enter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes rb-hover { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes rb-scan { 0%, 100% { fill-opacity: .25; } 50% { fill-opacity: .42; } }
@keyframes rb-spin { to { transform: rotate(360deg); } }
@keyframes rb-toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (hover: hover) and (pointer: fine) {
    .rb .rb-card:hover { transform: translateY(-4px); border-color: #bfcbb8; box-shadow: 0 14px 34px -24px #20262235; }
}
@media (max-width: 1000px) {
    .rb .container { width: calc(100% - 48px); }
    .rb .rb-hero { padding: 64px 0 80px; }
    .rb .rb-hero-grid { gap: 36px; }
    .rb .rb-hero h1 { font-size: clamp(44px, 6.2vw, 62px); }
    .rb .rb-lead { font-size: 15px; }
    .rb .rb-section { padding: 76px 0; }
    .rb .rb-card { padding: 28px; }
    .rb nav ul { gap: 22px; }
}
@media (max-width: 760px) {
    .rb { --header-height: 72px; }
    .rb .header-container { gap: 0; }
    .rb .mobile-menu-btn { display: inline-flex; }
    .rb nav { position: absolute; top: 100%; left: 0; width: 100%; }
    .rb nav ul { display: none; gap: 4px; margin: 0; padding: 12px 24px 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
    .rb nav ul.active { display: flex; flex-direction: column; align-items: stretch; animation: rb-enter .2s var(--ease) both; }
    .rb nav ul a { display: flex; min-height: 44px; padding: 12px 0; font-size: 14px; }
    .rb nav ul a::after { display: none; }
    .rb nav li:last-child a { justify-content: center; margin-top: 6px; }
    /* Навигация остаётся доступной, если JavaScript не загрузился. */
    .rb:not(.rb-js) header { height: auto; min-height: var(--header-height); }
    .rb:not(.rb-js) .header-container { padding-top: 20px; flex-wrap: wrap; }
    .rb:not(.rb-js) nav { position: static; }
    .rb:not(.rb-js) .mobile-menu-btn { display: none; }
    .rb:not(.rb-js) nav ul { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 10px 0 0; padding-inline: 0; }
    .rb .rb-hero { padding: 48px 0 64px; }
    .rb .rb-hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .rb .rb-hero h1 { max-width: 620px; font-size: clamp(46px, 9vw, 68px); margin-bottom: 24px; }
    .rb .rb-lead { max-width: 430px; font-size: 16px; margin-bottom: 26px; }
    .rb .rb-scene { max-width: 560px; margin-inline: auto; border-radius: 18px; }
    .rb .rb-tracks { grid-template-columns: 1fr; gap: 20px; }
    .rb .rb-card h3 { max-width: 420px; font-size: 28px; }
    .rb .rb-arena { grid-template-columns: 1fr; gap: 32px; }
    .rb .rb-arena p { max-width: 520px; }
    .rb .rb-h2 { margin-bottom: 32px; }
    .rb .rb-note { margin-top: -12px; margin-bottom: 30px; }
    .rb .rb-notifications { top: calc(var(--header-height) + 12px); right: 16px; }
}
@media (max-width: 440px) {
    .rb .container { width: calc(100% - 32px); }
    .rb .rb-section { padding: 60px 0; }
    .rb .rb-hero h1 { font-size: 46px; letter-spacing: -.06em; }
    .rb .rb-hero .btn { width: 100%; padding-inline: 16px; }
    .rb .rb-card { padding: 24px; border-radius: 12px; }
    .rb .rb-card::before { margin-bottom: 24px; }
    .rb .rb-card .btn { width: 100%; }
    .rb .rb-map { padding: 12px; }
    .rb .rb-form { padding: 22px 18px; border-radius: 12px; }
    .rb .team-member { grid-template-columns: 1fr; padding: 18px; }
    .rb .team-member .form-group:nth-last-child(2) { margin-bottom: 16px; }
    .rb .team-member .form-group:last-child { margin-bottom: 0; }
    .rb .form-control { font-size: 16px; }
    .rb .rb-counter { margin-left: 8px; }
    .rb nav ul { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    html:has(> .rb) { scroll-behavior: auto !important; }
    .rb *, .rb *::before, .rb *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .rb .rb-reveal { opacity: 1; transform: none; }
    .rb .rb-scene, .rb .rb-tilt-frame { transform: none !important; }
}
