/* ==========================================================================
   Premium PRO — Engineering / Будівельні послуги
   Стек: чистий HTML + CSS + JS (без фреймворків)
   Мова контенту: українська
   ========================================================================== */

:root{
  /* Brand */
  --brand-500:#1D4ED8; /* deep blue */
  --brand-400:#2563EB;
  --accent-500:#06B6D4; /* cyan */
  --accent-400:#22D3EE;

  /* Logo accent */
  --sip-red:#9C1415; /* logo red */
  --sip-red-soft: rgba(156,20,21,.12);

  /* Neutrals */
  --ink:#0B1220;
  --ink-2:#121B2E;
  --paper:#F6F7FB;
  --paper-2:#FFFFFF;
  --muted:#60708A;
  --border:rgba(11,18,32,.12);
  --border-dark:rgba(255,255,255,.12);

  /* Effects */
  --shadow-sm:0 6px 18px rgba(11,18,32,.10);
  --shadow-md:0 14px 38px rgba(11,18,32,.14);
  --shadow-lg:0 22px 60px rgba(11,18,32,.18);

  /* Radius */
  --r-sm:10px;
  --r-md:16px;
  --r-lg:24px;

  /* Spacing */
  --container:1160px;
  --gutter:24px;

  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --font-display: var(--font-sans);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font-sans);
  color:var(--ink);
  background:linear-gradient(180deg, var(--paper) 0%, #fff 75%);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

img{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }
p{ margin:0 0 1rem 0; color:var(--muted); }
h1,h2,h3,h4{ margin:0 0 .6rem 0; letter-spacing:-0.02em; }
h1{ font-family:var(--font-display); font-size:clamp(2.2rem, 3.4vw, 3.6rem); line-height:1.05; }
h2{ font-size:clamp(1.6rem, 2.4vw, 2.2rem); line-height:1.15; }
h3{ font-size:1.15rem; }
small{ color:var(--muted); }

::selection{ background:rgba(156,20,21,.18); }

.container{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:0 var(--gutter);
}

.skip-link{
  position:absolute;
  left:-999px;
  top:0;
  padding:.75rem 1rem;
  background:var(--paper-2);
  border:1px solid var(--border);
  border-radius:var(--r-sm);
  z-index:9999;
}
.skip-link:focus{ left: var(--gutter); top: var(--gutter); }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */
.header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(246,247,251,.72);
  backdrop-filter: blur(14px);
  border-bottom:1px solid rgba(11,18,32,.08);
}
.header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:74px;
  gap:16px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand__mark{
  width:38px; height:38px;
  border-radius:12px;
  background: rgba(255,255,255,.92) url('../img/logo-mark.png') no-repeat center / 86%;
  border:1px solid rgba(11,18,32,.10);
  box-shadow:var(--shadow-sm);
}
.brand__text{
  display:flex; flex-direction:column;
  line-height:1.05;
}
.brand__name{
  font-weight:800;
  letter-spacing:.02em;
}
.brand__tagline{
  font-size:.82rem;
  color:var(--muted);
}

.nav{
  display:flex;
  align-items:center;
  gap:18px;
}
.nav a{
  font-size:.95rem;
  color:rgba(11,18,32,.86);
  padding:.5rem .25rem;
  border-radius:10px;
  transition:background .2s ease, color .2s ease, transform .2s ease;
}
.nav a:hover{
  background:rgba(29,78,216,.08);
  color:var(--ink);
}

/* Hide redundant "Замовити" tab in navigation (CTA button already exists) */
.nav a[href$="order.html"]{ display:none; }
.mobile__panel a[href$="order.html"]{ display:none; }

