﻿/* ── Local fonts (no external request) ── */
@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/firacode-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/firacode-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/firacode-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/firacode-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Share Tech Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/sharetechmono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*{margin:0;padding:0;box-sizing:border-box}
html,body{width:100%;height:100%;overflow:hidden;background:#090909;color:#fff;font-family:'Fira Code','Courier New',monospace;user-select:none;cursor:default}
input,textarea,select{user-select:auto;cursor:text}

#webgl{position:fixed;top:0;left:0;width:100%;height:100%;z-index:0}

/* ── INTRO SCREEN (landing logo) ── */
#introScreen{
  position:fixed;inset:0;z-index:50;
  background:#090909;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  pointer-events:all;
  transition:opacity .8s ease;
}
#introScreen.hidden{display:none}
#introLogoWrap{
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  will-change:transform,filter;
}
#introLogoSvg{
  width:608px;height:608px;
  fill:none;
  display:block;
  will-change:transform,filter;
}

/* wireframe draw-on animation */
#introLogoSvg .wf-path {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: wfDraw 1.8s cubic-bezier(0.4,0,0.2,1) forwards;
}
#introLogoSvg .wf-accent .wf-path:nth-child(1) { animation-delay: 0.1s; }
#introLogoSvg .wf-accent .wf-path:nth-child(2) { animation-delay: 0.4s; }
#introLogoSvg .wf-dim    .wf-path:nth-child(1) { animation-delay: 0.7s; }
#introLogoSvg .wf-dim    .wf-path:nth-child(2) { animation-delay: 0.9s; }

@keyframes wfDraw {
  to { stroke-dashoffset: 0; }
}

