:root {
  color-scheme: dark;
  --ink: #050a11;
  --white: #f4f8fd;
  --muted: #bac5d2;
  --blue: #1c9bff;
  --blue-bright: #45b0ff;
  --line: rgba(207, 227, 246, .16);
  --header-h: 76px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }
html { background: var(--ink); }
body { margin: 0; min-width: 320px; background: var(--ink); color: var(--white); }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 5px; border-radius: 4px; }

.skip-link { position: fixed; z-index: 20; top: 12px; left: 12px; padding: 12px 16px; border-radius: 8px; background: var(--white); color: var(--ink); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.scene-stack { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; background: #070d14; }
.scene-bg { position: absolute; inset: -1.5%; opacity: 0; transform: scale(1.025); background-color: #070d14; background-size: cover; background-position: center 52%; transition: opacity .48s ease, transform .68s cubic-bezier(.2,.65,.25,1); will-change: opacity, transform; }
.scene-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,9,16,.96) 0%, rgba(4,9,16,.88) 24%, rgba(4,9,16,.58) 54%, rgba(4,9,16,.26) 100%), linear-gradient(0deg, rgba(4,9,16,.78) 0%, transparent 28%, transparent 72%, rgba(4,9,16,.48) 100%); }
.scene-bg.is-active { opacity: 1; transform: scale(1); }
.scene-bg[data-scene='hero'] { background-image: url('assets/hero.webp'); background-position: center 55%; }
.scene-bg[data-scene='mecanica'] { background-image: url('assets/mechanica.webp'); background-position: center 52%; }
.scene-bg[data-scene='electrica'] { background-image: url('assets/electrica.webp'); background-position: center 52%; }
.scene-bg[data-scene='diagnoza'] { background-image: url('assets/diagnoza.webp'); background-position: center 52%; }
.scene-bg[data-scene='contact'] { background-image: url('assets/hero.webp'); background-position: center 58%; }

