/* D2 Controls — Connect. Control. Deliver.
   Layout: a dark "control room" hero whose live single-line diagram lights each layer as the
   tagline cycles; the page then follows the tagline as three numbered chapters. */

:root {
  --bg: #F2F3F5;
  --surface: #FFFFFF;
  --ink: #0F1215;
  --ink-2: #4A525D;
  --line: #D8DCE2;
  --red: #E3120E;
  --red-ink: #C20F0B;
  --on-red: #FFFFFF;
  --focus: #1F6FEB;

  /* fixed night palette for hero, header and bands */
  --night: #0A0C0F;
  --night-2: #12151A;
  --night-3: #1A1E24;
  --night-line: #262B33;
  --night-ink: #EEF0F3;
  --night-ink-2: #8E97A3;
  --night-red: #FF2B25;
  --ok: #2FBF71;

  --f-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --t-xs: 0.8125rem; --t-sm: 0.9375rem; --t-md: 1.0625rem; --t-lg: 1.25rem;
  --t-xl: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  --t-hero: clamp(3rem, 1.2rem + 6.4vw, 6rem);

  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1013; --surface: #161A1F; --ink: #ECEEF1; --ink-2: #9EA6B1; --line: #272C34;
    --red: #F2231E; --red-ink: #FF5A52; --focus: #6AA5FF;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-md)/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
h2 { font-size: var(--t-xl); font-weight: 820; font-stretch: 112%; line-height: 1.05; }
h3 { font-size: var(--t-lg); font-weight: 750; font-stretch: 106%; line-height: 1.2; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--red); color: var(--on-red); padding: 10px 14px; border-radius: 4px; text-decoration: none; }
.skip:focus { top: 12px; }

.kicker { font: 500 var(--t-xs)/1.2 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--red-ink); }
.chapter-head .kicker { font: 800 clamp(2.5rem, 1.6rem + 4vw, 5rem)/1 var(--f-display); font-stretch: 118%; letter-spacing: -0.02em; text-transform: none; color: var(--ink); margin: 0 0 .25em; }
.kicker-night { color: var(--night-red); }
.lead { font-size: var(--t-lg); line-height: 1.5; color: var(--ink-2); max-width: 36em; }
.lead-night { color: var(--night-ink-2); }

/* Buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  font: 600 var(--t-md)/1 var(--f-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  padding: 1em 1.4em; border-radius: 999px; border: 1.5px solid transparent; overflow: hidden; isolation: isolate;
  transition: transform .25s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn-sm { padding: .72em 1.15em; font-size: var(--t-sm); }
.btn-red { background: var(--red); color: var(--on-red); }
.btn-red::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.btn-red:hover::after { transform: translateX(120%); }
.btn-line { border-color: color-mix(in srgb, var(--night-ink) 35%, transparent); color: var(--night-ink); }
.btn-line:hover { border-color: var(--night-ink); background: color-mix(in srgb, var(--night-ink) 8%, transparent); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn:hover { transform: translateY(-2px); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.text-link { font-weight: 600; font-size: var(--t-sm); color: var(--red-ink); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .3s var(--ease); padding-bottom: 2px; justify-self: start; }
.text-link:hover, a:hover > .text-link { background-size: 100% 1.5px; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); background: color-mix(in srgb, var(--night) 55%, transparent); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid transparent; transition: background-color .3s, border-color .3s; color: var(--night-ink); }
.site-header.scrolled { background: color-mix(in srgb, var(--night) 88%, transparent); border-bottom-color: var(--night-line); }
.header-row { display: flex; align-items: center; gap: 28px; height: 72px; transition: height .3s var(--ease); }
.site-header.scrolled .header-row { height: 60px; }
.logo img { display: block; height: 38px; width: auto; transition: height .3s var(--ease); }
.site-header.scrolled .logo img { height: 32px; }
.nav { display: flex; gap: 2px; }
.nav a { position: relative; text-decoration: none; font-size: var(--t-sm); font-weight: 500; padding: 8px 12px; color: var(--night-ink-2); transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--night-red); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover, .nav a.active { color: var(--night-ink); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.header-cta { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.phone { font: 500 var(--t-sm)/1.2 var(--f-mono); text-decoration: none; white-space: nowrap; color: var(--night-ink); }
.phone small { display: block; font: 400 11px/1.2 var(--f-body); color: var(--night-ink-2); }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--night-line); background: transparent; cursor: pointer; position: relative; }
.menu-btn span:not(.sr-only) { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--night-ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-btn span:nth-child(1) { top: 16px; }
.menu-btn span:nth-child(2) { top: 24px; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { top: 20px; transform: rotate(-45deg); }
.menu[hidden] { display: none; }
.menu { display: grid; padding: 8px var(--gutter) 20px; border-top: 1px solid var(--night-line); background: var(--night); }
.menu a { text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--night-line); font: 700 1.25rem/1.2 var(--f-display); font-stretch: 110%; }
.menu .menu-phone { font: 500 1.1rem/1.2 var(--f-mono); color: var(--night-red); border-bottom: 0; }
@media (max-width: 980px) { .nav { display: none; } .menu-btn { display: block; } }
@media (max-width: 600px) { .phone { display: none; } .logo img { height: 32px; } .header-cta { gap: 10px; } }
@media (min-width: 981px) { .menu { display: none !important; } }

/* Hero */
.hero { position: relative; background: var(--night); color: var(--night-ink); padding-block: calc(72px + clamp(40px, 7vw, 96px)) clamp(32px, 4vw, 56px); overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--night-line) 1px, transparent 1px), linear-gradient(90deg, var(--night-line) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .35;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 20%, transparent 75%);
}
.hero::after { content: ""; position: absolute; width: 60vw; height: 60vw; right: -15vw; top: -20vw; background: radial-gradient(circle, color-mix(in srgb, var(--night-red) 18%, transparent), transparent 60%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.hero-copy { display: grid; gap: 28px; min-width: 0; }
.eyebrow { font: 500 var(--t-xs)/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--night-ink-2); display: flex; align-items: center; gap: 10px; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--night-red); box-shadow: 0 0 0 0 var(--night-red); animation: ping 2.4s infinite; flex: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--night-red) 70%, transparent); } 80%, 100% { box-shadow: 0 0 0 10px transparent; } }

