/* =========================================================
   ГК Энергия — production stylesheet (core)
   Tokens · base · engineering chrome utility · header · footer · hero
   ========================================================= */

:root {
  --scarlet: #e63515;
  --scarlet-hover: #ff3f2e;
  --scarlet-soft: rgba(230,53,21,0.08);
  --ink-50:  #F5F7FA;
  --ink-100: #E9EEF5;
  --ink-200: #C9D3E2;
  --ink-300: #A5B4CB;
  --ink-400: #6E85A6;
  --ink-500: #4B6485;
  --ink-600: #314964;
  --ink-700: #22354A;
  --ink-800: #162635;
  --ink-900: #0B1220;

  --bg-paper:   #F4F5F7;
  --bg-surface: #FFFFFF;
  --bg-warm:    #FAFAF8;
  --bg-ink:     #0B1220;

  --border:      rgba(11, 18, 32, 0.08);
  --border-soft: rgba(11, 18, 32, 0.05);
  --rule:        rgba(11, 18, 32, 0.12);

  --shadow-cta:       0 6px 18px rgba(230, 53, 21, 0.25);
  --shadow-cta-hover: 0 8px 20px rgba(230, 53, 21, 0.22);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Onest', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink-900);
  background: var(--bg-paper);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 {
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.028em;
  line-height: 1.05;
  color: var(--ink-900);
}
.mono { font-family: 'JetBrains Mono', monospace; font-feature-settings: 'tnum'; }
.tabular { font-variant-numeric: tabular-nums; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─────────── container & eyebrow ─────────── */
.container {
  max-width: 1280px; margin: 0 auto;
  padding: 0 20px;
  position: relative; z-index: 1;
}
@media (min-width: 1024px) { .container { padding: 0 80px; } }

.section-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--ink-500);
}
.section-eyebrow::before {
  content: ''; width: 28px; height: 1.5px; background: var(--scarlet);
}
.on-dark .section-eyebrow { color: rgba(255, 255, 255, 0.6); }

/* =========================================================
   ENGINEERING CHROME — utility for ANY light section
   Adds: faint blueprint grid · crop marks · coord labels.
   Apply with class="eng" on a <section>. Add 4 corner crop
   spans + 4 coord spans inline (see HTML).
   ========================================================= */
.eng {
  position: relative;
  background-image:
    /* faint warm radial in top-right corner */
    radial-gradient(circle at 95% 5%, rgba(230, 53, 21, 0.025), transparent 40%),
    /* faint blueprint grid */
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 79px,
      rgba(11, 18, 32, 0.035) 79px,
      rgba(11, 18, 32, 0.035) 80px
    ),
    /* subtle noise via svg */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: auto, auto, 160px 160px;
}
/* top-left + top-right crop marks via ::before / ::after */
.eng::before,
.eng::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--ink-900);
  z-index: 2;
  pointer-events: none;
}
.eng::before { top: 28px; left: 28px; border-right: none; border-bottom: none; }
.eng::after  { top: 28px; right: 28px; border-left: none; border-bottom: none; }
.eng .eng-bot-l,
.eng .eng-bot-r {
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--ink-900);
  z-index: 2;
  pointer-events: none;
}
.eng .eng-bot-l { bottom: 28px; left: 28px; border-right: none; border-top: none; }
.eng .eng-bot-r { bottom: 28px; right: 28px; border-left: none; border-top: none; }

/* coordinate labels */
.coord {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-400);
  z-index: 2;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.coord .tick { width: 8px; height: 1px; background: var(--scarlet); flex-shrink: 0; }
.coord.tl { top: 26px; left: 60px; }
.coord.tr { top: 26px; right: 60px; }
.coord.bl { bottom: 26px; left: 60px; }
.coord.br { bottom: 26px; right: 60px; }
.coord.scarlet { color: var(--scarlet); }
@media (max-width: 900px) {
  .eng::before, .eng::after, .eng .eng-bot-l, .eng .eng-bot-r { display: none; }
  .coord { display: none; }
}

