/* =========================================================
   DESQE Sp. z o.o. — stylesheet
   Design tokens
   ========================================================= */
:root {
  /* Color */
  --ink: #1B2430;        /* primary text / dark surfaces */
  --ink-soft: #3A4453;
  --paper: #F6F4EF;      /* page background, warm off-white */
  --paper-raised: #FFFFFF;
  --timber: #B4703A;     /* copper / timber accent */
  --timber-dark: #8F5A2E;
  --sage: #56695C;       /* sanitary / secondary accent */
  --line: #DDD7C9;       /* hairline borders */
  --muted: #6E6A5F;      /* secondary text on paper */
  --muted-on-dark: #B7BEC9;

  /* Type */
  --font-head: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Layout */
  --container-w: 1180px;
  --radius: 4px;
  --shadow-card: 0 1px 2px rgba(27, 36, 48, 0.06), 0 8px 24px rgba(27, 36, 48, 0.05);
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
}
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

:focus-visible {
  outline: 2px solid var(--timber);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--timber-dark);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(27, 36, 48, 0.04);
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 16px rgba(27, 36, 48, 0.05);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 76px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.logo-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 22px;
}
.logo-mark span {
  display: block;
  height: 4px;
  background: var(--timber);
}
.logo-mark span:nth-child(1) { width: 100%; }
.logo-mark span:nth-child(2) { width: 70%; background: var(--ink); }
.logo-mark span:nth-child(3) { width: 85%; background: var(--sage); }

.logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.logo-suffix {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.7rem;
  margin-left: 2px;
}

.main-nav ul {
  display: flex;
  gap: 32px;
}
.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color 0.18s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--timber);
  transition: width 0.2s ease;
}
.nav-link:hover {
  color: var(--ink);
}
.nav-link:hover::after {
  width: 100%;
}

.header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding: 88px 0 96px;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.hero-kicker {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--timber-dark);
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  max-width: 16ch;
}
.hero-lead {
  margin-top: 22px;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 36px;
  margin: 52px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hero-stats dt {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--ink);
}
.hero-stats dd {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 20ch;
}

/* Hero visual: stacked planks + pipe, built with CSS */
.hero-visual {
  position: relative;
  height: 380px;
}
.plank-stack {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  animation: fade-in 0.7s ease 0.15s forwards;
}
.plank {
  display: block;
  height: 34px;
  border-radius: 3px;
  box-shadow: var(--shadow-card);
  transform-origin: left center;
  transform: scaleX(0);
  animation: plank-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.plank-1 { width: 96%; background: #C88B54; animation-delay: 0.25s; }
.plank-2 { width: 80%; background: var(--timber); animation-delay: 0.35s; }
.plank-3 { width: 100%; background: #9C6636; animation-delay: 0.45s; }
.plank-4 { width: 68%; background: var(--sage); animation-delay: 0.55s; }
.plank-5 { width: 88%; background: var(--ink-soft); animation-delay: 0.65s; }

.pipe-detail {
  position: absolute;
  right: 6%;
  bottom: 8%;
  display: flex;
  gap: 10px;
  align-items: flex-end;
  opacity: 0;
  animation: fade-in 0.6s ease 0.9s forwards;
}
.pipe {
  width: 16px;
  height: 90px;
  border-radius: 8px;
  background: var(--paper-raised);
  border: 2px solid var(--sage);
}
.pipe-short { height: 60px; }

@keyframes plank-in {
  to { transform: scaleX(1); }
}
@keyframes fade-in {
  to { opacity: 1; }
}

/* =========================================================
   Section heading (shared)
   ========================================================= */
.section-heading {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-heading p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1.05rem;
}
.section-heading.light h2 { color: var(--paper); }
.section-heading.light p { color: var(--muted-on-dark); }

/* =========================================================
   About
   ========================================================= */
.about {
  padding: 88px 0;
  background: var(--paper-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.about-lead {
  font-size: 1.2rem;
  color: var(--ink);
  font-weight: 500;
}
.about-grid p:not(.about-lead) {
  color: var(--ink-soft);
}

/* =========================================================
   Services
   ========================================================= */
.services { padding: 96px 0; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.service-card.cat-timber { border-top-color: var(--timber); }
.service-card.cat-building { border-top-color: var(--ink); }
.service-card.cat-sanitary { border-top-color: var(--sage); }
.service-card.cat-service { border-top-color: var(--muted); }

.service-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  color: var(--ink);
}
.cat-timber .service-icon { color: var(--timber-dark); }
.cat-sanitary .service-icon { color: var(--sage); }

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.service-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* =========================================================
   Why Us
   ========================================================= */
.why-us {
  background: var(--ink);
  padding: 96px 0;
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}
.benefit {
  border-left: 2px solid rgba(255,255,255,0.14);
  padding-left: 20px;
}
.benefit h3 {
  color: var(--paper);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.benefit p {
  color: var(--muted-on-dark);
  font-size: 0.95rem;
}

/* =========================================================
   Contact
   ========================================================= */
.contact { padding: 96px 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-form {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-field {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}
.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--ink-soft);
}
.form-field input,
.form-field select,
.form-field textarea {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  resize: vertical;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--timber);
  box-shadow: 0 0 0 3px rgba(180, 112, 58, 0.14);
}
.form-field.invalid input,
.form-field.invalid textarea {
  border-color: #B3432F;
}
.field-error {
  font-size: 0.8rem;
  color: #B3432F;
  min-height: 1.1em;
  margin-top: 5px;
}

.form-submit { width: 100%; }
.form-status {
  margin-top: 14px;
  font-size: 0.9rem;
  min-height: 1.2em;
}
.form-status.success { color: var(--sage); font-weight: 600; }
.form-status.error { color: #B3432F; font-weight: 600; }

.contact-details {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 34px;
}
.contact-details h3 {
  color: var(--paper);
  font-size: 1.05rem;
  margin-bottom: 22px;
}
.contact-details dl div {
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.contact-details dl div:first-of-type { border-top: none; }
.contact-details dt {
  font-size: 0.78rem;
  color: var(--muted-on-dark);
  margin-bottom: 4px;
}
.contact-details dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--paper);
}
.contact-details a:hover { color: var(--timber); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--paper-raised);
  border-top: 1px solid var(--line);
  padding: 64px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-logo { margin-bottom: 14px; }
.footer-col p {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 34ch;
}
.footer-col h4 {
  font-size: 0.85rem;
  color: var(--ink);
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a,
.footer-col address a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.18s ease;
}
.footer-col ul a:hover,
.footer-col address a:hover { color: var(--timber-dark); }
.footer-col address { font-style: normal; color: var(--muted); font-size: 0.92rem; line-height: 1.7; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { height: 260px; order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .main-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
  }
  .main-nav ul li { border-bottom: 1px solid var(--line); }
  .main-nav ul li:last-child { border-bottom: none; }
  .nav-link { display: block; padding: 14px 0; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .hero { padding: 56px 0 64px; }
  .hero-stats { gap: 24px; }

  .service-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
  .benefit { padding-left: 16px; }

  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
