/* Metec sp. z o.o. — system wizualny "Modułowy System" (wybrany wariant C) */

:root {
  --ink: #101114;
  --panel: #ffffff;
  --accent: #E30613;
  --accent-dark: #A01000;
  --navy: #022949;
  --bg: #f7f7f5;
  --line: #d8d8d4;
  --muted: #55585c;
  --white: #ffffff;

  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1220px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.3rem, 4.6vw, 3.8rem); line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
p { margin: 0 0 1em; color: var(--muted); }
code, .mono { font-family: "IBM Plex Mono", monospace; }

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
  font-weight: 600;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.kicker::before { content: "//"; color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 13px 24px;
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
}
.btn:hover { background: #000; }
.btn-accent { background: var(--accent); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-ghost.is-active,
.filter-btn.is-active { background: var(--ink); color: var(--white); }

/* header */
header.site { position: sticky; top: 0; z-index: 50; background: var(--panel); border-bottom: 1px solid var(--line); transition: box-shadow 0.2s ease; }
header.site.is-scrolled { box-shadow: 0 2px 12px rgba(16,17,20,0.06); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; max-width: 1220px; margin: 0 auto; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; white-space: nowrap; }
.brand img { height: 32px; width: auto; }
nav.main-nav { display: flex; gap: 4px; }
nav.main-nav a {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  padding: 8px 14px;
  white-space: nowrap;
  border-radius: 2px;
}
nav.main-nav a:hover { background: var(--bg); }
nav.main-nav a.is-active { background: var(--ink); color: var(--white); }
.header-cta { flex-shrink: 0; }
.nav-toggle {
  display: none;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 4px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; }

/* hero — tabliczka statystyk + mozaika, nie klasyczne tło */
.hero { padding: 48px 0 0; border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  border: 1px solid var(--line);
  border-bottom: none;
}
.hero-text {
  padding: 64px 48px;
  border-right: 1px solid var(--line);
}
.hero h1 { max-width: 14ch; }
.hero .lead { font-size: 1.08rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.hero-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.hero-mosaic a { position: relative; overflow: hidden; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-mosaic a:nth-child(2n) { border-left: 1px solid var(--line); }
.hero-mosaic img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1/1; transition: transform 0.3s ease; filter: grayscale(20%); }
.hero-mosaic a:hover img { transform: scale(1.08); filter: grayscale(0%); }
.hero-mosaic .tag {
  position: absolute; left: 8px; bottom: 8px;
  background: rgba(16,17,20,0.85); color: var(--white);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem; padding: 4px 8px; border-radius: 2px;
}

/* page hero — banery podstron */
.page-hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line); background: var(--panel); }
.page-hero .kicker { margin-bottom: 10px; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); max-width: 22ch; }
.page-hero .lead { font-size: 1.05rem; max-width: 60ch; margin-bottom: 0; }
.breadcrumb { font-family: "IBM Plex Mono", monospace; font-size: 0.8rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }

