/* eMeL — styl inspirowany minimalistyczną, "numerowaną" kompozycją sekcji (na wzór prohygiene.pl) */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #12181f;
  --ink-soft: #4d5866;
  --accent: #2454a6;
  --accent-dark: #17335c;
  --border: #e1e4ea;
  --header-bg: rgba(245, 246, 248, 0.94);
  --radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10151f;
    --surface: #171f2c;
    --ink: #e7ecf3;
    --ink-soft: #a3b1c4;
    --accent: #6fa4ec;
    --accent-dark: #0b1220;
    --border: #2a3446;
    --header-bg: rgba(16, 21, 31, 0.88);
  }
}

:root[data-theme="dark"] {
  --bg: #10151f;
  --surface: #171f2c;
  --ink: #e7ecf3;
  --ink-soft: #a3b1c4;
  --accent: #6fa4ec;
  --accent-dark: #0b1220;
  --border: #2a3446;
  --header-bg: rgba(16, 21, 31, 0.88);
}

body,
.site-header,
.card,
.step,
.map-wrap,
.contact-form input,
.contact-form select,
.contact-form textarea {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

h1, h2, h3 {
  margin: 0 0 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }

.section-number {
  display: block;
  text-align: left;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.nav-area {
  display: flex;
  align-items: center;
  gap: 22px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.theme-toggle:hover { border-color: var(--accent); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
}

.logo span { color: var(--accent); }

nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

nav a:hover,
nav a[aria-current="page"] { color: var(--accent); }

/* Hero */
.hero {
  padding: 110px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.page-hero {
  padding: 70px 0 50px;
}

.hero-inner, .page-hero-inner { max-width: 720px; }
.hero-inner { position: relative; z-index: 1; }

.lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-bottom: 32px;
  max-width: 560px;
}

.lead-small {
  font-style: italic;
  color: var(--accent);
  font-size: 1.05rem;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn:hover { background: var(--accent-dark); }

.btn-ghost {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

/* Generic section spacing */
section { padding: 76px 0; }

.alt { background-color: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.dotted { background-image: url("assets/pattern-dots.svg"); background-repeat: repeat; }
.circuit { background-image: url("assets/pattern-circuit.svg"); background-repeat: repeat; background-size: 120px 120px; }

.section-intro {
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 40px;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.card-icon { font-size: 1.7rem; margin-bottom: 12px; }
.card p { color: var(--ink-soft); margin: 0 0 14px; }
.card a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.card a:hover { text-decoration: underline; }

/* Numbered service blocks (uslugi.html) */
.service-block {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.service-block:last-child { border-bottom: 1px solid var(--border); }

.service-block .num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

.service-block ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
}

.service-block li { margin-bottom: 6px; }

/* Steps (o-mnie.html) */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface);
}

.step .step-num {
  display: inline-block;
  width: 30px; height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* Tags */
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 0;
}

.tags li {
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
}

.about-inner { max-width: 700px; }

.tech-group { margin-bottom: 28px; }
.tech-group:last-child { margin-bottom: 0; }
.tech-group h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 12px;
}
.tech-group .tags { gap: 8px; }
.tech-group .tags li { padding: 6px 13px; font-size: 0.85rem; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
}

.contact-info p { margin: 0 0 20px; }
.contact-info strong { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin-bottom: 4px; }
.contact-info a { text-decoration: none; color: var(--accent); font-weight: 600; }

.contact-form { display: flex; flex-direction: column; gap: 6px; }
.contact-form label { font-size: 0.85rem; font-weight: 600; margin-top: 10px; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font: inherit;
  background: var(--surface);
  color: var(--ink);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form .btn { margin-top: 18px; align-self: flex-start; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  min-height: 1.3em;
  margin: 4px 0 0;
  font-size: 0.9rem;
  font-weight: 500;
}
.form-status.is-success { color: #1f9d55; }
.form-status.is-error { color: #d64545; }

/* CTA banner */
.cta-banner {
  text-align: center;
  padding: 60px 0;
}
.cta-banner p { color: var(--ink-soft); margin-bottom: 24px; }

@media (max-width: 720px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .nav-area { width: 100%; flex-wrap: wrap; gap: 14px; }
  nav ul { gap: 18px; flex-wrap: wrap; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero { background-image: none; }
  .service-block { grid-template-columns: 1fr; }
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
  .hero-inner .section-number,
  .hero-inner h1,
  .hero-inner .lead,
  .hero-inner .btn {
    opacity: 0;
    animation: fadeInUp 0.7s ease forwards;
  }
  .hero-inner .section-number { animation-delay: 0.05s; }
  .hero-inner h1              { animation-delay: 0.15s; }
  .hero-inner .lead           { animation-delay: 0.35s; }
  .hero-inner .btn            { animation-delay: 0.5s; }

  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .cards .card:nth-child(1) { transition-delay: 0.00s; }
  .cards .card:nth-child(2) { transition-delay: 0.05s; }
  .cards .card:nth-child(3) { transition-delay: 0.10s; }
  .cards .card:nth-child(4) { transition-delay: 0.15s; }
  .cards .card:nth-child(5) { transition-delay: 0.20s; }
  .cards .card:nth-child(6) { transition-delay: 0.25s; }
  .cards .card:nth-child(7) { transition-delay: 0.30s; }
  .cards .card:nth-child(8) { transition-delay: 0.35s; }

  .steps .step:nth-child(1) { transition-delay: 0.00s; }
  .steps .step:nth-child(2) { transition-delay: 0.08s; }
  .steps .step:nth-child(3) { transition-delay: 0.16s; }
}

.card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.6s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(20, 30, 50, 0.1);
}

.btn {
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: scale(0.97); }

/* Footer */
.site-footer {
  background: var(--accent-dark);
  color: #dbe4f2;
  padding: 28px 0;
  text-align: center;
  font-size: 0.85rem;
}

.site-footer a { color: #dbe4f2; }
