/* ============================================================
   FERRFECT — Spawalnictwo i ślusarstwo
   System wizualny: industrialny, solidny, granatowy
   ============================================================ */

:root {
  /* Granaty / stal */
  --navy-950: #081627;
  --navy-900: #0c1d33;
  --navy-800: #122a47;
  --navy-700: #1e3a5f;   /* kolor podstawowy */
  --navy-600: #2a4d75;
  --steel-500: #4a7fb5;  /* akcent */
  --steel-400: #6b9bcb;

  /* Neutralne chłodne */
  --paper: #f6f8fb;
  --paper-2: #eef2f7;
  --ice: #e3eaf2;
  --ink: #131e2b;
  --ink-soft: #41506180;
  --muted: #5a6b7d;
  --line: #d7dfe9;
  --line-dark: #ffffff14;

  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 64px);

  --ff-display: "Archivo", system-ui, sans-serif;
  --ff-body: "IBM Plex Sans", system-ui, sans-serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* Etykieta techniczna (mono) */
.kicker {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel-500);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--steel-500);
}
.kicker.on-dark { color: var(--steel-400); }
.kicker.on-dark::before { background: var(--steel-400); }

/* Tytuły */
h1, h2, h3 { font-family: var(--ff-display); font-weight: 800; line-height: 1.04; letter-spacing: -0.01em; }

