/* ==========================================================================
   Pellet Ostrzeszów — stylesheet
   Single hand-authored CSS file (no build step, no preprocessor).
   Organised as: tokens → reset → layout → components → utilities.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Palette — warm, natural wood/pellet tones */
  --color-bg: #ffffff;
  --color-bg-muted: #f5f1ea;
  --color-text: #2b2620;
  --color-text-soft: #5c554b;
  --color-primary: #8a5a2b; /* wood brown */
  --color-primary-dark: #6f4720;
  --color-accent: #6b8e23; /* olive/leaf green */
  --color-border: #e3dccf;
  --color-white: #ffffff;

  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-base: 1rem;
  --lh-base: 1.6;

  /* Spacing / layout */
  --container-max: 1120px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(43, 38, 32, 0.08);
  --header-height: 68px;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary-dark);
}

h1,
h2,
h3 {
  line-height: 1.2;
  color: var(--color-text);
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section {
  padding-block: var(--space-6);
}

.section--muted {
  background: var(--color-bg-muted);
}

.section__eyebrow,
.hero__eyebrow {
  margin: 0 0 var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
}

.section__title {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.prose {
  max-width: 65ch;
  color: var(--color-text-soft);
}

/* ---------- Utilities ---------- */
.u-text-center {
  text-align: center;
}

.u-center-inline {
  margin-inline: auto;
}

.u-mt-4 {
  margin-top: var(--space-4);
}

/* Hidden from sight but kept in the render tree — used by the inline icon
   sprite, which must not be display:none for <use> to resolve everywhere. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* Inline SVG icon, sized to the surrounding text and inheriting its colour. */
.icon {
  width: 1em;
  height: 1em;
  flex: none;
  color: var(--color-primary);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  color: var(--color-primary-dark);
  padding: var(--space-1) var(--space-2);
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

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

.btn--ghost {
  background: transparent;
  color: var(--color-primary-dark);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-primary);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
}

.brand__name {
  font-size: 1.1rem;
}

.primary-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
}

.primary-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}

.primary-nav a:hover {
  color: var(--color-primary-dark);
}

.primary-nav__cta {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: var(--color-primary);
  color: var(--color-white) !important;
}

.primary-nav__cta:hover {
  background: var(--color-primary-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--color-bg-muted), var(--color-bg));
  padding-block: var(--space-6);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 var(--space-3);
}

.hero__lead {
  font-size: 1.15rem;
  color: var(--color-text-soft);
  max-width: 48ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.hero__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Stats ---------- */
.stats {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.stat {
  text-align: center;
  padding: var(--space-3);
  background: var(--color-bg-muted);
  border-radius: var(--radius);
}

.stat__value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.stat__label {
  color: var(--color-text-soft);
  font-size: 0.95rem;
}

/* ---------- Cards (products) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.card__media {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.card__body {
  padding: var(--space-3);
}

.card__title {
  margin: 0 0 var(--space-1);
}

.card__specs {
  margin: var(--space-2) 0 0;
  padding-left: 1.1rem;
  color: var(--color-text-soft);
  font-size: 0.95rem;
}

/* ---------- Features ---------- */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.feature {
  padding: var(--space-3);
  border-left: 4px solid var(--color-accent);
  background: var(--color-bg-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.feature__title {
  margin: 0 0 var(--space-1);
}

/* ---------- Team ---------- */
.team {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

.team__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Nickname above the name — deliberately quiet, a wink rather than a label. */
.team__alias {
  margin: var(--space-2) 0 0;
  color: var(--color-text-soft);
  font-size: 0.8125rem;
  font-style: italic;
  opacity: 0.7;
}

.team__name {
  margin: 0;
  font-size: 1.125rem;
}

.team__role {
  margin: 0;
  color: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Contact ---------- */
.contact__list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.contact__list li {
  display: grid;
}

.contact__phones {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
}

.contact__phones li {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.contact__label {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-text);
  color: var(--color-bg-muted);
  padding-block: var(--space-4);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.site-footer__brand {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.site-footer__nav {
  list-style: none;
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
}

.site-footer__nav a {
  color: var(--color-bg-muted);
  text-decoration: none;
}

.site-footer__nav a:hover {
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    display: none;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-2);
  }

  .primary-nav__list li {
    border-bottom: 1px solid var(--color-border);
  }

  .primary-nav__list li:last-child {
    border-bottom: 0;
  }

  .primary-nav a {
    display: block;
    padding: var(--space-2) 0;
  }

  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__media {
    order: -1;
  }

  .cards,
  .features,
  .stats {
    grid-template-columns: 1fr;
  }

  .team {
    grid-template-columns: repeat(2, 1fr);
  }
}