/* пульсирующее свечение после прорисовки */
#introLogoSvg .wf-accent {
  animation: wfGlow 6s ease-in-out 2s infinite alternate;
}
#introLogoSvg .wf-dim {
  filter: drop-shadow(0 0 1px rgba(255,255,255,0.3));
}
@keyframes wfGlow {
  from { filter: drop-shadow(0 0 1px #D4FF00); }
  to   { filter: drop-shadow(0 0 2px #D4FF00) drop-shadow(0 0 4px #D4FF0066); }
}
#introHint{
  margin-top:48px;
  font-size:13px;letter-spacing:8px;color:#D4FF00;
  text-transform:uppercase;
  font-family:'Share Tech Mono',monospace;
  animation:hintPulse 5s ease-in-out infinite;
  white-space:nowrap;
  text-shadow: 0 0 8px #D4FF00;
}
@keyframes hintPulse{0%,100%{opacity:.85}50%{opacity:1}}

/* ── CSS GRID OVERLAY ── */
.grid-overlay{
  position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;pointer-events:none;
  background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
                   linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
  background-size:100px 100px;
}

/* ── VIGNETTES ── */
.vig{position:fixed;z-index:2;pointer-events:none}
.vig-l{top:0;left:0;width:220px;height:100%;background:linear-gradient(90deg,rgba(9,9,9,.85),transparent)}
.vig-r{top:0;right:0;width:220px;height:100%;background:linear-gradient(-90deg,rgba(9,9,9,.85),transparent)}
.vig-t{top:0;left:0;width:100%;height:130px;background:linear-gradient(180deg,rgba(9,9,9,.95),transparent)}
.vig-b{bottom:0;left:0;width:100%;height:160px;background:linear-gradient(0deg,rgba(9,9,9,.95),transparent)}

/* ── HEADER ── */
.header{
  position:fixed;top:0;left:0;right:0;z-index:10;
  display:flex;justify-content:space-between;align-items:center;
  padding:22px 36px 22px 36px;
}
.logo{display:flex;flex-direction:column;gap:5px;cursor:default;text-decoration:none;align-items:center;}
.logo svg{height:38px;width:auto;fill:#fff;display:block}
.logo span{font-size:9.6px;letter-spacing:5px;color:rgba(255,255,255,.38);text-transform:uppercase;text-align:center}
.menu-btn{
  display:flex;align-items:center;gap:14px;font-size:10.8px;letter-spacing:4px;
  color:rgba(255,255,255,.4);text-transform:uppercase;background:none;border:none;
  cursor:pointer;transition:color .3s;
}
.menu-btn:hover{color:#D4FF00}
.hbg{display:flex;flex-direction:column;gap:5px}
.hbg span{width:20px;height:1px;background:currentColor;display:block;transition:all .3s}
.header-contacts{
  display:flex;align-items:center;gap:20px;
}
.header-contacts a{
  display:flex;align-items:center;gap:7px;
  font-size:10px;letter-spacing:2px;color:rgba(255,255,255,.32);
  text-decoration:none;text-transform:uppercase;
  transition:color .2s;
}
.header-contacts a:hover{ color:#D4FF00; }
.header-contacts svg{ width:14px;height:14px;fill:currentColor;flex-shrink:0; }

/* ── SLIDE COUNTER ── */
.counter{
  position:fixed;top:108px;left:12vw;
  z-index:10;display:flex;align-items:center;gap:14px;
  font-size:10.8px;letter-spacing:4px;color:rgba(255,255,255,.3);
  transition:opacity .4s;
}
.counter .cur{color:#D4FF00}
.counter .sep{width:28px;height:1px;background:rgba(255,255,255,.15)}

/* ── CMS loading: скрываем текст слайдера до прихода данных ── */
.cms-pending .slide-panel{ opacity:0; pointer-events:none; }

/* ── SLIDE CONTENT ── */
.slide-panel{
  position:fixed;left:55%;top:32%;
  z-index:10;max-width:520px;
  transition:opacity .35s,transform .35s;
}
.slide-panel.hidden{opacity:0;transform:translateY(18px);pointer-events:none}
.slide-panel.hidden-up{opacity:0;transform:translateY(-18px);pointer-events:none}
.slide-panel.slide-last{max-width:none}
.slide-panel.slide-last .s-title{white-space:nowrap}
.s-tag{display:none}
.s-title{
  font-size:clamp(33.6px,3.8vw,62.4px);font-weight:100;letter-spacing:8px;
  text-transform:uppercase;line-height:1.05;margin-bottom:22px;color:#fff;
}
.s-desc{
  font-size:15.2px;line-height:1.85;color:rgba(255,255,255,.60);
  font-family:'Fira Code',monospace;letter-spacing:.4px;margin-bottom:32px;
  max-width:640px;
}
.btn-enter{
  display:inline-block;padding:13px 34px;
  border:1px solid #D4FF00;font-size:10.8px;
  letter-spacing:5px;text-transform:uppercase;cursor:pointer;
  background:rgba(212,255,0,.08);
  color:#D4FF00;text-decoration:none;
  position:relative;overflow:hidden;
  transition:border-color .4s, color .4s;
}
.btn-enter span{
  position:relative;z-index:1;
}
.btn-enter .btn-accent{
  color:#D4FF00;
}
.btn-enter::before{
  content:'';
  position:absolute;inset:0;
  background:#D4FF00;
  transform:translateX(-101%);
  transition:transform .4s cubic-bezier(0.77,0,0.175,1);
  z-index:0;
}
.btn-enter:hover::before{ transform:translateX(0); }
.btn-enter:hover{ border-color:#D4FF00; color:#090909; }
.btn-enter:hover .btn-accent{ color:#090909; }

/* ── NAV ARROWS ── */
.nav-arr{
  position:fixed;top:50%;z-index:10;
  width:46px;height:46px;border:1px solid rgba(255,255,255,.18);border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;background:rgba(9,9,9,.85);
  color:rgba(255,255,255,.45);font-size:19.2px;
  transition:border-color .3s, color .3s, background .3s, opacity .3s, transform .3s;
}
.nav-arr.prev{
  left:88px;
  animation: arrFloatL 5s linear infinite, arrGlow 3.5s ease-in-out infinite;
}
.nav-arr.next{
  right:88px;
  animation: arrFloatR 5s linear infinite 0.8s, arrGlow 3.5s ease-in-out infinite 0.8s;
}
.nav-arr.off{opacity:.12;pointer-events:none;animation:none;}

/* плавное синусоидальное плавание */
@keyframes arrFloatL {
  0%   { transform:translateY(calc(-50% - 7px)); }
  12%  { transform:translateY(calc(-50% - 5px)); }
  25%  { transform:translateY(calc(-50% + 0px)); }
  37%  { transform:translateY(calc(-50% + 5px)); }
  50%  { transform:translateY(calc(-50% + 7px)); }
  62%  { transform:translateY(calc(-50% + 5px)); }
  75%  { transform:translateY(calc(-50% + 0px)); }
  87%  { transform:translateY(calc(-50% - 5px)); }
  100% { transform:translateY(calc(-50% - 7px)); }
}
@keyframes arrFloatR {
  0%   { transform:translateY(calc(-50% + 7px)); }
  12%  { transform:translateY(calc(-50% + 5px)); }
  25%  { transform:translateY(calc(-50% + 0px)); }
  37%  { transform:translateY(calc(-50% - 5px)); }
  50%  { transform:translateY(calc(-50% - 7px)); }
  62%  { transform:translateY(calc(-50% - 5px)); }
  75%  { transform:translateY(calc(-50% + 0px)); }
  87%  { transform:translateY(calc(-50% + 5px)); }
  100% { transform:translateY(calc(-50% + 7px)); }
}
/* пульсирующее свечение по окружности */
@keyframes arrGlow {
  0%,100% {
    border-color: rgba(212,255,0,.25);
    color: rgba(255,255,255,.45);
  }
  50% {
    border-color: rgba(212,255,0,.80);
    color: #D4FF00;
  }
}

/* ── SCROLL HINT ── */
.scroll-hint{
  position:fixed;left:36px;bottom:80px;z-index:10;
  writing-mode:vertical-lr;transform:rotate(180deg);
  font-size:9.6px;letter-spacing:5px;color:rgba(255,255,255,.2);
  text-transform:uppercase;display:flex;align-items:center;gap:14px;
}
.scroll-hint::before{
  content:'';width:1px;height:36px;background:#D4FF00;opacity:.4;
  animation:pulse 2.2s ease-in-out infinite;
}
@keyframes pulse{0%,100%{opacity:.15;height:20px}50%{opacity:.6;height:36px}}

/* ── FOOTER ── */
.footer{
  position:fixed;bottom:0;left:0;right:0;z-index:10;
  display:flex;justify-content:center;align-items:flex-end;
  padding:18px 36px;
}
.brand{display:flex;flex-direction:column;gap:4px}
.brand svg{height:30px;fill:#D4FF00;display:block}
.brand small{font-size:8.4px;letter-spacing:5px;color:rgba(255,255,255,.22);text-transform:uppercase}
.dots{display:flex;gap:7px;align-items:center}
.dot{width:5px;height:5px;border-radius:50%;background:rgba(255,255,255,.18);cursor:pointer;transition:all .3s}
.dot.on{background:#D4FF00;transform:scale(1.4)}

/* ── MENU OVERLAY ── */
.menu-overlay{
  position:fixed;top:70px;left:0;right:0;bottom:0;z-index:20;
  display:flex;align-items:center;justify-content:flex-end;
  padding-right:72px;pointer-events:none;
  transform:translateX(100%);
  transition:transform 0.55s cubic-bezier(0.77,0,0.175,1);
}
.menu-overlay.open{transform:translateX(0);pointer-events:all}
.menu-bg{
  position:absolute;inset:0;
  background:rgba(9,9,9,.72);
  backdrop-filter:blur(6px);
  z-index:0;
  overflow:hidden;
}

/* scan line — акцентная полоса скользит сверху вниз при открытии */
.menu-bg::before {
  content:'';
  position:absolute;left:0;right:0;
  height:2px;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(212,255,0,0.15) 20%,
    rgba(212,255,0,0.9) 50%,
    rgba(212,255,0,0.15) 80%,
    transparent 100%
  );
  box-shadow: 0 0 12px rgba(212,255,0,0.6), 0 0 32px rgba(212,255,0,0.2);
  top: -2px;
  pointer-events:none;
  z-index:3;
  opacity:0;
}
.menu-overlay.open .menu-bg::before {
  animation: scanReveal 1.4s cubic-bezier(0.4,0,0.2,1) 0.1s forwards;
}


@keyframes scanReveal {
  0%   { top:-2px;  opacity:1; }
  85%  { top:100%;  opacity:1; }
  100% { top:100%;  opacity:0; }
}
.menu-list{position:relative;z-index:2;list-style:none;text-align:right}
.menu-list li{
  margin-bottom:16px;
  overflow:hidden;
}
.menu-list li .scan-inner {
  display:block;
  transform: translateY(100%);
  opacity:0;
  transition: none;
}
.menu-list a{
  font-size:clamp(16.8px,2.4vw,33.6px);letter-spacing:6px;text-transform:uppercase;
  color:rgba(255,255,255,.75);text-decoration:none;font-weight:100;
  transition:color .3s;display:flex;align-items:center;justify-content:flex-end;gap:20px;
}
.menu-list a:hover{color:#D4FF00}
.menu-list .mn{font-size:9.6px;color:#D4FF00;letter-spacing:2px;opacity:.9}

/* ── HOTSPOTS ── */
.hotspots{position:fixed;inset:0;z-index:5;pointer-events:none}
.hotspot{
  position:absolute;transform:translate(-50%,-50%);
  pointer-events:all;cursor:pointer;
}
.hotspot .hd{
  width:7px;height:7px;border-radius:50%;background:#D4FF00;
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2;
}
.hotspot .hr{
  position:absolute;top:50%;left:50%;border-radius:50%;
  border:1px solid rgba(212,255,0,.5);transform:translate(-50%,-50%);
  animation:hr 2.4s ease-out infinite;
}
.hotspot .hr1{width:22px;height:22px}
.hotspot .hr2{width:36px;height:36px;animation-delay:.6s}
@keyframes hr{0%{opacity:.9;transform:translate(-50%,-50%) scale(.7)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.4)}}
.hotspot .hl{
  position:absolute;left:26px;top:50%;transform:translateY(-50%);
  font-size:8.4px;letter-spacing:3px;color:rgba(255,255,255,.45);text-transform:uppercase;
  white-space:nowrap;border-left:1px solid rgba(212,255,0,.3);padding-left:8px;
}

/* ── LOADING ── */
#loader{
  position:fixed;inset:0;z-index:100;background:#090909;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;
}
.l-title{font-size:14.4px;letter-spacing:10px;color:rgba(255,255,255,.25);text-transform:uppercase}
.l-bar-wrap{width:180px;height:1px;background:rgba(255,255,255,.08)}
.l-bar{height:100%;background:#D4FF00;width:0%;transition:width .08s linear}
.l-pct{font-size:9.6px;letter-spacing:4px;color:rgba(255,255,255,.2)}

/* Hide slide UI when card is open */
body.card-open .slide-panel,
body.card-open .counter,
body.card-open .nav-arr,
body.card-open .scroll-hint,
body.card-open .hotspots,
body.card-open .footer,
body.card-open .header {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s, visibility .3s;
}

/* ══════════════════════════════════════════════════════════
   CARD DETAIL — full-screen overlay, scrolls as a viewport.
   Hero is 100vh plain block (no sticky/fixed).
   Right column is transparent — 3D canvas shows through.
   Content section has solid dark background (covers 3D).
══════════════════════════════════════════════════════════ */
#cardDetail {
  position: fixed;
  inset: 0;
  z-index: 300;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 0.78s cubic-bezier(0.77,0,0.175,1);
  will-change: transform;
}
#cardDetail.open { transform: translateY(0); }

/* ── Hero: 100vh, two columns ── */
.cd-hero {
  position: relative;
  height: 100vh;
  display: grid;
  grid-template-columns: 52% 48%;
  align-items: stretch;
}

/* Left column: text */
.cd-hero-l {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 32vh 4vw 0 20vw;
  min-width: 0;
}
@media (min-width: 600px) {
  .cd-hero-l { padding-left: 17vw; }
  #cardDetail.card-4 .cd-hero-l { padding-left: 17vw; }
}

/* Right column: empty — 3D canvas shows through */
.cd-hero-r {
  display: block;
}

/* Close button */
#cdClose {
  position: fixed;
  top: clamp(64px, 6vw, 88px);
  right: clamp(160px, 25vw, 320px);
  width: clamp(44px, 3.5vw, 52px);
  height: clamp(44px, 3.5vw, 52px);
  border-radius: 50%;
  border: 1px solid rgba(212,255,0,.5);
  background: rgba(9,9,9,.92);
  cursor: pointer;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px) rotate(-90deg);
  transition: opacity .4s ease-out, transform .4s ease-out,
              border-color .25s, background .25s;
  will-change: top;
}
body.card-open #cdClose {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) rotate(0deg);
  animation: closeGlow 3.5s ease-in-out infinite;
}
#cdClose::before, #cdClose::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 1px;
  background: #D4FF00;
  top: 50%; left: 50%;
  transform-origin: center;
  transition: transform .3s cubic-bezier(0.77,0,0.175,1), background .25s;
}
#cdClose::before { transform: translate(-50%,-50%) rotate(45deg); }
#cdClose::after  { transform: translate(-50%,-50%) rotate(-45deg); }
@keyframes closeGlow {
  0%,100% {
    border-color: rgba(212,255,0,.25);
    box-shadow: 0 0 8px rgba(212,255,0,.10);
  }
  50% {
    border-color: rgba(212,255,0,.80);
    box-shadow: 0 0 20px rgba(212,255,0,.40);
  }
}

/* Portfolio hotspot button */
#cdPortfolioBtn {
  position: fixed;
  top: calc(clamp(64px, 6vw, 88px) + clamp(44px, 3.5vw, 52px) + 14px);
  right: clamp(160px, 25vw, 320px);
  width: clamp(36px, 3.5vw, 52px);
  height: clamp(36px, 3.5vw, 52px);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(9,9,9,.92);
  cursor: pointer;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .35s ease-out, transform .35s ease-out,
              border-color .25s, background .25s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#cdPortfolioBtn.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
#cdPortfolioBtn:hover {
  border-color: rgba(255,255,255,.45);
  background: rgba(20,20,20,.95);
  animation: pfBtnPulse 1.2s ease-in-out infinite;
}
@keyframes pfBtnPulse {
  0%,100% {
    border-color: rgba(255,255,255,.25);
    box-shadow: 0 0 0 0 rgba(255,255,255,0),
                0 0 8px rgba(255,255,255,.08);
  }
  50% {
    border-color: rgba(255,255,255,.7);
    box-shadow: 0 0 0 4px rgba(255,255,255,.08),
                0 0 18px rgba(255,255,255,.3),
                0 0 36px rgba(255,255,255,.12);
  }
}
.cd-pf-arrow {
  font-size: clamp(14px, 1.4vw, 18px);
  color: rgba(255,255,255,.55);
  line-height: 1;
  transition: color .25s, transform .25s;
}
#cdPortfolioBtn:hover .cd-pf-arrow {
  color: #fff;
  transform: translate(1px,-1px);
}
.cd-pf-label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
#cdPortfolioBtn:hover .cd-pf-label { opacity: 1; }

@media (max-width: 599px) {
  /* Хотспот ↗ — над крестиком закрытия */
  #cdPortfolioBtn { top: calc(10px + clamp(26px, 6.5vw, 30px) + 10px); right: 16px; width: clamp(26px, 6.5vw, 30px); height: clamp(26px, 6.5vw, 30px); }
  .cd-pf-label { display: none; }
}

/* Hero text */
.cd-tag {
  font-size: 9.6px;
  letter-spacing: 5px;
  color: #D4FF00;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.cd-title {
  font-size: clamp(33.6px, 3.8vw, 62.4px);
  font-weight: 100;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.05;
  margin: 0 0 24px;
}
.cd-lead {
  font-size: 16px;
  line-height: 1.85;
  color: rgba(255,255,255,.75);
  font-family: 'Fira Code', monospace;
  letter-spacing: .3px;
  margin: 0 0 36px;
  max-width: 100%;
}

/* Scroll hint */
.cd-scroll-hint {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 8.4px;
  letter-spacing: 5px;
  color: rgba(255,255,255,.25);
  text-transform: uppercase;
}
.cd-scroll-hint::before {
  content: '';
  width: 1px;
  height: 36px;
  background: #D4FF00;
  opacity: .35;
  flex-shrink: 0;
}

/* ── Content: solid bg, reveals as hero scrolls away ── */
.cd-content {
  background: #090909;
  padding: 72px 7vw 140px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.cd-inner { max-width: 1100px; margin: 0 auto; }

/* ── О НАС (card-1) ── */
#cardDetail.card-1 .cd-hero-l {
  padding-top: 32vh;
}

/* ── Архитектура слоёв (card-3) ── */
#cardDetail.card-3 .cd-hero-l {
  padding-top: 32vh;
}

@media (max-width: 599px) {
  #cardDetail.card-1 .cd-hero-l,
  #cardDetail.card-3 .cd-hero-l { padding-top: 50px; }
}

/* ── Точка формы (card-7): title on one line ── */
#cardDetail.card-7 .cd-title {
  white-space: nowrap;
}

/* ── Микропластика (card-4): bring text closer to 3D, centre content ── */
#cardDetail.card-4 .cd-hero-l {
  padding-left: 20vw;
}
#cardDetail.card-4 .cd-inner {
  margin: 0 auto;
}

