/* Remote-RED — design system
   Colors sampled from the real CI mark (logo-quadrat-weiss-300x300.png):
   background #8F0000, ink white. Everything below is derived from that. */

:root {
  --red-900: #4a0000;
  --red-800: #5a0000;
  --red-700: #720707;
  --red-600: #8f0000;   /* the CI color, sampled from the logo */
  --red-500: #a81a1a;
  --red-400: #c53f3f;
  --wire-green: #3a9d70; /* Node-RED "connected" signal */

  --paper: #f7f2ea;      /* warm off-white, not pure #fff */
  --paper-dim: #efe7d8;
  --ink: #241c18;        /* warm near-black, not pure #000 */
  --ink-soft: #5a5049;
  --line: #e2d8c6;

  --bg: var(--paper);
  --bg-raised: #ffffff;
  --bg-sunken: var(--paper-dim);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --border: var(--line);
  --accent: var(--red-600);
  --accent-strong: var(--red-800);

  --shadow: 0 2px 0 rgba(36, 28, 24, 0.05), 0 12px 32px rgba(36, 28, 24, 0.07);
  --shadow-hover: 0 2px 0 rgba(36, 28, 24, 0.06), 0 20px 44px rgba(36, 28, 24, 0.12);
  --radius: 4px;
  --maxw: 1160px;

  --font-display: "Zilla Slab", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110f;
    --bg-raised: #1f1714;
    --bg-sunken: #120d0b;
    --text: #f2e9dd;
    --text-soft: #b9aa9a;
    --border: #3a2b24;
    --accent: #c53f3f;
    --accent-strong: #e35a5a;
    --shadow: 0 2px 0 rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.45);
    --shadow-hover: 0 2px 0 rgba(0, 0, 0, 0.35), 0 24px 56px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.45em;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--text-soft); max-width: 62ch; }
img { max-width: 100%; display: block; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-sunken); padding: 0.15em 0.4em; border-radius: 3px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Header ----------
   The header itself is the CI-red surface the logo was designed for —
   same relationship as the square app icon (white wordmark on #8F0000). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--red-600);
  border-bottom: 1px solid var(--red-900);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; height: 100%; }
.brand img { height: 17px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 4px;
}
.site-nav a[aria-current="page"], .site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: -3px;
  height: 2px;
  background: #fff;
}
.lang-switch { display: flex; gap: 8px; font-size: 0.82rem; border-left: 1px solid rgba(255,255,255,0.25); padding-left: 20px; }
.lang-link { color: rgba(255,255,255,0.7); padding: 4px 8px; border-radius: 3px; font-weight: 600; letter-spacing: 0.02em; }
.lang-link.active { color: #fff; background: rgba(255,255,255,0.16); }
.nav-toggle { display: none; }
.nav-toggle span { background: #fff; }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 40px; position: relative; overflow: hidden; }
/* Node-RED editor dot grid, fading out towards the bottom */
.has-grid { position: relative; overflow: hidden; }
.has-grid > .wrap { position: relative; }
.hero::before,
.has-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 13%, transparent) 1px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 92%);
  mask-image: linear-gradient(to bottom, black 30%, transparent 92%);
  pointer-events: none;
}
/* On long sections the grid is capped instead of spanning the whole height */
.has-grid::before {
  inset: 0 0 auto 0;
  height: 460px;
  -webkit-mask-image: linear-gradient(to bottom, black 25%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 25%, transparent 100%);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}
.hero-eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--wire-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wire-green) 25%, transparent);
}
.hero h1 { margin-bottom: 0.4em; }
.hero-lead { font-size: 1.2rem; max-width: 46ch; }
.hero-media { position: relative; text-align: center; }
/* The screenshot already sits in a device frame — no extra radius/shadow. */
.hero-media img {
  max-width: 300px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Node-RED flow wired into the phone (decorative) */
.hero-wires {
  position: absolute;
  left: -6%;
  top: 50%;
  transform: translateY(-50%);
  width: 104%;
  height: auto;
  z-index: 1;
}
.hero-media:has(.hero-wires) img { margin-right: 0; margin-left: auto; }
.hero-wires .wire {
  fill: none;
  stroke: color-mix(in srgb, var(--text) 22%, transparent);
  stroke-width: 2;
}
.hero-wires .wire-pulse {
  stroke: var(--wire-green);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 10 90;
  stroke-dashoffset: 100;
  animation: wirePulse 3.6s linear infinite;
}
.hero-wires .wire-pulse-2 { animation-delay: 1.2s; }
.hero-wires .wire-pulse-3 { animation-delay: 2.4s; }
@keyframes wirePulse {
  0%   { stroke-dashoffset: 100; opacity: 0; }
  8%   { opacity: 1; }
  70%  { stroke-dashoffset: -12; opacity: 1; }
  71%, 100% { stroke-dashoffset: -12; opacity: 0; }
}
.hero-wires .chip rect:first-child {
  fill: var(--bg-raised);
  stroke: var(--border);
  stroke-width: 1.5;
}
.hero-wires .chip text {
  font-family: var(--font-mono);
  font-size: 13px;
  fill: var(--text-soft);
}
.hero-wires .chip-status { fill: var(--wire-green); }
.hero-wires .chip-port {
  fill: var(--bg-sunken);
  stroke: var(--border);
  stroke-width: 1.5;
}

.store-badges { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 8px; align-items: center; }
.store-badges img { height: 80px; width: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; }

/* ---------- Sections ---------- */
section { padding: 68px 0; }
main > section:last-of-type { padding-bottom: 28px; }
.section-head { max-width: 60ch; margin: 0 auto 44px; text-align: center; }
.section-head.left { margin: 0 0 40px; text-align: left; }
.section-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-strong);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  font-weight: 500;
}
.bg-sunken { background: var(--bg-sunken); }