/* footnotes (after content inside .eng sections) */
.eng-foot {
  margin-top: 48px; padding-top: 22px;
  border-top: 1px dashed var(--rule);
  display: grid; grid-template-columns: 1fr; gap: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--ink-500); line-height: 1.55;
}
@media (min-width: 768px) {
  .eng-foot { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}
.eng-foot b { color: var(--scarlet); font-weight: 700; margin-right: 6px; }

/* footnote superscripts */
sup.fn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.5em; font-weight: 600;
  color: var(--scarlet);
  vertical-align: super;
  margin-left: 3px;
  letter-spacing: 0;
}
.on-dark sup.fn { color: var(--scarlet); }

/* kpi tag (used above numbers in chromed sections) */
.kpi-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-400);
  display: flex; align-items: center; gap: 8px;
}
.kpi-tag::before {
  content: ''; width: 6px; height: 6px;
  border: 1px solid var(--ink-400);
}
.kpi-tag.scarlet { color: var(--scarlet); }
.kpi-tag.scarlet::before {
  border-color: var(--scarlet);
  background: var(--scarlet);
}

/* duration / spec chip */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-700);
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: rgba(255,255,255,0.5);
}
.chip.scarlet {
  color: var(--scarlet);
  border-color: var(--scarlet);
  background: var(--scarlet-soft);
}
.on-dark .chip {
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.cta-primary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; min-height: 50px; padding: 14px 28px;
  background: var(--scarlet); color: white;
  border: none; border-radius: 999px;
  font-family: 'Onest', sans-serif; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.3s ease;
  box-shadow: var(--shadow-cta);
  white-space: nowrap;
}
.cta-primary:hover {
  background: var(--scarlet-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-cta-hover);
}
.cta-primary .arrow { transition: transform 0.25s cubic-bezier(.2,.7,.2,1); }
.cta-primary:hover .arrow { transform: translateX(3px); }
.cta-primary.cta-large { min-height: 60px; padding: 18px 38px; font-size: 16px; }
.cta-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 12px 26px;
  background: transparent; color: var(--ink-900);
  border: 1.5px solid var(--ink-200); border-radius: 999px;
  font-family: 'Onest', sans-serif; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.cta-ghost:hover { border-color: var(--ink-900); background: var(--ink-900); color: white; }
.cta-ghost.on-dark { color: white; border-color: rgba(255,255,255,0.3); }
.cta-ghost.on-dark:hover { background: white; color: var(--ink-900); border-color: white; }

