/* Salwa Meble Włoszczowa: wspólne style. Płasko: biel, czerń, czerwień. */

:root {
  --white: #ffffff;
  --paper: #f4f4f3;
  --ink: #141414;
  --ink-raised: #222222;
  --ink-soft: #55585a;
  --line: #e3e3e1;
  --red: #d0201f;
  --red-dark: #a8170f;
  --red-light: #ff5a4d;
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-1: 0 1px 2px rgba(20, 20, 20, 0.05), 0 2px 8px rgba(20, 20, 20, 0.04);
  --shadow-2: 0 2px 4px rgba(20, 20, 20, 0.06), 0 14px 32px rgba(20, 20, 20, 0.08);
  --shadow-3: 0 4px 10px rgba(0, 0, 0, 0.14), 0 24px 60px rgba(0, 0, 0, 0.24);
}

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  font-family: "Instrument Sans", sans-serif;
  line-height: 1.7;
  background: var(--white);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ---------- typography ---------- */
.heading-xl,
.heading-lg,
.heading-md {
  font-family: "Familjen Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.heading-xl { font-size: clamp(2.6rem, 6.4vw, 5.2rem); }
.heading-lg { font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.06; }
.heading-md { font-size: clamp(1.35rem, 2.2vw, 1.7rem); letter-spacing: -0.02em; line-height: 1.15; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-soft); }
.on-dark .lead { color: #b5b5b5; }

/* red key word */
.red-mark { color: var(--red); }

/* ---------- header ---------- */
.site-header {
  background-color: var(--white);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px rgba(20, 20, 20, 0.04); }
.brand-name { font-family: "Familjen Grotesk", sans-serif; font-weight: 700; letter-spacing: 0.02em; color: var(--red); }
.nav-link {
  position: relative;
  padding: 0.25rem 0;
  border-radius: 4px;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav-link:hover::after,
.nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link:active { opacity: 0.7; }

.mobile-menu {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s var(--ease-out);
  box-shadow: var(--shadow-2);
}
.mobile-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- focus ---------- */
.focus-ring:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 4px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.35s var(--ease-spring), background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.97); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #000; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { border: 1.5px solid #cfcfcd; color: var(--ink); background: var(--white); }
.btn-outline:hover { border-color: var(--ink); }
.on-dark .btn-outline { border-color: rgba(255, 255, 255, 0.3); color: var(--white); background: transparent; }
.on-dark .btn-outline:hover { border-color: var(--white); background: var(--ink-raised); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--red);
  border-radius: 4px;
}
.text-link svg { transition: transform 0.35s var(--ease-spring); }
.text-link:hover { color: var(--red-dark); }
.text-link:hover svg { transform: translateX(4px); }
.text-link:active { opacity: 0.7; }
.on-dark .text-link { color: var(--red-light); }

/* ---------- hero collage ---------- */
.collage {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  aspect-ratio: 5 / 4.6;
}
.collage-main { grid-row: 1 / 3; }
@media (max-width: 639px) {
  .collage { gap: 8px; aspect-ratio: 4 / 4.2; }
}

/* ---------- cards & surfaces ---------- */
.surface {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.card-link {
  transition: transform 0.45s var(--ease-spring), box-shadow 0.3s ease, border-color 0.2s ease;
}
.card-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--ink); }
.card-link:active { transform: translateY(-1px); }
.card-link:hover .text-link svg { transform: translateX(4px); }

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--white);
  transition: background-color 0.2s ease;
}
.card-link:hover .icon-chip { background: var(--red); }

.photo {
  overflow: hidden;
  border-radius: 6px;
  background: var(--paper);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.red-bar { background: var(--red); }

/* ---------- gallery ---------- */
/* even grid: all tiles 3:4 so every row lines up */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1100px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gallery-item {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  background: var(--paper);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease-out); }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item:active img { transform: scale(1.01); }
.gallery-item.is-hidden { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5rem 1rem;
  background: rgba(12, 12, 12, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox figure { margin: 0; max-width: 1100px; width: 100%; text-align: center; }
.lightbox img { max-height: 76vh; max-width: 100%; margin: 0 auto; border-radius: 4px; box-shadow: var(--shadow-3); }
.lightbox figcaption { color: #cfcfcf; margin-top: 0.9rem; font-size: 0.95rem; }
.lb-btn {
  position: absolute;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.35s var(--ease-spring), background-color 0.2s ease;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.18); transform: scale(1.06); }
.lb-btn:active { transform: scale(0.94); }

/* ---------- reviews ---------- */
.review {
  break-inside: avoid;
  margin-bottom: 14px;
  padding: 1.6rem;
  border-radius: 6px;
  background: var(--ink-raised);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
/* mobile: horizontal scroll-snap carousel; desktop: masonry columns */
.reviews {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  margin: 0 -1.25rem;
  padding: 0 1.25rem 0.25rem;
  scroll-padding: 0 1.25rem;
  scrollbar-width: none;
}
.reviews::-webkit-scrollbar { display: none; }
.reviews .review { flex: 0 0 86%; margin-bottom: 0; scroll-snap-align: start; }
.reviews-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.reviews-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 220px; }
.review-dot { width: 8px; height: 8px; border-radius: 1px; padding: 0; background: rgba(255, 255, 255, 0.25); transition: background-color 0.2s ease, transform 0.25s var(--ease-spring); }
.review-dot:hover { background: rgba(255, 255, 255, 0.5); }
.review-dot.is-active { background: var(--red-light); transform: scale(1.3); }
@media (min-width: 768px) {
  .reviews { display: block; columns: 2; column-gap: 14px; overflow: visible; margin: 0; padding: 0; }
  .reviews .review { margin-bottom: 14px; }
}
@media (min-width: 1100px) { .reviews { columns: 3; } }

/* ---------- hours ---------- */
.hours-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.hours-row:last-child { border-bottom: 0; }
.hours-row.is-today { font-weight: 700; color: var(--red); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s ease, transform 0.9s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card-link, .gallery-item img, .text-link svg, .mobile-menu, .lb-btn, .review-dot, .icon-chip, .nav-link::after { transition: none !important; }
}