/* ---------- Flow diagram (signature element) ----------
   Feature list rendered as connected nodes, echoing a Node-RED flow. */
.flow {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 720px;
  margin: 0 auto;
}
.flow-node {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: start;
  position: relative;
  padding: 26px 0;
}
.flow-node:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 56px;
  bottom: -26px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--border) 0 6px, transparent 6px 12px);
}
.flow-port {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 2px solid var(--accent);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow);
}
.flow-node h3 { margin-bottom: 6px; font-family: var(--font-display); font-size: 1.3rem; }
.flow-node p { margin: 0; font-size: 0.97rem; }
.flow-node .flow-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-soft);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

/* ---------- Plain feature cards (used on pricing/partners) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card .icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-sunken);
  border: 2px solid var(--accent);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 8px; font-family: var(--font-display); font-size: 1.25rem; }
.card p { margin: 0; font-size: 0.95rem; }

/* Plan cards with price list pinned to the bottom */
.card-plan { display: flex; flex-direction: column; }
.price-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding-top: 14px;
}
.card-plan p { margin-bottom: 20px; }
.price-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 4px 0;
  font-size: 0.92rem;
}
.price-period { color: var(--text-soft); white-space: nowrap; }
.price-amount { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; font-size: 0.88rem; }

.icon-svg { width: 1em; height: 1em; display: block; }
.flow-port .icon-svg { width: 22px; height: 22px; }
.card .icon .icon-svg { width: 18px; height: 18px; }

/* ---------- Tabs (CSS-only, radio-driven) ---------- */
.tabs-input { position: absolute; opacity: 0; pointer-events: none; }
.tabs-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.tabs-label {
  cursor: pointer;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tabs-label:hover { color: var(--text); }
.tabs-panel { display: none; }
.tabs-panel p { max-width: none; }
.tabs-input:nth-of-type(1):checked ~ .tabs-labels .tabs-label:nth-of-type(1),
.tabs-input:nth-of-type(2):checked ~ .tabs-labels .tabs-label:nth-of-type(2),
.tabs-input:nth-of-type(3):checked ~ .tabs-labels .tabs-label:nth-of-type(3),
.tabs-input:nth-of-type(4):checked ~ .tabs-labels .tabs-label:nth-of-type(4) {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tabs-input:nth-of-type(1):checked ~ .tabs-panels .tabs-panel:nth-of-type(1),
.tabs-input:nth-of-type(2):checked ~ .tabs-panels .tabs-panel:nth-of-type(2),
.tabs-input:nth-of-type(3):checked ~ .tabs-panels .tabs-panel:nth-of-type(3),
.tabs-input:nth-of-type(4):checked ~ .tabs-panels .tabs-panel:nth-of-type(4) {
  display: block;
}
:focus-visible.tabs-label,
.tabs-input:focus-visible ~ .tabs-labels .tabs-label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Pricing ---------- */
.table-scroll { overflow-x: auto; }
.table-scroll .price-table { min-width: 560px; }
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-raised);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.price-table th, .price-table td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--border); }
.price-table th { background: var(--bg-sunken); font-weight: 600; font-family: var(--font-mono); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-soft); }
.price-table tr:last-child td { border-bottom: none; }
.card-grid + .note-box { margin-top: 44px; }
.note-box {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 0.95rem;
}
.note-box strong { color: var(--text); }

