/* ==========================================================================
   Pracownia Tapicerska Sławomir Ceranek — style.css
   ========================================================================== */

:root {
  --black: #000000;
  --navy: #0B1E39;
  --gold: #D4AF37;
  --gold-dark: #b8952c;
  --bg: #FAFAF8;
  --bg-alt: #F1EFEA;
  --text: #3a3a3a;
  --heading: #10233d;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14);
  --font-body: 'Inter', system-ui, sans-serif;
  --font-head: 'Playfair Display', Georgia, serif;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: min(92%, 1200px);
  margin: 0 auto;
}

/* ==========================================================================
   Topbar — pigułki z telefonem i adresem
   ========================================================================== */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  padding: 12px 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.topbar__item {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(20, 20, 20, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

.topbar__item:hover { background: var(--gold); color: var(--black); }

body.scrolled .topbar {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

/* ==========================================================================
   Header — czarna zaokrąglona pigułka (sticky)
   ========================================================================== */

.header {
  position: fixed;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 1240px);
  z-index: 1000;
  background: rgba(0, 0, 0, 1);
  border-radius: 40px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: all 0.35s ease;
}

body.scrolled .header {
  top: 12px;
  transform: translateX(-50%) scale(0.97);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 28px;
  min-height: var(--header-h);
}

.header__logo img {
  height: 46px;
  width: auto;
  transition: height 0.3s ease;
}

body.scrolled .header__logo img { height: 40px; }

/* Na desktopie sama sofa, na mobile pełne logo z napisem */
.header__logo-full { display: none; }

@media (max-width: 820px) {
  .header__logo-icon { display: none; }
  .header__logo-full { display: block; height: 38px; }
  body.scrolled .header__logo-full { height: 34px; }
}

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

.nav a {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

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

.nav a.is-active { color: var(--gold); }

.nav__cta {
  background: var(--gold);
  color: var(--black) !important;
  padding: 9px 22px;
  border-radius: 999px;
  transition: background 0.25s ease !important;
}

.nav__cta:hover { background: #fff; color: var(--black) !important; }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero (strona główna) — slider crossfade
   ========================================================================== */

.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: var(--navy);
}

.hero__slides { position: absolute; inset: 0; }

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__slide.is-active { opacity: 1; }

.hero__slide.is-active img {
  animation: kenburns 7s ease-out forwards;
}

@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 30, 57, 0.35) 0%, rgba(11, 30, 57, 0.15) 45%, rgba(11, 30, 57, 0.55) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding-top: 60px;
}

.hero__content h1 {
  font-family: var(--font-head);
  font-size: clamp(34px, 5.4vw, 64px);
  font-weight: 600;
  line-height: 1.15;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.hero__content p {
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(17px, 2.2vw, 24px);
  margin-top: 14px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero__actions {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Przycisk z telefonem w hero — tylko na mobile */
.hero__actions .hero__phone { display: none; }

/* Kropki slidera */
.hero__dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.hero__dot.is-active {
  background: var(--gold);
  transform: scale(1.25);
}

/* ==========================================================================
   Nagłówek podstrony (mniejszy banner)
   ========================================================================== */

.page-hero {
  background: linear-gradient(160deg, #06101f 0%, var(--navy) 60%, #16325a 100%);
  color: #fff;
  padding: 200px 0 72px;
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(30px, 4.5vw, 50px);
  font-weight: 600;
}

.page-hero p {
  margin-top: 10px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.75);
  font-family: var(--font-head);
  font-style: italic;
}

/* Okruszki (breadcrumbs) */
.breadcrumb {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 18px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s ease;
}

.breadcrumb a:hover { color: var(--gold); }

.breadcrumb span { color: #fff; }

/* ==========================================================================
   Przyciski
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 13px 32px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

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

.btn--gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

.btn--outline:hover {
  background: #fff;
  color: var(--black);
  border-color: #fff;
}

.btn--dark {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.btn--dark:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

/* ==========================================================================
   Sekcje
   ========================================================================== */

.section { padding: 96px 0; }

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

.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.eyebrow {
  display: inline-block;
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h2 {
  font-family: var(--font-head);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 600;
  color: var(--heading);
  line-height: 1.2;
}

.section__head p {
  margin-top: 16px;
  font-size: 17px;
  color: #6a6a6a;
}

/* ==========================================================================
   O nas
   ========================================================================== */

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.about__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  object-fit: cover;
}

.about__text h2 { margin-bottom: 20px; }

.about__text p + p { margin-top: 14px; }

.about__list {
  list-style: none;
  margin-top: 24px;
}

.about__list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--heading);
}

.about__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 16.2l-4.2-4.2L3.4 13.4 9 19 21 7l-1.4-1.4z"/></svg>') center / contain no-repeat;
  -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 16.2l-4.2-4.2L3.4 13.4 9 19 21 7l-1.4-1.4z"/></svg>') center / contain no-repeat;
}

.about__text .btn { margin-top: 28px; }

/* ==========================================================================
   Usługi — kafelki
   ========================================================================== */

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card:hover .card__img img { transform: scale(1.06); }

.card__body {
  padding: 26px 26px 30px;
  text-align: center;
}

.card__body h3 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 600;
  color: var(--heading);
  line-height: 1.3;
  margin-bottom: 10px;
  /* rezerwa na 2 linie — opisy we wszystkich kafelkach zaczynają się na tej samej wysokości */
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__body p { font-size: 15px; color: #666; }

/* Usługi — pełne wiersze (uslugi.html) */
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 44px 0;
}

.service-row + .service-row { border-top: 1px solid #e5e2da; }

.service-row__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.service-row__text h3 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 14px;
  line-height: 1.25;
}

.service-row__text p { color: #555; }

.service-row:nth-child(even) .service-row__media { order: 2; }

/* ==========================================================================
   Galeria / Realizacje
   ========================================================================== */

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.gallery__item {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  position: relative;
  cursor: zoom-in;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gallery__item:hover img { transform: scale(1.07); }

.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 30, 57, 0);
  transition: background 0.3s ease;
}

.gallery__item:hover::after { background: rgba(11, 30, 57, 0.18); }

.gallery__more {
  text-align: center;
  margin-top: 44px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.is-open { display: flex; }

.lightbox__img {
  max-width: 90vw;
  max-height: 86vh;
  border-radius: 8px;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.6);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 26px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover { background: var(--gold); color: var(--black); }

.lightbox__close { top: 22px; right: 22px; font-size: 32px; }
.lightbox__prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 22px; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   Pasek CTA
   ========================================================================== */

.cta-band {
  background: linear-gradient(120deg, #06101f, var(--navy));
  color: #fff;
  text-align: center;
  padding: 72px 0;
}

.cta-band h2 { color: #fff; margin-bottom: 12px; }

.cta-band p { color: rgba(255, 255, 255, 0.75); margin-bottom: 30px; }

/* ==========================================================================
   Kontakt
   ========================================================================== */

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

.contact__info h2 { margin-bottom: 24px; }

.contact__list {
  list-style: none;
  margin-bottom: 30px;
}

.contact__list li {
  padding: 14px 0;
  border-bottom: 1px solid #e5e2da;
  font-size: 16px;
  color: var(--heading);
}

.contact__list a { color: var(--heading); font-weight: 500; transition: color 0.2s; }
.contact__list a:hover { color: var(--gold-dark); }

.contact__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 3px;
}

.contact__map iframe {
  width: 100%;
  height: 460px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

/* ==========================================================================
   Stopka
   ========================================================================== */

.footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.72);
  padding: 60px 0 0;
  font-size: 14.5px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 44px;
}

.footer__brand img { height: 52px; width: auto; margin-bottom: 16px; }

.footer h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer ul { list-style: none; }

.footer ul li { margin-bottom: 9px; }

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

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer__top { color: var(--gold); font-weight: 600; }

/* ==========================================================================
   Responsywność
   ========================================================================== */

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

@media (max-width: 820px) {
  .nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    background: rgba(0, 0, 0, 0.96);
    border-radius: 24px;
    padding: 18px;
    display: none;
    box-shadow: var(--shadow-lg);
  }

  .nav.is-open { display: flex; }

  .nav a { padding: 11px 0; width: 100%; text-align: center; }

  .nav__cta { margin-top: 6px; }

  .burger { display: flex; }

  .about__grid,
  .contact__grid,
  .service-row { grid-template-columns: 1fr; gap: 36px; }

  .service-row:nth-child(even) .service-row__media { order: 0; }

  .section { padding: 68px 0; }

  .page-hero { padding: 170px 0 56px; }
}

@media (max-width: 820px) {
  /* Na wąskich ekranach kadruj hero tak, żeby fotel był na środku */
  .hero__slide img.pos-chair { object-position: 16% center; }
  /* Slajd z niebieskim kompletem: na telefonie centruj na fotelu (lewa część zdjęcia) */
  .hero__slide img.pos-komplet { object-position: 15% center; }
  /* Plac zabaw: kadr na kolorowe pufy i ławkę */
  .hero__slide img.pos-plac { object-position: 48% center; }

  /* Telefon jako drugi przycisk pod „Zobacz usługi" (mobile) — 20% większy */
  .hero__actions .hero__phone { display: inline-flex; font-size: 16px; padding: 8px 20px; gap: 8px; }
  .hero__actions .hero__phone svg { width: 17px; height: 17px; }
  .hero__actions { flex-direction: column; align-items: center; }
  /* Na stronie głównej pigułka z telefonem przenosi się z paska do hero */
  .home .topbar__phone { display: none; }
}

@media (max-width: 640px) {
  .topbar__item--address { display: none; }

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

  .gallery__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }

  .header__inner { padding: 8px 18px; min-height: 62px; }

  .header { top: 54px; }

  .hero__actions .btn { width: 100%; max-width: 320px; }

  .contact__map iframe { height: 340px; }
}

/* Delikatne wejście sekcji */
@media (prefers-reduced-motion: no-preference) {
  /* ukrywamy do animacji TYLKO gdy JS działa (klasa .js na <html>) */
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

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