/* Content sections */
.cd-section {
  padding: 77px 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.cd-section:first-child { border-top: none; padding-top: 0; }

/* ── Specs ── */
.cd-specs {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  align-items: stretch;
  padding: 0;
  border: 1px solid rgba(255,255,255,.07);
}
.cd-spec-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 40px;
  border-right: 1px solid rgba(255,255,255,.07);
  position: relative;
  flex: 1;
  min-width: 140px;
}
.cd-spec-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: #D4FF00;
}
.cd-spec-item:last-child { border-right: none; }
.cd-spec-val {
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 52px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -.02em;
}
.cd-spec-val span { color: #D4FF00; }
.cd-spec-val .unit { font-size: .62em; }
.cd-spec-key {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
}

/* ── Process steps ── */
.cd-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: transparent;
  gap: 0;
}
.cd-step {
  position: relative;
  padding: 36px 88px 36px 28px;
  background: #090909;
  border-bottom: 1px solid rgba(255,255,255,.08);
  border-left: 1px solid rgba(255,255,255,.08);
  transition: background .25s, border-color .25s;
}
.cd-step:hover {
  background: #0c0c0c;
  border-color: rgba(212,255,0,.2);
}
/* квадрат с номером — правый верхний угол */
.cd-step-num {
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 18px;
  letter-spacing: 1px;
  color: #D4FF00;
  border: 1px solid rgba(212,255,0,.35);
  transition: background .25s, border-color .25s;
  user-select: none;
}
.cd-step:hover .cd-step-num {
  background: rgba(212,255,0,.06);
  border-color: #D4FF00;
}
.cd-step-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cd-step-title {
  font-size: 13px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
}
.cd-step-desc {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255,255,255,.45);
}
@media (max-width: 599px) {
  .cd-steps { grid-template-columns: 1fr; }
  .cd-step:last-child:nth-child(odd) { grid-column: 1; }
  .cd-step { padding: clamp(20px, 5vw, 28px) 72px clamp(20px, 5vw, 28px) clamp(16px, 4vw, 20px); }
  .cd-step-num { width: 52px; height: 52px; font-size: 15px; }
  .cd-step-desc { font-size: clamp(12px, 3vw, 14px); }
  .cd-step-title { font-size: clamp(11px, 2.8vw, 13px); }
}

/* ── Materials ── */
.cd-materials {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cd-mat-group {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.cd-mat-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #D4FF00;
  opacity: .55;
  white-space: nowrap;
  flex-shrink: 0;
  width: 80px;
}
.cd-mat-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cd-mat-item {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  letter-spacing: .06em;
  color: rgba(255,255,255,.5);
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,.08);
  transition: color .22s, border-color .22s, background .22s;
  cursor: default;
}
.cd-mat-item:hover {
  color: #D4FF00;
  border-color: rgba(212,255,0,.35);
  background: rgba(212,255,0,.04);
}

/* ── SLA resin rows ── */
.cd-mat-resin-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}
.cd-mat-resin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: relative;
  cursor: default;
  transition: background .2s;
}
.cd-mat-resin-row::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 2px;
  height: 60%;
  background: #D4FF00;
  transition: transform .2s;
}
.cd-mat-resin-row:hover::before { transform: translateY(-50%) scaleY(1); }
.cd-mat-resin-row:hover .cd-mat-resin-name { color: #D4FF00; }
.cd-mat-resin-row:hover .cd-mat-resin-tag { border-color: rgba(212,255,0,.4); color: rgba(212,255,0,.7); }
.cd-mat-resin-idx {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: rgba(212,255,0,.25);
  text-align: right;
}
.cd-mat-resin-name {
  font-family: 'Fira Code', monospace;
  font-size: 15px;
  letter-spacing: .06em;
  color: rgba(255,255,255,.8);
  transition: color .2s;
}
.cd-mat-resin-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  border: 1px solid rgba(255,255,255,.12);
  padding: 4px 8px;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}