.tagline { font-size: var(--t-hero); font-weight: 880; font-stretch: 118%; line-height: .92; letter-spacing: -0.03em; display: grid; }
.tagline .word { display: block; overflow: hidden; padding-bottom: .04em; cursor: default; white-space: nowrap; }
.tagline .word > span { display: inline-block; color: color-mix(in srgb, var(--night-ink) 38%, transparent); transition: color .5s var(--ease); }
.tagline .word.on > span { color: var(--night-ink); }
.tagline .word[data-layer="deliver"].on > span { color: var(--night-red); }
.js .tagline .word > span { animation: rise 1s var(--ease) both; }
.js .tagline .word:nth-child(2) > span { animation-delay: .12s; }
.js .tagline .word:nth-child(3) > span { animation-delay: .24s; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
.js .hero-lede, .js .hero-actions, .js .hero-urgent, .js .eyebrow { animation: fade-up .9s var(--ease) both; }
.js .eyebrow { animation-delay: 0s; }
.js .hero-lede { animation-delay: .4s; }
.js .hero-actions { animation-delay: .5s; }
.js .hero-urgent { animation-delay: .6s; }
.js .hero-visual { animation: fade-up 1.1s var(--ease) .3s both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.hero-lede { font-size: var(--t-lg); line-height: 1.5; color: var(--night-ink-2); max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-urgent { font-size: var(--t-sm); color: var(--night-ink-2); }
.hero-urgent a { font-family: var(--f-mono); color: var(--night-ink); }

.hero-visual { margin: 0; min-width: 0; background: color-mix(in srgb, var(--night-2) 80%, transparent); border: 1px solid var(--night-line); border-radius: 16px; padding: clamp(10px, 1.6vw, 18px); box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); }
.visual-cap { font: 400 var(--t-xs)/1.4 var(--f-mono); color: var(--night-ink-2); padding: 12px 6px 2px; border-top: 1px dashed var(--night-line); margin-top: 8px; min-height: 2.6em; }

/* Diagram */
.sld { display: block; width: 100%; height: auto; }
.sld .layer { opacity: .42; transition: opacity .6s var(--ease); }
.sld .layer-box { fill: var(--night-3); stroke: var(--night-line); stroke-width: 1; transition: stroke .5s, fill .5s; }
.sld .layer-label { fill: var(--night-ink-2); font: 500 10.5px var(--f-mono); letter-spacing: .08em; transition: fill .5s; }
.sld .dev { fill: var(--night-2); stroke: var(--night-ink-2); stroke-width: 1.2; transition: stroke .5s; }
.sld .dev-name { fill: var(--night-ink); font: 600 13px var(--f-body); }
.sld .dev-sub { fill: var(--night-ink-2); font: 400 10.5px var(--f-mono); }
.sld .wire { stroke: var(--night-ink-2); stroke-width: 1.3; fill: none; opacity: .7; }
.sld .bus { stroke: var(--night-ink-2); stroke-width: 3; fill: none; }
.sld .bus-label { fill: var(--night-ink-2); font: 400 10px var(--f-mono); letter-spacing: .06em; }
.sld .ah { fill: var(--night-ink-2); }
.sld .flow { stroke: var(--night-red); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-dasharray: 4 18; opacity: 0; transition: opacity .5s; animation: dash 1.1s linear infinite; }
.sld .flow-bus { stroke-width: 3.2; }
@keyframes dash { to { stroke-dashoffset: -22; } }
.sld .links { opacity: .5; transition: opacity .5s; }
.sld .screen { fill: var(--night); stroke: var(--night-line); }
.sld .grid-line { stroke: var(--night-line); stroke-width: 1; }
.sld .trend { fill: none; stroke: var(--ok); stroke-width: 2; stroke-linejoin: round; stroke-dasharray: 260; stroke-dashoffset: 260; }
.sld .ok { fill: var(--ok); }
.sld[data-active="connect"] .layer-connect,
.sld[data-active="control"] .layer-control,
.sld[data-active="deliver"] .layer-deliver { opacity: 1; }
.sld[data-active="connect"] .layer-connect .layer-box,
.sld[data-active="control"] .layer-control .layer-box,
.sld[data-active="deliver"] .layer-deliver .layer-box { stroke: var(--night-red); fill: color-mix(in srgb, var(--night-red) 7%, var(--night-3)); }
.sld[data-active="connect"] .layer-connect .layer-label,
.sld[data-active="control"] .layer-control .layer-label,
.sld[data-active="deliver"] .layer-deliver .layer-label { fill: var(--night-red); }
.sld[data-active="connect"] .layer-connect .flow,
.sld[data-active="connect"] .links-a .flow,
.sld[data-active="control"] .layer-control .flow,
.sld[data-active="control"] .links-a .flow,
.sld[data-active="control"] .links-b .flow,
.sld[data-active="deliver"] .links-b .flow { opacity: 1; }
.sld[data-active="connect"] .links-a,
.sld[data-active="control"] .links-a, .sld[data-active="control"] .links-b,
.sld[data-active="deliver"] .links-b { opacity: 1; }
.sld[data-active="deliver"] .trend { animation: draw 1.6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.sld[data-active="deliver"] .ok { animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

.hero-facts { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--night-line); }
.hero-facts div { display: grid; gap: 4px; padding: 20px 20px 4px 0; min-width: 0; }
.hero-facts div + div { padding-left: 20px; border-left: 1px solid var(--night-line); }
.hero-facts strong { font: 750 var(--t-md)/1.2 var(--f-display); font-stretch: 110%; }
.hero-facts span { font-size: var(--t-sm); color: var(--night-ink-2); line-height: 1.45; }
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-facts div:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) {
  .hero-facts { grid-template-columns: minmax(0, 1fr); }
  .hero-facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--night-line); }
}


