/*
Theme Name: ИПМ Engineering
Theme URI: https://enpm.pro
Author: ООО ИПМ
Description: Кастомная тема для сайта ООО ИПМ — инжиниринг, проектирование металлоконструкций.
Version: 1.0
Text Domain: ipm-theme
*/

:root{
    --navy:#1B2530;
    --navy-dark:#12181F;
    --concrete:#E8E6E1;
    --concrete-light:#F4F3F0;
    --graphite:#22262B;
    --rust:#C08A2E;
    --rust-light:#D9A94A;
    --steel:#4C6B8A;
    --steel-light:#7C97B0;
    --line: rgba(255,255,255,0.14);
    --line-dark: rgba(34,38,43,0.14);
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  body{
    font-family:'Inter', sans-serif;
    color:var(--graphite);
    background:var(--concrete-light);
    line-height:1.55;
  }
  h1,h2,h3,.eyebrow-num{ font-family:'Oswald', sans-serif; }
  a{color:inherit; text-decoration:none;}
  img{max-width:100%;}
  .wrap{max-width:1180px; margin:0 auto; padding:0 32px;}

  /* ===== HEADER ===== */
  header{
    position:sticky; top:0; z-index:50;
    background:var(--navy);
    border-bottom:1px solid var(--line);
  }
  .header-inner{
    display:flex; align-items:center; justify-content:space-between;
    padding:18px 32px; max-width:1180px; margin:0 auto;
  }
  .logo{
    color:var(--concrete-light);
    font-family:'Oswald', sans-serif;
    font-size:19px; font-weight:600;
    letter-spacing:0.3px;
    display:flex; align-items:center; gap:10px;
  }
  .logo .mark{
    width:30px; height:30px;
    border:2px solid var(--rust);
    display:flex; align-items:center; justify-content:center;
    font-size:13px; font-weight:700; color:var(--rust);
    transform:rotate(45deg);
  }
  .logo .mark span{ transform:rotate(-45deg); }
  nav{ display:flex; gap:30px; }
  nav a{
    color:#C7CFD8; font-size:13px; font-weight:600;
    letter-spacing:0.04em; text-transform:uppercase;
    transition:color .15s ease;
    position:relative;
  }
  nav a:hover{ color:var(--concrete-light); }
  .header-cta{
    background:var(--rust); color:#fff;
    padding:10px 22px; font-size:14px; font-weight:600;
    border:1px solid var(--rust);
    transition:background .15s ease;
  }
  .header-cta:hover{ background:var(--rust-light); }

  /* ===== HERO ===== */
  .hero{
    background:var(--navy);
    color:var(--concrete-light);
    position:relative;
    overflow:hidden;
    border-bottom:1px solid var(--line);
  }
  .hero-grid{
    position:absolute; inset:0;
    background-image:
      linear-gradient(var(--line) 1px, transparent 1px),
      linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size:64px 64px;
    opacity:0.35;
    mask-image:linear-gradient(180deg, transparent, rgba(0,0,0,0.5) 40%, transparent 100%);
  }
  .hero-inner{
    position:relative;
    padding:96px 32px 110px;
    max-width:1180px; margin:0 auto;
    display:grid;
    grid-template-columns:1.15fr 0.85fr;
    gap:48px;
    align-items:end;
  }
  .hero-eyebrow{
    font-size:13px; letter-spacing:0.04em; color:var(--rust-light);
    font-weight:600; margin-bottom:18px;
    display:flex; align-items:center; gap:10px;
  }
  .hero-eyebrow .dash{ width:28px; height:1px; background:var(--rust-light); }
  h1.hero-title{
    font-size:clamp(38px, 5.2vw, 64px);
    font-weight:600;
    line-height:1.04;
    letter-spacing:-0.01em;
    max-width:640px;
  }
  h1.hero-title em{
    font-style:normal;
    color:var(--rust-light);
  }
  .hero-desc{
    margin-top:24px;
    font-size:17px;
    color:#B7C0CA;
    max-width:480px;
  }
  .hero-actions{
    margin-top:36px;
    display:flex; gap:14px; flex-wrap:wrap;
  }
  .btn-primary{
    background:var(--rust); color:#fff;
    padding:15px 28px; font-size:15px; font-weight:600;
    border:1px solid var(--rust);
    display:inline-block;
    transition:background .15s ease, transform .1s ease;
  }
  .btn-primary:hover{ background:var(--rust-light); }
  .btn-primary:active{ transform:translateY(1px); }
  .btn-secondary{
    color:var(--concrete-light);
    padding:15px 26px; font-size:15px; font-weight:600;
    border:1px solid var(--line);
    display:inline-block;
    transition:border-color .15s ease, background .15s ease;
  }
  .btn-secondary:hover{ border-color:var(--steel-light); background:rgba(255,255,255,0.04); }

  /* hero side panel — technical drawing motif */
  .hero-panel{
    border:1px solid var(--line);
    padding:26px 24px;
    background:rgba(255,255,255,0.02);
  }
  .hero-panel-row{
    display:flex; justify-content:space-between; align-items:baseline;
    padding:14px 0;
    border-bottom:1px solid var(--line);
  }
  .hero-panel-row:last-child{ border-bottom:none; }
  .hero-panel-row .num{
    font-family:'Oswald', sans-serif;
    font-size:28px; font-weight:600; color:var(--rust-light);
  }
  .hero-panel-row .label{
    font-size:13px; color:#9AA5B1; text-align:right; max-width:180px;
  }

  /* ===== SECTION HEADS ===== */
  .section{ padding:96px 0; }
  .section.tight{ padding:72px 0; }
  .section-head{
    display:flex; justify-content:space-between; align-items:flex-end;
    gap:24px; margin-bottom:52px;
    border-bottom:1px solid var(--line-dark);
    padding-bottom:24px;
  }
  .section-head h2{
    font-size:clamp(28px,3.4vw,38px);
    font-weight:600; letter-spacing:-0.01em;
    max-width:520px;
  }
  .section-head p{
    max-width:340px; color:#5B6169; font-size:15px;
  }

  /* ===== SERVICES ===== */
  .services{ background:var(--concrete-light); }
  .services-grid{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    border-top:1px solid var(--line-dark);
    border-left:1px solid var(--line-dark);
  }
  .service{
    border-right:1px solid var(--line-dark);
    border-bottom:1px solid var(--line-dark);
    padding:34px 30px;
    position:relative;
  }
  .service .idx{
    font-family:'Oswald', sans-serif;
    font-size:13px; color:var(--rust);
    font-weight:600; letter-spacing:0.04em;
    margin-bottom:22px;
  }
  .service h3{
    font-size:19px; font-weight:600; margin-bottom:10px;
  }
  .service p{
    font-size:14.5px; color:#5B6169;
  }

  /* ===== STATS ===== */
  .stats{
    background:var(--navy-dark);
    color:var(--concrete-light);
  }
  .stats-inner{
    display:grid; grid-template-columns:repeat(4,1fr);
    padding:56px 32px;
    max-width:1180px; margin:0 auto;
  }
  .stat{
    padding:0 24px;
    border-left:1px solid var(--line);
  }
  .stat:first-child{ border-left:none; padding-left:0; }
  .stat .n{
    font-family:'Oswald', sans-serif;
    font-size:44px; font-weight:600; color:var(--rust-light);
    line-height:1;
  }
  .stat .l{
    margin-top:10px; font-size:13.5px; color:#9AA5B1;
  }

  /* ===== WHY ===== */
  .why{ background:var(--concrete); }
  .why-list{
    display:grid; grid-template-columns:1fr 1fr; gap:0;
    border-top:1px solid var(--line-dark);
  }
  .why-item{
    display:flex; gap:18px;
    padding:26px 0;
    border-bottom:1px solid var(--line-dark);
  }
  .why-item:nth-child(odd){ padding-right:40px; }
  .why-item:nth-child(even){ padding-left:40px; border-left:1px solid var(--line-dark); }
  .why-mark{
    flex-shrink:0;
    width:34px; height:34px;
    border:1px solid var(--rust);
    color:var(--rust);
    display:flex; align-items:center; justify-content:center;
    font-family:'Oswald', sans-serif; font-weight:600; font-size:14px;
  }
  .why-item h4{ font-size:16px; font-weight:600; margin-bottom:6px; }
  .why-item p{ font-size:14px; color:#5B6169; }

  /* ===== CTA BAND ===== */
  .cta-band{
    background:var(--rust);
    color:#fff;
  }
  .cta-inner{
    max-width:1180px; margin:0 auto;
    padding:64px 32px;
    display:flex; justify-content:space-between; align-items:center;
    gap:32px; flex-wrap:wrap;
  }
  .cta-inner h2{ font-size:30px; font-weight:600; max-width:480px; }
  .cta-inner p{ margin-top:10px; color:rgba(255,255,255,0.85); font-size:15px; max-width:440px; }
  .cta-actions{ display:flex; gap:14px; flex-wrap:wrap; }
  .btn-on-rust{
    background:var(--navy-dark); color:#fff;
    padding:15px 28px; font-weight:600; font-size:15px;
    border:1px solid var(--navy-dark);
    transition:opacity .15s ease;
  }
  .btn-on-rust:hover{ opacity:0.85; }
  .btn-on-rust.outline{
    background:transparent; border:1px solid rgba(255,255,255,0.5);
  }
  .btn-on-rust.outline:hover{ border-color:#fff; }

  /* ===== FOOTER ===== */
  footer{
    background:var(--navy-dark); color:#8B93A0;
    padding:48px 32px 28px;
  }
  .footer-inner{
    max-width:1180px; margin:0 auto;
    display:flex; justify-content:space-between; align-items:flex-start;
    flex-wrap:wrap; gap:24px;
    padding-bottom:28px;
    border-bottom:1px solid var(--line);
  }
  .footer-logo{
    color:var(--concrete-light); font-family:'Oswald',sans-serif;
    font-size:17px; font-weight:600;
  }
  .footer-links{ display:flex; gap:28px; flex-wrap:wrap; }
  .footer-links a{ font-size:14px; color:#8B93A0; }
  .footer-links a:hover{ color:var(--concrete-light); }
  .footer-bottom{
    max-width:1180px; margin:0 auto; padding-top:22px;
    font-size:12.5px; color:#5A6270;
    display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
  }

  /* ===== SECTIONS (project documentation) ===== */
  .sections-band{ background:var(--concrete); }
  .sections-grid{
    display:grid; grid-template-columns:repeat(7,1fr);
    border-top:1px solid var(--line-dark);
    border-left:1px solid var(--line-dark);
  }
  .section-tile{
    border-right:1px solid var(--line-dark);
    border-bottom:1px solid var(--line-dark);
    padding:26px 18px;
    text-align:center;
  }
  .section-tile .abbr{
    font-family:'Oswald', sans-serif;
    font-size:26px; font-weight:600; color:var(--navy);
    margin-bottom:8px;
  }
  .section-tile .full{
    font-size:12px; color:#6B7178; line-height:1.35;
  }

  /* ===== EQUIPMENT BAND ===== */
  .equip{
    background:var(--navy);
    color:var(--concrete-light);
  }
  .equip-inner{
    display:grid; grid-template-columns:1fr 1fr; gap:56px;
    padding:88px 32px; max-width:1180px; margin:0 auto;
    align-items:start;
  }
  .equip h2{ font-size:clamp(26px,3vw,34px); font-weight:600; max-width:440px; line-height:1.15; }
  .equip .lead{ margin-top:18px; color:#B7C0CA; font-size:15.5px; max-width:420px; }
  .equip-list{ display:flex; flex-direction:column; gap:0; }
  .equip-row{
    padding:18px 0; border-bottom:1px solid var(--line);
    display:flex; gap:14px; align-items:flex-start;
  }
  .equip-row:first-child{ padding-top:0; }
  .equip-row .dot{
    width:6px; height:6px; background:var(--rust-light);
    margin-top:8px; flex-shrink:0;
  }
  .equip-row p{ font-size:14.5px; color:#C7CFD8; }

  /* ===== GALLERY (photo placeholders) ===== */
  .gallery{ background:var(--concrete-light); }
  .gallery-grid{
    display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:2px;
    height:420px;
  }
  .photo-slot{
    position:relative;
    background:
      repeating-linear-gradient(135deg, #cfd2d6 0 2px, #c3c7cc 2px 4px),
      linear-gradient(160deg, #b9bec4, #8f96a0);
    overflow:hidden;
    display:flex; align-items:flex-end;
  }
  .photo-slot .tag{
    margin:18px; padding:8px 14px;
    background:rgba(27,37,48,0.82);
    color:#E8E6E1; font-size:12.5px; font-weight:600;
    display:flex; align-items:center; gap:8px;
  }
  .photo-slot .tag::before{
    content:"";
    width:6px; height:6px; background:var(--rust-light);
  }

  /* ===== PAGE HERO (inner pages) ===== */
  .page-hero{
    background:var(--navy); color:var(--concrete-light);
    padding:64px 32px 56px;
    border-bottom:1px solid var(--line);
  }
  .page-hero-inner{ max-width:1180px; margin:0 auto; }
  .page-hero h1{ font-size:clamp(30px,4vw,46px); font-weight:600; }
  .page-hero p{ margin-top:14px; color:#B7C0CA; font-size:16px; max-width:560px; }
  .breadcrumb{ font-size:13px; color:#8B93A0; margin-bottom:14px; }
  .breadcrumb a{ color:#8B93A0; } .breadcrumb a:hover{ color:var(--concrete-light); }

  /* ===== DETAIL SERVICE BLOCKS (services page) ===== */
  .detail-block{
    display:grid; grid-template-columns:0.9fr 1.6fr; gap:40px;
    padding:44px 0; border-bottom:1px solid var(--line-dark);
  }
  .detail-block:first-child{ padding-top:0; }
  .detail-block:last-child{ border-bottom:none; }
  .detail-block .idx-big{
    font-family:'Oswald',sans-serif; font-size:15px; font-weight:600;
    color:var(--rust); letter-spacing:0.04em; margin-bottom:10px;
  }
  .detail-block h3{ font-size:23px; font-weight:600; }
  .detail-block .body p{ font-size:15px; color:#5B6169; margin-bottom:10px; }
  .detail-block ul{ margin-top:14px; padding-left:0; list-style:none; }
  .detail-block li{
    font-size:14px; color:#3A3F45; padding:8px 0 8px 18px;
    border-top:1px solid var(--line-dark); position:relative;
  }
  .detail-block li:first-child{ border-top:none; }
  .detail-block li::before{
    content:""; position:absolute; left:0; top:16px;
    width:5px; height:5px; background:var(--rust);
  }

  /* ===== ABOUT PAGE ===== */
  .about-lead{
    font-size:19px; line-height:1.6; color:var(--graphite);
    max-width:760px; margin-bottom:8px;
  }
  .value-grid{
    display:grid; grid-template-columns:repeat(2,1fr); gap:28px;
    margin-top:12px;
  }
  .value-card{ border-left:2px solid var(--rust); padding-left:20px; }
  .value-card h4{ font-size:16px; font-weight:600; margin-bottom:8px; }
  .value-card p{ font-size:14px; color:#5B6169; }

  /* ===== CONTACTS PAGE ===== */
  .contacts-grid{
    display:grid; grid-template-columns:1fr 1fr; gap:56px;
  }
  .contact-item{ padding:20px 0; border-bottom:1px solid var(--line-dark); }
  .contact-item:first-child{ padding-top:0; }
  .contact-item .k{ font-size:12.5px; color:#8B93A0; text-transform:uppercase; letter-spacing:0.04em; margin-bottom:6px; }
  .contact-item .v{ font-size:17px; font-weight:600; }
  .contact-item .v a{ color:var(--graphite); }
  .contact-form{ display:flex; flex-direction:column; gap:16px; }
  .contact-form label{ font-size:13px; color:#5B6169; margin-bottom:6px; display:block; }
  .contact-form input, .contact-form textarea{
    width:100%; border:1px solid var(--line-dark); background:var(--concrete-light);
    padding:13px 14px; font-family:'Inter',sans-serif; font-size:14.5px; color:var(--graphite);
  }
  .contact-form textarea{ min-height:110px; resize:vertical; }
  .contact-form button{
    background:var(--rust); color:#fff; border:none; padding:15px 26px;
    font-weight:600; font-size:15px; cursor:pointer; align-self:flex-start;
  }

  /* ===== ANIMATED PHOTO PLACEHOLDER (Ken Burns style) ===== */
  @keyframes kenburns{
    0%{ transform: scale(1) translate(0,0); }
    100%{ transform: scale(1.12) translate(-1%, -1%); }
  }
  @keyframes shimmer-sweep{
    0%{ background-position: 0% 50%; }
    100%{ background-position: 100% 50%; }
  }
  .photo-anim{
    position:relative; overflow:hidden;
    background:
      linear-gradient(120deg, #2a3542 0%, #445263 35%, #6b7d92 50%, #445263 65%, #2a3542 100%);
    background-size:220% 220%;
    animation: shimmer-sweep 9s ease-in-out infinite alternate;
  }
  .photo-anim::after{
    content:"";
    position:absolute; inset:0;
    background:repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 6px);
    animation: kenburns 14s ease-in-out infinite alternate;
  }

  /* ===== HERO v2 (photo hero, referenced layout) ===== */
  .hero-photo{
    position:relative;
    background:var(--navy);
    color:var(--concrete-light);
    min-height:560px;
    display:flex; align-items:flex-end;
    overflow:hidden;
    border-bottom:1px solid var(--line);
  }
  .hero-photo .bg{
    position:absolute; inset:0; z-index:0;
  }
  .hero-photo .bg.real-photo{
    background-image:url('assets/images/hero-plant.jpg');
    background-size:cover;
    background-position:center 60%;
    animation: kenburns-photo 22s ease-in-out infinite alternate;
  }
  @keyframes kenburns-photo{
    0%{ transform: scale(1) translate(0,0); }
    100%{ transform: scale(1.1) translate(-1.5%, -1%); }
  }
  .hero-photo .shine{
    position:absolute; inset:0; z-index:1; pointer-events:none;
    background:linear-gradient(115deg, transparent 20%, rgba(217,169,74,0.16) 42%, rgba(255,255,255,0.22) 48%, rgba(217,169,74,0.16) 54%, transparent 76%);
    background-size:250% 250%;
    mix-blend-mode:overlay;
    animation: shine-sweep 6s ease-in-out infinite;
  }
  @keyframes shine-sweep{
    0%{ background-position: 130% 30%; }
    50%{ background-position: -30% 70%; }
    100%{ background-position: 130% 30%; }
  }
  .hero-photo .scrim{
    position:absolute; inset:0; z-index:1;
    background:linear-gradient(90deg, rgba(12,16,22,0.74) 0%, rgba(12,16,22,0.58) 34%, rgba(12,16,22,0.28) 60%, rgba(12,16,22,0.08) 100%);
  }
  .hero-photo-inner{
    position:relative; z-index:2;
    width:100%;
    padding:130px 6vw 80px;
  }
  .hero-photo .hero-eyebrow{ color:var(--rust-light); }
  .hero-photo h1{
    font-size:clamp(38px,5.6vw,66px); font-weight:700; line-height:1.02;
    letter-spacing:-0.01em; max-width:640px;
  }
  .hero-photo .desc{ margin-top:22px; color:#C7CFD8; font-size:16.5px; max-width:480px; }
  .hero-photo .actions{ margin-top:34px; display:flex; gap:14px; flex-wrap:wrap; }

  /* ===== STAT STRIP v2 (icons) ===== */
  .stat-strip{
    background:var(--navy-dark);
    border-top:1px solid var(--line);
  }
  .stat-strip-inner{
    max-width:1180px; margin:0 auto;
    padding:34px 32px;
    display:grid; grid-template-columns:repeat(4,1fr);
  }
  .stat-icon-item{
    display:flex; align-items:center; gap:14px;
    padding:0 20px; border-left:1px solid var(--line);
  }
  .stat-icon-item:first-child{ border-left:none; padding-left:0; }
  .stat-icon-item .ico{
    width:40px; height:40px; flex-shrink:0;
    border:1px solid var(--rust); border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    color:var(--rust-light); font-family:'Oswald',sans-serif; font-size:15px; font-weight:600;
  }
  .stat-icon-item .txt .n{ font-size:14.5px; font-weight:600; color:var(--concrete-light); line-height:1.25; }
  .stat-icon-item .txt .l{ font-size:12px; color:#9AA5B1; }

  /* ===== INDUSTRY / PROJECT-TYPE CARDS ===== */
  .industries{ background:var(--concrete-light); }
  .industry-grid{
    display:grid; grid-template-columns:repeat(auto-fit, minmax(230px, 1fr)); gap:2px;
    background:var(--line-dark);
  }
  .industry-card{
    position:relative; height:280px; overflow:hidden;
    background:var(--concrete-light);
    display:flex; align-items:flex-end;
  }
  .industry-card .photo-anim{ position:absolute; inset:0; transition:transform .5s ease; }
  .industry-card:hover .photo-anim{ transform:scale(1.06); }
  .photo-anim.atomic-photo{
    background-image:url('assets/images/hero-plant.jpg');
    background-size:cover; background-position:center 55%;
    animation: kenburns-photo 20s ease-in-out infinite alternate;
  }
  .photo-anim.oilgas-photo{
    background-image:url('assets/images/oilgas.jpg');
    background-size:cover; background-position:center 45%;
    animation: kenburns-photo 20s ease-in-out infinite alternate-reverse;
  }
  .photo-anim.production-photo{
    background-image:url('assets/images/production.jpg');
    background-size:cover; background-position:center 55%;
    animation: kenburns-photo 24s ease-in-out infinite alternate;
  }
  .photo-anim.equipment-photo{
    background-image:url('assets/images/equipment.jpg');
    background-size:cover; background-position:center 50%;
    animation: kenburns-photo 22s ease-in-out infinite alternate-reverse;
  }
  .photo-anim.coming-soon{
    background:
      repeating-linear-gradient(135deg, #d8d3c8 0 2px, #cbc5b6 2px 4px),
      linear-gradient(160deg, #c9c2ae, #a89f88);
    animation: shimmer-sweep 9s ease-in-out infinite alternate;
  }
  .industry-card .overlay{
    position:relative; z-index:1;
    padding:22px;
    background:linear-gradient(0deg, rgba(18,24,31,0.88) 10%, rgba(18,24,31,0.1) 80%);
    width:100%;
  }
  .industry-card h4{ color:#fff; font-size:16.5px; font-weight:600; margin-bottom:6px; }
  .industry-card p{ color:#C7CFD8; font-size:13px; }

  @media (max-width: 860px){
    .hero-photo{ min-height:auto; }
    .hero-photo-inner{ padding:80px 24px 48px; }
    .stat-strip-inner{ grid-template-columns:1fr 1fr; row-gap:20px; }
    .stat-icon-item{ border-left:none; padding-left:0; }
    .industry-grid{ grid-template-columns:1fr 1fr; }
    .detail-block{ grid-template-columns:1fr; gap:16px; }
    .value-grid{ grid-template-columns:1fr; }
    .contacts-grid{ grid-template-columns:1fr; gap:36px; }
    .hero-inner{ grid-template-columns:1fr; }
    .services-grid{ grid-template-columns:1fr; }
    .stats-inner{ grid-template-columns:1fr 1fr; row-gap:28px; }
    .stat{ border-left:none; padding-left:0; }
    .why-list{ grid-template-columns:1fr; }
    .why-item:nth-child(even){ padding-left:0; border-left:none; }
    .why-item:nth-child(odd){ padding-right:0; }
    nav{ display:none; }
    .section{ padding:64px 0; }
    .gallery-grid{ grid-template-columns:1fr; height:auto; }
    .photo-slot{ height:220px; }
    .sections-grid{ grid-template-columns:repeat(3,1fr); }
    .equip-inner{ grid-template-columns:1fr; gap:32px; padding:64px 32px; }
  }