/* ── Periodic Material Table ── */
#cardDetail.card-1 .cd-materials,
#cardDetail.card-3 .cd-materials,
#cardDetail.card-4 .cd-materials,
#cardDetail.card-5 .cd-materials {
  display: block;
  background: none;
  gap: 0;
}
.mat-table-wrap { width: 100%; }
.mat-table-row-auto { justify-content: flex-start; }
.mat-table-row-auto .mat-cell { flex: none; width: max-content; min-width: 72px; }
.mat-table-row-auto.mat-row-sm .mat-cell { height: 55px; padding: 5px 7px; min-width: 50px; }
.mat-table-row-auto.mat-row-sm .mat-num  { font-size: 7px; }
.mat-table-row-auto.mat-row-sm .mat-sym  { font-size: 15px; }
.mat-table-row-auto.mat-row-sm .mat-temp { font-size: 7px; }
.mat-table-title {
  font-size: 12px; letter-spacing: 5px; color: #D4FF00;
  text-transform: uppercase; margin-bottom: 24px;
}
.mat-row-label {
  font-size: 10px; letter-spacing: 3px; color: rgba(255,255,255,.6);
  text-transform: uppercase; margin-bottom: 4px; margin-top: 10px;
  font-family: 'Fira Code', monospace;
}
.mat-row-label:first-child { margin-top: 0; }
.mat-table-grid { display: flex; flex-direction: column; gap: 6px; }
.mat-table-row  { display: flex; gap: 6px; }
.mat-cell {
  flex: 1;
  height: 78px;
  border: 1px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: space-between;
  padding: 7px 9px;
  position: relative;
  cursor: default;
  transition: border-color .2s, background .2s;
  min-width: 0;
}
.mat-cell::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--mc, #fff);
  opacity: 0;
  transition: opacity .2s;
}
.mat-cell:hover { border-color: var(--mc, #fff); }
.mat-cell:hover::before { opacity: .07; }
.mat-cell-empty {
  flex: 1;
  border: 1px solid rgba(255,255,255,.03);
  background: transparent;
  cursor: default;
}
.mat-num {
  font-size: 9px; color: rgba(255,255,255,.3);
  font-family: 'Fira Code', monospace;
  position: relative; z-index: 1;
}
.mat-sym {
  font-size: 22px; font-weight: 600;
  color: var(--mc, #fff);
  font-family: 'Fira Code', monospace;
  line-height: 1;
  position: relative; z-index: 1;
}
.mat-temp {
  font-size: 8px; color: rgba(255,255,255,.35);
  font-family: 'Fira Code', monospace;
  position: relative; z-index: 1;
  white-space: nowrap;
}

/* Tooltip */
.mat-tooltip {
  position: fixed; z-index: 9999;
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,.15);
  padding: 16px 18px;
  width: 220px;
  pointer-events: none;
  display: none;
}
.mat-tt-sym  { font-size: 28px; font-weight: 700; font-family: 'Fira Code', monospace; line-height: 1; margin-bottom: 4px; }
.mat-tt-name { font-size: 9px; letter-spacing: 1px; color: rgba(255,255,255,.4); margin-bottom: 10px; text-transform: uppercase; }
.mat-tt-temp { font-size: 11px; color: rgba(255,255,255,.6); font-family: 'Fira Code', monospace; margin-bottom: 12px; }
.mat-tt-props { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.mat-tt-props span {
  font-size: 8px; letter-spacing: 1px; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.15); padding: 3px 7px;
  color: rgba(255,255,255,.5);
}
.mat-tt-use { font-size: 11px; color: rgba(255,255,255,.65); line-height: 1.5; }

/* ── Tags ── */
.cd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-tag-chip {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  border: 1px solid rgba(255,255,255,.1);
  padding: 7px 14px;
  transition: border-color .25s, color .25s;
  cursor: default;
}
.cd-tag-chip:hover { border-color: rgba(212,255,0,.5); color: #D4FF00; }

/* ── Interactive zone ── */
.cd-interactive { }
.interactive-body {
  min-height: 260px;
  border: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* ── Interactive: Stats counter wall ── */
.id-wall { display:flex; gap:40px; padding:40px; flex-wrap:wrap; justify-content:center }
.id-stat-card { text-align:center; min-width:100px }
.id-stat-num { font-size:43.2px; font-weight:900; color:#D4FF00; font-family:'Share Tech Mono','Courier New',monospace; letter-spacing:-.02em }
.id-stat-key { font-size:8.4px; letter-spacing:3px; color:rgba(255,255,255,.3); text-transform:uppercase; margin-top:6px }

/* ── Interactive: Iteration cycle ── */
.id-cycle { display:flex; align-items:center; gap:48px; padding:40px }
.id-cycle-ring { position:relative; width:120px; height:120px }
.id-cycle-ring svg { width:100%; height:100% }
.id-arc { transition:stroke-dashoffset 1s ease }
.id-cycle-lbl { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:8.4px; letter-spacing:3px; color:rgba(255,255,255,.25); text-transform:uppercase }
.id-cycle-steps { display:grid; gap:12px }
.id-cstep { font-size:9.6px; letter-spacing:4px; text-transform:uppercase; color:rgba(255,255,255,.3); padding:8px 16px; border:1px solid rgba(255,255,255,.06); transition:all .3s }
.id-cstep:hover { border-color:#D4FF00; color:#D4FF00 }
@media(max-width:600px){.id-cycle{flex-direction:column;gap:24px}}

/* ── Interactive: 3D CSS cube ── */
.id-cube-wrap { perspective:600px; padding:40px }
.id-cube { width:120px;height:120px;position:relative;transform-style:preserve-3d;transition:transform .05s;margin:0 auto }
.id-cube-face { position:absolute;width:120px;height:120px;display:flex;align-items:center;justify-content:center;font-size:16.8px;letter-spacing:4px;text-transform:uppercase;color:#fff;background:rgba(212,255,0,.08);border:1px solid rgba(212,255,0,.2);backface-visibility:hidden }
.id-cube-face.front { transform:translateZ(60px) }
.id-cube-face.back { transform:rotateY(180deg) translateZ(60px) }
.id-cube-face.right { transform:rotateY(90deg) translateZ(60px) }
.id-cube-face.left { transform:rotateY(-90deg) translateZ(60px) }
.id-cube-face.top { transform:rotateX(90deg) translateZ(60px) }
.id-cube-face.bottom { transform:rotateX(-90deg) translateZ(60px) }

/* ── Interactive: Layers ── */
.id-layers { display:flex; flex-direction:column; align-items:center; gap:16px; padding:40px }
.id-layers-stack { height:180px;width:80px;display:flex;flex-direction:column;align-items:center;overflow:hidden;transition:transform .3s ease;border:1px solid rgba(255,255,255,.06);padding:4px }
.id-layer { width:60px;background:#D4FF00;opacity:.3;margin:1px 0;border-radius:1px;transition:opacity .3s }
.id-layer:nth-child(odd) { opacity:.15 }
.id-layers-info { font-size:8.4px;letter-spacing:4px;color:rgba(255,255,255,.2);text-transform:uppercase }

/* ── Interactive: Resolution bars ── */
.id-res { padding:40px;width:100%;max-width:400px;margin:0 auto }
.id-res-bars { display:flex;flex-direction:column;gap:20px }
.id-res-row { display:flex;align-items:center;gap:16px }
.id-res-row span { font-size:8.4px;letter-spacing:3px;color:rgba(255,255,255,.3);text-transform:uppercase;min-width:100px;flex-shrink:0 }
.id-res-bar { height:12px;background:rgba(255,255,255,.15);transition:width 1s ease;border-radius:2px }
.id-res-note { margin-top:20px;font-size:9.6px;letter-spacing:3px;color:rgba(255,255,255,.15);text-transform:uppercase;text-align:center }

/* ── Interactive: Scale ── */
.id-scale { padding:40px;text-align:center }
.id-scale-objects { display:flex;align-items:flex-end;justify-content:center;gap:32px;margin-bottom:20px }
.id-scale-item { display:flex;align-items:center;justify-content:center;border:1px solid rgba(255,255,255,.1);background:rgba(212,255,0,.04);transition:all .3s }
.id-scale-item span { font-size:7.2px;letter-spacing:2px;color:rgba(255,255,255,.25);text-transform:uppercase;text-align:center;line-height:1.5 }
.id-scale-item.giga { border-color:rgba(212,255,0,.25);background:rgba(212,255,0,.08) }
.id-scale-item.giga span { color:#D4FF00 }
.id-scale-vs { font-size:12px;letter-spacing:6px;color:rgba(255,255,255,.12);padding-bottom:20px }
.id-scale-note { font-size:8.4px;letter-spacing:4px;color:rgba(255,255,255,.15);text-transform:uppercase }

/* ── Interactive: Metal selector ── */
.id-metals { display:flex;gap:24px;padding:40px;flex-wrap:wrap;justify-content:center }
.id-metal-swatch { text-align:center;cursor:pointer;transition:transform .3s;padding:20px }
.id-metal-swatch:hover { transform:translateY(-4px) }
.id-metal-swatch.active { transform:translateY(-4px) }
.id-metal-swatch span { display:block;font-size:8.4px;letter-spacing:3px;color:rgba(255,255,255,.3);text-transform:uppercase;margin-top:10px }
.id-metal-swatch.active span { color:#D4FF00 }
.id-metal-preview { width:60px;height:60px;border-radius:50%;margin:0 auto;border:1px solid rgba(255,255,255,.1);transition:box-shadow .3s }
.id-metal-swatch.active .id-metal-preview { box-shadow:0 0 20px var(--clr) }

/* ── Interactive: Before/After ── */
.id-compare { display:flex;width:100%;height:200px;cursor:ew-resize;user-select:none }
.id-compare > div { display:flex;align-items:center;justify-content:center;transition:width .05s;overflow:hidden }
.id-compare > div span { font-size:12px;letter-spacing:8px;text-transform:uppercase }
.id-compare-before { border-right:2px solid #D4FF00 }
.id-compare-before span { color:rgba(255,255,255,.15) }
.id-compare-after span { color:#D4FF00 }

/* ── About block ── */
.cd-about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 80px;
  align-items: start;
}
/* Column wrapper — each fills one grid cell */
.cd-about-col { display: flex; flex-direction: column; gap: 16px; }

/* Section label above a group */
.cd-about-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #D4FF00;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(212,255,0,.2);
}
/* Full-width items span both columns */
.cd-about-full { grid-column: 1 / -1; }
.cd-about-p {
  font-family: 'Fira Code', monospace;
  font-size: 17px;
  line-height: 1.85;
  color: rgba(255,255,255,.8);
  letter-spacing: .3px;
}
.cd-about-services {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 0;
}
.cd-about-services li {
  font-family: 'Fira Code', monospace;
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.cd-about-services li:last-child { border-bottom: none; }
.cd-about-services li::before {
  content: '—';
  color: #D4FF00;
  margin-right: 14px;
  flex-shrink: 0;
}
.cd-about-sname {
  color: #fff;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 12px;
  min-width: 160px;
}
.cd-about-sdesc {
  color: rgba(255,255,255,.5);
  margin-left: 10px;
  font-size: 14px;
}
.cd-about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 0;
  counter-reset: list-counter;
}
.cd-about-list li {
  font-family: 'Fira Code', monospace;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background .2s, color .2s, padding-left .25s;
  counter-increment: list-counter;
}
.cd-about-list li:first-child { border-top: 1px solid rgba(255,255,255,.05); }
.cd-about-list li:hover {
  background: rgba(212,255,0,.04);
  color: #fff;
  padding-left: 22px;
}
.cd-about-list li::before {
  content: counter(list-counter, decimal-leading-zero);
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: #D4FF00;
  margin-right: 18px;
  flex-shrink: 0;
  letter-spacing: 1px;
  opacity: .7;
}
.cd-about-workflow {
  grid-column: 1 / -1;
  padding-top: 48px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.cd-about-workflow-title {
  font-size: 11px;
  letter-spacing: 5px;
  color: #D4FF00;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.cd-about-workflow-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
  padding: 0;
}
.cd-about-workflow-steps li {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  font-family: 'Fira Code', monospace;
  font-size: 16px;
  color: rgba(255,255,255,.7);
  padding: 18px 24px 18px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: color .2s;
}
.cd-about-workflow-steps li:hover { color: #fff; }
.cd-about-workflow-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: #D4FF00;
  letter-spacing: 2px;
  flex-shrink: 0;
  width: 28px;
  padding-top: 2px;
}

.cd-about-table {
  width: 100%;
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.cd-about-table-head {
  display: grid;
  grid-template-columns: 1fr 180px;
  padding: 10px 16px;
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #D4FF00;
  border-bottom: 1px solid rgba(212,255,0,.2);
}
.cd-about-table-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background .2s;
}
.cd-about-table-row:hover { background: rgba(212,255,0,.03); }
.cd-about-table-need {
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  color: rgba(255,255,255,.7);
  line-height: 1.5;
  padding-right: 24px;
}
.cd-about-table-mat {
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 12px;
  color: #D4FF00;
  letter-spacing: 1px;
  align-self: center;
}

.cd-about-highlight {
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: 18px;
  color: rgba(212,255,0,.9);
  letter-spacing: .5px;
  line-height: 1.6;
  border-left: 3px solid #D4FF00;
  padding: 20px 28px;
  margin-top: 8px;
  background: rgba(212,255,0,.04);
}

/* ── Services tile grid (О НАС) ── */
.cd-tiles-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  color: #D4FF00;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-top: 8px;
}

.cd-steps-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  color: #D4FF00;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-top: 8px;
}

.cd-capabilities-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  color: #D4FF00;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-top: 8px;
}

.cd-capabilities-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 32px;
}

.cd-capabilities-list li {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: #fff;
  padding-left: 14px;
  position: relative;
}

.cd-capabilities-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #D4FF00;
}

@media (max-width: 599px) {
  .cd-capabilities-list {
    grid-template-columns: 1fr;
  }
}

.cd-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  grid-column: 1 / -1;
  background: transparent;
}
.cd-tile {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 24px 24px 20px;
  background: transparent;
  border-right: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative;
  cursor: default;
  overflow: visible;
  transition: background .35s;
}
.cd-tile:nth-child(3n) { border-right: none; }
.cd-tile:nth-last-child(-n+3) { border-bottom: none; }

.cd-tile::before,
.cd-tile::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: #D4FF00;
  border-style: solid;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.cd-tile::before {
  top: 6px; left: 6px;
  border-width: 1px 0 0 1px;
  transform: translate(-4px, -4px);
}
.cd-tile::after {
  bottom: 6px; right: 6px;
  border-width: 0 1px 1px 0;
  transform: translate(4px, 4px);
}
.cd-tile:hover::before,
.cd-tile:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

.cd-tile-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: #D4FF00;
  opacity: .5;
  margin-bottom: 14px;
  transition: opacity .3s;
}
.cd-tile:hover .cd-tile-num {
  opacity: 1;
}

.cd-tile-name {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  margin-bottom: 12px;
  transition: color .3s;
}
.cd-tile:hover .cd-tile-name {
  color: #fff;
}

.cd-tile-keys {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(255,255,255,.4);
  margin-bottom: 14px;
  transition: color .3s;
}
.cd-tile:hover .cd-tile-keys {
  color: rgba(255,255,255,.65);
}

.cd-tile-line {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: rgba(255,255,255,.22);
  line-height: 1.5;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: auto;
  transition: color .3s, border-color .3s;
}
.cd-tile:hover .cd-tile-line {
  color: rgba(212,255,0,.55);
  border-color: rgba(212,255,0,.15);
}

/* ── CTA section ── */
.cd-cta-section {
  text-align: center;
  padding: 80px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}
.cd-cta-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
}
.cd-cta-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Section label ── */
.cd-section-label {
  font-size: 11px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-bottom: 16px;
  font-family: 'Share Tech Mono', monospace;
}

/* ── Contacts section in card ── */
.cd-contacts-section {
  border-top: 1px solid #1a1e25;
  padding: 48px 0 16px;
}
.cd-contacts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255,255,255,.05);
  gap: 1px;
}
.cd-contact-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 24px;
  background: #090909;
  border-left: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: border-color .25s, background .25s;
}
.cd-contact-item:hover {
  background: #0c0c0c;
  border-color: rgba(212,255,0,.2);
}
.cd-contact-label {
  font-size: 8px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,.22);
}
.cd-contact-value {
  font-size: 13px;
  letter-spacing: 2px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s;
}
.cd-contact-value:hover { color: #D4FF00; }

@media (max-width: 599px) {
  .cd-contacts { grid-template-columns: repeat(2, 1fr); }
  .cd-contact-item { padding: 14px 12px; }
  .cd-contact-value { font-size: 11px; letter-spacing: 1px; word-break: break-all; }
  .cd-contact-label { font-size: 7px; letter-spacing: 2px; }
}

/* ── Secondary button (calc) ── */
.btn-secondary {
  opacity: .7;
  border-color: rgba(255,255,255,.25);
}
.btn-secondary:hover { opacity: 1; border-color: rgba(212,255,0,.6); }
.btn-secondary:hover span { color: #090909; }
.btn-secondary:hover .btn-accent { color: #090909; }

/* ══════════════════════════════════════════════════════════
   CALCULATOR
══════════════════════════════════════════════════════════ */
.calc-wrap {
  display: flex;
  flex-direction: column;
  gap: 48px;
  width: 100%;
  padding: 8px 0 32px;
}
.calc-instruction {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,.4);
  letter-spacing: .06em;
  margin-bottom: -32px;
}
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.calc-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.calc-label {
  font-size: 9px;
  letter-spacing: 5px;
  color: #D4FF00;
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(212,255,0,.2);
}
.calc-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.calc-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.65);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 2px;
  padding: 9px 18px;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.calc-btn:hover {
  border-color: rgba(212,255,0,.5);
  color: #fff;
}
.calc-btn.active {
  border-color: #D4FF00;
  color: #D4FF00;
  background: rgba(212,255,0,.07);
}
.calc-btn-sub {
  font-size: 9px;
  opacity: .55;
  letter-spacing: 1px;
}
.calc-btn-individual {
  border-style: dashed;
  border-color: rgba(255,255,255,.12);
}
.calc-dims {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.calc-dim-field {
  position: relative;
  flex: 1;
  min-width: 80px;
}
.calc-input {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 2px;
  padding: 10px 32px 10px 14px;
  transition: border-color .2s;
  -moz-appearance: textfield;
}
.calc-input::-webkit-inner-spin-button,
.calc-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.calc-input:focus {
  outline: none;
  border-color: rgba(212,255,0,.6);
}
.calc-input-error { border-color: rgba(255,80,80,.8) !important; }
.calc-input-error:focus { border-color: rgba(255,80,80,1) !important; }
.calc-dim-axis {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(212,255,0,.6);
}
.calc-qty {
  display: flex;
  align-items: center;
  gap: 0;
}
.calc-qty-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.65);
  font-family: inherit;
  font-size: 18px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calc-qty-btn:hover { border-color: #D4FF00; color: #D4FF00; }
.calc-qty-val {
  font-size: 14px;
  letter-spacing: 3px;
  color: #fff;
  width: 52px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.18);
  border-bottom: 1px solid rgba(255,255,255,.18);
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calc-result {
  border: 1px solid rgba(212,255,0,.2);
  background: transparent;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}
.calc-result-label {
  font-size: 9px;
  letter-spacing: 5px;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
}
.calc-result-price {
  font-size: 28px;
  letter-spacing: 3px;
  color: #fff;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.calc-price-from { font-size: 13px; color: rgba(255,255,255,.45); }
.calc-price-cur  { font-size: 16px; color: rgba(212,255,0,.8); }
.calc-price-sep  { color: rgba(255,255,255,.25); font-size: 18px; }
.calc-individual { font-size: 14px; color: rgba(212,255,0,.7); letter-spacing: 2px; }
.calc-result-note {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.3);
  line-height: 1.7;
}
.calc-result-weight {
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(212,255,0,.6);
}

/* ── Order form ── */
.calc-order-form {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.calc-order-title {
  font-size: 10px;
  letter-spacing: 5px;
  color: rgba(255,255,255,.35);
  margin-bottom: 20px;
}
.calc-order-fields {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.calc-order-fields .calc-dim-field { min-width: 160px; }
.calc-submit-btn {
  width: 100%;
  padding: 16px;
  background: transparent;
  border: 1px solid rgba(212,255,0,.5);
  color: #D4FF00;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 4px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.calc-submit-btn:hover:not(:disabled) {
  background: #D4FF00;
  color: #090909;
}
.calc-submit-btn:disabled {
  opacity: .5;
  cursor: default;
}
.calc-submit-status {
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 1px;
  min-height: 18px;
}
.calc-submit-status.success { color: #D4FF00; }
.calc-submit-status.error   { color: #ff4466; }

/* Tabs */
.calc-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 36px;
}
.calc-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,.35);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 3px;
  padding: 12px 24px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  text-transform: uppercase;
  margin-bottom: -1px;
}
.calc-tab:hover { color: rgba(255,255,255,.7); }
.calc-tab.active {
  color: #D4FF00;
  border-bottom-color: #D4FF00;
}

/* Upload zone */
.calc-upload-zone {
  border: 1px dashed rgba(255,255,255,.2);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.calc-upload-zone:hover,
.calc-upload-zone.drag-over {
  border-color: rgba(212,255,0,.5);
  background: rgba(212,255,0,.04);
}
.calc-upload-zone.calc-upload-done {
  border-color: rgba(212,255,0,.4);
  border-style: solid;
}
.calc-upload-icon { color: rgba(255,255,255,.3); }
.calc-upload-zone:hover .calc-upload-icon,
.calc-upload-zone.drag-over .calc-upload-icon { color: rgba(212,255,0,.7); }
.calc-upload-text {
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(255,255,255,.5);
  text-align: center;
}
.calc-upload-sub {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.25);
}
.calc-stl-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(212,255,0,.06);
  border: 1px solid rgba(212,255,0,.2);
  margin-top: 4px;
}
.calc-stl-name {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.6);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calc-stl-weight {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #D4FF00;
  white-space: nowrap;
}
.calc-stl-reset {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.3);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  transition: color .2s;
}
.calc-stl-reset:hover { color: #fff; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — ADAPTIVE LAYOUT
   1200px: wide tablets / small laptops
   1024px: tablets landscape
   600px:  tablets portrait / large phones (≥600px = desktop layout)
   480px:  phones
══════════════════════════════════════════════════════════ */

/* ── 1200px ── */
@media (max-width: 1200px) {
  /* Slide content — чуть левее, больше ширины */
  .slide-panel { left: 50%; max-width: 460px; }
  .counter     { left: 50%; }

  /* Стрелки — ближе к краям */
  .nav-arr.prev { left: 56px; }
  .nav-arr.next { right: 56px; }

  /* Виньетки — уже */
  .vig-l, .vig-r { width: 140px; }

  /* #cdClose — адаптируется через clamp() в базовых стилях */
}

/* ── 1024px ── */
@media (max-width: 1024px) {
  .slide-panel { left: 46%; max-width: 400px; top: 30%; }
  .counter     { left: 46%; }

  /* Card hero — чуть шире левая колонка */
  .cd-hero { grid-template-columns: 50% 50%; }
  .cd-hero-l { padding-left: 7vw; }

  /* #cdClose — адаптируется через clamp() */

  /* Виньетки боковые — совсем узкие */
  .vig-l, .vig-r { width: 80px; }
}

/* ── 430–599px — крупные телефоны (iPhone Plus/Pro Max, Android XL) ── */
@media (min-width: 430px) and (max-width: 599px) {
  .slide-panel {
    left: 0; right: 0; top: auto; bottom: 50px;
    max-width: none;
    padding: 0 28px;
  }
  .counter { display: none; }
  .vig-l, .vig-r { display: none; }
  .nav-arr.prev { left: 16px; }
  .nav-arr.next { right: 16px; }
}

/* ── 600px ── */
@media (max-width: 599px) {

  /* INTRO — лого меньше */
  #introLogoSvg { width: 280px; height: 280px; }
  #introHint    { font-size: 11px; letter-spacing: 5px; margin-top: 32px; }

  /* Хедер — меньше отступы */
  .header { padding: clamp(12px, 2vw, 16px) clamp(16px, 4vw, 20px); }
  .logo   { margin-left: 0; }
  .logo svg { height: clamp(20px, 4.9vw, 22px); }
  .menu-btn { font-size: clamp(9px, 2.3vw, 10px); letter-spacing: clamp(2px, .7vw, 3px); gap: 10px; }
  .logo span { font-size: clamp(8px, 2vw, 9.6px); }
  .header-contacts { gap: clamp(10px, 2.5vw, 14px); }
  .header-contacts svg { width: clamp(14px, 3.5vw, 16px); height: clamp(14px, 3.5vw, 16px); }

  /* Скрываем боковые виньетки и хотспоты на мобиле */
  .vig-l, .vig-r { display: none; }
  .hotspots { display: none; }

  /* Слайд — занимает всю ширину снизу */
  .slide-panel {
    left: 0; right: 0; top: auto; bottom: 50px;
    max-width: none;
    padding: 0 24px;
  }
  .counter { display: none; }
  .s-tag {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 4px;
    color: #D4FF00;
    opacity: .6;
    margin-bottom: 14px;
  }

  /* Заголовок слайда */
  .s-title { font-size: clamp(22px, 7.5vw, 42px); letter-spacing: clamp(3px, 1.2vw, 5px); margin-bottom: 14px; }
  .s-desc  { font-size: clamp(11px, 2.8vw, 13px); line-height: 1.7; margin-bottom: 20px; max-width: 100%; }
  .btn-enter { font-size: clamp(9px, 2.3vw, 11px); letter-spacing: clamp(2px, .7vw, 4px); padding: 11px 24px; }

  /* Стрелки — меньше и ближе к центру */
  .nav-arr { width: clamp(26px, 6.5vw, 30px); height: clamp(26px, 6.5vw, 30px); font-size: clamp(10px, 2.5vw, 12px); top: 42%; }
  .nav-arr.prev { left: clamp(10px, 2.5vw, 16px); }
  .nav-arr.next { right: clamp(10px, 2.5vw, 16px); }

  /* Scroll hint — прячем на мобиле */
  .scroll-hint { display: none; }
  .cd-scroll-hint { display: none; }

  /* Меню */
  .menu-overlay { padding-right: clamp(16px, 4vw, 24px); top: 60px; }
  .menu-list a  { font-size: clamp(14px, 5vw, 24px); letter-spacing: clamp(2px, 1vw, 4px); }

  /* Кнопка закрытия — прижата к верху на мобиле, меньше */
  #cdClose { top: 10px; right: 16px; width: clamp(26px, 6.5vw, 30px); height: clamp(26px, 6.5vw, 30px); }

  /* Card hero — одна колонка */
  .cd-hero { height: auto; min-height: 100vh; grid-template-columns: 1fr; }
  .cd-hero-r { display: none; }
  .cd-hero-l {
    padding: 50px clamp(16px, 4vw, 24px) 40px;
  }

  .cd-title  { font-size: clamp(22px, 7.5vw, 42px); letter-spacing: clamp(3px, 1.2vw, 5px); }
  .cd-lead   { font-size: clamp(12px, 3vw, 14px); max-width: 100%; }

  /* Card content — симметричные отступы */
  .cd-content { padding: 48px clamp(16px, 4vw, 24px) 100px clamp(16px, 4vw, 24px); }

  /* About grid — одна колонка */
  .cd-about { grid-template-columns: 1fr; gap: 32px; }
  .cd-about-full { grid-column: 1; }
  .cd-about-workflow-steps { grid-template-columns: 1fr; }

  /* Steps — одна колонка */
  .cd-steps    { grid-template-columns: 1fr; }
  .cd-materials{ grid-template-columns: 1fr; }

  /* Specs — wrap */
  .cd-spec-item { padding: 20px 20px; }
  .cd-spec-val  { font-size: 38px; }

  /* Periodic table — уменьшаем ячейки */
  .mat-cell { height: 58px; padding: 5px 6px; }
  .mat-sym  { font-size: 16px; }

  /* Table columns */
  .cd-about-table-head,
  .cd-about-table-row { grid-template-columns: 1fr 120px; }

  /* Tiles — 2 колонки на средних экранах */
  .cd-tiles { grid-template-columns: repeat(2, 1fr); }

  /* Interactive */
  .id-wall  { gap: 20px; padding: 24px; }
  .id-cycle { flex-direction: column; gap: 20px; padding: 24px; }
  .id-metals{ gap: 12px; padding: 24px; }

  /* CTA кнопки — колонкой, одинаковая ширина */
  .cd-cta-buttons { flex-direction: column; align-items: stretch; gap: 10px; }
  .cd-cta-buttons .btn-enter { text-align: center; }

  /* Calculator card */
  #cardDetail.card-7 .cd-title { white-space: normal; }

  /* Footer */
  .footer { padding: 14px 24px; }

  /* card-4 hero */
  #cardDetail.card-4 .cd-hero-l { padding-left: clamp(16px, 4vw, 24px); }

}

/* ── 480px — только layout, не типографика ── */
@media (max-width: 480px) {

  /* Intro */
  #introLogoSvg { width: 220px; height: 220px; }

  /* Header — скрываем подписи иконок */
  .logo span { display: none; }
  .header-contacts a span { display: none; }

  /* Slide */
  .slide-panel { bottom: 50px; }

  /* Periodic table — переводим на grid, 3 колонки, квадратные ячейки */
  .mat-table-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .mat-cell { height: auto; aspect-ratio: 1.4 / 1; flex: none; width: auto; min-width: 0; }
  .mat-temp { display: none; }
  .mat-table-wrap { width: 100%; transform: none; margin-bottom: 0; }

  /* About table — одна колонка */
  .cd-about-table-head,
  .cd-about-table-row { grid-template-columns: 1fr; gap: 4px; }
  .cd-about-table-head { display: none; }

  /* Tiles — 1 колонка */
  .cd-tiles { grid-template-columns: 1fr; }

  /* Specs — stack */
  .cd-specs { flex-direction: column; }
  .cd-spec-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.07); }
  .cd-spec-item:last-child { border-bottom: none; }

  /* Calculator dims */
  .calc-dims { flex-direction: column; }
  .calc-dim-field { min-width: unset; }
  .calc-order-fields { flex-direction: column; }
  .calc-order-fields .calc-dim-field { min-width: unset; }
}

