/* SZCZEPANEK-INSTALL — styles.css
   Tokens follow DESIGN.md. Hex (not OKLCH) is deliberate: colors are
   extracted from the client logo, not composed. */

:root {
  --ink-black: #0e1310;
  --brand-green: #1f6b3a;
  --brand-green-bright: #2e7d46;
  --brand-green-tint: #4d9162;
  --brand-green-deep: #154429;
  --paper: #f6f5f0;
  --surface: #ffffff;
  --ink-body: #1b241e;
  --accent-copper: #b96d38;
  --accent-copper-bright: #c97b3f;
  --line: #d8d8cc;

  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --z-sticky: 100;
  --z-mobile-nav: 200;
  --z-floating-cta: 300;
  --z-lightbox: 400;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  font-family: var(--font-serif);
  line-height: 1.15;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 1rem;
  background: var(--brand-green);
  color: #fff;
  padding: 0.6em 1.2em;
  border-radius: 4px;
  z-index: 1000;
  transition: top 0.2s ease-out;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Section eyebrows / headings ---------- */

.section-heading {
  max-width: 62ch;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--brand-green);
}

.section-heading p {
  color: var(--ink-body);
  opacity: 0.85;
  max-width: 60ch;
}

section {
  padding-block: clamp(3rem, 8vw, 6rem);
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--ink-black);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
}

.brand__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand__name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name strong {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--brand-green-tint);
}

.brand__name span {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.03em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease-out, color 0.2s ease-out;
}

.nav__links a:hover,
.nav__links a:focus-visible {
  color: #fff;
  border-color: var(--accent-copper);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-copper);
  color: var(--ink-black);
  font-weight: 600;
  text-decoration: none;
  padding: 0.55em 1.1em;
  border-radius: 4px;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.2s ease-out;
}

.nav__cta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav__cta:hover,
.nav__cta:focus-visible {
  background: var(--accent-copper-bright);
}

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  border-radius: 4px;
  color: #fff;
  padding: 0.4rem;
  cursor: pointer;
}

.nav__toggle svg {
  width: 26px;
  height: 26px;
}

@media (max-width: 860px) {
  .nav__links {
    position: fixed;
    inset: 0 0 0 auto;
    top: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--ink-black);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem var(--gutter);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: var(--z-mobile-nav);
  }

  .nav__links[data-open="true"] {
    transform: translateX(0);
  }

  .nav__links a {
    font-size: 1.15rem;
  }

  .nav__cta {
    display: none;
  }

  .nav__toggle {
    display: inline-flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav__links {
    transition: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--ink-black);
  color: #fff;
  overflow: hidden;
  padding-block: clamp(4rem, 14vh, 7rem);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(180deg, rgba(14, 19, 16, 0.88), rgba(14, 19, 16, 0.94)),
    url("../img/hero-bg.jpg");
  background-size: cover;
  background-position: center 30%;
  opacity: 0.55;
}

.hero .container {
  position: relative;
  max-width: 760px;
}

.hero__eyebrow {
  display: inline-block;
  color: var(--brand-green-tint);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.5em;
}

.hero h1 em {
  font-style: normal;
  color: var(--brand-green-bright);
}

.hero__lede {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 55ch;
  margin-bottom: 2.2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero__eyebrow,
.hero h1,
.hero__lede,
.hero__actions {
  animation: hero-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero h1 {
  animation-delay: 0.08s;
}

.hero__lede {
  animation-delay: 0.18s;
}

.hero__actions {
  animation-delay: 0.28s;
}

@media (prefers-reduced-motion: reduce) {
  .hero__eyebrow,
  .hero h1,
  .hero__lede,
  .hero__actions {
    animation: none;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85em 1.6em;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease-out, background 0.2s ease-out, border-color 0.2s ease-out;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent-copper);
  color: var(--ink-black);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--accent-copper-bright);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: #fff;
}

.btn--block {
  width: 100%;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

/* ---------- O firmie ---------- */

.about {
  background: var(--paper);
}

.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about__copy p + p {
  margin-top: 1em;
}

.about__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.about__stat strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--brand-green);
}

.about__stat span {
  font-size: 0.9rem;
  opacity: 0.75;
}

.about__photo {
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .about__grid {
    grid-template-columns: 1fr;
  }

  .about__photo {
    order: -1;
    aspect-ratio: 16 / 10;
  }
}

/* ---------- Usługi ---------- */