/* Language switch (injected by JS) */
.lang-switch{
  width:44px; height:44px;
  border-radius:14px;
  border:1px solid rgba(11,18,32,.12);
  background:rgba(255,255,255,.7);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  letter-spacing:.08em;
  font-size:.72rem;
  color:rgba(11,18,32,.78);
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.lang-switch:hover{ background:#fff; box-shadow:var(--shadow-sm); transform:translateY(-1px); }
.lang-switch:active{ transform:translateY(1px); }

.nav__cta{
  display:flex;
  align-items:center;
  gap:12px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  border-radius:999px;
  padding:.78rem 1.05rem;
  border:1px solid transparent;
  font-weight:700;
  letter-spacing:.01em;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  user-select:none;
}
.btn:active{ transform:translateY(1px); }
.btn--primary{
  color:#fff;
  background:linear-gradient(135deg, var(--brand-500) 0%, var(--accent-500) 70%, var(--sip-red) 100%);
  box-shadow:0 14px 38px rgba(29,78,216,.25);
}
.btn--primary:hover{ box-shadow:0 18px 46px rgba(29,78,216,.32); transform:translateY(-1px); }
.btn--ghost{
  background:rgba(255,255,255,.75);
  border-color:rgba(11,18,32,.12);
}
.btn--ghost:hover{ background:#fff; box-shadow:var(--shadow-sm); transform:translateY(-1px); }

.icon{
  width:18px; height:18px;
  display:inline-block;
}

.burger{
  display:none;
  width:44px; height:44px;
  border-radius:14px;
  border:1px solid rgba(11,18,32,.12);
  background:rgba(255,255,255,.7);
  cursor:pointer;
}
.burger span{
  display:block;
  width:18px;
  height:2px;
  background:rgba(11,18,32,.82);
  margin:4px auto;
  border-radius:2px;
}

/* Mobile Nav */
.mobile{
  display:none;
  padding:0 0 18px 0;
}
.mobile__panel{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:0 var(--gutter) 18px var(--gutter);
}
.mobile__panel a{
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(11,18,32,.10);
  background:rgba(255,255,255,.78);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  position:relative;
  padding:52px 0 28px 0;
}
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(800px 340px at 20% 18%, rgba(34,211,238,.22), transparent 60%),
    radial-gradient(700px 300px at 86% 25%, rgba(29,78,216,.18), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.5), rgba(246,247,251,0));
  pointer-events:none;
}
.hero__grid{
  position:relative;
  display:grid;
  grid-template-columns: 1.18fr .82fr;
  gap:34px;
  align-items:center;
}
.kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:.35rem .65rem;
  border-radius:999px;
  border:1px solid rgba(11,18,32,.10);
  background:rgba(255,255,255,.66);
  font-weight:700;
  color:rgba(11,18,32,.74);
  font-size:.85rem;
}
.kicker__dot{
  width:9px; height:9px; border-radius:99px;
  background:linear-gradient(135deg, var(--brand-500) 0%, var(--accent-500) 70%, var(--sip-red) 100%);
  box-shadow:0 0 0 6px rgba(6,182,212,.12), 0 0 0 11px rgba(156,20,21,.06);
}

.hero__lead p{ font-size:1.05rem; max-width:60ch; }
.hero__actions{ display:flex; gap:12px; flex-wrap:wrap; margin-top:16px; }

.hero__meta{
  margin-top:18px;
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}
.meta{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px 14px;
  border-radius:var(--r-md);
  background:rgba(255,255,255,.7);
  border:1px solid rgba(11,18,32,.10);
  box-shadow:var(--shadow-sm);
  min-width: 220px;
}
.meta strong{ display:block; color:var(--ink); }
.meta span{ display:block; font-size:.92rem; color:var(--muted); }

.hero__card{
  border-radius:var(--r-lg);
  overflow:hidden;
  box-shadow:var(--shadow-md);
  border:1px solid rgba(11,18,32,.12);
  background:#0B1220;
}
.hero__card img{ width:100%; height:auto; }
.hero__card__caption{
  padding:14px 16px 16px 16px;
  color:rgba(234,242,255,.92);
}
.hero__card__caption p{ color:rgba(234,242,255,.72); margin:8px 0 0 0; }
.badges{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:.35rem .55rem;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.07);
  font-size:.84rem;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section{
  padding:56px 0;
}
.section--tight{ padding:44px 0; }
.section__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:22px;
}
.section__head p{ max-width:68ch; margin:0; }
.overline{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:.78rem;
  color:rgba(11,18,32,.55);
  margin-bottom:10px;
}
.overline::before{
  content:"";
  width:18px; height:2px;
  border-radius:2px;
  background:linear-gradient(135deg, var(--brand-500) 0%, var(--accent-500) 70%, var(--sip-red) 100%);
}