/* Chapters */
.chapter { padding-block: clamp(72px, 10vw, 136px); position: relative; }
.chapter-alt, .section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.chapter-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.chapter-head { display: grid; gap: 20px; position: relative; min-width: 0; }
.chapter-head-wide { max-width: 50rem; margin-bottom: clamp(36px, 5vw, 56px); }
.chapter-no { font: 900 clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem)/.8 var(--f-display); font-stretch: 125%; color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--ink) 45%, var(--bg)); letter-spacing: -0.04em; margin-bottom: -8px; }
.chapter-head .btn { justify-self: start; }
.jobs { display: flex; flex-wrap: wrap; gap: 8px; }
.jobs span { font: 500 12px/1 var(--f-mono); padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); }
.chapter-alt .jobs span { background: var(--bg); }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 2px solid var(--ink); counter-reset: feat; }
.feature-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 0; padding: 22px 0; border-bottom: 1px solid var(--line); counter-increment: feat; position: relative; }
.feature-list li::before { content: counter(feat, decimal-leading-zero); grid-row: span 2; font: 500 var(--t-xs)/1.9 var(--f-mono); color: var(--red-ink); }
.feature-list li::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.feature-list li:hover::after { transform: scaleX(1); }
.feature-list strong { font-weight: 600; font-size: var(--t-md); }
.feature-list span { color: var(--ink-2); font-size: var(--t-sm); }
@media (max-width: 900px) { .chapter-grid { grid-template-columns: minmax(0, 1fr); } }

/* Panels + spotlight */
.twin { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.panel { position: relative; display: grid; gap: 18px; align-content: start; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: clamp(24px, 3vw, 40px); overflow: hidden; min-width: 0; }
.panel-tag { font: 500 var(--t-xs)/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); }
.panel h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); font-weight: 800; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; font-size: var(--t-sm); line-height: 1.5; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-45deg); }
.spot { --mx: 50%; --my: 50%; }
.spot::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--red) 10%, transparent), transparent 60%); opacity: 0; transition: opacity .3s; }
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; }
@media (max-width: 860px) { .twin { grid-template-columns: minmax(0, 1fr); } }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 2px; background: var(--line); }
.steps::after { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 2px; background: var(--red); transform-origin: left; transform: scaleX(1); }
.js .steps:not(.in)::after { transform: scaleX(0); }
.js .steps::after { transition: transform 1.6s var(--ease); }
.steps li { display: grid; gap: 10px; align-content: start; position: relative; min-width: 0; }
.step-no { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 2px solid var(--red); color: var(--ink); font: 600 var(--t-md)/1 var(--f-mono); margin-bottom: 8px; position: relative; z-index: 1; }
.steps h3 { font-size: var(--t-md); }
.steps p { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.5; }
.js .steps li { transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .steps:not(.in) li { opacity: 0; transform: translateY(14px); }
.steps li:nth-child(2) { transition-delay: .2s; } .steps li:nth-child(3) { transition-delay: .4s; } .steps li:nth-child(4) { transition-delay: .6s; } .steps li:nth-child(5) { transition-delay: .8s; }
@media (max-width: 960px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-left: 64px; }
  .steps::before, .steps::after { left: 23px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .steps::after { transform-origin: top; }
  .js .steps:not(.in)::after { transform: scaleY(0); }
  .step-no { position: absolute; left: -64px; top: -4px; margin: 0; }
}

/* Bands */
.band { background: var(--night); color: var(--night-ink); padding-block: clamp(72px, 10vw, 128px); position: relative; overflow: hidden; }
.why { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.why > div:first-child { display: grid; gap: 20px; }
.compare { display: grid; gap: 32px; min-width: 0; }
.compare-row { display: grid; gap: 12px; }
.compare-label { font: 500 var(--t-xs)/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--night-ink-2); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.chain { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; }
.chain .box { border: 1px solid var(--night-line); border-radius: 10px; padding: 16px 14px; font-size: var(--t-sm); line-height: 1.3; min-width: 0; color: var(--night-ink-2); }
.chain .gap { width: 36px; display: grid; place-items: center; position: relative; }
.chain .gap::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px dashed var(--night-ink-2); }
.chain .gap span { position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--night); border: 1.5px solid var(--night-red); color: var(--night-red); font: 700 12px/19px var(--f-mono); text-align: center; animation: warn 2s ease-in-out infinite; }
@keyframes warn { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--night-red) 20%, transparent); } }
.single { border: 1.5px solid var(--night-red); border-radius: 10px; padding: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; background: color-mix(in srgb, var(--night-red) 7%, transparent); }
.single div { font: 750 var(--t-md)/1.2 var(--f-display); font-stretch: 110%; }
.single div + div { border-left: 1px solid var(--night-line); padding-left: 14px; }
.single small { display: block; font: 400 11.5px/1.3 var(--f-mono); color: var(--night-ink-2); margin-top: 6px; font-stretch: normal; }
@media (max-width: 900px) { .why { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .chain { grid-template-columns: minmax(0, 1fr); }
  .chain .gap { width: auto; height: 32px; }
  .chain .gap::before { left: 50%; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 1.5px dashed var(--night-ink-2); }
  .single { grid-template-columns: minmax(0, 1fr); }
  .single div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--night-line); padding-top: 12px; }
}