.section { padding-block: clamp(72px, 9vw, 140px); }
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 {
  font-size: clamp(34px, 5vw, 58px);
  margin-top: 18px;
  text-wrap: balance;
}
.section-head p { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); margin-top: 20px; max-width: 56ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 15px 26px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-700); color: #fff; }
.btn-primary:hover { background: var(--navy-800); }
.btn-accent { background: var(--steel-500); color: #fff; }
.btn-accent:hover { background: var(--navy-700); }
.btn-ghost { background: transparent; color: #fff; border-color: #ffffff40; }
.btn-ghost:hover { border-color: #fff; background: #ffffff12; }
.btn-outline { background: transparent; color: var(--navy-700); border-color: var(--navy-700); }
.btn-outline:hover { background: var(--navy-700); color: #fff; }
.btn .arr { font-family: var(--ff-body); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: #fffffff2;
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 30px #0c1d3310;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: 0.02em;
  color: #fff;
  transition: color .3s ease;
}
.scrolled .brand { color: var(--navy-800); }
.brand-mark {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--steel-500);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
}
.brand .tld { color: var(--steel-400); }
.scrolled .brand .tld { color: var(--steel-500); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-family: var(--ff-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffffcc;
  padding: 10px 16px;
  transition: color .2s ease;
}
.scrolled .nav-links a { color: var(--muted); }
.nav-links a:hover { color: #fff; }
.scrolled .nav-links a:hover { color: var(--navy-700); }
.nav-cta { margin-left: 14px; }
.nav-links a.nav-cta {
  background: var(--steel-500);
  color: #fff !important;
  padding: 12px 20px;
}
.nav-links a.nav-cta:hover { background: var(--navy-700); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 26px; height: 2px; background: #fff; transition: background .3s; }
.scrolled .nav-toggle span { background: var(--navy-800); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  background: var(--navy-900);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-bg .ph-fill {
  width: 100%; height: 100%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(75deg, var(--navy-950) 0%, #0c1d33e0 42%, #0c1d3360 100%),
    linear-gradient(0deg, var(--navy-950) 0%, transparent 55%);
}
.hero-inner {
  width: 100%;
  padding-block: 150px 80px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(46px, 8vw, 104px);
  max-width: 16ch;
  margin-top: 24px;
}
.hero h1 em { font-style: normal; color: var(--steel-400); }
.hero-sub {
  color: #ffffffcf;
  font-size: clamp(17px, 1.9vw, 21px);
  max-width: 52ch;
  margin-top: 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* Pasek faktów pod hero */
.facts {
  border-top: 1px solid var(--line-dark);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.fact {
  padding: 26px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fact + .fact { border-left: 1px solid var(--line-dark); padding-left: 28px; }
.fact .n { font-family: var(--ff-display); font-weight: 800; font-size: clamp(28px, 3vw, 40px); color: #fff; }
.fact .l { font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel-400); }

/* ============================================================
   PLACEHOLDERY ZDJĘĆ
   ============================================================ */
.ph {
  position: relative;
  background-color: var(--navy-800);
  background-image: repeating-linear-gradient(
    -45deg,
    #ffffff0a 0 2px,
    transparent 2px 14px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #ffffff8c;
}
.ph.light {
  background-color: var(--paper-2);
  background-image: repeating-linear-gradient(
    -45deg,
    #1e3a5f12 0 2px,
    transparent 2px 14px
  );
  color: #1e3a5f99;
}
.ph .ph-tag {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  padding: 7px 13px;
  background: #0c1d3340;
  backdrop-filter: blur(2px);
}
.ph.light .ph-tag { background: #ffffff80; }

/* ============================================================
   OFERTA
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.svc {
  padding: 40px 36px 44px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  transition: background .25s ease;
  position: relative;
}
.svc:hover { background: #fff; }
.svc-num {
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--steel-500);
  letter-spacing: 0.1em;
}
.svc h3 { font-size: 24px; margin: 18px 0 12px; }
.svc p { color: var(--muted); font-size: 15.5px; }
.svc .tick {
  position: absolute;
  top: 40px; right: 36px;
  width: 8px; height: 8px;
  background: var(--ice);
  transition: background .25s ease;
}
.svc:hover .tick { background: var(--steel-500); }

/* ============================================================
   O FIRMIE
   ============================================================ */
.about { background: var(--navy-900); color: #fff; }
.about .kicker { color: var(--steel-400); }
.about .kicker::before { background: var(--steel-400); }
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.about h2 { font-size: clamp(32px, 4.4vw, 54px); color: #fff; margin: 18px 0 26px; text-wrap: balance; }
.about p { color: #ffffffc4; font-size: 17px; max-width: 52ch; }
.about p + p { margin-top: 18px; }
.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 44px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}
.about-stats .s { background: var(--navy-900); padding: 24px; }
.about-stats .n { font-family: var(--ff-display); font-weight: 800; font-size: 38px; color: var(--steel-400); }
.about-stats .l { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #ffffff99; margin-top: 6px; }
.about-photo { aspect-ratio: 4/5; min-height: 380px; }

.about-photo.ph .ph-tag { color: #ffffffb0; }

/* ============================================================
   GALERIA
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  gap: 14px;
}
.gallery-grid .ph { color: #fff; }
.g-wide { grid-column: span 2; }
.g-tall { grid-row: span 2; }

/* ============================================================
   KONTAKT
   ============================================================ */
.contact { background: var(--paper-2); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: stretch;
}
.contact-info h2 { font-size: clamp(32px, 4.4vw, 52px); margin: 18px 0 30px; text-wrap: balance; }
.info-list { display: flex; flex-direction: column; }
.info-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.info-row:last-child { border-bottom: 1px solid var(--line); }
.info-row .k { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel-500); }
.info-row .v { font-size: 17px; font-weight: 500; }
.info-row .v a:hover { color: var(--steel-500); }
.info-row .v small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; margin-top: 3px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* Mapa */
.map {
  position: relative;
  min-height: 420px;
  background: var(--navy-900);
  overflow: hidden;
  isolation: isolate;
}
.map-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(#ffffff10 1px, transparent 1px),
    linear-gradient(90deg, #ffffff10 1px, transparent 1px);
  background-size: 46px 46px;
}
.map-roads { position: absolute; inset: 0; }
.map-road { position: absolute; background: #ffffff14; }
.map-road.h { height: 14px; left: 0; right: 0; }
.map-road.v { width: 14px; top: 0; bottom: 0; }
.map-road.accent { background: var(--steel-500); opacity: 0.55; }
.map-pin {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3;
}
.map-pin .dot {
  width: 20px; height: 20px;
  background: var(--steel-400);
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 6px #4a7fb540;
}
.map-pin .stem { width: 2px; height: 26px; background: #fff; }
.map-card {
  position: absolute;
  left: 28px; bottom: 28px;
  background: #fff;
  padding: 22px 26px;
  max-width: 300px;
  z-index: 4;
  box-shadow: 0 20px 50px #0c1d3340;
}
.map-card .kicker { color: var(--steel-500); }
.map-card .kicker::before { background: var(--steel-500); }
.map-card .addr { font-family: var(--ff-display); font-weight: 800; font-size: 22px; margin-top: 12px; line-height: 1.2; }
.map-card .sub { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--navy-950); color: #fff; padding-block: 60px 36px; }
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-dark);
}
.footer .brand { color: #fff; font-size: 26px; }
.footer-tagline { color: #ffffff99; max-width: 36ch; margin-top: 16px; font-size: 15px; }
.footer-cols { display: flex; gap: clamp(40px, 6vw, 80px); flex-wrap: wrap; }
.footer-col h4 { font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel-400); font-weight: 500; margin-bottom: 14px; }
.footer-col a, .footer-col p { display: block; color: #ffffffc0; font-size: 14.5px; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #ffffff70;
}

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { order: -1; aspect-ratio: 16/10; min-height: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
}

@media (max-width: 680px) {
  .nav-links {
    position: fixed;
    inset: 76px 0 auto 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 12px var(--gut) 24px;
    gap: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px #0c1d3320;
    transform: translateY(-130%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
  }
  .nav-links.open { transform: none; }
  .nav-links a { color: var(--navy-800); padding: 15px 0; border-bottom: 1px solid var(--line); }
  .nav-links a.nav-cta { margin: 14px 0 0; justify-content: center; }
  .nav-toggle { display: flex; }
  .header:not(.scrolled) .nav-toggle span { background: #fff; }

  .facts { grid-template-columns: 1fr; }
  .fact + .fact { border-left: 0; border-top: 1px solid var(--line-dark); padding-left: 0; }
  .services-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .g-wide, .g-tall { grid-column: auto; grid-row: auto; }
  .info-row { grid-template-columns: 1fr; gap: 4px; }
}