/* Cards & grids */
.grid{
  display:grid;
  gap:16px;
}
.grid--3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--2{ grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--4{ grid-template-columns: repeat(4, minmax(0,1fr)); }

.card{
  border-radius:var(--r-md);
  background:rgba(255,255,255,.86);
  border:1px solid rgba(11,18,32,.10);
  box-shadow:var(--shadow-sm);
  overflow:hidden;
  transition:transform .18s ease, box-shadow .18s ease;
}
.card:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); }
.card__body{ padding:18px 18px 16px 18px; }
.card__title{ display:flex; align-items:center; gap:10px; font-weight:800; margin:0 0 6px 0; }
.card__title img{ width:22px; height:22px; opacity:.9; }
.card__meta{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.tag{
  font-size:.82rem;
  padding:.28rem .55rem;
  border-radius:999px;
  border:1px solid rgba(11,18,32,.10);
  background:rgba(29,78,216,.06);
  color:rgba(11,18,32,.75);
}

.media{
  border-radius:var(--r-md);
  overflow:hidden;
  border:1px solid rgba(11,18,32,.10);
  background:#0B1220;
}
.media img{ width:100%; }

/* Feature split */
.split{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:28px;
  align-items:center;
}
.list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:18px 0 0 0;
  padding:0;
  list-style:none;
}
.list li{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(11,18,32,.10);
  background:rgba(255,255,255,.8);
}
.list li img{ width:20px; height:20px; margin-top:2px; }
.list li strong{ color:var(--ink); }

/* CTA band */
.cta{
  position:relative;
  border-radius:var(--r-lg);
  padding:26px 22px;
  overflow:hidden;
  background:linear-gradient(135deg, rgba(29,78,216,.95), rgba(6,182,212,.88));
  color:#fff;
  box-shadow:var(--shadow-lg);
}
.cta::after{
  content:"";
  position:absolute;
  inset:-50px -80px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.24), transparent 45%),
    radial-gradient(circle at 80% 60%, rgba(255,255,255,.20), transparent 45%);
  pointer-events:none;
}
.cta__inner{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.cta h3{ margin:0; font-size:1.35rem; }
.cta p{ margin:6px 0 0 0; color:rgba(255,255,255,.82); }

/* ==========================================================================
   Projects page filters (basic)
   ========================================================================== */
.filters{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 18px 0;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:.55rem .75rem;
  border-radius:999px;
  border:1px solid rgba(11,18,32,.12);
  background:rgba(255,255,255,.76);
  cursor:pointer;
  font-weight:700;
  font-size:.92rem;
}
.chip[aria-pressed="true"]{
  background:rgba(29,78,216,.10);
  border-color:rgba(156,20,21,.28);
}
.project-card__img{
  height:180px;
  background:#0B1220;
}
.project-card__img img{ height:100%; width:100%; object-fit:cover; }
.card__foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 18px 16px 18px;
  border-top:1px solid rgba(11,18,32,.08);
}
.link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:800;
  color:rgba(29,78,216,.92);
}
.link:hover{ text-decoration:underline; }

/* ==========================================================================
   Blog
   ========================================================================== */
