/* ==========================================================================
   IceGuard, pre-sales demo
   Layout and visual language follow amaxgas.com (the client's stated favourite): two-row header,
   full-screen video hero with a white card, round icon tabs, soft cards, photo bands.
   One red DEVI heating cable is laid through the page as a thin line (js/main.js draws it on scroll).
   Brand colours come from the client's logo.
   ========================================================================== */

/* Montserrat (OFL), self-hosted. The Cyrillic file has its "locl" feature removed so lang="bg"
   does not switch т, д, г to the Bulgarian cursive forms (Safari ignores font-feature-settings for this). */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/montserrat-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/montserrat-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;
}

:root {
  --blue: #0070b2;
  --blue-dark: #1d4a96;
  --red: #e6382e;
  --ink: #232a31;
  --body: #373737;
  --muted: #5f6b75;
  --line: #e3e8ec;
  --soft: #f4f5f6;
  --navy: #0d2538;
  --grad: linear-gradient(90deg, #0070b2, #1d4a96);
  --header-h: 88px;
  --max: 1180px;
  --pad: clamp(28px, 5vw, 40px);
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  color: var(--body);
  background: #fff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
h1, h2, h3 { color: var(--body); margin: 0; font-weight: 500; line-height: 1.2; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { width: 100%; max-width: calc(var(--max) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- header: full-width bar at the top, floating rounded bar after scrolling (model: Starlink) ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 0; pointer-events: none; transition: padding .25s ease; }
.bar {
  pointer-events: auto; position: relative; display: flex; align-items: center; gap: 22px;
  width: 100%; max-width: 100%; height: 72px; margin: 0 auto;
  padding: 0 max(22px, calc((100% - var(--max)) / 2 + 14px)) 0 max(22px, calc((100% - var(--max)) / 2));
  background: #fff; border-radius: 0; box-shadow: 0 1px 0 var(--line);
  transition: max-width .25s ease, height .25s ease, border-radius .25s ease, box-shadow .25s ease, padding .25s ease;
}
.site-header.is-scrolled { padding: 12px; }
.is-scrolled .bar {
  max-width: calc(var(--max) + 24px); height: 64px; padding: 0 14px 0 22px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 10px 34px -12px rgba(13, 37, 56, 0.4);
}
.logo img { width: 150px; height: auto; }
.nav { display: flex; align-items: center; margin-left: auto; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { display: block; padding: 8px 12px; color: var(--ink); font-weight: 600; font-size: 14px; border-radius: 8px; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-contact { display: none; }
.bar-phone { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.bar-phone:hover { color: var(--blue); }
.nav-toggle { display: none; width: 40px; height: 40px; border: 0; background: none; padding: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px auto; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- buttons: pills ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 28px; border-radius: 999px; border: 2px solid transparent;
  background: var(--grad); color: #fff; font: 600 14px/1.2 var(--font); cursor: pointer; text-align: center;
  transition: filter .15s, background .15s, color .15s;
}
.pill:hover { color: #fff; filter: brightness(1.12); }
.pill--outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.pill--outline:hover { background: #eaf4fb; color: var(--blue); filter: none; }
.pill--light { background: #fff; color: var(--blue-dark); }
.pill--light:hover { color: var(--blue-dark); filter: brightness(0.95); }
.pill--block { width: 100%; }
.pill svg { width: 16px; height: 16px; }
a.pill:not(.pill--outline):not(.pill--light):not(.pill--block)::after { content: "\2192"; }

/* ---------- the stage and the cable ---------- */
.stage { position: relative; overflow: hidden; background: #fff; }
.stage > section { position: relative; z-index: 1; }
.cable { display: none; }
.stage.ig-ready .cable, .stage.ig-static .cable { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.cable svg { position: absolute; left: 0; top: 0; overflow: visible; }
.cable path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cable-ghost { stroke: rgba(40, 70, 95, 0.16); stroke-width: 1.5; }
.cable-live { stroke: var(--red); stroke-width: 2.5; stroke-dasharray: 1; stroke-dashoffset: 1; }
.stage.ig-static .cable-live { stroke-dashoffset: 0; }
.cable-ends rect, .cable-ends circle { fill: var(--ink); }
.cable-tip {
  position: absolute; left: 0; top: 0; width: 9px; height: 9px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 0 4px rgba(230, 56, 46, 0.18), 0 0 14px 4px rgba(230, 56, 46, 0.3);
  offset-rotate: 0deg; opacity: 0;
}
.stage.ig-ready .cable-tip { opacity: 1; }
.stage.ig-static .cable-tip { display: none; }

/* ---------- type ---------- */
.eyebrow { display: block; margin-bottom: 12px; font: 600 12px/1.4 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
h1 { font-size: clamp(28px, 3.4vw, 40px); }
h2 { font-size: clamp(24px, 2.8vw, 32px); }
h3 { font-size: 18px; font-weight: 600; }
.lead { font-size: 15px; max-width: 60ch; margin-top: 16px; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section--end { padding-bottom: 104px; }
.section-head { margin-bottom: 44px; max-width: 720px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.mark { width: 44px; height: 44px; margin: 0 auto 14px; }

/* stock photos fill their parent */
.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* home hero: full-screen video, white card in the corner */
.hero { position: relative; height: var(--vh, 100vh); min-height: 600px; max-height: 920px; background: #28323a; overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.8s; }
.hero-video.is-playing { opacity: 1; }
.hero-wrap { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: flex-end; z-index: 2; }
.hero-card {
  width: 100%; max-width: 560px; padding: 48px 48px 44px; background: #fff;
  border-radius: 90px 0 0 0; border-top: 3px solid var(--blue); border-left: 3px solid var(--blue);
}
.hero-card h1 { font-size: clamp(26px, 2.8vw, 34px); }
.hero-card .lead { margin-top: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-partner { margin: 22px 0 0; font-size: 13px; color: var(--muted); }

/* inner page banner */
.page-hero { position: relative; overflow: hidden; background: #28323a; padding: calc(var(--header-h) + 52px) 0 76px; }
.page-hero-bg { position: absolute; inset: 0; }
.page-hero-bg::after, .band-bg::after, .footer-bg::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.page-hero-bg::after { background: linear-gradient(90deg, rgba(13, 37, 56, 0.85), rgba(13, 37, 56, 0.5)); }
.page-hero-text { position: relative; z-index: 3; }
.page-hero h1 { color: #fff; font-size: clamp(30px, 4vw, 44px); }
.page-hero .eyebrow { color: #9bd3f5; }
.page-hero .lead { color: #e2edf5; }

/* two directions: tabs */
.tablist { display: none; justify-content: center; gap: 36px; margin-bottom: 44px; }
.is-tabs .tablist { display: flex; }
.tab { display: grid; justify-items: center; gap: 10px; width: 140px; padding: 0; border: 0; background: none; cursor: pointer; font: 600 13px/1.35 var(--font); color: var(--body); text-align: center; }
.tab-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: #fff; border: 1px solid #cfd8df; color: var(--blue); box-shadow: 0 6px 16px -8px rgba(13, 37, 56, 0.3); transition: background .2s, color .2s; }
.tab-icon svg { width: 36px; height: 36px; }
.tab:hover .tab-icon { border-color: var(--blue); }
.tab[aria-selected="true"] .tab-icon { background: var(--grad); border-color: transparent; color: #fff; }
.panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 430px); gap: 56px; align-items: center; max-width: 1000px; margin: 0 auto 56px; }
.is-tabs .panel { margin-bottom: 0; }
.panel--text { grid-template-columns: minmax(0, 560px); justify-content: center; }
.panel-copy h2 { font-size: clamp(24px, 2.6vw, 30px); }
.panel-brand { width: 60px; height: auto; margin: 16px 0 12px; }
.panel-copy p { max-width: 44ch; }
.panel-media img { width: 100%; border-radius: 14px; box-shadow: 0 16px 36px -18px rgba(13, 37, 56, 0.45); }
.panel-media--product { background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 16px 36px -18px rgba(13, 37, 56, 0.35); }
.panel-media--product img { box-shadow: none; }

/* references: soft grey cards */
.ref-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.ref { background: var(--soft); border-radius: 22px; padding: 14px 14px 6px; }
.ref img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; border-radius: 14px; }
.ref span { display: block; padding: 14px 6px 12px; font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.35; }

/* "why": photo band */
.band { position: relative; overflow: hidden; padding: 96px 0; background: #28323a; color: #e2edf5; }
.band-bg { position: absolute; inset: 0; }
.band-bg::after { background: rgba(13, 37, 56, 0.78); }
.band-photo { object-position: 50% 72%; }
.band-text { position: relative; z-index: 3; }
.band h2, .band h3 { color: #fff; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.why { border-top: 2px solid rgba(255, 255, 255, 0.35); padding-top: 18px; }
.why p { margin: 8px 0 0; font-size: 14px; }

/* cta */
.cta-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  background: var(--grad); color: #e2edf5; border-radius: 28px; padding: clamp(32px, 5vw, 52px);
}
.cta-banner h2 { color: #fff; }
.cta-banner p { margin: 10px 0 0; max-width: 46ch; }
.cta-banner .pill { flex: none; }

/* services */
.service { padding: 36px 0; }
.service:first-of-type { padding-top: 72px; }
.service-card { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 56px; align-items: center; padding: clamp(24px, 4vw, 44px); background: var(--soft); border-radius: 28px; }
.service-card--reverse .service-media { order: 2; }
.service-media img { width: 100%; border-radius: 14px; }
.service-media--product { background: #fff; border-radius: 14px; padding: 8px; }
.service-media--product img { border-radius: 8px; }
.service-copy h2 { font-size: clamp(22px, 2.6vw, 28px); }
.service-copy p { margin-top: 16px; }
.app-list { margin-top: 22px; columns: 2; column-gap: 28px; }
.app-list li { position: relative; padding-left: 26px; margin-bottom: 9px; break-inside: avoid; color: var(--ink); font-weight: 500; font-size: 14px; line-height: 1.45; }
.app-list li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 16px; height: 2px; border-radius: 2px; background: var(--red); }
.scope-note { margin: 36px 0 0; padding: 22px 26px; background: #fff; border: 1px solid var(--line); border-radius: 18px; font-size: 14px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 28px; align-items: start; }
.card { background: var(--soft); border-radius: 28px; }
.contact-info, .contact-form { padding: clamp(24px, 4vw, 40px); }
.contact-info h2, .contact-form h2 { font-size: 24px; margin-bottom: 22px; }
.contact-line { padding: 14px 0; border-top: 1px solid #dde3e8; display: grid; gap: 3px; }
.contact-line:last-child { border-bottom: 1px solid #dde3e8; }
.contact-line strong { font: 600 11.5px/1.4 var(--font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-line a:not(.link-more) { color: var(--ink); font-weight: 600; }
.link-more { font-weight: 600; font-size: 14px; color: var(--blue); display: inline-block; margin-top: 6px; }
.link-more::after { content: " \2192"; }

.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: 13.5px; color: var(--ink); margin-bottom: 6px; }
input, textarea { width: 100%; padding: 13px 16px; font: 400 15px/1.4 var(--font); color: var(--ink); background: #fff; border: 1.5px solid #cdd6dd; border-radius: 14px; }
textarea { min-height: 140px; resize: vertical; }
input:hover, textarea:hover { border-color: #8aa0af; }
.form-row.has-error input, .form-row.has-error textarea { border-color: #c4271e; }
.field-error { display: none; margin: 6px 0 0; font-size: 13px; color: #b3221a; }
.has-error .field-error { display: block; }
.form-success { display: none; margin-bottom: 20px; padding: 16px 18px; border-radius: 14px; background: #e6f4ea; border: 1px solid #9fd0ac; color: #17502a; font-weight: 600; }
.form-success.visible { display: block; }
.form-disclaimer { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

/* footer: photo with the contacts on top */
.site-footer { position: relative; z-index: 3; overflow: hidden; background: #28323a; color: #dbe7ef; padding: 64px 0 24px; }
.footer-bg { position: absolute; inset: 0; }
.footer-bg::after { background: rgba(13, 37, 56, 0.82); }
.site-footer .container { position: relative; z-index: 3; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 40px; }
.footer-col h2 { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 10px; }
.footer-col p, .footer-col li { font-size: 14px; margin-bottom: 8px; }
.footer-col p + h2 { margin-top: 22px; }
.footer-col a { color: #fff; }
.footer-col a:hover { color: #9bd3f5; }
.footer-devi { width: 64px; margin-top: 14px; background: #fff; padding: 6px 8px; border-radius: 8px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.25); font-size: 12.5px; color: #b8cbd9; }

/* phone: bottom action bar, shown after the first section (JS adds .is-armed) */
.mbar { display: none; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .bar-phone { display: none; }
}
@media (max-width: 1000px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: calc(100% + 8px); margin: 0;
    flex-direction: column; align-items: stretch; padding: 6px 20px 18px; background: #fff;
    border-radius: 16px; box-shadow: 0 16px 40px -14px rgba(13, 37, 56, 0.45);
    max-height: calc(var(--vh, 100vh) - 100px); overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { padding: 14px 0; font-size: 16px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav-contact { display: grid; gap: 2px; padding-top: 10px; }
  .nav-contact a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; font: 600 14px var(--font); color: var(--ink); }
  .nav-contact svg { width: 14px; height: 14px; color: var(--red); }

  .hero { max-height: none; }
  .hero-card { max-width: 520px; padding: 36px 36px 36px; border-radius: 64px 0 0 0; }
  .panel, .service-card, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .service-card--reverse .service-media { order: 0; }
  .service-media, .panel-media { max-width: 480px; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .ref-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-banner { flex-direction: column; align-items: flex-start; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  :root { --header-h: 84px; }
  .site-header.is-scrolled { padding: 10px; }
  .bar { height: 64px; padding: 0 10px 0 16px; gap: 10px; }
  .is-scrolled .bar { height: 60px; }
  .logo img { width: 132px; }
  body { padding-bottom: 76px; }
  .section { padding: 68px 0; }
  .section--end { padding-bottom: 80px; }
  .band { padding: 68px 0; }
  .service { padding: 24px 0; }
  .service:first-of-type { padding-top: 52px; }
  .page-hero { padding: calc(var(--header-h) + 32px) 0 48px; }
  .cable-live { stroke-width: 2.5; }

  .hero { height: auto; min-height: 0; max-height: none; }
  .hero-media { position: relative; height: var(--hero-media, calc(var(--vh, 100vh) * 0.66)); min-height: 300px; }
  .hero-wrap { height: auto; margin-top: -40px; padding: 0; }
  .hero-card { max-width: none; padding: 20px 24px 22px; border-radius: 48px 0 0 0; }
  .hero-card h1 { font-size: 24px; }
  .hero-card .lead { font-size: 14px; line-height: 1.6; margin-top: 10px; }
  .hero-actions { margin-top: 18px; }
  .hero-actions .pill { padding: 11px 24px; }
  .hero-partner { display: none; }
  .hero-actions .pill { flex: 1 1 100%; }
  .hero-actions .pill--outline { display: none; }
  .tablist { gap: 20px; }
  .tab { width: 120px; }
  .ref-grid { gap: 12px; }
  .ref { padding: 8px 8px 2px; border-radius: 16px; }
  .ref span { font-size: 13px; padding: 10px 4px; }
  .why-grid { grid-template-columns: 1fr; }
  .app-list { columns: 1; }
  .form-two { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  .mbar {
    display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--line);
  }
  .mbar.is-armed { transform: translateY(110%); transition: transform .3s ease; }
  .mbar.is-armed.is-visible { transform: none; }
  .mbar .pill { flex: 1; padding: 11px 8px; font-size: 12.5px; white-space: nowrap; }
  .mbar .pill::after { content: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* „Уеб сайт от coltcode“ (coltcode-starter/kod/coltcode-credit.html) */
.coltcode-credit { margin: 0; }
.coltcode-credit a { display: inline-flex; align-items: center; gap: .35em; color: inherit; text-decoration: none; }
.coltcode-credit img { flex: none; display: block; }
.coltcode-credit span { text-decoration: underline; text-underline-offset: 3px; }