/* Sections */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section-head { display: grid; gap: 16px; max-width: 46rem; margin-bottom: clamp(32px, 5vw, 52px); }
.split-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 5vw, 52px); }
.split-head .section-head { margin-bottom: 0; }

/* Offers */
.offers { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 16px; }
.offer { position: relative; display: grid; gap: 10px; align-content: start; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; overflow: hidden; min-width: 0; transition: transform .35s var(--ease), border-color .3s; }
.offer:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--red) 50%, var(--line)); }
.offer p { color: var(--ink-2); font-size: var(--t-sm); }
.offer-feature { grid-row: span 2; background: var(--night); color: var(--night-ink); border-color: var(--night-line); gap: 16px; padding: clamp(28px, 3vw, 40px); align-content: end; min-height: 320px; }
.offer-feature h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); font-weight: 820; }
.offer-feature p { color: var(--night-ink-2); font-size: var(--t-md); }
.offer-feature .panel-tag { color: var(--night-red); }
.offer-feature .text-link { color: var(--night-red); }
.offer-feature::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 1px solid var(--night-line); box-shadow: 0 0 0 40px color-mix(in srgb, var(--night-line) 30%, transparent), 0 0 0 80px color-mix(in srgb, var(--night-line) 15%, transparent); pointer-events: none; }
@media (max-width: 900px) { .offers { grid-template-columns: repeat(2, minmax(0, 1fr)); } .offer-feature { grid-column: 1 / -1; grid-row: auto; min-height: 0; } }
@media (max-width: 520px) { .offers { grid-template-columns: minmax(0, 1fr); } }

/* Products */
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pcard { display: grid; gap: 14px; align-content: start; text-decoration: none; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 24px; min-width: 0; transition: transform .35s var(--ease), border-color .3s; }
.pcard:hover { transform: translateY(-3px); border-color: var(--ink); }
.models { display: flex; flex-wrap: wrap; gap: 6px; }
.models span { font: 500 12px/1 var(--f-mono); padding: 7px 9px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); }
@media (max-width: 860px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pgrid { grid-template-columns: minmax(0, 1fr); } }