/* =========================================================
   HEADER
   ========================================================= */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(11, 18, 32, 0.96);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s ease, border-color 0.35s ease;
}
.header.scrolled {
  background: rgba(11, 18, 32, 0.6);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
.header-inner {
  max-width: 1440px; margin: 0 auto;
  padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
@media (min-width: 1024px) { .header-inner { padding: 0 40px; } }
.logo {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; color: #ffffff; font-size: 18px;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--scarlet); position: relative;
  box-shadow: 0 4px 10px rgba(230, 53, 21, 0.35);
}
.logo-mark::after {
  content: ''; position: absolute; inset: 6px;
  border: 2px solid white; border-radius: 3px;
  border-top: none; border-right: none;
}
.dna-signature {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
  padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.18); margin-left: 4px;
}
.nav { display: none; align-items: center; gap: 28px; }
@media (min-width: 900px) { .nav { display: flex; } }
.nav button {
  background: none; border: none; cursor: pointer;
  font-family: 'Onest', sans-serif; font-size: 14px; font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s ease;
}
.nav button:hover { color: #ffffff; }
.header-cta { display: none; }
@media (min-width: 768px) { .header-cta { display: inline-flex; } }
.header-cta .cta-primary {
  min-height: 42px; padding: 10px 18px;
  font-size: 13.5px; border-radius: 999px;
}
.header-phone {
  display: none; align-items: center; gap: 6px;
  color: rgba(255, 255, 255, 0.92);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; margin-right: 16px;
}
@media (min-width: 1100px) { .header-phone { display: inline-flex; } }

/* =========================================================
   HERO (cinematic — unchanged philosophy, refined typography)
   ========================================================= */
.hero {
  position: relative;
  width: 100%; min-height: 100vh;
  overflow: hidden; isolation: isolate;
  background: var(--ink-900);
  padding-top: 64px;
}
.hero-photo {
  position: absolute; inset: 0;
  background-image: url('uploads/ChatGPT Image 18 мая 2026 г., 16_05_58.png');
  background-color: #1c2738;
  background-size: cover; background-position: center 45%;
  z-index: 0;
  animation: kenBurns 24s ease-in-out infinite;
}
.hero-photo::after {
  content: ''; position: absolute; inset: 0;
  background:
    /* левая зона текста: чуть прикрываем, справа погрузчик открыт */
    linear-gradient(110deg, rgba(11,18,32,0.70) 0%, rgba(11,18,32,0.38) 44%, rgba(11,18,32,0.05) 70%, transparent 100%),
    /* низ: якорит H1 */
    linear-gradient(to top, rgba(11,18,32,0.62) 0%, rgba(11,18,32,0.15) 36%, transparent 58%);
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 1440px; margin: 0 auto;
  padding: 80px 20px 64px;
  min-height: calc(100vh - 64px);
  display: flex; flex-direction: column; justify-content: flex-end;
}
@media (min-width: 1024px) { .hero-inner { padding: 120px 48px 96px; } }
.hero-text { max-width: 800px; color: #ffffff; }
.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.72);
  display: inline-flex; align-items: center; gap: 12px;
}
.hero-eyebrow::before { content: ''; width: 32px; height: 1.5px; background: var(--scarlet); }
.hero-h1 {
  margin-top: 22px;
  font-size: 36px; font-weight: 800;
  line-height: 1.02; letter-spacing: -0.028em;
  color: #ffffff; max-width: 880px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
@media (min-width: 640px) { .hero-h1 { font-size: 50px; } }
@media (min-width: 1024px) { .hero-h1 { font-size: 72px; } }
@media (min-width: 1280px) { .hero-h1 { font-size: 88px; } }
.hero-sub {
  margin-top: 24px;
  font-size: 16px; color: rgba(255, 255, 255, 0.88);
  line-height: 1.6; max-width: 640px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}
@media (min-width: 1024px) { .hero-sub { font-size: 18px; } }
.hero-actions {
  margin-top: 40px;
  display: flex; flex-direction: column; gap: 12px;
}
@media (min-width: 640px) { .hero-actions { flex-direction: row; flex-wrap: wrap; align-items: center; } }

/* hero engineering corner marks (white version for dark) */
.hero-coord {
  position: absolute; z-index: 3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  display: flex; align-items: center; gap: 8px;
}
.hero-coord .tick { width: 8px; height: 1px; background: var(--scarlet); }
.hero-coord.tl { top: 84px; left: 28px; }
.hero-coord.tr { top: 84px; right: 28px; color: var(--scarlet); }
@media (min-width: 1024px) {
  .hero-coord.tl { top: 96px; left: 48px; }
  .hero-coord.tr { top: 96px; right: 48px; }
}
@media (max-width: 768px) { .hero-coord { display: none; } }

/* price stamp */
.price-stamp {
  position: absolute; z-index: 3;
  top: 132px; right: 20px;
  background: #ffffff; border-radius: 14px;
  padding: 18px 22px 16px;
  box-shadow: 0 1px 2px rgba(11, 18, 32, 0.06), 0 14px 40px rgba(11, 18, 32, 0.18);
  max-width: 290px;
  transform: rotate(0.6deg);
}
@media (min-width: 1024px) { .price-stamp { top: 160px; right: 48px; max-width: 320px; } }
.price-stamp-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-500); margin-bottom: 6px;
}
.price-stamp-value {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; font-size: 28px;
  color: var(--scarlet);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 1024px) { .price-stamp-value { font-size: 30px; } }
.price-stamp-spec {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--rule);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--ink-600); letter-spacing: 0.04em; line-height: 1.45;
}
@media (max-width: 640px) {
  .price-stamp { position: static; transform: none; max-width: 100%; margin: 0 0 16px; }
}
.hero-scroll-hint {
  position: absolute; z-index: 2;
  bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
}
.hero-scroll-hint .dash {
  width: 1px; height: 28px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
  animation: scrollHint 2.2s ease-in-out infinite;
}
@keyframes scrollHint {
  0%, 100% { transform: scaleY(0.6); opacity: 0.4; transform-origin: top; }
  50%      { transform: scaleY(1);   opacity: 0.85; transform-origin: top; }
}

