/* =========================================================================
   InovexLabs IT — base design system
   Concept: Swiss corporate. Strict 12-col grid, flush-left, hairline rules,
   square corners, data tables as the visual centrepiece. One accent (cobalt)
   used only for actions and key figures. Dark "ink" sections for contrast.
   ========================================================================= */
:root {
  /* colour */
  --ink: #0b1424;          /* dark sections, headings */
  --ink-2: #131f33;        /* raised surface on dark */
  --ink-3: #1d2a42;        /* hairlines on dark */
  --text: #18202d;
  --muted: #5b6576;
  --muted-dark: #8c97aa;   /* muted text on dark */
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --line: #e1e5eb;
  --line-strong: #c7cdd6;
  --accent: #1544c9;       /* cobalt — CTAs, key numbers */
  --accent-hover: #0f37a8;
  --accent-bright: #5a86ff;/* accent on dark backgrounds */
  --accent-wash: #eef2fd;
  --ok: #12845a;
  --warn: #b26800;
  --crit: #c0351e;

  /* type */
  --f-head: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --fs-xs: 0.8125rem;   /* 13 */
  --fs-sm: 0.9375rem;   /* 15 */
  --fs-base: 1.0625rem; /* 17 */
  --fs-lg: 1.25rem;     /* 20 */
  --fs-xl: clamp(1.5rem, 1.1rem + 1.2vw, 1.875rem);   /* 24–30 */
  --fs-2xl: clamp(1.875rem, 1.2rem + 2.2vw, 2.75rem); /* 30–44 */
  --fs-3xl: clamp(2.375rem, 1.3rem + 3.6vw, 4.25rem); /* 38–68 */

  /* layout */
  --container: 1240px;
  --gutter: clamp(16px, 3vw, 32px);
  --section: clamp(72px, 9vw, 136px);
  --radius: 2px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-base)/1.6 var(--f-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 200; }
.skip:focus { left: 8px; }

/* ---------- layout primitives ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--alt { background: var(--bg-alt); }
.section--ink { background: var(--ink); color: #dfe5ee; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }
.section--tight { padding-block: clamp(48px, 6vw, 88px); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.section--ink .rule { border-color: var(--ink-3); }

/* Section heading block: eyebrow + title + lede, left-aligned on the grid */
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); margin-bottom: clamp(36px, 5vw, 64px); }
.section-head > .eyebrow { grid-column: 1 / span 3; padding-top: .55em; }
.section-head > .section-head__body { grid-column: 4 / span 9; display: flex; flex-direction: column; gap: 18px; max-width: 62ch; }
@media (max-width: 860px) { .section-head > .eyebrow, .section-head > .section-head__body { grid-column: 1 / -1; } .section-head { gap: 12px; } }

.eyebrow { font: 600 var(--fs-sm)/1.3 var(--f-body); color: var(--accent); display: flex; gap: 10px; align-items: baseline; }
.eyebrow__num { display: none; }

.section--ink .eyebrow { color: var(--accent-bright); }