.scroll-progress { position: fixed; z-index: 10; top: 0; left: 0; width: 100%; height: 2px; background: transparent; }
.scroll-progress span { display: block; width: 0; height: 100%; background: var(--blue); box-shadow: 0 0 16px rgba(28,155,255,.7); }
.site-header { position: fixed; z-index: 9; top: 0; right: 0; left: 0; height: var(--header-h); padding: 0 max(5vw, calc((100vw - 1320px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid rgba(216,235,250,.12); background: rgba(4,9,16,.77); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.brand-mark { width: 43px; height: 34px; fill: none; stroke: var(--blue); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark circle { fill: var(--ink); stroke: var(--blue); }
.brand-name { display: flex; flex-direction: column; line-height: .94; letter-spacing: -.035em; }
.brand-name strong { font-family: Manrope, sans-serif; font-size: 21px; font-weight: 800; }
.brand-name small { margin-top: 4px; font-size: 10px; font-weight: 600; letter-spacing: .015em; color: #d7e2ed; }
.main-nav { display: flex; height: 100%; align-items: center; justify-content: center; gap: clamp(18px, 2.5vw, 38px); }
.nav-link { position: relative; display: flex; height: 100%; align-items: center; font-size: 12px; font-weight: 600; color: #d8e1eb; transition: color .2s ease; }
.nav-link::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 2px; transform: scaleX(0); transform-origin: left; background: var(--blue); transition: transform .25s ease; }
.nav-link:hover, .nav-link.is-current { color: #fff; }
.nav-link.is-current::after { transform: scaleX(1); }
.header-phone { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; color: var(--white); font-size: 12px; font-weight: 700; }
.header-phone svg { width: 15px; height: 15px; fill: var(--blue); }

main { position: relative; z-index: 1; }
.screen { position: relative; display: flex; min-height: 100svh; align-items: center; padding: calc(var(--header-h) + 52px) max(9vw, calc((100vw - 1180px) / 2)) 76px; scroll-margin-top: var(--header-h); }
.screen-content { position: relative; z-index: 1; width: min(100%, 640px); }
.hero-content { padding-top: 10px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: #d4e4f4; font-size: 11px; font-weight: 700; letter-spacing: .19em; text-transform: uppercase; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 13px rgba(28,155,255,.9); }
h1, h2 { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-weight: 800; letter-spacing: -.052em; line-height: 1.04; text-wrap: balance; }
h1 { max-width: 780px; font-size: clamp(46px, 6.2vw, 86px); }
h1 span, h2 span { color: var(--blue-bright); }
.intro-copy, .section-copy { max-width: 520px; margin: 23px 0 0; color: #d5dce6; font-size: clamp(15px, 1.45vw, 18px); line-height: 1.72; text-wrap: pretty; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 31px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; border-radius: 999px; padding: 0 20px; font-size: 13px; font-weight: 700; transition: transform .22s ease, background .22s ease, box-shadow .22s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 9px 28px rgba(9,115,207,.24); }
.button-primary:hover { background: #1289ec; box-shadow: 0 12px 34px rgba(9,115,207,.36); }
.button-primary svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.button-quiet { padding: 0 2px; color: #edf4fb; }
.button-quiet span { color: var(--blue-bright); font-size: 18px; transition: transform .2s ease; }
.button-quiet:hover span { transform: translateY(3px); }
.hero-note { display: flex; align-items: center; gap: 12px; margin-top: clamp(48px, 9vh, 88px); color: #b7c5d3; font-size: 11px; letter-spacing: .05em; }
.note-line { display: block; width: 35px; height: 1px; background: var(--blue); }
.hero-index { position: absolute; right: max(9vw, calc((100vw - 1180px) / 2)); bottom: 54px; display: flex; align-items: center; gap: 10px; color: #c5d1de; font-size: 10px; letter-spacing: .12em; }
.hero-index span:first-child { color: var(--blue-bright); }
.hero-index i { display: block; width: 66px; height: 1px; background: var(--line); }

.service-screen { border-top: 1px solid rgba(213,230,247,.12); }
.service-screen .screen-content { padding: 35px 0 42px; }
h2 { max-width: 720px; font-size: clamp(42px, 5.2vw, 72px); }
.section-copy { max-width: 485px; font-size: clamp(15px, 1.3vw, 17px); }
.text-link { display: inline-flex; align-items: center; gap: 14px; margin-top: 28px; color: var(--blue-bright); font-size: 13px; font-weight: 700; }
.text-link span { transition: transform .2s ease; }
.text-link:hover span { transform: translate(3px,-3px); }
.service-tag { position: absolute; right: max(9vw, calc((100vw - 1180px) / 2)); bottom: 56px; display: flex; align-items: center; gap: 12px; color: #d8e2ec; font-size: 11px; font-weight: 600; letter-spacing: .03em; }
.tag-icon { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(69,176,255,.55); border-radius: 50%; color: var(--blue-bright); font-size: 9px; }

.contact-screen { border-top: 1px solid rgba(213,230,247,.12); }
.contact-content { padding-bottom: 30px; }
.contact-button { min-width: 235px; justify-content: space-between; margin-top: 30px; }
.phone-icon { width: 16px; height: 16px; fill: currentColor; }
.contact-caption { margin: 18px 0 0; color: #bdc9d5; font-size: 12px; }
.contact-caption span { padding: 0 5px; color: var(--blue-bright); }
.site-footer { position: absolute; right: max(9vw, calc((100vw - 1180px) / 2)); bottom: 25px; left: max(9vw, calc((100vw - 1180px) / 2)); display: flex; justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--line); color: #aebdca; font-size: 11px; }
.site-footer a { color: #d9e5ef; }
.site-footer a:hover { color: var(--blue-bright); }

.section-dots { position: fixed; z-index: 8; top: 50%; right: 26px; display: flex; flex-direction: column; gap: 14px; transform: translateY(-50%); }
.dot-link { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid transparent; border-radius: 50%; color: transparent; font-size: 8px; transition: border-color .2s ease, color .2s ease; }
.dot-link span { display: block; width: 5px; height: 5px; border-radius: 50%; background: rgba(232,242,251,.5); transition: width .2s ease, height .2s ease, background .2s ease; }
.dot-link:hover { color: #d9e9f8; }
.dot-link:hover span, .dot-link.is-current span { width: 7px; height: 7px; background: var(--blue-bright); box-shadow: 0 0 12px rgba(28,155,255,.75); }
.dot-link.is-current { border-color: rgba(69,176,255,.45); }

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .site-header { padding: 0 24px; gap: 18px; }
  .main-nav { gap: 17px; }
  .nav-link { font-size: 11px; }
  .header-phone span { display: none; }
  .header-phone { width: 38px; height: 38px; justify-content: center; border: 1px solid rgba(28,155,255,.4); border-radius: 50%; }
  .header-phone svg { width: 16px; height: 16px; }
  .screen { padding-right: 8vw; padding-left: 8vw; }
  .hero-index, .service-tag { right: 8vw; }
  .site-footer { right: 8vw; left: 8vw; }
  .section-dots { right: 14px; }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .site-header { padding: 0 17px; }
  .brand-mark { width: 36px; height: 30px; }
  .brand-name strong { font-size: 18px; }
  .brand-name small { font-size: 9px; }
  .main-nav { gap: 16px; margin-left: auto; }
  .nav-link { display: none; }
  .nav-link[href="#mecanica"], .nav-link[href="#contact"] { display: flex; font-size: 11px; }
  .header-phone { width: 34px; height: 34px; }
  .screen { min-height: 100svh; padding: calc(var(--header-h) + 52px) 25px 92px; }
  .scene-bg { background-size: 100% auto; background-position: center center; }
  .scene-bg::before { content: ''; position: absolute; inset: -7%; background-image: inherit; background-size: cover; background-position: center 62%; filter: blur(24px) brightness(.34) saturate(.8); transform: scale(1.05); }
  .scene-bg[data-scene='hero'] { background-position: 69% center; }
  .scene-bg[data-scene='mecanica'] { background-position: 72% center; }
  .scene-bg[data-scene='electrica'] { background-position: 77% center; }
  .scene-bg[data-scene='diagnoza'] { background-position: 70% center; }
  .scene-bg::after { background: linear-gradient(0deg, rgba(4,9,16,.9) 0%, rgba(4,9,16,.72) 37%, rgba(4,9,16,.53) 72%, rgba(4,9,16,.66) 100%), linear-gradient(90deg, rgba(4,9,16,.52), rgba(4,9,16,.12)); }
  .hero-content { padding-top: 5px; }
  .eyebrow { margin-bottom: 18px; font-size: 9px; letter-spacing: .15em; }
  h1 { max-width: 420px; font-size: clamp(42px, 12vw, 57px); }
  h2 { max-width: 430px; font-size: clamp(40px, 11vw, 54px); }
  .intro-copy, .section-copy { max-width: 390px; margin-top: 17px; font-size: 15px; line-height: 1.62; }
  .hero-actions { gap: 12px 19px; margin-top: 25px; }
  .button { min-height: 46px; padding: 0 16px; font-size: 12px; }
  .button-quiet { padding: 0; }
  .hero-note { margin-top: 38px; font-size: 10px; }
  .hero-index { right: 26px; bottom: 32px; }
  .service-screen .screen-content { padding: 0 0 34px; }
  .text-link { margin-top: 23px; }
  .service-tag { right: 25px; bottom: 29px; left: 25px; font-size: 10px; }
  .tag-icon { width: 27px; height: 27px; }
  .contact-content { padding-bottom: 28px; }
  .contact-button { min-width: 224px; }
  .contact-caption { max-width: 280px; line-height: 1.6; }
  .site-footer { right: 25px; bottom: 17px; left: 25px; padding-top: 12px; font-size: 10px; }
  .section-dots { top: auto; right: 50%; bottom: 10px; flex-direction: row; gap: 7px; transform: translateX(50%); }
  .dot-link { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
