/* ============================================================
   Моэнерго — Tech / Dashboard theme
   Тёмная «приборная панель мониторинга энергии»
   ============================================================ */

:root {
  /* surfaces */
  --bg:        #12150f50;          /* base deep, warm */
  --bg-solid:  #12150f;
  --bg-2:      #181c12;
  --panel:     #1b2016;
  --panel-2:   #21271c;
  --line:      rgba(150, 165, 120, .14);
  --line-2:    rgba(150, 165, 120, .28);

  /* ink */
  --ink:       #eef1e3;
  --muted:     #a6ad98;
  --muted-2:   #7c8570;

  /* accents — естественные: шалфейный зелёный + тёплая охра */
  --neon:      #74b18c;            /* primary — sage green */
  --neon-dim:  rgba(116, 177, 140, .55);
  --amber:     #cf9a4f;            /* secondary — warm ochre */
  --amber-2:   #e0b06a;
  --amber-dim: rgba(207, 154, 79, .55);
  --lime:      #b7c98a;            /* bridge */
  --warn:      #d6a657;

  /* effects */
  --glow:      0 0 0 1px rgba(116,177,140,.25), 0 0 28px rgba(116,177,140,.22);
  --glow-soft: 0 0 40px rgba(116,177,140,.12);
  --glow-amber: 0 0 0 1px rgba(207,154,79,.25), 0 0 32px rgba(207,154,79,.18);
  --glow-amber-soft: 0 0 40px rgba(207,154,79,.14);
  --shadow:    0 22px 60px rgba(0,0,0,.55);

  --radius:    4px;
  --maxw:      1180px;

  /* unified photo grade — приводит разнородные стоки к одной палитре */
  --img-grade: saturate(.8) contrast(1.06) brightness(.92);

  --sans:  Inter, "Segoe UI", system-ui, Arial, sans-serif;
  --display: Manrope, Inter, "Segoe UI", sans-serif;
  --logo:  "Exo 2", Manrope, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg-solid);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-solid);
  /* subtle telemetry grid */
  background-image:
    linear-gradient(rgba(150,165,120,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150,165,120,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- shared atoms ---------- */

.eyebrow {
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--neon);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--neon);
  box-shadow: var(--glow-soft);
}
.eyebrow.dark { color: var(--amber); }
.eyebrow.dark::before { background: var(--amber); box-shadow: var(--glow-amber-soft); }

h1, h2, h3 { font-family: var(--display); }

h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(46px, 6vw, 80px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.035em;
}

h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.lead {
  max-width: 560px;
  margin: 28px 0 36px;
  color: rgba(232, 242, 239, .78);
  font-size: 19px;
  line-height: 1.65;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border: 1px solid var(--neon);
  border-radius: var(--radius);
  color: var(--bg-solid);
  background: var(--neon);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  box-shadow: var(--glow);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.button::after { content: "→"; transition: transform .25s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--neon), 0 0 40px rgba(116,177,140,.5); }
.button:hover::after { transform: translateX(4px); }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  z-index: 20;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px max(20px, calc((100vw - var(--maxw)) / 2));
  color: var(--ink);
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(8, 18, 22, .78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
  font-family: var(--logo);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.018em;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.brand:hover { transform: translateY(-1px); }
.brand:hover .bm-leaf { opacity: .92; }
.brand-mark { display: inline-flex; align-items: center; }
.brand-svg { height: 30px; width: 30px; display: block; }
.bm-leaf { fill: var(--neon); }
.bm-bolt { fill: var(--bg-solid); }
.brand-text { color: var(--ink); }

.header-right { display: flex; align-items: center; gap: 30px; }

nav { display: flex; gap: 26px; }
nav a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--muted);
  transition: color .2s ease;
}
nav a:hover { color: var(--neon); }