.services {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (max-width: 900px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .services__grid {
    grid-template-columns: 1fr;
  }
}

.service-tile {
  background: var(--surface);
  padding: 2.2rem 1.75rem;
  box-shadow: inset 0 0 0 0 var(--brand-green);
  transition: box-shadow 0.2s ease-out;
}

.service-tile:hover,
.service-tile:focus-within {
  box-shadow: inset 0 0 0 2px var(--brand-green);
}

@media (prefers-reduced-motion: reduce) {
  .service-tile {
    transition: none;
  }
}

.service-tile--lead {
  background: var(--paper);
}

.service-tile__icon {
  width: 52px;
  height: 52px;
  margin-bottom: 1.25rem;
}

.service-tile h3 {
  font-size: 1.15rem;
  color: var(--ink-body);
  margin-bottom: 0.5em;
}

.service-tile p {
  font-size: 0.95rem;
  opacity: 0.8;
  margin: 0;
}

/* ---------- Realizacje ---------- */

.gallery {
  background: var(--paper);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.gallery__item {
  position: relative;
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  cursor: pointer;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery__item:hover img,
.gallery__item:focus-visible img {
  transform: scale(1.05);
}

/* ---------- Lightbox (hover/tap-to-preview) ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 5vw, 3rem);
  background: rgba(14, 19, 16, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-out;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: clamp(0.75rem, 3vw, 1.5rem);
  right: clamp(0.75rem, 3vw, 1.5rem);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.lightbox__close svg {
  width: 22px;
  height: 22px;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery__item img {
    transition: none;
  }
}

/* ---------- Dlaczego my ---------- */

.why {
  background: var(--ink-black);
  color: #fff;
}

.why .section-heading h2 {
  color: var(--brand-green-bright);
}

.why .section-heading p {
  color: rgba(255, 255, 255, 0.75);
}

.why__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem 2.5rem;
}

.why__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.why__item strong {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--brand-green-bright);
  min-width: 2ch;
}

.why__item h3 {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.3em;
}

.why__item p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* ---------- Opinie ---------- */

.testimonials {
  background: var(--surface);
}

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.testimonial {
  position: relative;
  background: var(--paper);
  padding: 2rem;
  border-radius: 6px;
}

.testimonial::before {
  content: "\201C";
  display: block;
  font-family: var(--font-serif);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--brand-green);
  opacity: 0.3;
  margin-bottom: -0.4rem;
}

.testimonial p {
  font-size: 1.02rem;
  margin: 0 0 1.2rem;
}

.testimonial cite {
  font-style: normal;
  font-weight: 600;
  color: var(--brand-green);
  display: block;
}

.testimonial cite span {
  display: block;
  font-weight: 400;
  color: var(--ink-body);
  opacity: 0.65;
  font-size: 0.85rem;
}

/* ---------- Kontakt ---------- */

.contact {
  background: var(--paper);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.contact__info h3 {
  font-size: 1.1rem;
  color: var(--brand-green);
  margin-top: 1.6rem;
  margin-bottom: 0.4em;
}

.contact__info h3:first-child {
  margin-top: 0;
}

.contact__info address {
  font-style: normal;
}

.contact__quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.contact__map {
  margin-top: 1.75rem;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.contact__map iframe {
  width: 100%;
  height: 260px;
  border: 0;
  display: block;
}

.contact-form {
  background: var(--surface);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 6px;
  border: 1px solid var(--line);
}

.form-field {
  margin-bottom: 1.15rem;
}

.form-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4em;
}

.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  padding: 0.7em 0.85em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink-body);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--brand-green);
  outline-offset: 1px;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-note {
  font-size: 0.8rem;
  opacity: 0.65;
  margin-top: 0.75rem;
}

@media (max-width: 860px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink-black);
  color: rgba(255, 255, 255, 0.75);
  padding-block: 3rem 2rem;
}

.site-footer .brand {
  margin-bottom: 1.25rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
}

.footer__col h4 {
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__col li {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
}

.footer__col li + li {
  margin-top: 0.6rem;
}

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

.footer__col a:hover,
.footer__col a:focus-visible {
  color: var(--brand-green-tint);
}

.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  opacity: 0.6;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

@media (max-width: 700px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Sticky mobile CTA ---------- */

.floating-cta {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: var(--z-floating-cta);
  background: var(--accent-copper);
  color: var(--ink-black);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(14, 19, 16, 0.35);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.floating-cta[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.floating-cta svg {
  width: 26px;
  height: 26px;
}

@media (min-width: 861px) {
  .floating-cta {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-cta {
    transition: none;
  }
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* Staggered cascade for grid/list children — each section's reveal
     fits what it reveals, rather than one uniform pop. */
  .services__grid .reveal:nth-child(2) { transition-delay: 0.08s; }
  .services__grid .reveal:nth-child(3) { transition-delay: 0.16s; }
  .services__grid .reveal:nth-child(4) { transition-delay: 0.24s; }

  .gallery__grid .reveal:nth-child(2) { transition-delay: 0.05s; }
  .gallery__grid .reveal:nth-child(3) { transition-delay: 0.1s; }
  .gallery__grid .reveal:nth-child(4) { transition-delay: 0.15s; }
  .gallery__grid .reveal:nth-child(5) { transition-delay: 0.2s; }
  .gallery__grid .reveal:nth-child(6) { transition-delay: 0.25s; }
  .gallery__grid .reveal:nth-child(7) { transition-delay: 0.3s; }
  .gallery__grid .reveal:nth-child(8) { transition-delay: 0.35s; }
  .gallery__grid .reveal:nth-child(9) { transition-delay: 0.4s; }

  .why__list .reveal:nth-child(2) { transition-delay: 0.08s; }
  .why__list .reveal:nth-child(3) { transition-delay: 0.16s; }
  .why__list .reveal:nth-child(4) { transition-delay: 0.24s; }

  .testimonials__grid .reveal:nth-child(2) { transition-delay: 0.1s; }
  .testimonials__grid .reveal:nth-child(3) { transition-delay: 0.2s; }
}
