/* ==========================================================
   1. DESIGN TOKENS — change colours, fonts, sizes here
   ========================================================== */
:root{
  --black:#0B0F10; --charcoal:#151A1C; --white:#FFFFFF; --offwhite:#F5F5F2;
  --yellow:#FFB51B; --yellow-dark:#e6a008;
  --text:#14191b; --muted:#4d5558; --muted-light:#b9c0c2; --line:#dcdcd6; --line-dark:#2a3134;
  --font:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --container:1200px; --gutter:24px; --header-h:78px;
  --section-y:clamp(56px,8vw,88px);
  --radius:6px;
}

/* ==========================================================
   2. BASE / RESET
   ========================================================== */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:var(--header-h);-webkit-text-size-adjust:100%}
body{margin:0;font-family:var(--font);font-size:16px;line-height:1.65;color:var(--text);background:var(--offwhite);overflow-x:hidden}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
h1,h2,h3,p{margin:0}
ul{margin:0;padding:0;list-style:none}
button{font:inherit;cursor:pointer}
:focus-visible{outline:3px solid var(--yellow);outline-offset:3px}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ==========================================================
   3. UTILITIES & SHARED COMPONENTS
   ========================================================== */
.container{width:100%;max-width:calc(var(--container) + var(--gutter)*2);margin:0 auto;padding:0 var(--gutter)}
.section{padding:var(--section-y) 0}
.section--dark{background:var(--charcoal);color:var(--white)}
.accent{color:var(--yellow)}
.eyebrow{display:flex;align-items:center;gap:12px;margin-bottom:14px;font-size:.72rem;font-weight:600;letter-spacing:.2em;text-transform:uppercase}
.eyebrow::after{content:"";width:22px;height:2px;background:var(--yellow)}
.section-title{font-size:clamp(1.7rem,3.4vw,2.2rem);line-height:1.15;font-weight:700;letter-spacing:-.01em}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:44px;padding:0 24px;border:1.5px solid transparent;border-radius:var(--radius);font-size:.85rem;font-weight:600;transition:background .2s,color .2s,border-color .2s}
.btn--primary{background:var(--yellow);color:var(--black);border-radius: 14px;}
.btn--primary:hover{background:var(--yellow-dark)}
.btn--outline{background:transparent;border-color:var(--yellow);color:var(--text)}
.btn--outline:hover{background:var(--yellow)}
.btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.icon{width:44px;height:44px;fill:none;stroke:var(--yellow);stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}

/* ==========================================================
   4. HEADER
   ========================================================== */
.site-header{position:sticky;top:0;z-index:50;background:var(--white);border-bottom:1px solid var(--line)}
.header-inner{display:flex;align-items:center;justify-content:space-between;height:var(--header-h);gap:24px}
.brand img{height:54px;width:auto}
.nav-list{display:flex;gap:40px}
.nav-link{position:relative;display:block;padding:8px 0;font-size:.85rem;font-weight:500;color:var(--text);transition:color .2s}
.nav-link::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--yellow);transform:scaleX(0);transform-origin:left;transition:transform .25s}
.nav-link:hover,.nav-link.is-active{color:#c98400}
.nav-link:hover::after,.nav-link.is-active::after{transform:scaleX(1)}
.nav-cta{display:none}
.menu-toggle{display:none;width:44px;height:44px;background:none;border:0;padding:10px}
.menu-toggle span{display:block;height:2px;background:var(--black);margin:6px 0;transition:transform .25s,opacity .2s}
.menu-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(8px) rotate(45deg)}
.menu-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.menu-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-8px) rotate(-45deg)}

/* ==========================================================
   5. HERO — swap the image: change the url() below
   ========================================================== */
.hero{position:relative;display:flex;align-items:center;min-height:clamp(380px,56vw,420px);color:var(--white);
  background:linear-gradient(90deg,rgba(11,15,16,.95) 0%,rgba(11,15,16,.7) 40%,rgba(11,15,16,.1) 75%),
             url("assets/hero.jpeg") center/cover no-repeat var(--black)}