/* Divider */
.calc-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(255,255,255,.2);
  font-size: 9px;
  letter-spacing: 4px;
}
.calc-divider::before,
.calc-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.1);
}

/* ══════════════════════════════════════════════════════════
   INTRO SCREEN
══════════════════════════════════════════════════════════ */
#intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 40px;
  pointer-events: all;
  background: #090909;
}
#introCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#introLogo {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, filter;
}
#introSvg {
  width: 140px;
  height: 140px;
  fill: #D4FF00;
  display: block;
  transition: none;
  will-change: transform, filter;
}
#introHint {
  font-size: 9.6px;
  letter-spacing: 6px;
  color: #D4FF00;
  text-shadow: 0 0 12px rgba(212, 255, 0, 0.35);
  text-transform: uppercase;
  animation: introHintPulse 3.2s ease-in-out infinite;
  position: relative;
  opacity: 0;
  animation-delay: 1.2s;
  animation-fill-mode: forwards;
}
@keyframes introHintPulse {
  0%        { opacity: 0; }
  15%       { opacity: .85; }
  50%       { opacity: .55; }
  85%       { opacity: .85; }
  100%      { opacity: .55; }
}
#intro.dissolving {
  pointer-events: none;
}
#intro.gone {
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   PORTFOLIO GRID
   ═══════════════════════════════════════════════════════════ */