/* live status pill */
.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 0 0 rgba(116,177,140,.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(116,177,140,.55); }
  70%  { box-shadow: 0 0 0 9px rgba(116,177,140,0); }
  100% { box-shadow: 0 0 0 0 rgba(116,177,140,0); }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--ink);
  background: var(--bg-solid);
}
.hero > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .5;
  filter: var(--img-grade);
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 600px at 78% 28%, rgba(116,177,140,.2), transparent 60%),
    linear-gradient(90deg, rgba(8,18,22,.96) 0%, rgba(8,18,22,.82) 46%, rgba(8,18,22,.42) 100%),
    linear-gradient(0deg, var(--bg-solid) 2%, transparent 36%);
  mix-blend-mode: normal;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
  width: 100%;
  max-width: var(--maxw);
  margin: auto;
  padding: 120px max(20px, calc((100vw - var(--maxw)) / 2)) 90px;
}

.hero-content { max-width: 640px; }
.hero h1 .accent { color: var(--neon); }

/* HUD telemetry panel */
.hud {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14,33,41,.92), rgba(8,18,22,.92));
  box-shadow: var(--shadow), var(--glow-soft);
  backdrop-filter: blur(6px);
  overflow: hidden;
}
.hud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hud-head .live-dot { width: 7px; height: 7px; }
.hud-rec { display: inline-flex; align-items: center; gap: 7px; color: var(--amber); }

.hud-spark {
  height: 110px;
  padding: 14px 16px 4px;
  position: relative;
}
.hud-spark svg { width: 100%; height: 100%; overflow: visible; display: block; }
.hud-spark .unit {
  position: absolute;
  top: 14px; left: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted-2);
}

.hud-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.hud-stat {
  padding: 16px;
  border-right: 1px solid var(--line);
}
.hud-stat:last-child { border-right: 0; }
.hud-stat .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.hud-stat .v {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
}
.hud-stat .v.ok { color: var(--neon); }
.hud-stat .v small { font-size: 12px; color: var(--muted); }
.hud-stat.active { background: rgba(116,177,140,.06); }
.hud-stat.active .v { color: var(--neon); }

/* ---------- день/ночь переключатель в HUD ---------- */
.hud-toggle {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
}
.hud-toggle button {
  flex: 1;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 7px 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.hud-toggle button:hover { color: var(--ink); }
.hud-toggle button.on {
  border-color: var(--neon-dim);
  color: var(--neon);
  background: rgba(116,177,140,.08);
}

/* ---------- линейная анимация тока (спарклайн HUD) ---------- */
.hud-spark .flow-base {
  fill: none;
  stroke: var(--neon-dim);
  stroke-width: 1.4;
  opacity: .3;
  vector-effect: non-scaling-stroke;
}
.hud-spark .flow-current {
  fill: none;
  stroke: var(--neon);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 9 13;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px var(--neon-dim));
  animation: hud-flow 1.3s linear infinite;
}
@keyframes hud-flow { to { stroke-dashoffset: -44; } }
.hud-spark .flow-dot { fill: var(--neon); filter: drop-shadow(0 0 6px var(--neon)); }

