/* ============================================================
   ZMIENNE
   ============================================================ */
:root {
  --bg: #0a0a0a;
  --bg-2: #100f0c;
  --border: #1a1815;
  --border-strong: #2a2620;

  --gold: #c9a96a;
  --gold-light: #e0c48a;
  --gold-soft: rgba(201, 169, 106, 0.06);
  --gold-glow: rgba(201, 169, 106, 0.35);

  --text: #f5f1e8;
  --text-dim: #8b8578;
  --text-faint: #5c574c;

  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* ============================================================
   KONTENER
   ============================================================ */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============================================================
   NAWIGACJA
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 1.5px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text b {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
}

.brand-text em {
  font-style: normal;
  font-size: 0.66rem;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: var(--text-dim);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::after { width: 100%; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 100px 32px 100px;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text { max-width: 560px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 28px;
  font-family: var(--sans);
}

.tag::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 26px;
  color: var(--text);
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.lead {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text-dim);
  margin-bottom: 36px;
}

/* ==== HERO VISUAL ==== */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, var(--bg-2) 0%, var(--bg) 100%);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  margin-left: auto;
  overflow: hidden;
}

.visual-frame {
  position: absolute;
  inset: 22px;
  border: 1px solid var(--gold);
  opacity: 0.35;
  pointer-events: none;
}

.visual-letter {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(9rem, 20vw, 14rem);
  color: var(--gold);
  opacity: 0.16;
  line-height: 1;
}

.visual-tag {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--gold);
  letter-spacing: 5px;
  opacity: 0.75;
}

/* ============================================================
   PRZYCISKI
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 30px;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1;
}

.btn-gold {
  background: var(--gold);
  color: #0a0a0a;
  border-color: var(--gold);
}

.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  box-shadow: 0 12px 32px -12px var(--gold-glow);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.btn-outline:hover {
  background: var(--gold-soft);
  transform: translateY(-2px);
}

.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.cta-row.center { justify-content: center; }

/* ============================================================
   SEKCJE — wspólny head
   ============================================================ */
.section {
  padding: 80px 32px 100px;
  border-top: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 56px;
}

.section-head.center {
  justify-content: center;
}

.section-line {
  width: 40px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
  position: relative;
  top: -10px;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.section-title em {
  font-style: italic;
  color: var(--gold);
}

/* ============================================================
   KAFELKI — styl „4 filary"
   ============================================================ */
.tiles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.tile {
  position: relative;
  background: var(--bg);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.25s ease;
  cursor: pointer;
  overflow: hidden;
}

.tile::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.5s ease;
}

.tile:hover { background: #12100c; }
.tile:hover::after { width: 100%; }

.tile-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 2px;
  font-weight: 500;
  margin-bottom: 8px;
}

.tile-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.tile-desc {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 300px;
}

/* ============================================================
   LICZNIKI — styl „stats-strip" z wariantu 5, ale złoty
   ============================================================ */
.counters {
  padding: 80px 32px 100px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.counters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 24px;
}

.counter {
  text-align: center;
  position: relative;
  padding: 0 8px;
}

.counter-value {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.counter-label {
  font-size: 0.68rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}

/* ============================================================
   KONTAKT
   ============================================================ */
.contact {
  padding: 100px 32px 120px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.contact-inner {
  max-width: 700px;
  margin: 0 auto;
}

.contact-inner .section-head {
  justify-content: center;
  margin-bottom: 40px;
}

.contact-lead {
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 520px;
  margin: 0 auto 36px;
}

.contact-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-faint);
  letter-spacing: 1px;
  margin-top: 40px;
}

.contact-meta .dot { color: var(--gold); }

/* ============================================================
   STOPKA
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 32px;
  background: var(--bg);
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.footer-sep { color: var(--gold); }

/* ============================================================
   RESPONSYWNOŚĆ
   ============================================================ */
@media (min-width: 700px) {
  .tiles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1fr 1fr; gap: 80px; }
  .hero { padding: 120px 32px 120px; }

  .tiles-grid { grid-template-columns: repeat(4, 1fr); }

  .counters-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }

  .counter + .counter::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 25%;
    height: 50%;
    width: 1px;
    background: var(--border-strong);
  }
}

@media (max-width: 720px) {
  .container,
  .nav-inner { padding-left: 20px; padding-right: 20px; }

  .nav-links { display: none; }

  .hero,
  .section,
  .counters,
  .contact { padding-left: 20px; padding-right: 20px; }

  .hero { padding-top: 60px; padding-bottom: 60px; }

  .btn { padding: 15px 22px; font-size: 0.7rem; letter-spacing: 2px; }

  .section-head { margin-bottom: 40px; gap: 14px; }
  .section-line { width: 28px; }

  .tile { padding: 32px 24px; }
}

/* ============================================================
   PREFERS REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}


/* ============================================================
   LICZNIKI z emoji (bez data-target)
   ============================================================ */
.counter-value:not([data-target]) {
  font-family: var(--sans);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0;
}


/* ============================================================
   FILTRY (podstrona materiały)
   ============================================================ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 10px 18px;
  background: var(--bg);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--gold);
}

.filter-btn.active {
  background: var(--gold);
  color: #0a0a0a;
  border-color: var(--gold);
}

/* ============================================================
   KAFELKI MATERIAŁÓW
   ============================================================ */
.materials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 700px) {
  .materials-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .materials-grid { grid-template-columns: repeat(3, 1fr); }
}

.material {
  position: relative;
  background: var(--bg);
  padding: 28px 26px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: background 0.25s ease;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.material::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.5s ease;
}

.material:hover { background: #12100c; }
.material:hover::after { width: 100%; }

.material-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.material-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
  padding: 4px 10px;
  border: 1px solid var(--gold);
  background: var(--gold-soft, rgba(201,169,106,0.06));
  line-height: 1;
}

.material-arrow {
  color: var(--text-faint);
  transition: all 0.3s ease;
}

.material-arrow svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.material:hover .material-arrow {
  color: var(--gold);
  transform: translateY(3px);
}

.material-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--text);
}

.material-desc {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
}

.material-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Pusty stan */
.materials-empty {
  display: none;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ============================================================
   LICZNIKI z emoji (bez data-target) — na podstronach
   ============================================================ */
.counter-value:not([data-target]) {
  font-family: var(--sans);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0;
}

/* ============================================================
   RESPONSYWNOŚĆ
   ============================================================ */
@media (max-width: 720px) {
  .filters { gap: 6px; }
  .filter-btn { padding: 8px 14px; font-size: 0.76rem; }
  .material { padding: 24px 20px 28px; }
}