.pf-wrap {
  width: 100%;
  padding: 0 0 40px;
}

.pf-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
}

.pf-title {
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a97a8;
}

.pf-count {
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: #D4FF00;
  letter-spacing: 0.12em;
}

/* ═══════════════════════════════════════════════════════════
   CONTACT MODAL
   ═══════════════════════════════════════════════════════════ */
/* ── Contact Modal — Blueprint Grid style ── */
.cmodal-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(4,5,8,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.cmodal-overlay.open { opacity: 1; pointer-events: all; }

.cmodal-box {
  position: relative;
  width: min(580px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  background: #06080b;
  border: 1px solid rgba(212,255,0,.20);
  transform: translateY(20px) scale(.98);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  font-family: 'Fira Code', monospace;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,255,0,.25) transparent;
}
.cmodal-box::-webkit-scrollbar { width: 4px; }
.cmodal-box::-webkit-scrollbar-track { background: transparent; }
.cmodal-box::-webkit-scrollbar-thumb {
  background: rgba(212,255,0,.25);
  border-radius: 2px;
}
.cmodal-box::-webkit-scrollbar-thumb:hover { background: rgba(212,255,0,.5); }
.cmodal-overlay.open .cmodal-box { transform: translateY(0) scale(1); }

/* engineering grid background */
.cmodal-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212,255,0,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,255,0,.04) 1px, transparent 1px),
    linear-gradient(rgba(212,255,0,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,255,0,.02) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px, 12px 12px, 12px 12px;
  pointer-events: none;
  z-index: 0;
}

/* corner marks */
.cmodal-box::before,
.cmodal-box::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  z-index: 2;
  pointer-events: none;
}
.cmodal-box::before {
  top: -1px; left: -1px;
  border-top: 2px solid #D4FF00;
  border-left: 2px solid #D4FF00;
}
.cmodal-box::after {
  bottom: -1px; right: -1px;
  border-bottom: 2px solid #D4FF00;
  border-right: 2px solid #D4FF00;
}

