/* GARTH AERO — публичный сайт: светлый «инженерный» стиль (лист чертежа). */
:root {
  --paper: #f3f5f8;
  --ink: #0f1d33;
  --steel: #5b6b80;
  --line: #d5dde8;
  --bp: #1e4f9c;
  --orange: #f26b1d;
  --grid-minor: rgba(30, 79, 156, .07);
  --grid-major: rgba(30, 79, 156, .13);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Oswald", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;
}
body.site { min-height: 100vh; min-height: 100dvh; background: var(--paper); color: var(--ink); overflow-x: hidden; font-family: var(--font); }

/* ---------- верх ---------- */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(20px, env(safe-area-inset-top)) max(clamp(16px, 4vw, 48px), env(safe-area-inset-right)) 20px max(clamp(16px, 4vw, 48px), env(safe-area-inset-left));
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-txt { display: grid; line-height: 1.1; }
.brand-txt b { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: .14em; }
.brand-txt small { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--steel); margin-top: 3px; }
.lm-btn { color: var(--ink); background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(15, 29, 51, .06); backdrop-filter: none; border-radius: 8px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em; }
.lm-btn:hover { background: #fff; border-color: var(--bp); }
.lm-list { border-radius: 10px; }

/* ---------- лист чертежа ---------- */
.dev-wrap {
  position: relative; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: 1fr auto; isolation: isolate;
  padding: 104px clamp(16px, 4vw, 48px) 0;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px), linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px), linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}
/* рамка листа и уголки */
.dev-wrap::before {
  content: ""; position: absolute; z-index: -1; inset: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border: 1.5px solid rgba(15, 29, 51, .55); pointer-events: none;
}
.dev-wrap::after {
  content: ""; position: absolute; z-index: -1; inset: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  border: 1px solid rgba(15, 29, 51, .18); pointer-events: none;
}
body.boot .dev-wrap { opacity: 0; }
.dev-wrap { transition: opacity .35s; }

.dev { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(24px, 5vw, 72px); max-width: 1240px; width: 100%; margin: 0 auto; padding: 24px 0 40px; }
.dev-text { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); }
.kicker .sq { width: 10px; height: 10px; background: var(--orange); }
.kicker .sep { color: var(--line); }
.dev h1 { margin: 0 0 20px; font-family: var(--font-display); font-weight: 700; font-size: clamp(44px, 7vw, 96px); line-height: .98; letter-spacing: .01em; text-transform: uppercase; color: var(--ink); }
.lead { margin: 0; max-width: 560px; font-size: clamp(16px, 1.8vw, 19px); line-height: 1.65; color: #334155; }

/* измерительная шкала с бегущей меткой */
.meter { position: relative; height: 26px; margin: 40px 0 10px; max-width: 460px; border-bottom: 2px solid var(--ink);
  background: repeating-linear-gradient(90deg, var(--ink) 0 1.5px, transparent 1.5px 46px) bottom / 100% 14px no-repeat,
              repeating-linear-gradient(90deg, rgba(15, 29, 51, .45) 0 1px, transparent 1px 9.2px) bottom / 100% 7px no-repeat; }
.meter i { position: absolute; bottom: -7px; left: 0; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 5px rgba(242, 107, 29, .2); animation: scan 3.6s ease-in-out infinite alternate; }
@keyframes scan { to { left: 100%; } }
.meter-lbl { display: inline-flex; align-items: center; gap: 10px; margin: 6px 0 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--steel); }
.meter-lbl .dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; animation: blink 1.4s steps(2, end) infinite; }
@keyframes blink { 50% { opacity: .2; } }