.h1 { font-size: var(--fs-3xl); font-weight: 600; letter-spacing: -0.03em; line-height: 1.04; }
.h2 { font-size: var(--fs-2xl); }
.h3 { font-size: var(--fs-xl); }
.lede { font-size: var(--fs-lg); line-height: 1.55; color: var(--muted); max-width: 60ch; }
.section--ink .lede { color: var(--muted-dark); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.accent { color: var(--accent); }

/* ---------- buttons ---------- */
.btn { --b: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 1px solid var(--b); border-radius: var(--radius); background: var(--b); color: #fff; font: 600 var(--fs-sm)/1 var(--f-body); letter-spacing: .01em; text-decoration: none; cursor: pointer; transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); white-space: nowrap; }
.btn .icon { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { --b: var(--accent); }
.btn--primary:hover { --b: var(--accent-hover); }
.btn--call { --b: var(--accent); }
.btn--call:hover { --b: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); }
.section--ink .btn--ghost, .on-ink .btn--ghost { color: #fff; border-color: var(--ink-3); }
.section--ink .btn--ghost:hover, .on-ink .btn--ghost:hover { border-color: #fff; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: var(--fs-xs); }
.btn--block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent); text-decoration: none; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .25s var(--ease); }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__row { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.logo__mark { color: var(--ink); }
.logo__word { font: 600 1.125rem/1 var(--f-head); letter-spacing: -0.02em; }
.logo__word b { font-weight: 600; color: var(--accent); }
.logo--light, .logo--light .logo__mark { color: #fff; }
.logo--light .logo__word b { color: var(--accent-bright); }
.site-nav { display: flex; gap: 26px; margin-left: 12px; }
.site-nav a { font-size: var(--fs-sm); color: var(--muted); text-decoration: none; padding-block: 6px; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.site-header__cta { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.header-support { font-size: var(--fs-xs); color: var(--muted); text-decoration: none; }
.header-support:hover { color: var(--ink); }
.nav-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line-strong); background: none; border-radius: var(--radius); position: relative; cursor: pointer; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .25s var(--ease); }
.nav-toggle span:first-child { top: 15px; } .nav-toggle span:last-child { top: 23px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
@media (max-width: 1080px) { .header-support { display: none; } .site-nav { gap: 18px; } }
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .site-nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0; margin: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease); }
  .site-nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-base); color: var(--ink); }
}
@media (max-width: 560px) { .site-header .btn--call span { display: none; } .site-header .btn--call { width: 40px; padding: 0; } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--fs-xs); font-weight: 500; color: var(--muted); letter-spacing: .01em; }
.field .opt { font-weight: 400; color: var(--line-strong); }
.input, .select, .textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; color: var(--ink); font-size: var(--fs-base); transition: border-color .2s, box-shadow .2s; }
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%235b6576' stroke-width='1.5'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* lead form (partials/lead-form.php) */
.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lead-form .field--wide { grid-column: 1 / -1; }
.lead-form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 4px; }
.lead-form__note { font-size: var(--fs-xs); color: var(--muted); max-width: 46ch; }
.lead-form__error { grid-column: 1 / -1; color: var(--crit); font-size: var(--fs-sm); }
.lead-form.is-sending .btn { opacity: .7; pointer-events: none; }
.lead-form details { grid-column: 1 / -1; }
.lead-form details summary { cursor: pointer; font-size: var(--fs-sm); color: var(--accent); font-weight: 500; list-style: none; }
.lead-form details summary::-webkit-details-marker { display: none; }
.lead-form details[open] summary { margin-bottom: 14px; }
.lead-form details .lead-form__more { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (max-width: 620px) { .lead-form { grid-template-columns: 1fr; } }
.on-ink .field label { color: var(--muted-dark); }
.on-ink .input, .on-ink .select, .on-ink .textarea { background: var(--ink-2); border-color: var(--ink-3); color: #fff; }
.on-ink .input:focus, .on-ink .select:focus, .on-ink .textarea:focus { border-color: var(--accent-bright); box-shadow: 0 0 0 3px rgba(90, 134, 255, .18); }
.on-ink .lead-form__note { color: var(--muted-dark); }
.on-ink .lead-form details summary { color: var(--accent-bright); }

/* ---------- data tables ---------- */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--ink); }
.dtable { font-size: var(--fs-sm); min-width: 640px; }
.dtable th, .dtable td { text-align: left; padding: 16px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dtable thead th { font: 600 var(--fs-sm)/1.3 var(--f-body); color: var(--ink); padding-block: 14px; }
.dtable td.n, .dtable th.n { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.dtable tbody tr:hover { background: var(--bg-alt); }

/* ---------- reveal (content is visible by default; JS adds .reveal-ready to animate) ---------- */
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal-ready [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--muted-dark); font-size: var(--fs-sm); padding-top: clamp(56px, 7vw, 96px); }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: var(--gutter); padding-bottom: 48px; }
.site-footer__brand p { margin-top: 18px; max-width: 34ch; }
.footer-h { font: 600 var(--fs-sm)/1 var(--f-body); color: #fff; margin-bottom: 18px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-list a { text-decoration: none; color: #c9d1de; }
.footer-list a:hover { color: #fff; }
.site-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--ink-3); padding-block: 22px; font-size: var(--fs-xs); }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------- mobile call bar ---------- */
.callbar { display: none; }
@media (max-width: 760px) {
  .callbar { display: grid; grid-template-columns: 1.4fr 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--ink); border-top: 1px solid var(--ink-3); padding-bottom: env(safe-area-inset-bottom, 0px); transform: translateY(100%); transition: transform .3s var(--ease); }
  .callbar.is-visible { transform: none; }
  .callbar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; color: #fff; text-decoration: none; font-weight: 600; font-size: var(--fs-sm); }
  .callbar a + a { border-left: 1px solid var(--ink-3); }
  .callbar .icon { width: 18px; height: 18px; }
  .callbar__call { background: var(--accent); }
  body { padding-bottom: 58px; }
}

.icon { width: 24px; height: 24px; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- photos ---------- */
.photo { margin: 0; min-width: 0; }
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); background: var(--bg-alt); }
.photo figcaption { margin-top: 10px; font-size: var(--fs-xs); color: var(--muted); }
.section--ink .photo figcaption { color: var(--muted-dark); }

/* nav: emergency link + footer service area */
.site-nav .site-nav__urgent { color: var(--crit); font-weight: 500; }
.site-nav .site-nav__urgent:hover { color: var(--crit); border-bottom-color: var(--crit); }
.site-footer__areas { padding-block: 0 26px; font-size: var(--fs-xs); line-height: 1.7; color: var(--muted-dark); }
.site-footer__areas span { color: #fff; font-weight: 600; margin-right: 4px; }
@media (max-width: 1180px) { .site-nav { gap: 16px; } .site-nav a { font-size: var(--fs-xs); } }
@media (max-width: 1080px) and (min-width: 921px) { .site-header .btn--call span { display: none; } .site-header .btn--call { width: 40px; padding: 0; } }

/* nav dropdown "Usluge" */
.nav-drop { position: relative; display: flex; align-items: center; }
.nav-drop__btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; border: 0; background: none; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; }
.nav-drop__btn:hover, .nav-drop:focus-within .nav-drop__btn { color: var(--ink); }
.nav-drop__chev { width: 14px; height: 14px; transform: rotate(90deg); transition: transform .2s var(--ease); }
.nav-drop__menu { position: absolute; top: calc(100% + 14px); left: -20px; width: 340px; padding: 8px; background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 40px -24px rgba(11, 20, 36, .4); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .18s, transform .18s var(--ease), visibility .18s; }
.nav-drop__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.nav-drop:hover .nav-drop__menu, .nav-drop:focus-within .nav-drop__menu { opacity: 1; visibility: visible; transform: none; }
.nav-drop:hover .nav-drop__chev, .nav-drop:focus-within .nav-drop__chev { transform: rotate(-90deg); }
.site-nav .nav-drop__menu a { display: block; padding: 10px 12px; border: 0; color: var(--ink); }
.site-nav .nav-drop__menu a:hover { background: var(--bg-alt); border: 0; }
.nav-drop__menu b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.nav-drop__menu span { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--muted); }
@media (max-width: 920px) {
  .nav-drop { display: block; }
  .nav-drop__btn { display: none; }
  .nav-drop__menu { position: static; width: auto; padding: 0; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
  .site-nav .nav-drop__menu a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-drop__menu span { display: none; }
}