/* ---------- FAQ / Help ---------- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 14px;
  background: var(--bg-raised);
}
.faq-item h3 { margin-bottom: 8px; font-size: 1.05rem; font-family: var(--font-display); }
.faq-item p:last-child { margin-bottom: 0; }

.faq-item + .faq-item-media { margin-top: 36px; }
.faq-item-media {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: start;
  border: none;
  background: none;
  padding: 0;
  border-radius: 0;
  margin-bottom: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--border);
}
.faq-item-media:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.faq-item-media .faq-item-text p { max-width: none; }
.faq-item-media .faq-item-image { text-align: center; position: sticky; top: 88px; }
.faq-item-media .faq-item-image img {
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin: 0 auto;
}
@media (max-width: 760px) {
  .faq-item-media { grid-template-columns: 1fr; }
  .faq-item-media .faq-item-image { order: -1; max-width: 260px; margin: 0 auto; position: static; }
}

.steps { counter-reset: step; list-style: none; padding: 0; margin: 24px 0; }
.steps li { counter-increment: step; position: relative; padding-left: 48px; margin-bottom: 22px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}

.code-block {
  background: #1a1310;
  color: #f0e6d8;
  border-radius: var(--radius);
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.87rem;
  white-space: pre-wrap;
  overflow-x: auto;
  border: 1px solid #2e2018;
}

/* ---------- Pricing panel (Home Assistant costs) ---------- */
.pricing-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 20px 56px;
  align-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 36px 44px;
  max-width: 920px;
  margin: 0 auto;
}
.pricing-panel-copy h3 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 10px; }
.pricing-panel-copy p { margin-bottom: 0.7em; }
.pricing-panel .pricing-note { font-size: 0.85rem; margin-bottom: 0; }
.pricing-panel .price-list { margin: 0; padding: 0; border-top: none; }
.pricing-panel .price-list li { font-size: 1rem; padding: 12px 0; }
.pricing-panel .price-list li + li { border-top: 1px solid var(--border); }
.pricing-panel .price-list .price-amount { font-size: 1rem; }
@media (max-width: 760px) {
  .pricing-panel { grid-template-columns: minmax(0, 1fr); padding: 28px; }
}

/* ---------- Tutorial videos ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  max-width: 980px;
  margin: 0 auto;
}
.video-card {
  margin: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video-card video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-card figcaption {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.95rem;
}
.center-cta { text-align: center; margin-top: 36px; }

/* ---------- Split layout (partner page) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: start;
}
.split-aside { position: sticky; top: 92px; }
.point { padding: 18px 0; border-bottom: 1px solid var(--border); }
.point:first-child { padding-top: 0; }
.point:last-child { border-bottom: none; padding-bottom: 0; }
.point h3 { margin-bottom: 6px; }
.point p { margin: 0; }
.code-note { font-size: 0.88rem; margin-top: 12px; }
.table-footnote { margin-top: 16px; font-size: 0.9rem; max-width: none; }
.card > .flow-tag { margin-bottom: 14px; }

/* ---------- Linked screenshots (Home Assistant buttons) ---------- */
.method-image { display: inline-block; margin: 14px 0; }
.method-image img {
  border-radius: 8px;
  transition: transform 0.15s ease;
}
a.method-image:hover img { transform: translateY(-2px); }

/* ---------- Scroll reveal (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .js .reveal.visible { opacity: 1; transform: none; }
}

/* ---------- Prose (legal pages) ---------- */
.prose { max-width: 74ch; margin: 0 auto; }
.prose h2 { margin-top: 1.7em; font-size: 1.5rem; }
.prose ul { color: var(--text-soft); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--accent);
  background-image: linear-gradient(160deg, var(--accent) 0%, var(--red-900) 100%);
  color: #fff;
  border-radius: 8px;
  padding: 52px;
  text-align: center;
}
.cta-banner h2, .cta-banner p { color: #fff; }
.cta-banner p { margin-left: auto; margin-right: auto; }
.cta-banner .btn-ghost { background: #fff; color: var(--accent-strong); border-color: #fff; }
.cta-banner .btn-ghost:hover { background: var(--paper-dim); }
.cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.cta-banner .btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
}
.cta-banner .btn-outline:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; color: #fff; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-sunken); padding: 52px 0 26px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; max-width: 32ch; }
.footer-brand img { height: 36px; width: 36px; border-radius: 6px; image-rendering: auto; }
.footer-brand p { font-size: 0.9rem; margin: 0; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-soft); margin-bottom: 14px; font-weight: 500; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: var(--text-soft); font-size: 0.92rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.82rem; color: var(--text-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-media { order: -1; }
  .hero-wires { display: none; }
  .hero-media:has(.hero-wires) img { margin: 0 auto; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 4px;
    background: none; border: none; padding: 8px; cursor: pointer;
  }
  .nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
  .site-nav {
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--red-600); border-bottom: 1px solid var(--red-900);
    flex-direction: column; align-items: flex-start; padding: 20px 24px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 14px; width: 100%; }
  .lang-switch { margin-top: 16px; border-left: none; padding-left: 0; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .flow-node { grid-template-columns: 44px 1fr; gap: 14px; }
  .flow-port { width: 44px; height: 44px; font-size: 1.1rem; }
  .flow-node:not(:last-child)::after { left: 21px; top: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
