:root {
  --bg: #020812;
  --bg-soft: #071421;
  --panel: rgba(5, 15, 27, 0.82);
  --panel-border: rgba(66, 138, 222, 0.22);
  --text: #f5f7fb;
  --muted: #b9c3d1;
  --accent: #1688ff;
  --accent-dark: #006bd5;
  --header-height: 96px;
  --content-width: 1540px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-height);
  display: grid;
  grid-template-columns: 290px 1fr 200px;
  align-items: center;
  gap: 28px;
  padding: 0 38px;
  background: rgba(2, 8, 18, 0.96);
  border-bottom: 1px solid rgba(52, 121, 202, 0.19);
  backdrop-filter: blur(14px);
}

.brand {
  position: relative;
  display: block;
  width: 240px;
  height: 86px;
  overflow: hidden;
  transform: scale(0.75);
  transform-origin: left center;
}

/*
 * Plik logo-dark.png zawiera duże marginesy dookoła właściwego znaku.
 * Kadrujemy go wewnątrz nagłówka, aby nie nachodził na sekcję Hero.
 */
.brand img {
  position: absolute;
  top: -77px;
  left: -34px;
  width: 312px;
  max-width: none;
}

.nav {
  display: flex;
  justify-content: center;
  gap: clamp(22px, 2.5vw, 44px);
}

.nav a {
  position: relative;
  padding: 38px 0 34px;
  color: white;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 23px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.header-contact {
  justify-self: end;
  padding: 17px 26px;
  border: 1px solid var(--accent);
  border-radius: 5px;
  background: rgba(7, 36, 70, 0.42);
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 800;
}

.menu-toggle {
  display: none;
}

.construction-notice {
  position: absolute;
  top: calc(var(--header-height) + 14px);
  left: 50%;
  z-index: 90;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 4px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    135deg,
    #0b0d10 0 13px,
    #f4b800 13px 26px
  );
  border: 1px solid rgba(255, 204, 49, 0.72);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.34);
}

.construction-notice__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 18px;
  background: #f4b800;
  color: #090b0e;
  text-transform: uppercase;
  white-space: nowrap;
}

.construction-notice strong {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.055em;
}

.construction-notice span {
  padding-left: 14px;
  border-left: 1px solid rgba(9, 11, 14, 0.42);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding:
    calc(var(--header-height) + 80px)
    max(46px, calc((100vw - var(--content-width)) / 2))
    38px;
  background:
    linear-gradient(rgba(74, 148, 234, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 148, 234, 0.07) 1px, transparent 1px),
    radial-gradient(circle at 72% 42%, rgba(28, 111, 208, 0.30), transparent 34%),
    linear-gradient(90deg, #020812 0%, #04111e 48%, #071c33 100%);
  background-size: 48px 48px, 48px 48px, auto, auto;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 8, 18, 0.92) 0%, rgba(2, 8, 18, 0.72) 30%, rgba(2, 8, 18, 0.22) 58%, rgba(2, 8, 18, 0.04) 100%),
    radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

.hero-art {
  position: absolute;
  inset: var(--header-height) 0 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(3, 11, 21, 0.18), rgba(3, 11, 21, 0)),
    url("../images/hero-logo-cnc-machining.png") center / cover no-repeat;
  opacity: 0.9;
  mix-blend-mode: screen;
  filter: saturate(1.06) contrast(1.04) brightness(1);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(650px, 46vw);
}

.eyebrow {
  margin: 0 0 26px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 16px;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  color: white;
  text-transform: uppercase;
  font-size: clamp(38px, 3.85vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.hero-description {
  max-width: 600px;
  margin: 34px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.service-card a span {
  margin-left: 10px;
}

.service-cards {
  position: absolute;
  left: max(46px, calc((100vw - var(--content-width)) / 2));
  right: max(46px, calc((100vw - var(--content-width)) / 2));
  bottom: 34px;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.service-card {
  min-height: 196px;
  padding: 26px 26px 22px;
  background: linear-gradient(180deg, rgba(7, 18, 31, 0.88), rgba(3, 11, 20, 0.88));
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.card-icon {
  color: var(--accent);
  font-size: 38px;
  line-height: 1;
}

.service-card h2 {
  margin: 14px 0 10px;
  text-transform: uppercase;
  font-size: 17px;
  line-height: 1.25;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.service-card a {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  color: #cbd5e2;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.content-section {
  min-height: 55vh;
  padding: 110px max(46px, calc((100vw - var(--content-width)) / 2));
  background: #07101c;
  border-top: 1px solid rgba(66, 138, 222, 0.16);
}

.content-section.alternate {
  background: #040b14;
}

.section-inner {
  max-width: 980px;
}

.section-label {
  margin: 0 0 12px;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.content-section h2 {
  margin: 0;
  font-size: clamp(42px, 5vw, 72px);
}

.content-section p {
  max-width: 820px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.7;
}

.contact-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--accent);
  font-size: 26px;
  text-decoration: none;
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: 230px 1fr 170px;
    padding-inline: 24px;
  }

  .brand {
    width: 200px;
    height: 72px;
  }

  .brand img {
    top: -64px;
    left: -29px;
    width: 260px;
  }

  .nav {
    gap: 20px;
  }

  .nav a {
    font-size: 12px;
  }

  .hero {
    padding-inline: 34px;
  }

  .hero-content {
    width: min(620px, 56vw);
  }

  .hero-art {
    right: -16%;
    width: 78%;
  }

  .service-cards {
    left: 34px;
    right: 34px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 78px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .brand {
    width: 175px;
    height: 63px;
  }

  .brand img {
    top: -56px;
    left: -25px;
    width: 228px;
  }

  .header-contact {
    display: none;
  }

  .menu-toggle {
    display: grid;
    gap: 5px;
    width: 42px;
    padding: 9px;
    border: 0;
    background: transparent;
  }

  .menu-toggle span {
    display: block;
    height: 2px;
    background: white;
  }

  .nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 18px 26px 26px;
    background: rgba(2, 8, 18, 0.98);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 14px 0;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + 64px) 24px 54px;
  }

  .hero-content {
    width: 100%;
  }

  .hero-art {
    inset: var(--header-height) 0 0;
    opacity: 0.54;
  }

  .service-cards {
    position: relative;
    inset: auto;
    margin-top: 90px;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .construction-notice {
    top: calc(var(--header-height) + 10px);
  }

  .construction-notice__inner {
    padding: 7px 14px;
  }

  .construction-notice span {
    display: none;
  }

  .hero h1 {
    font-size: clamp(32px, 9.8vw, 46px);
  }

  .service-cards {
    grid-template-columns: 1fr;
  }
}