.hero-content{padding:56px 0;max-width:560px}
.hero .eyebrow::after{display:none}
.hero .eyebrow{color:#e8ecec;margin-bottom:18px}
.hero h1{font-size:clamp(2.5rem,6.5vw,3.6rem);line-height:1.05;font-weight:800;letter-spacing:-.02em;margin-bottom:22px}
.hero p{font-size:.95rem;color:#e2e6e7;max-width:46ch;margin-bottom:26px}

/* ==========================================================
   6. CHI SIAMO
   ========================================================== */
.about-grid{display:grid;grid-template-columns:1fr 1fr;gap:clamp(32px,6vw,56px);align-items:center}
.about-media{position:relative;aspect-ratio: 1024/639;border-radius:var(--radius);overflow:hidden;}
.about-media img{width:100%;height:100%;object-fit:cover; object-position: top;}
.about-media::before{content:"";position:absolute;top:18px;left:18px;width:70px;height:70px;border-top:3px solid var(--yellow);border-left:3px solid var(--yellow);}
.about-text{margin:16px 0 28px;color:var(--muted);max-width:56ch}
.features{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.feature{display:flex;align-items:center;gap:12px;font-size:.8rem;font-weight:600;line-height:1.3}
.feature .icon-ring{flex:none;width:52px;height:52px;display:grid;place-items:center;border:1px solid var(--yellow);border-radius:50%;}
.feature .icon{width:28px;height:28px;}

.bounce-text span {
  display: inline-block;
  /* Задаем базовый цвет текста */
  color: #333333; 
  /* Запускаем плавную волну света */
  animation: lightWave 6s ease-in-out infinite;
}


@keyframes lightWave {
  0%, 100% {
    color: #333333; 
    filter: drop-shadow(0 0 0 rgba(255,255,255,0));
    transform: scale(1);
  }
  25% {
    color: #ffffffa6; 
    filter: drop-shadow(0 0 4px rgba(255, 149, 88, 0.829)); 
    transform: scale(1.05); 
  }
  50% {
    color: #333333; 
    filter: drop-shadow(0 0 0 rgba(255,255,255,0));
    transform: scale(1);
  }
}


.bounce-text span:empty, 
.bounce-text span[data-space="true"] {
  width: 0.25em;
}

/* ==========================================================
   7. SERVIZI
   ========================================================== */
.services{background:
  repeating-linear-gradient(90deg,transparent 0 119px,rgba(255,255,255,.03) 119px 120px),
  repeating-linear-gradient(0deg,transparent 0 119px,rgba(255,255,255,.03) 119px 120px),var(--charcoal)}
.services-head{display:grid;grid-template-columns:1fr 1fr;gap:32px;align-items:center;margin-bottom:48px}
.services-head p{color:var(--muted-light);font-size:.9rem;max-width:46ch}
.service-list{display:grid;grid-template-columns:repeat(5,1fr);gap:24px}
.service{display:flex;flex-direction:column;gap:14px;padding-top:4px;border-top:2px solid transparent;transition:border-color .2s,transform .2s}
.service:hover{border-color:var(--yellow);transform:translateY(-3px)}
.service h3{font-size:.9rem;font-weight:600;line-height:1.35}

/* ==========================================================
   8. PROGETTI
   ========================================================== */
.projects-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:36px;flex-wrap:wrap}
.project-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:28px}
.project-card{display:flex;flex-direction:column;background:var(--white);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;cursor:pointer}
.project-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #d5d8d7;
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Стрелки галереи */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;
    padding: 0;

    border: 0;
    border-radius: 50%;
    background: rgba(11, 15, 16, 0.75);
    color: #fff;

    font-size: 25px;
    line-height: 1;

    z-index: 2;
    transition: background 0.2s;
}

.gallery-arrow:hover {
    background: var(--yellow);
    color: var(--black);
}

.gallery-prev {
    left: 12px;
}

.gallery-next {
    right: 12px;
}