/* ---------- точки на щитке (поверх фото) ---------- */
.video-stage { position: relative; }
.panel-hotspots { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.panel-hotspots .hot { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; }
.panel-hotspots .hdot {
  display: block;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid #07131a;
  cursor: help;
  animation: hot-pulse 2.6s ease infinite;
}
@keyframes hot-pulse {
  0%   { box-shadow: 0 0 0 0 var(--amber-dim); }
  70%  { box-shadow: 0 0 0 12px rgba(207,154,79,0); }
  100% { box-shadow: 0 0 0 0 rgba(207,154,79,0); }
}
.panel-hotspots .hlabel {
  position: absolute;
  left: 50%; top: calc(100% + 9px);
  transform: translateX(-50%) translateY(6px);
  width: max-content; max-width: 210px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 9px 11px;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 5;
}
.panel-hotspots .hlabel b {
  display: block;
  font-family: var(--display);
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 3px;
}
.panel-hotspots .hot:hover .hlabel,
.panel-hotspots .hot:focus-within .hlabel { opacity: 1; transform: translateX(-50%) translateY(0); }
.panel-hotspots .hot.er .hlabel { left: auto; right: 0; transform: translateX(0) translateY(6px); }
.panel-hotspots .hot.er:hover .hlabel { transform: translateX(0) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .hud-spark .flow-current { animation: none; }
  .panel-hotspots .hdot { animation: none; }
}

/* ============================================================
   Смягчение «машинности»: мягче углы, тоньше телеметрия-сетка
   ============================================================ */
:root { --radius: 12px; }
.card, .tech-card { border-radius: 14px; }
.hud, .video-frame { border-radius: 16px; }
body {
  background-image:
    linear-gradient(rgba(150,165,120,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150,165,120,.02) 1px, transparent 1px);
  background-size: 76px 76px;
}

/* ============================================================
   Переключатель темы (шапка)
   ============================================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 100px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.theme-toggle:hover { color: var(--neon); border-color: var(--neon-dim); }
.theme-toggle .tt-ico { font-size: 13px; line-height: 1; }

/* ============================================================
   Блок «Анатомия щита» — фото + точки
   ============================================================ */
.panel-anatomy {
  max-width: var(--maxw);
  margin: auto;
  padding: 92px 24px 24px;
}
.pa-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}
.pa-photo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.46) saturate(.85) contrast(1.05);
}
.pa-overlay {
  position: relative;
  z-index: 1;
  padding: clamp(24px, 4vw, 46px);
  background: linear-gradient(180deg, rgba(10,14,9,.5), rgba(10,14,9,.78));
}
.pa-overlay .eyebrow { color: #c9e3d3; }
.pa-overlay .eyebrow::before { background: var(--neon); box-shadow: none; }
.pa-overlay h2 {
  margin: 10px 0 10px;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.01em;
  color: #fff;
  max-width: 18ch;
}
.pa-overlay .pa-sub {
  margin: 0 0 26px;
  max-width: 56ch;
  color: rgba(255,255,255,.82);
  font-size: 15.5px;
  line-height: 1.7;
}
.device-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.device-list li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(4px);
}
.d-en {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
  color: #fff;
}
.d-ru {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #9fd3b6;
}
.d-fn {
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255,255,255,.72);
}

/* ============================================================
   Тема ДЕНЬ — светлая, тёплая. Ночь = значения :root.
   ============================================================ */