.cmodal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none; border: none;
  color: rgba(255,255,255,.25);
  font-size: 18px; cursor: pointer;
  line-height: 1; padding: 4px 6px;
  transition: color .2s; z-index: 3;
}
.cmodal-close:hover { color: #D4FF00; }

/* header */
.cmodal-header {
  position: relative;
  z-index: 1;
  padding: 32px 32px 24px;
  border-bottom: 1px solid rgba(212,255,0,.10);
}
.cmodal-coord {
  font-size: 11px;
  letter-spacing: 5px;
  color: #D4FF00;
  opacity: .7;
  margin-bottom: 12px;
}
.cmodal-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(26px, 4.5vw, 38px);
  font-weight: 400;
  letter-spacing: 6px;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 12px;
  white-space: nowrap;
}
.cmodal-title span { color: #D4FF00; }
.cmodal-sub {
  font-size: 12px;
  color: rgba(255,255,255,.35);
  letter-spacing: .04em;
}

/* form */
.cmodal-form {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  padding: 0;
}
.cmodal-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.cmodal-grid-row:last-of-type { border-bottom: none; }
.cmodal-field {
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  border-right: 1px solid rgba(255,255,255,.07);
  transition: background .2s;
}
.cmodal-field:last-child { border-right: none; }
.cmodal-field--full {
  grid-column: 1 / -1;
  border-right: none;
}
.cmodal-field:focus-within { background: rgba(212,255,0,.03); }

.cmodal-label {
  font-size: 10px;
  letter-spacing: 4px;
  color: rgba(255,255,255,.35);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.cmodal-xy {
  color: #D4FF00;
  opacity: .5;
  font-size: 10px;
  letter-spacing: 1px;
  transition: opacity .2s;
}
.cmodal-field:focus-within .cmodal-xy { opacity: 1; }
.cmodal-required { color: #D4FF00; margin-left: 2px; }

.cmodal-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: #fff;
  font-family: 'Fira Code', monospace;
  font-size: 15px;
  padding: 4px 0 6px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  resize: none;
  -webkit-appearance: none;
  transition: border-color .2s;
}
.cmodal-input:focus { border-bottom-color: #D4FF00; }
.cmodal-input::placeholder { color: rgba(255,255,255,.15); }
.cmodal-input.cmodal-input-error { border-bottom-color: #ff4d4d; }
.cmodal-textarea { min-height: 64px; }
.cmodal-hint { font-size: 9px; letter-spacing: 1px; color: rgba(255,255,255,.25); text-transform: none; margin-left: 8px; }
.cmodal-file-input { display: none; }
.cmodal-file-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  transition: border-color .2s;
}
.cmodal-file-label:hover { border-color: rgba(212,255,0,.5); }
.cmodal-file-btn {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: #D4FF00;
  border: 1px solid rgba(212,255,0,.35);
  padding: 5px 10px;
  white-space: nowrap;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}
.cmodal-file-label:hover .cmodal-file-btn {
  background: rgba(212,255,0,.08);
}
.cmodal-file-name {
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(255,255,255,.35);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmodal-actions {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px 24px 24px;
  border-top: 1px solid rgba(212,255,0,.10);
}
.cmodal-submit { flex-shrink: 0; }
.cmodal-privacy {
  font-size: 9px;
  color: rgba(255,255,255,.18);
  line-height: 1.5;
  max-width: 240px;
}

/* consent checkbox */
.cmodal-consent {
  position: relative; z-index: 1;
  padding: 0 24px 16px;
}
.cmodal-consent-title {
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #D4FF00;
  opacity: .7;
  margin-bottom: 10px;
}
.cmodal-consent-label {
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.cmodal-consent-check { display: none; }
.cmodal-consent-box {
  flex-shrink: 0;
  width: 14px; height: 14px;
  border: 1px solid rgba(255,255,255,.25);
  margin-top: 1px;
  position: relative;
  transition: border-color .2s;
}
.cmodal-consent-check:checked + .cmodal-consent-box {
  border-color: #D4FF00;
  background: rgba(212,255,0,.08);
}
.cmodal-consent-check:checked + .cmodal-consent-box::after {
  content: '';
  position: absolute;
  left: 3px; top: 0px;
  width: 5px; height: 9px;
  border-right: 2px solid #D4FF00;
  border-bottom: 2px solid #D4FF00;
  transform: rotate(45deg);
}
.cmodal-consent-text {
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: rgba(255,255,255,.3);
  line-height: 1.5;
  user-select: none;
}
.cmodal-consent-link {
  color: rgba(212,255,0,.6);
  text-decoration: none;
  border-bottom: 1px solid rgba(212,255,0,.2);
  transition: color .2s, border-color .2s;
  cursor: pointer;
}
.cmodal-consent-link:hover { color: #D4FF00; border-color: rgba(212,255,0,.6); }
.cmodal-status {
  position: relative; z-index: 1;
  font-size: 11px;
  min-height: 16px;
  letter-spacing: .04em;
  padding: 0 24px 16px;
}
.cmodal-status.ok  { color: #D4FF00; }
.cmodal-status.err { color: #ff4d4d; }


.pf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2px;
}

/* ── Loading dots ────────────────────────────────────────── */
.pf-loading {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  padding: 40px 0;
  align-items: center;
}

.pf-loading-dot {
  width: 4px;
  height: 4px;
  background: #D4FF00;
  border-radius: 50%;
  animation: pfDotPulse 1.2s ease-in-out infinite;
}
.pf-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.pf-loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pfDotPulse {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%       { opacity: 1;   transform: scale(1.2); }
}

/* ── Empty / error state ─────────────────────────────────── */
.pf-empty {
  grid-column: 1 / -1;
  font-family: 'Fira Code', monospace;
  font-size: 11px;
  color: #4a5568;
  letter-spacing: 0.14em;
  padding: 40px 0;
}

/* ── Card ────────────────────────────────────────────────── */
.pf-card {
  background: #0d0f12;
  border: 1px solid #1a1e25;
  cursor: default;
  transition: border-color 0.25s, transform 0.25s;
  animation: pfCardIn 0.4s ease both;
  position: relative;
  overflow: hidden;
}

.pf-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--accent, #D4FF00);
  opacity: 0;
  transition: opacity 0.25s;
}

.pf-card:hover {
  border-color: #2a3040;
  transform: translateY(-2px);
}

.pf-card:hover::before {
  opacity: 1;
}

@keyframes pfCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Card image ──────────────────────────────────────────── */
.pf-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0a0c0f;
}

.pf-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(20%) brightness(0.9);
  transition: filter 0.3s, transform 0.4s;
}

.pf-card:hover .pf-card-img img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.03);
}

.pf-card-noimg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    #0d0f12 0px, #0d0f12 8px,
    #111318 8px, #111318 16px
  );
}

.pf-card-noimg span {
  font-family: 'Fira Code', monospace;
  font-size: 22px;
  color: #2a3040;
  letter-spacing: 0.2em;
}

/* ── Card index badge ────────────────────────────────────── */
.pf-card-idx {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: 'Fira Code', monospace;
  font-size: 9px;
  color: #D4FF00;
  letter-spacing: 0.14em;
  background: rgba(9,9,9,0.75);
  padding: 2px 6px;
  line-height: 1.6;
}

/* ── Card body ───────────────────────────────────────────── */
.pf-card-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pf-card-tech {
  font-family: 'Fira Code', monospace;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.5;
}

.pf-card-title {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  font-weight: 500;
  color: #c8d0dc;
  letter-spacing: 0.06em;
  line-height: 1.4;
  margin-top: 2px;
}

.pf-card-usage {
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: #4a5568;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

.pf-card-desc {
  font-family: 'Fira Code', monospace;
  font-size: 10px;
  color: #3a4455;
  letter-spacing: 0.04em;
  line-height: 1.6;
  margin-top: 4px;
  border-top: 1px solid #1a1e25;
  padding-top: 8px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .pf-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1px;
  }
  .pf-card-body {
    padding: 10px 12px 14px;
  }
}