/* Счётчик фотографий */
.gallery-counter {
    position: absolute;
    right: 12px;
    bottom: 12px;

    padding: 4px 10px;
    border-radius: 4px;

    background: rgba(11, 15, 16, 0.75);
    color: #fff;

    font-size: 0.8rem;
    font-weight: 600;

    z-index: 2;
}
.project-body{display:flex;flex-direction:column;flex:1;padding:20px 22px 22px;gap:10px}
.project-body h3{font-size:1.05rem;line-height:1.3;font-weight:700}
.project-desc{font-size:.88rem;color:var(--muted);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.project-more{align-self:flex-start;margin-top:auto;padding:6px 0;background:none;border:0;border-bottom:2px solid var(--yellow);font-size:.82rem;font-weight:600;color:var(--text)}
.project-more:hover{color:#c98400}

/* Modal (native <dialog>: closes with Escape) */
.modal{width:min(680px,calc(100% - 32px));max-height:calc(100% - 48px);padding:0;border:0;border-radius:var(--radius);background:var(--white);color:var(--text);overflow:auto}
.modal::backdrop{background:rgba(11,15,16,.7)}
.modal img{width:100%;aspect-ratio:16/9;object-fit:cover}
.modal-body{padding:24px 28px 30px}
.modal-body h3{font-size:1.4rem;line-height:1.25;margin-bottom:12px}
.modal-body p{color:var(--muted)}
.modal-close{position:absolute;top:12px;right:12px;width:44px;height:44px;border:0;border-radius:50%;background:var(--yellow);color:var(--black);font-size:1.5rem;line-height:1}

/* ==========================================================
   9. OPERE INFRASTRUTTURALI
   ========================================================== */

.infrastructure {
  background: var(--offwhite);
}

.infrastructure-head {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  align-items: center;
  gap: 64px;
  margin-bottom: 42px;
}

.infrastructure-title-wrap {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.infrastructure-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.infrastructure-label span {
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--yellow);
}

.infrastructure-title {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  overflow-wrap: break-word;
  max-width: 100%;
}

.infrastructure-title span {
  display: block;
  color: #8b9293;
}

.infrastructure-intro {
  padding-left: 24px;
  border-left: 3px solid var(--yellow);
}

.infrastructure-intro p {
  max-width: 43ch;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.85;
}

/* Обёртка карусели */
.infrastructure-gallery {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 10px;
  aspect-ratio: 16 / 9;
  overflow: hidden;

  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;

  box-shadow: 0 12px 35px rgba(11, 15, 16, 0.09);
}

/* Фотография */
.infrastructure-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 7px;

  opacity: 1;
  transition: opacity 0.35s ease;
}

/* Плавное исчезновение при смене фото */
.infrastructure-gallery img.is-changing {
  opacity: 0.35;
}

/* Стрелки */
.infrastructure-gallery .gallery-arrow {
  width: 44px;
  height: 44px;
  background: rgba(11, 15, 16, 0.78);
  backdrop-filter: blur(5px);
}

.infrastructure-gallery .gallery-arrow:hover {
  background: var(--yellow);
  color: var(--black);
}

.infrastructure-gallery .gallery-prev {
  left: 22px;
  transform: translateY(-50%) rotate(180deg);
}

.infrastructure-gallery .gallery-next {
  right: 22px;
}

/* Счётчик */
.infrastructure-gallery .gallery-counter {
  right: 22px;
  bottom: 22px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(11, 15, 16, 0.78);
  backdrop-filter: blur(5px);
}

/* Планшеты */
@media (max-width: 900px) {
  .infrastructure-head {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .infrastructure-gallery {
    max-width: 760px;
  }
}

/* Телефоны */
@media (max-width: 640px) {
  .infrastructure-gallery {
    padding: 6px;
    aspect-ratio: 4 / 3;
    border-radius: 9px;
  }

  .infrastructure-gallery img {
    border-radius: 5px;
  }

  .infrastructure-gallery .gallery-arrow {
    width: 38px;
    height: 38px;
  }

  .infrastructure-gallery .gallery-prev {
    left: 12px;
  }

  .infrastructure-gallery .gallery-next {
    right: 12px;
  }

  .infrastructure-gallery .gallery-counter {
    right: 12px;
    bottom: 12px;
    font-size: 0.75rem;
  }
}

@media (max-width: 900px) {
  .infrastructure-head {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .infrastructure-intro {
    max-width: 560px;
  }
}

@media (max-width: 640px) {
  .infrastructure-title {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .infrastructure-head {
    margin-bottom: 28px;
  }

  .infrastructure-intro p {
    font-size: 0.88rem;
  }
}

/* ==========================================================
   10. CONTATTI (CTA)
   ========================================================== */
.cta{background:var(--black);color:var(--white);padding:56px 0}
.cta-inner{display:grid;grid-template-columns:1fr 1.1fr auto;gap:40px;align-items:center}
.cta p{color:var(--muted-light);font-size:.92rem;max-width:42ch}

/* ==========================================================
   11. FOOTER
   ========================================================== */
.site-footer{background:var(--black);color:var(--muted-light);border-top:1px solid var(--line-dark);font-size:.82rem}
.footer-grid{display:grid;grid-template-columns:1fr 1.3fr 1.3fr 1.1fr;gap:32px;padding:40px 0}
.footer-grid img{height:48px;width:auto;filter: brightness(0) invert(1);}
.footer-grid h2{margin-bottom:8px;font-size:.7rem;font-weight:600;letter-spacing:.18em;text-transform:uppercase;color:var(--yellow)}
.footer-grid address{font-style:normal;line-height:1.7}
.footer-grid a:hover{color:var(--yellow)}
.footer-bottom{padding:20px 0;font-size:.75rem;color:#8a9294}
.footer-inline{display: flex; justify-content: space-between; align-items: center; width: 100%; margin: 0 auto; border-top: 1px solid var(--line-dark); padding-left: 20px; padding-bottom: 20px;}
.powered-by{text-decoration: none; color: orange; animation: color-flashing 2s ease infinite;}

@keyframes color-flashing{
   0%{
      color: orange;
   }25%{
      color: rgb(255, 176, 29);
      text-shadow: 0 4px 10px orange;
   }50%{
      color: rgb(255, 184, 52);
      text-shadow: 0 4px 10px orange;
   }75%{
      color: rgb(255, 176, 29);
      text-shadow: 0 4px 10px orange;
   }100%{
      color: orange;
   }
}
   

/* ==========================================================
   12. RESPONSIVE (desktop-first overrides)
   ========================================================== */
@media (max-width:1080px){
  .service-list{grid-template-columns:repeat(3,1fr);gap:32px 24px}
  .footer-grid{grid-template-columns:1fr 1fr}
  .nav-list{gap:26px}
}
@media (max-width:900px){
  :root{--header-h:64px}
  .brand img{height:44px}
  .header-cta{display:none}
  .menu-toggle{display:block}
  .site-nav{position:absolute;top:100%;left:0;right:0;background:var(--white);border-bottom:1px solid var(--line);padding:8px var(--gutter) 20px;display:none}
  .site-nav.is-open{display:block}
  .nav-list{flex-direction:column;gap:0}
  .nav-link{padding:14px 0;border-bottom:1px solid var(--line)}
  .nav-link::after{display:none}
  .nav-cta{display:block;margin-top:16px}
  .nav-cta .btn{width:100%}
  .about-grid,.services-head,.cta-inner{grid-template-columns:1fr}
  .project-grid{grid-template-columns:repeat(2,1fr)}
  .cta-inner{gap:24px}
}
@media (max-width:640px){
  :root{--gutter:20px}
  .hero{min-height:420px;background:linear-gradient(180deg,rgba(11,15,16,0.2),rgba(11,15,16,0.85)),url("assets/hero-mobile.jpeg"); background-position: center; background-size: cover; background-repeat: no-repeat; min-height: 500px;}
  .about-media::before{display: none;}
  .features{grid-template-columns:1fr}
  .service-list{grid-template-columns:1fr 1fr;gap:28px 16px}
  .project-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
  .cta .btn{width:100%}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition:none!important}
}