html[data-theme="day"] {
  --bg:        #f1f2ef;
  --bg-solid:  #ffffff;
  --bg-2:      #f5f6f3;
  --panel:     #ffffff;
  --panel-2:   #f6f7f4;
  --line:      rgba(28,40,34,.12);
  --line-2:    rgba(28,40,34,.2);
  --ink:       #1c241f;
  --muted:     #5b655c;
  --muted-2:   #8b938b;
  --neon:      #2f8a5f;
  --neon-dim:  rgba(47,138,95,.5);
  --amber:     #b07d2e;
  --amber-2:   #9a6b22;
  --amber-dim: rgba(176,125,46,.5);
  --glow:      0 0 0 1px rgba(47,138,95,.16);
  --glow-soft: 0 12px 32px -18px rgba(28,40,34,.26);
  --glow-amber: 0 0 0 1px rgba(176,125,46,.16);
  --glow-amber-soft: 0 12px 32px -18px rgba(70,55,20,.2);
  --shadow:    0 22px 54px -30px rgba(28,40,34,.36);
  --img-grade: saturate(1) contrast(1.02) brightness(1.03);
}
html[data-theme="day"] body {
  background-image:
    linear-gradient(rgba(28,40,34,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28,40,34,.03) 1px, transparent 1px);
}
html[data-theme="day"] .hero > img { opacity: .94; }
html[data-theme="day"] .hero-shade {
  background:
    radial-gradient(900px 600px at 78% 28%, rgba(47,138,95,.1), transparent 60%),
    linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.82) 46%, rgba(255,255,255,.35) 100%),
    linear-gradient(0deg, var(--bg-solid) 2%, transparent 38%);
}
html[data-theme="day"] .hud { background: linear-gradient(180deg, #ffffff, #f5f6f3); }
html[data-theme="day"] .video-frame { background: linear-gradient(180deg, #ffffff, #f4f5f2); }
html[data-theme="day"] .smart-video { background: #ededeb; }
html[data-theme="day"] .site-header { background: rgba(255,255,255,.82); }
html[data-theme="day"] .site-header.scrolled { background: rgba(255,255,255,.92); }
html[data-theme="day"] .lead { color: #16201a; }

/* ---------- intro ---------- */

.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: var(--maxw);
  margin: auto;
  padding: 110px 24px 56px;
  border-bottom: 1px solid var(--line);
}
.intro > p, .about > p {
  max-width: 620px;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.78;
}

/* ---------- cards (panel modules) ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: var(--maxw);
  margin: auto;
  padding: 48px 24px 120px;
}
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card::before, .card::after {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--neon-dim);
  opacity: 0;
  transition: opacity .3s ease;
  z-index: 3;
}
.card::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.card::after  { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-2);
  box-shadow: var(--shadow), var(--glow-soft);
}
.card:hover::before, .card:hover::after { opacity: 1; }

.card img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  filter: var(--img-grade);
  transition: filter .4s ease, transform .5s ease;
}
.card:hover img { filter: saturate(1) contrast(1.02) brightness(1); }
.card-body { padding: 24px 24px 28px; }

.tag {
  margin: 0 0 14px;
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--neon);
}
.card h3 {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.01em;
}
.card-body > p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.68;
}

/* ---------- smart intro + video ---------- */

.smart-intro {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 64px;
  align-items: center;
  padding: 110px max(24px, calc((100vw - var(--maxw)) / 2));
  background:
    radial-gradient(700px 400px at 12% 20%, rgba(116,177,140,.08), transparent 60%),
    var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
/* smart-секция и техника — оранжевый акцент */
.smart-intro .eyebrow { color: var(--amber); }
.smart-intro .eyebrow::before { background: var(--amber); box-shadow: var(--glow-amber-soft); }
.smart-copy > p:not(.eyebrow) {
  margin: 24px 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.78;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .03em;
  color: var(--neon);
  text-decoration: none;
  transition: gap .2s ease;
}
.text-link:hover { gap: 12px; }
.smart-intro .text-link { color: var(--amber); }

/* monitor frame around video */
.video-frame {
  position: relative;
  padding: 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14,33,41,.7), rgba(8,18,22,.7));
  box-shadow: var(--shadow), var(--glow-soft);
}
.video-frame .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
}
.video-frame .bar .rec { display: inline-flex; align-items: center; gap: 7px; color: var(--amber); }
.smart-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  object-fit: cover;
  background: #061015;
}

/* ---------- tech cards ---------- */

.tech-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: var(--maxw);
  margin: auto;
  padding: 90px 24px 120px;
}
.tech-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.tech-card:hover {
  transform: translateY(-6px);
  border-color: var(--amber-dim);
  box-shadow: var(--shadow), var(--glow-amber-soft);
}
.tech-card .tag { color: var(--amber); }
.tech-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: var(--img-grade);
  transition: transform .45s ease, filter .4s ease;
}
.tech-card:hover img { transform: scale(1.04); filter: saturate(1) contrast(1.02) brightness(1); }
.tech-card > div { padding: 24px; }
.tech-card h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.tech-card p:not(.tag) {
  min-height: 66px;
  margin: 14px 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.68;
}
.tech-card span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .03em;
  color: var(--amber);
}

/* ---------- principles (telemetry table) ---------- */

.principles {
  display: grid;
  grid-template-columns: .9fr 1.4fr;
  gap: 80px;
  padding: 110px max(24px, calc((100vw - var(--maxw)) / 2));
  background:
    radial-gradient(600px 400px at 90% 10%, rgba(207,154,79,.07), transparent 60%),
    var(--bg-2);
  border-top: 1px solid var(--line);
}
.principle-grid { border-top: 1px solid var(--line-2); }
.principle-grid > div {
  display: grid;
  grid-template-columns: 56px 1fr 1.2fr;
  gap: 22px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left .3s ease, background .3s ease;
}
.principle-grid > div:hover { padding-left: 12px; background: linear-gradient(90deg, rgba(207,154,79,.06), transparent); }
.principle-grid strong {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--amber);
}
.principle-grid h3 { margin: 0; font-size: 17px; font-weight: 600; }
.principle-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.62; }

/* ---------- about ---------- */

.about {
  max-width: 900px;
  margin: auto;
  padding: 120px 24px;
  text-align: left;
}
.about .updated {
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--muted-2);
}
.status-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
}

/* ---------- footer ---------- */

footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 35px;
  align-items: center;
  padding: 38px max(24px, calc((100vw - var(--maxw)) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .03em;
}
.footer-brand { color: var(--ink); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-nav a { color: var(--muted); text-decoration: none; transition: color .2s ease; }
.footer-nav a:hover { color: var(--neon); }
.about .updated a { color: var(--neon); text-decoration: none; }

/* ============================================================
   Article pages
   ============================================================ */

.article-header {
  position: fixed;
  max-width: none;
}

.article-main { background: var(--bg-solid); }

.article-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 540px;
  color: var(--ink);
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.article-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 18% 28%, rgba(116,177,140,.12), transparent 60%),
    radial-gradient(520px 360px at 88% 76%, rgba(207,154,79,.1), transparent 60%);
  pointer-events: none;
}
.article-hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 650px;
  padding: 120px max(35px, calc((100vw - var(--maxw)) / 2)) 80px;
  padding-right: 60px;
}
.article-hero h1 { font-size: clamp(40px, 5vw, 64px); }
.article-hero p:last-child {
  margin-top: 24px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}
.article-hero img { width: 100%; height: 100%; min-height: 540px; object-fit: cover; filter: var(--img-grade); opacity: .92; }

.article-body {
  max-width: 760px;
  margin: auto;
  padding: 80px 24px 120px;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.8;
  color: rgba(232, 242, 239, .9);
}
.article-body h2 {
  margin: 64px 0 20px;
  font-size: 32px;
  color: var(--ink);
}
.article-body h3 {
  margin: 38px 0 12px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}
.article-body p { margin: 0 0 22px; }
.article-body ul { padding-left: 22px; }
.article-body li { margin: 10px 0; }
.article-body li::marker { color: var(--neon); }

.article-body .note {
  margin: 38px 0;
  padding: 24px 28px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(33,22,14,.6), rgba(8,18,22,.5));
  box-shadow: var(--glow-amber-soft);
  font-size: 15px;
  line-height: 1.7;
}
.article-body .note strong { color: var(--amber); }

.article-body .comparison {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 30px 0;
}
.comparison div {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.comparison strong {
  display: block;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--neon);
}
.comparison p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.sources {
  margin-top: 64px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.sources strong { color: var(--ink); }
.sources a { color: var(--neon); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 34px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .03em;
  color: var(--neon);
  text-decoration: none;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: -14px 0 36px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--muted-2);
}
.article-meta .cat { color: var(--neon); }

.related { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.related h2 { margin: 0 0 18px; font-size: 22px; }
.related-list { display: grid; gap: 10px; }
.related-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  text-decoration: none;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.related-list a:hover { border-color: var(--line-2); transform: translateX(4px); background: var(--panel-2); }
.related-list a span { flex: none; font-family: var(--mono); font-size: 13px; color: var(--neon); }

/* ============================================================
   Scroll reveal (added by main.js)
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; padding-top: 130px; padding-bottom: 70px; }
  .hud { max-width: 460px; }
}

@media (max-width: 800px) {
  .site-header { padding: 14px 20px; }
  .header-right { gap: 14px; }
  nav { display: none; }
  .hero { min-height: auto; }
  .hero > img { object-position: 64% center; opacity: .35; }
  h1 { font-size: clamp(40px, 11vw, 58px); }
  .lead { font-size: 17px; }
  .intro, .principles, .smart-intro, .article-hero { grid-template-columns: 1fr; gap: 38px; }
  .intro { padding-top: 84px; }
  .cards { grid-template-columns: 1fr; padding-bottom: 84px; }
  .smart-intro { padding-top: 84px; padding-bottom: 70px; }
  .tech-cards { grid-template-columns: 1fr; padding: 70px 24px 84px; }
  .tech-card p:not(.tag) { min-height: 0; }
  .principles { padding-top: 84px; padding-bottom: 84px; }
  .principle-grid > div { grid-template-columns: 44px 1fr; }
  .principle-grid p { grid-column: 2; }
  .about { padding-top: 84px; padding-bottom: 84px; }
  .article-hero { gap: 0; }
  .article-hero-copy { padding: 110px 24px 60px; }
  .article-hero img { min-height: 300px; }
  .article-body { font-size: 17px; padding-top: 60px; }
  .article-body .comparison { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .live-dot { animation: none; }
  * { scroll-behavior: auto !important; }
}