.post-card__img{ height:160px; background:#0B1220; }
.post-card__img img{ height:100%; width:100%; object-fit:cover; }

.prose{
  max-width: 123ch; /* было 78ch */
}
.prose p{ font-size:1.02rem; }

/* ==========================================================================
   Forms
   ========================================================================== */
.form{
  display:grid;
  gap:12px;
}
.field{
  display:grid;
  gap:6px;
}
label{ font-weight:800; color:rgba(11,18,32,.85); }
input, select, textarea{
  font: inherit;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(11,18,32,.14);
  background:rgba(255,255,255,.9);
  outline:none;
  transition:border-color .2s ease, box-shadow .2s ease;
}
textarea{ min-height:140px; resize:vertical; }
input:focus, select:focus, textarea:focus{
  border-color:rgba(6,182,212,.55);
  box-shadow:0 0 0 6px rgba(6,182,212,.12), 0 0 0 11px rgba(156,20,21,.06);
}
.help{
  font-size:.9rem;
  color:rgba(96,112,138,.95);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer{
  padding:36px 0;
  border-top:1px solid rgba(11,18,32,.10);
  background:linear-gradient(180deg, rgba(246,247,251,.1), rgba(246,247,251,.8));
}
.footer__grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
  align-items:flex-start;
}
.footer__links{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  justify-content:flex-end;
}
.footer__links a{ color:rgba(11,18,32,.78); font-weight:700; }
.footer__links a:hover{ text-decoration:underline; }
.footer small{ display:block; margin-top:10px; }

/* ==========================================================================
   Animations (subtle)
   ========================================================================== */
.reveal{ opacity:0; transform:translateY(10px); transition:opacity .5s ease, transform .5s ease; }
.reveal.is-in{ opacity:1; transform:none; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .reveal{ opacity:1; transform:none; transition:none; }
  .btn{ transition:none; }
}

@media (max-width: 1160px){
  /* Hide phone button in header to avoid wrapping */
  .nav__cta .btn--ghost[href^="tel:"]{ display:none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px){
  .grid--2{ grid-template-columns: 1fr; }
  .hero__grid{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }
  .grid--3{ grid-template-columns: 1fr; }
  .grid--4{ grid-template-columns: 1fr 1fr; }
  .footer__grid{ grid-template-columns: 1fr; }
  .footer__links{ justify-content:flex-start; }
  .nav{ display:none; }
  .header .burger { display: none !important; }
  .header .mobile { display: none !important; }
}

@media (max-width: 850px){
  /* On the order page: hide the left "Наші контакти" column to keep the form full-width */
  .order-grid > .card:first-child{ display:none; }
}

@media (max-width: 420px){
  .brand__tagline{ display:none; }
  .hero__actions .btn{ width:100%; }
}

@media (max-width: 360px){
  .nav__cta{ gap:8px; }
  .lang-switch{ width:40px; height:40px; border-radius:13px; }
  .btn{ padding:.72rem .92rem; }
  .brand__name{ font-size:.98rem; }
}

@media (max-width: 520px){
  :root{ --gutter:16px; }
  .meta{ min-width: 0; width:100%; }
  .cta__inner{ flex-direction:column; align-items:flex-start; }
  .grid--4{ grid-template-columns: 1fr; }
}


/* ==========================================================================
   Navigation tweaks
   ========================================================================== */
/* Hide duplicate 'Order/Замовити' link inside the top nav and the mobile panel (CTA button remains) */
.nav a[href$="order.html"],
.mobile__panel a[href$="order.html"]{ display:none; }


/* ==========================================================================
   Mobile bottom navigation (PRO)
   ========================================================================== */
.bottom-nav{ display:none; }

@media (max-width: 980px){
  body{ padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .bottom-nav{
    display:block;
    position:fixed;
    left:0; right:0; bottom:0;
    z-index:90;
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top:1px solid rgba(11,18,32,.10);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bottom-nav__inner{
    max-width: 1100px;
    margin: 0 auto;
    display:grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 10px 12px;
  }
  .bn__item{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding: 10px 8px;
    border-radius: 16px;
    color: rgba(11,18,32,.78);
    text-decoration:none;
    font-weight: 750;
    font-size: .78rem;
    line-height: 1.1;
    user-select:none;
    -webkit-tap-highlight-color: transparent;
  }
  .bn__item img{ width:20px; height:20px; opacity:.9; }
  .bn__item[aria-current="page"]{
    color: var(--ink);
    background: rgba(0,184,255,.10);
    outline: 1px solid rgba(156,20,21,.20);
  }
  .bn__item:active{ transform: translateY(1px); }
}