/* ── Portfolio Lightbox ──────────────────────────────────── */
.pf-lb-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(9,9,9,.85);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.pf-lb-overlay.open {
  opacity: 1; pointer-events: all;
}
.pf-lb-card {
  position: relative;
  width: 80vw;
  max-height: 80vh;
  background: #0d0f14;
  border: 1px solid #1e2229;
  display: flex;
  overflow: hidden;
  clip-path: inset(50% 50% 50% 50%);
  transition: clip-path 0.45s cubic-bezier(0.77,0,0.175,1);
}
.pf-lb-overlay.open .pf-lb-card {
  clip-path: inset(0% 0% 0% 0%);
}
.pf-lb-card .pf-lb-img {
  flex: 1;
  aspect-ratio: 4/3;
  width: 100%;
}
.pf-lb-close {
  position: absolute; top: 14px; right: 18px; z-index: 2;
  background: none; border: none;
  color: rgba(255,255,255,.35); font-size: 22px; line-height: 1;
  cursor: pointer; transition: color .2s;
}
.pf-lb-close:hover { color: #D4FF00; }
.pf-lb-img {
  flex: 0 0 70%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #080a0d;
  align-self: stretch;
}
.pf-lb-img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.pf-lb-noimg {
  flex: 0 0 70%;
  display: flex; align-items: center; justify-content: center;
  background: #080a0d; color: rgba(255,255,255,.07);
  font-size: 48px; font-family: 'Fira Code', monospace;
}
.pf-lb-info {
  flex: 0 0 30%;
  display: flex; flex-direction: column; gap: 14px;
  padding: 32px 28px 32px 28px;
  overflow-y: auto;
  opacity: 0; transform: translateX(12px);
  transition: opacity 0.3s ease 0.38s, transform 0.3s ease 0.38s;
}
.pf-lb-overlay.open .pf-lb-info {
  opacity: 1; transform: translateX(0);
}
.pf-lb-idx {
  font-size: 9px; letter-spacing: 4px;
  color: rgba(255,255,255,.18); text-transform: uppercase;
}
.pf-lb-tech {
  font-size: 9px; letter-spacing: 3px; text-transform: uppercase;
  margin-top: -4px;
}
.pf-lb-title {
  font-size: 18px; letter-spacing: 2px;
  color: #fff; text-transform: uppercase; line-height: 1.3;
}
.pf-lb-usage {
  font-size: 10px; letter-spacing: 2px;
  color: rgba(255,255,255,.38); text-transform: uppercase;
}
.pf-lb-desc {
  font-size: 10px; color: rgba(255,255,255,.25);
  line-height: 1.8; letter-spacing: 0.04em;
  border-top: 1px solid #1a1e25; padding-top: 14px; margin-top: 2px;
}
.pf-card { cursor: pointer; }

/* ═══════════════════════════════════════════════════════════
   CALCULATOR — MATERIAL CELLS (periodic table style)
   ═══════════════════════════════════════════════════════════ */
.calc-mat-groups {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.calc-mat-group-btn {
  background: none;
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.45);
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: .08em;
  padding: 5px 12px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.calc-mat-group-btn:hover { border-color: rgba(255,255,255,.3); color: rgba(255,255,255,.7); }
.calc-mat-group-btn.active { border-color: #D4FF00; color: #D4FF00; }
.calc-mat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.calc-mat-cell {
  position: relative;
  width: 80px;
  height: 68px;
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  cursor: pointer;
  transition: border-color .2s;
  user-select: none;
  outline: none;
  flex-shrink: 0;
  overflow: hidden;
}
.calc-mat-cell::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--mc, #fff);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.calc-mat-cell:hover { border-color: var(--mc, #fff); }
.calc-mat-cell:hover::before { opacity: .08; }
.calc-mat-cell.active { border-color: var(--mc, #D4FF00); }
.calc-mat-cell.active::before { opacity: .12; }
.calc-mat-cell.calc-mat-individual { border-style: dashed; opacity: .55; }
.calc-mat-sym--sm { font-size: 9px; }
.calc-mat-sym {
  font-size: 11px;
  font-weight: 600;
  font-family: 'Fira Code', monospace;
  color: var(--mc, #fff);
  line-height: 1.2;
  position: relative; z-index: 1;
  word-break: break-word;
  overflow-wrap: break-word;
  width: 100%;
  text-align: center;
}

@media (max-width: 1024px) {
  .calc-mat-cell { width: 74px; height: 62px; }
}
@media (max-width: 599px) {
  /* Материалы — ячейки чуть меньше */
  .calc-mat-cell { width: 66px; height: 56px; padding: 6px 8px; }
  .calc-mat-sym  { font-size: 12px; }

  /* Калькулятор — меньше gap между блоками */
  .calc-wrap { gap: 16px; padding-bottom: 0; }
  .calc-instruction { margin-bottom: 0; }
  .calc-tabs { margin-bottom: 0; }
  .calc-form { gap: 20px; }

  /* Зона загрузки STL — компактнее и заметнее */
  .calc-upload-zone { padding: 14px 16px; gap: 6px; border-color: rgba(255,255,255,.35); }
  .calc-upload-icon svg { width: 20px; height: 20px; }
  .calc-upload-text { font-size: 10px; }
  .calc-upload-hint { font-size: 9px; }

  /* Табы — в одну строку без переноса */
  .calc-tab { white-space: nowrap; padding: 10px 12px; font-size: 9px; letter-spacing: 2px; }

  /* Кнопки качества — в одну строку */
  .calc-btns { flex-wrap: nowrap; }
  .calc-btn  { flex: 1; justify-content: center; padding: 8px 6px; font-size: 9px; letter-spacing: 1px; white-space: nowrap; }
  .calc-btn-sub { font-size: 8px; }

  /* Кнопки групп материала (БАЗОВЫЕ / ТЕХНИЧЕСКИЕ / ГИБКИЕ) */
  .calc-mat-groups { display: flex; gap: 6px; flex-wrap: nowrap; }
  .calc-mat-group-btn { flex: 1; font-size: 8px; letter-spacing: 1px; padding: 6px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ═══════════════════════════════════════════════════════════
   FLOATING CONTACTS PANEL
   ═══════════════════════════════════════════════════════════ */
.fc-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}
.fc-panel.open .fc-items {
  margin-bottom: 8px;
}
.fc-trigger {
  position: relative;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.fc-dot {
  position: relative;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #D4FF00;
  box-shadow: 0 0 8px rgba(212,255,0,0.8);
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}
.fc-trigger:hover .fc-dot {
  transform: scale(1.3);
  box-shadow: 0 0 16px rgba(212,255,0,1);
}
.fc-trigger::before {
  content: 'СВЯЗАТЬСЯ';
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  color: rgba(212,255,0,0.55);
  font-family: 'Fira Code', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.6s ease;
}
.fc-trigger:hover::before { opacity: 1; }
.fc-trigger.fc-labeled::before { opacity: 1; }
.fc-panel.open .fc-trigger::before { opacity: 0; }
.fc-ping {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(212,255,0,0.6);
  animation: fcPing 2.4s ease-out infinite;
  pointer-events: none;
}
.fc-ping::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(212,255,0,0.3);
  animation: fcPing 2.4s ease-out 0.8s infinite;
}
@keyframes fcPing {
  0%   { transform: scale(0.4); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 0; }
}
.fc-icon-close {
  position: absolute;
  width: 14px;
  height: 14px;
  fill: #D4FF00;
  display: none;
  z-index: 3;
}
.fc-panel.open .fc-dot  { display: none; }
.fc-panel.open .fc-ping { display: none; }
.fc-panel.open .fc-icon-close { display: block; }

.fc-items {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1),
              opacity 0.25s ease;
}
.fc-panel.open .fc-items {
  max-height: 280px;
  opacity: 1;
  pointer-events: auto;
}
.fc-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #0f0f0f;
  border: 1px solid rgba(212,255,0,0.35);
  color: #D4FF00;
  text-decoration: none;
  position: relative;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.fc-item svg {
  width: 20px;
  height: 20px;
  fill: #D4FF00;
}
.fc-item:hover {
  background: rgba(212,255,0,0.1);
  border-color: #D4FF00;
  box-shadow: 0 0 14px rgba(212,255,0,0.25);
}
.fc-item[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #0f0f0f;
  border: 1px solid rgba(212,255,0,0.35);
  color: #D4FF00;
  font-family: 'Fira Code', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.fc-item:hover[data-tooltip]::before { opacity: 1; }
.fc-item.fc-hidden { display: none; }

@media (max-width: 599px) {
  .fc-panel { right: 14px; bottom: 14px; }
  .fc-item { width: 40px; height: 40px; }
  .fc-item svg { width: 18px; height: 18px; }
  .fc-item[data-tooltip]::before { display: none; }
}

@media (max-width: 599px) {
  .pf-lb-card { flex-direction: column; width: 80vw; max-height: 80vh; }
  .pf-lb-img, .pf-lb-noimg { flex: none; width: 100%; aspect-ratio: 4/3; }
  .pf-lb-info { padding: 20px; }
}

/* ── Card Tags ── */
.cd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.06);
  margin-top: 8px;
}
.cd-tag-pill {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  border: 1px solid rgba(255,255,255,.08);
  padding: 5px 10px;
  cursor: default;
  transition: color .2s, border-color .2s;
}
.cd-tag-portfolio {
  cursor: pointer;
  color: rgba(212,255,0,.45);
  border-color: rgba(212,255,0,.18);
}
.cd-tag-portfolio:hover {
  color: #D4FF00;
  border-color: rgba(212,255,0,.55);
  background: rgba(212,255,0,.04);
}

/* ── Portfolio Filters ── */
.pf-filters {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
  flex-wrap: wrap;
  row-gap: 10px;
}
.pf-filter-btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  background: none;
  border: none;
  padding: 6px 14px;
  cursor: pointer;
  position: relative;
  transition: color .2s;
}
.pf-filter-btn::after {
  content: '/';
  position: absolute;
  right: -1px;
  color: rgba(255,255,255,.12);
  pointer-events: none;
}
.pf-filter-btn:last-child::after { display: none; }
.pf-filter-btn:first-child { padding-left: 0; }
.pf-filter-btn:hover { color: rgba(255,255,255,.7); }
.pf-filter-btn.active {
  color: #D4FF00;
}
.pf-filter-btn.active::before {
  content: '';
  position: absolute;
  bottom: 0; left: 14px; right: 14px;
  height: 1px;
  background: #D4FF00;
}
.pf-filter-btn:first-child.active::before { left: 0; }

/* fade при смене фильтра */
.pf-grid.filtering { opacity: 0; transition: opacity .18s; }
.pf-grid.filtered  { opacity: 1; transition: opacity .18s; }

@media (max-width: 599px) {
  .pf-filter-btn { font-size: clamp(7px, 2vw, 9px); letter-spacing: clamp(1px, .5vw, 2px); padding: 5px clamp(7px, 2vw, 10px); }
  .pf-grid { grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 42vw, 220px), 1fr)); }
}

/* ── SFX Mute Button ── */
#sfxMuteBtn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color .2s, background .2s;
  user-select: none;
}
#sfxMuteBtn:hover {
  border-color: rgba(212,255,0,.4);
  background: rgba(0,0,0,.75);
}
#sfxMuteBtn svg {
  width: 16px;
  height: 16px;
  fill: rgba(255,255,255,.45);
  transition: fill .2s;
}
#sfxMuteBtn:hover svg { fill: #D4FF00; }
@media (max-width: 599px) {
  #sfxMuteBtn { bottom: 14px; left: 14px; width: 32px; height: 32px; }
  #sfxMuteBtn svg { width: 14px; height: 14px; }
}

/* ── Контактный модал — мобиль ── */
@media (max-width: 599px) {
  .cmodal-overlay { align-items: flex-end; }
  .cmodal-box {
    width: 100vw;
    max-height: 92dvh;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }
  .cmodal-overlay.open .cmodal-box { transform: translateY(0) scale(1); }
  .cmodal-close { top: 10px; right: 12px; }
  .cmodal-header { padding: 20px 16px 16px; }
  .cmodal-title { font-size: 22px; letter-spacing: 3px; white-space: normal; }
  .cmodal-coord { font-size: 9px; letter-spacing: 3px; margin-bottom: 8px; }
  .cmodal-sub { font-size: 10px; }
  .cmodal-grid-row { grid-template-columns: 1fr; }
  .cmodal-field { padding: 8px 16px; border-right: none; }
  .cmodal-field--full { grid-column: 1; }
  .cmodal-input { font-size: 13px; }
  .cmodal-label { font-size: 9px; letter-spacing: 2px; }
  .cmodal-textarea { min-height: 48px; }
  .cmodal-file-label { flex-wrap: wrap; gap: 8px; }
  .cmodal-consent { padding: 0 16px 12px; }
  .cmodal-actions { padding: 14px 16px 20px; gap: 12px; }
}