/* ---------- чертёж квадрокоптера ---------- */
.dev-fig { margin: 0; display: grid; place-items: center; animation: fade 1.2s ease both .15s; }
@keyframes fade { from { opacity: 0; } }
.bp { width: min(100%, 520px); height: auto; overflow: visible; }
.bp-ring { fill: none; stroke: var(--bp); stroke-width: 1.4; stroke-dasharray: 6 6; opacity: .55; }
.bp-ring.thin { stroke-width: 1; stroke-dasharray: 2 6; opacity: .45; }
.bp-cross, .bp-ticks { stroke: var(--bp); stroke-width: 1; opacity: .35; }
.bp-ticks { stroke-width: 2; opacity: .6; }
.bp-sweep { transform-origin: 240px 240px; animation: sweep 7s linear infinite; }
.bp-sweep path { fill: var(--orange); opacity: .1; }
@keyframes sweep { to { transform: rotate(360deg); } }
.bp-ping { fill: none; stroke: var(--orange); stroke-width: 2; transform-origin: 240px 240px; animation: ping 3.4s ease-out infinite; }
@keyframes ping { from { transform: scale(.5); opacity: .7; } to { transform: scale(3.7); opacity: 0; } }
.bp-disk { fill: rgba(30, 79, 156, .04); stroke: var(--bp); stroke-width: 1.2; stroke-dasharray: 3 5; }
.bp-arm { stroke: var(--ink); stroke-width: 9; stroke-linecap: round; }
.bp-prop { fill: rgba(15, 29, 51, .55); transform-box: fill-box; transform-origin: center; animation: spin .45s linear infinite; }
.bp-prop.rev { animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.bp-motor { fill: var(--ink); }
.bp-hub { fill: var(--paper); }
.bp-body { fill: #fff; stroke: var(--ink); stroke-width: 3; }
.bp-core { fill: var(--orange); }
.bp-cam { fill: var(--ink); }
.bp-dim { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.bp-txt { font-family: var(--font-mono); font-size: 13px; font-weight: 600; fill: var(--ink); letter-spacing: .06em; }
.bp-txt.small { font-size: 10.5px; fill: var(--steel); }

/* ---------- низ: копирайт и штамп ---------- */
.foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1240px; width: 100%; margin: 0 auto; padding: 0 0 max(36px, calc(env(safe-area-inset-bottom) + 24px)); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--steel); }
.foot p { margin: 0; }
.made { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .1em; }
.tblock { display: grid; grid-template-columns: repeat(4, auto); border: 1.5px solid var(--ink); background: rgba(255, 255, 255, .7); }
.tblock div { display: grid; gap: 2px; padding: 6px 12px; border-left: 1px solid rgba(15, 29, 51, .35); }
.tblock div:first-child { border-left: 0; }
.tblock span { font-size: 9px; letter-spacing: .14em; color: var(--steel); }
.tblock b { font-size: 12px; color: var(--ink); letter-spacing: .06em; }

/* ---------- опубликованная страница ---------- */
body.live { background: #fff; }
body.live .top { position: fixed; inset: 0 0 auto auto; padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 14px 14px; }
body.live .brand { display: none; }
.live-page { min-height: 100vh; min-height: 100dvh; }

/* ---------- 404 ---------- */
.dev.nf { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.nf-code { margin: 0 0 6px; font-family: var(--font-display); font-weight: 700; font-size: clamp(96px, 18vw, 180px); line-height: .9; color: transparent; -webkit-text-stroke: 2px var(--ink); }
.nf-home { margin-top: 30px; height: 46px; padding: 0 22px; border-radius: 8px; background: var(--ink); border-color: var(--ink); font-family: var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.nf-home:hover { background: var(--orange); border-color: var(--orange); }

/* ---------- телефоны и планшеты ---------- */
@media (max-width: 900px) {
  .dev { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 8px; }
  .dev-fig { order: -1; }
  .bp { width: min(78vw, 360px); }
  .tblock { display: none; }
}
@media (max-width: 480px) {
  .brand-txt small { display: none; }
  .brand-txt b { font-size: 18px; }
  .dev-wrap { padding-top: 92px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .bp-sweep, .bp-ping, .bp-prop, .meter i, .meter-lbl .dot, .dev-text, .dev-fig { animation: none !important; }
}