/* Group */
.group-chain { display: grid; grid-template-columns: 1fr 64px 1fr 64px 1fr; align-items: center; margin-bottom: 40px; }
.gnode { display: grid; gap: 6px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; }
.gname { font: 800 var(--t-lg)/1.1 var(--f-display); font-stretch: 112%; }
.gwhat { font-size: var(--t-sm); color: var(--ink-2); }
.gnode-me { border: 2px solid var(--red); background: color-mix(in srgb, var(--red) 6%, var(--surface)); }
.gnode-me .gname { color: var(--red-ink); }
.glink { height: 2px; background: repeating-linear-gradient(90deg, var(--red) 0 8px, transparent 8px 14px); background-size: 28px 2px; animation: flow 1s linear infinite; position: relative; }
.glink::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--red); }
@keyframes flow { to { background-position: 28px 0; } }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.duo > div { display: grid; gap: 10px; align-content: start; padding: 28px; border-radius: 14px; border: 1px solid var(--line); }
.duo p { color: var(--ink-2); font-size: var(--t-sm); }
@media (max-width: 860px) {
  .group-chain { grid-template-columns: minmax(0, 1fr); }
  .glink { width: 2px; height: 36px; justify-self: center; background: repeating-linear-gradient(180deg, var(--red) 0 8px, transparent 8px 14px); background-size: 2px 28px; animation-name: flow-v; }
  .glink::after { right: auto; left: -4px; top: auto; bottom: -2px; border: 5px solid transparent; border-top: 7px solid var(--red); }
  .duo { grid-template-columns: minmax(0, 1fr); }
}
@keyframes flow-v { to { background-position: 0 28px; } }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 88px); }
.contact-info { display: grid; gap: 22px; align-content: start; }
.info { display: grid; gap: 6px; }
.info .k { font: 500 var(--t-xs)/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--night-ink-2); }
.info address { font-style: normal; line-height: 1.55; }
.big-phone { font: 500 clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem)/1 var(--f-mono); text-decoration: none; color: var(--night-ink); transition: color .2s; }
.big-phone:hover { color: var(--night-red); }
.quote { background: var(--surface); color: var(--ink); border-radius: 18px; padding: clamp(22px, 3vw, 40px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; min-width: 0; }
.field { display: grid; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.full { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 600; font-size: var(--t-sm); padding: 0; margin-bottom: 2px; }
.opt { font-weight: 400; color: var(--ink-2); }
.field input, .field textarea { font: 400 var(--t-md)/1.4 var(--f-body); color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 124px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 18%, transparent); }
.need { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }
.need input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.need label { font-weight: 500; font-size: var(--t-sm); padding: 9px 15px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--bg); transition: border-color .2s, background-color .2s, color .2s; margin: 0; }
.need label:hover { border-color: var(--ink-2); }
.need input:checked + label { border-color: var(--red); background: var(--red); color: var(--on-red); }
.need input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.form-foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.form-foot p { font-size: var(--t-xs); color: var(--ink-2); }
.form-status { font-size: var(--t-sm); padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--red); }
@media (max-width: 900px) { .contact { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .quote { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
.footer { background: var(--night); color: var(--night-ink-2); border-top: 1px solid var(--night-line); padding-top: clamp(48px, 7vw, 96px); font-size: var(--t-sm); overflow: hidden; }
.footer-tag { font: 900 clamp(2.6rem, 1rem + 7.5vw, 8.4rem)/.9 var(--f-display); font-stretch: 122%; letter-spacing: -0.035em; color: transparent; -webkit-text-stroke: 1.5px var(--night-line); margin-bottom: clamp(40px, 6vw, 72px); }
.footer-tag span { transition: color .5s var(--ease), -webkit-text-stroke-color .5s; }
.footer-tag span:last-child { -webkit-text-stroke-color: color-mix(in srgb, var(--night-red) 60%, transparent); }
.footer-tag:hover span { color: var(--night-ink); -webkit-text-stroke-color: transparent; }
.footer-tag:hover span:last-child { color: var(--night-red); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 32px; padding-bottom: 40px; }
.foot-grid h4 { font: 500 var(--t-xs)/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--night-ink); margin: 0 0 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { color: var(--night-ink); }
.foot-grid > div:first-child { display: grid; gap: 14px; align-content: start; }
.foot-logo { height: 36px; width: auto; }
.foot-base { border-top: 1px solid var(--night-line); padding-block: 20px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: var(--t-xs); }
.foot-links { display: flex; gap: 18px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--night-ink); }
@media (max-width: 860px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }

/* Scroll reveal: content is visible without JS; JS hides it until it scrolls in */
.js [data-reveal] { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal]:not(.in) { opacity: 0; transform: translateY(28px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal]:not(.in), .js .steps:not(.in) li { opacity: 1; transform: none; }
  .js .steps:not(.in)::after { transform: none; }
  .sld .flow { display: none; }
  .sld .trend { stroke-dashoffset: 0; }
}