/* =========================================================
   FORMS — shared
   ========================================================= */
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.span-2 { grid-column: 1 / -1; }
.form-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; color: var(--ink-500);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 13px 16px;
  background: var(--bg-paper); color: var(--ink-900);
  border: 1px solid var(--border); border-radius: 12px;
  font-family: 'Onest', sans-serif; font-size: 14px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--scarlet); background: white;
}
.form-textarea { min-height: 96px; resize: vertical; }
.form-consent {
  margin-top: 18px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: var(--ink-500); line-height: 1.5;
}
.form-consent input { margin-top: 3px; accent-color: var(--scarlet); }
.form-consent a { color: var(--ink-700); text-decoration: underline; text-underline-offset: 2px; }
.form-actions { margin-top: 22px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form-micro { margin-top: 14px; font-size: 12.5px; color: var(--ink-500); line-height: 1.5; }
.on-dark .form-input, .on-dark .form-select, .on-dark .form-textarea {
  background: rgba(11, 18, 32, 0.45); color: white;
  border-color: rgba(255, 255, 255, 0.18);
}
.on-dark .form-input:focus, .on-dark .form-select:focus, .on-dark .form-textarea:focus {
  border-color: var(--scarlet); background: rgba(11, 18, 32, 0.65);
}
.on-dark .form-input::placeholder, .on-dark .form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}
.on-dark .form-label { color: rgba(255, 255, 255, 0.55); }
.on-dark .form-consent { color: rgba(255, 255, 255, 0.62); }
.on-dark .form-consent a { color: rgba(255, 255, 255, 0.85); }
.on-dark .form-micro { color: rgba(255, 255, 255, 0.6); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: #060912; color: rgba(255, 255, 255, 0.72); padding: 72px 0 36px; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 1024px) { .footer-inner { padding: 0 40px; } }
.footer-top {
  display: grid; gap: 36px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .footer-top { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; } }
.footer-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800; color: white; font-size: 22px;
}
.footer-tagline {
  margin-top: 14px; font-size: 13.5px;
  color: rgba(255, 255, 255, 0.62); line-height: 1.55; max-width: 360px;
}
.footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6); margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
  font-size: 14px; color: rgba(255, 255, 255, 0.78); transition: color 0.2s ease;
}
.footer-col a:hover { color: white; }
.footer-bottom {
  margin-top: 56px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column; gap: 12px;
  font-size: 12.5px; color: rgba(255, 255, 255, 0.5); line-height: 1.55;
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}
.footer-legal-row { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal-row a { color: rgba(255, 255, 255, 0.62); }
.footer-legal-row a:hover { color: white; }

/* =========================================================
   REVEAL · ENTRANCE ANIMATIONS
   .reveal = legacy (hero only). [data-anim] = new on-scroll.
   ========================================================= */
.reveal { opacity: 0; transform: translateY(20px); animation: rise 0.7s cubic-bezier(.2,.7,.2,1) forwards; }
.reveal.d1 { animation-delay: 0.10s; }
.reveal.d2 { animation-delay: 0.20s; }
.reveal.d3 { animation-delay: 0.30s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* scroll-driven reveal (IntersectionObserver flips .in) */
[data-anim] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--anim-delay, 0s);
  will-change: opacity, transform;
}
[data-anim].in { opacity: 1; transform: translateY(0); }
[data-anim="fade"] { transform: none; }
[data-anim="slide-right"] { transform: translateX(-24px); }
[data-anim="slide-right"].in { transform: translateX(0); }
[data-anim="scale"] { transform: scale(0.96); transform-origin: left center; }
[data-anim="scale"].in { transform: scale(1); }

/* keyframes for ambient micro-animations */
@keyframes kenBurns {
  0%, 100% { transform: scale(1.0); }
  50%      { transform: scale(1.07); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
@keyframes nowBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}
@keyframes timelineFill {
  from { width: 0; }
  to   { width: 36%; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, [data-anim] { opacity: 1; transform: none; animation: none; transition: none; }
  .hero-photo, .hero-scroll-hint .dash, .now-pointer { animation: none; }
}