/* trust as tabliczka */
.trust { background: var(--ink); color: var(--white); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1220px; margin: 0 auto; }
.trust-item { padding: 26px 24px; border-left: 1px solid #2a2b2f; font-family: "IBM Plex Mono", monospace; }
.trust-item:first-child { border-left: none; }
.trust-num { font-family: var(--font-head); font-size: 2.4rem; color: var(--accent); display: block; line-height: 1; }
.trust-label { font-size: 0.78rem; color: #a7a9ad; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.03em; }

section { padding: 80px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.bg-alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* branch grid — technical cards */
.branch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.branch-card { background: var(--panel); display: flex; flex-direction: column; }
.branch-card .thumb { aspect-ratio: 1/1; overflow: hidden; position: relative; }
.branch-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.branch-card:hover .thumb img { transform: scale(1.05); }
.branch-card .thumb .idx {
  position: absolute; top: 8px; left: 8px;
  font-family: "IBM Plex Mono", monospace; font-size: 0.7rem;
  background: var(--white); padding: 2px 6px; border-radius: 2px;
}
.branch-body { padding: 16px 16px 20px; flex: 1; display: flex; flex-direction: column; }
.branch-body h3 { font-size: 1.05rem; margin-bottom: 6px; }
.branch-body p { font-size: 0.88rem; flex: 1; margin-bottom: 12px; }
.branch-body .more { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; color: var(--accent-dark); font-weight: 600; }

/* chip list — produkty w branży */
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list li {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 2px;
  color: var(--ink);
}

/* branża — sekcja pełna (produkty-i-uslugi.html) */
.branch-full {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0;
  border: 1px solid var(--line);
  margin-bottom: -1px;
}
.branch-full .photo { aspect-ratio: 4/3; overflow: hidden; border-right: 1px solid var(--line); }
.branch-full .photo img { width: 100%; height: 100%; object-fit: cover; }
.branch-full .info { padding: 40px 44px; }
.branch-full .info .idx { font-family: "IBM Plex Mono", monospace; color: var(--accent); font-size: 0.85rem; margin-bottom: 8px; display: block; }
.branch-full:nth-child(even) { grid-template-columns: 1.1fr 0.9fr; }
.branch-full:nth-child(even) .photo { order: 2; border-right: none; border-left: 1px solid var(--line); }

/* park maszynowy — tabela specyfikacji */
.machine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); }
.machine-col { padding: 48px; }
.machine-col.dark { background: var(--ink); color: var(--white); }
.machine-col.dark .kicker { color: #ff8a80; }
.machine-col.dark .kicker::before { color: var(--accent); }
.machine-col.dark h2 { color: var(--white); }
.machine-col.dark p { color: #b8bac0; }
.spec-table { width: 100%; border-collapse: collapse; margin: 22px 0 30px; font-size: 0.92rem; }
.spec-table td { padding: 10px 0; border-bottom: 1px solid #2a2b2f; color: #e2e3e6; }
.spec-table td:first-child { font-family: "IBM Plex Mono", monospace; color: var(--accent); width: 32px; }
.mosaic-2x2 { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; height: 100%; min-height: 420px; }
.mosaic-2x2 img { width: 100%; height: 100%; object-fit: cover; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }

/* light spec table (na jasnym tle, podstrona park-maszynowy) */
.spec-table-light { width: 100%; border-collapse: collapse; margin: 0 0 8px; font-size: 0.94rem; }
.spec-table-light td, .spec-table-light th { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.spec-table-light th { font-family: "IBM Plex Mono", monospace; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.spec-table-light td:first-child { font-family: "IBM Plex Mono", monospace; color: var(--accent); width: 40px; }
.spec-card { border: 1px solid var(--line); background: var(--panel); padding: 28px 32px; margin-bottom: 24px; }
.spec-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.spec-card .note { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* proces — numbered strip */
.process-steps { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-left: none; }
.step { padding: 26px 20px; border-left: 1px solid var(--line); position: relative; }
.step-num { font-family: "IBM Plex Mono", monospace; font-size: 0.85rem; color: var(--accent); display: block; margin-bottom: 10px; }
.step h4 { font-size: 0.98rem; margin-bottom: 6px; }
.step p { font-size: 0.85rem; margin: 0; }

/* realizacje */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.gallery-card { position: relative; overflow: hidden; aspect-ratio: 1/1; background: var(--panel); }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-card:hover img { transform: scale(1.06); }
.gallery-tag {
  position: absolute; left: 10px; top: 10px;
  background: var(--white); color: var(--ink);
  font-family: "IBM Plex Mono", monospace; font-size: 0.7rem;
  padding: 4px 8px; border-radius: 2px;
}
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.78), transparent);
  color: var(--white); font-size: 0.85rem; font-weight: 600;
}
.gallery-cta { text-align: center; margin-top: 36px; }

/* filtry realizacji */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filter-btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 2px;
  cursor: pointer;
}
.filter-btn:hover { border-color: var(--ink); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); display: none; }
.empty-state.is-visible { display: block; }

/* CTA band — ukośne cięcie krawędzi */
.cta-band {
  background: var(--ink); color: var(--white);
  padding: 90px 0 76px;
  text-align: center;
  position: relative;
  clip-path: polygon(0 4%, 100% 0, 100% 100%, 0 100%);
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: #b8bac0; max-width: 56ch; margin: 0 auto 26px; }

/* kontakt */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); }
.contact-text { padding: 48px; }
.contact-list { padding: 48px; background: var(--panel); border-left: 1px solid var(--line); display: grid; gap: 20px; align-content: start; }
.contact-card h4 { font-size: 0.95rem; margin-bottom: 8px; font-family: "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: 0.03em; }
.contact-card p { margin: 0; font-size: 0.94rem; }

/* formularz kontaktowy */
.contact-form { border: 1px solid var(--line); background: var(--panel); padding: 40px; display: grid; gap: 18px; }
.form-row { display: grid; gap: 6px; }
.form-row label { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.form-row input, .form-row textarea, .form-row select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--bg);
  color: var(--ink);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: 0.82rem; color: var(--muted); margin: 0; }
.map-embed { border: 1px solid var(--line); aspect-ratio: 4/3; background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 0.85rem; text-align: center; padding: 20px; }

/* footer */
footer.site { background: var(--panel); color: var(--muted); padding: 50px 0 26px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.footer-grid img { height: 28px; margin-bottom: 14px; }
.footer-grid h5 { font-family: "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink); margin-bottom: 14px; font-size: 0.82rem; }
.footer-grid a, .footer-grid p { display: block; color: var(--muted); font-size: 0.92rem; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--ink); }
.footer-bottom { padding-top: 20px; font-size: 0.8rem; color: #9a9c9f; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-family: "IBM Plex Mono", monospace; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-text { border-right: none; border-bottom: 1px solid var(--line); padding: 48px 28px; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-item:nth-child(3) { border-left: none; }
  .branch-grid { grid-template-columns: repeat(2, 1fr); }
  .branch-full, .branch-full:nth-child(even) { grid-template-columns: 1fr; }
  .branch-full .photo, .branch-full:nth-child(even) .photo { order: 0; border: none; border-bottom: 1px solid var(--line); }
  .branch-full .info { padding: 28px 24px; }
  .machine-grid { grid-template-columns: 1fr; }
  .machine-col { padding: 32px 24px; }
  .process-steps { grid-template-columns: repeat(2, 1fr); border-left: 1px solid var(--line); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-list { border-left: none; border-top: 1px solid var(--line); }
  .form-two { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  nav.main-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 2px;
    padding: 10px 24px 18px;
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 10px 2px; border-bottom: 1px solid var(--line); border-radius: 0; }
}
@media (max-width: 560px) {
  .branch-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-mosaic { grid-template-columns: 1fr 1fr; }
}
