:root {
  --bg: #ffffff;
  --bg-elev: #f5f5f5;
  --fg: #0a0a0a;
  --muted: #525252;
  --accent: #e71c46;
  --accent-dark: #c3123a;
  --accent-light: #ff4d6d;
  --border: rgba(0, 0, 0, 0.08);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-display {
  font-family: 'Geist', 'Inter', sans-serif;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.btn-fire {
  background: linear-gradient(135deg, #e71c46, #c3123a);
  color: white;
  box-shadow: 0 10px 30px -10px rgba(231, 28, 70, 0.55);
}
.btn-fire:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -10px rgba(231, 28, 70, 0.75);
}
.btn-ghost {
  background: rgba(0, 0, 0, 0.04);
  color: var(--fg);
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Header / nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}
.nav.scrolled {
  box-shadow: 0 8px 30px -12px rgba(0, 0, 0, 0.15);
}
.main-menu {
  align-items: stretch;
  gap: 0.25rem;
  border-top: 1px solid var(--border);
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #262626;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav-link:hover,
.nav-link[aria-current="page"],
.nav-link.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.dropdown { position: relative; display: flex; }
.dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.2);
}
.dropdown:hover .dropdown-panel,
.dropdown:focus-within .dropdown-panel,
.dropdown.open .dropdown-panel { display: block; }
.dropdown-link {
  display: block;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-weight: 500;
  color: #262626;
}
.dropdown-link:hover,
.dropdown-link[aria-current="page"] {
  background: rgba(231, 28, 70, 0.08);
  color: var(--accent);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 49;
  padding: 96px 1.5rem 2rem;
  overflow-y: auto;
}
.mobile-menu.open {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}
.mobile-menu > a:not(.btn),
.mobile-menu summary {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
}
.mobile-menu details { text-align: center; }
.mobile-menu summary { list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary::after { content: ' ▾'; color: var(--accent); }
.mobile-menu details[open] summary::after { content: ' ▴'; }
.mobile-sub {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.75rem;
}
.mobile-sub a { font-size: 1.15rem; color: var(--muted); }
.mobile-menu a[aria-current="page"] { color: var(--accent); }

/* Home grid (5 columns, per client sketch) */
.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .home-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .home-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .home-grid { grid-template-columns: 1.15fr 1fr 1fr 1fr; } }
.home-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.home-sub { display: flex; flex-direction: column; gap: 1.25rem; }
/* Columns 1–2 share two rows: "Hale namiotowe" and "Namioty plenerowe" end at the same height,
   below them the hall tiles and "Wyposażenie dodatkowe" */
@media (min-width: 1280px) {
  .home-grid { grid-template-rows: auto 1fr; }
  .home-col { grid-row: span 2; }
  .home-col:nth-child(-n+2) { display: grid; grid-template-rows: subgrid; }
}

/* Tiles */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 20px;
  padding: 1.25rem;
  transition: all 0.25s ease;
}
.tile-sm { padding: 1rem; gap: 0.35rem; }
.tile-key {
  border: 2px solid var(--accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
/* Clickable tiles: unmistakable hover / keyboard focus */
a.tile-key { cursor: pointer; }
a.tile-key:hover,
a.tile-key:focus-visible {
  outline: none;
  transform: translateY(-6px) scale(1.015);
  background: #fff4f6;
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 4px rgba(231, 28, 70, 0.3), 0 26px 50px -18px rgba(231, 28, 70, 0.65);
}
a.tile-key:hover .tile-title,
a.tile-key:focus-visible .tile-title,
a.tile-key:hover .tile-kicker,
a.tile-key:focus-visible .tile-kicker { color: var(--accent); }
a.tile-key:hover .tile-more,
a.tile-key:focus-visible .tile-more { background: var(--accent); color: #fff; }
a.tile-key:hover .tile-more svg,
a.tile-key:focus-visible .tile-more svg { transform: translateX(4px); }
a.tile-key:hover .tile-arrow,
a.tile-key:focus-visible .tile-arrow { background: var(--accent); color: #fff; }
a.tile-key:hover .tile-arrow svg,
a.tile-key:focus-visible .tile-arrow svg { transform: translateX(2px); }
.tile-more svg,
.tile-arrow svg { transition: transform 0.2s ease; }
.tile-grow { flex: 1; }
.tile-center { justify-content: center; text-align: center; align-items: center; }
.tile-title {
  font-family: 'Geist', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1.2;
}
.tile-title-sm { font-size: 1.15rem; }
.tile-kicker {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.tile-lead { font-size: 1.2rem; line-height: 1.5; color: #262626; }
.tile-media {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  background: var(--bg-elev);
}
.tile-media-tall { aspect-ratio: 3 / 4; }
.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
a.tile-key:hover .tile-media img,
a.tile-key:focus-visible .tile-media img { transform: scale(1.05); }
.tile-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 1rem;
  line-height: 1.45;
  color: #262626;
}
.tile-list li {
  position: relative;
  padding-left: 1rem;
}
.tile-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.tile-list-sm { font-size: 0.9rem; gap: 0.2rem; line-height: 1.35; }
.tile-list-lg { font-size: 1.15rem; gap: 0.6rem; }
.tile-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--accent);
  align-self: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.tile-row {
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem;
}
.tile-thumb {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 10px;
}
.tile-arrow {
  margin-left: auto;
  color: var(--accent);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  transition: background 0.2s ease, color 0.2s ease;
}
.price-chip {
  align-self: flex-start;
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(231, 28, 70, 0.1);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 1.15rem;
}
.tile-shop {
  flex-direction: row;
  align-items: center;
  gap: 0.9rem;
  background: linear-gradient(180deg, #fff 0%, #fdf2f4 100%);
}
.tile-shop .soon-badge { margin-top: 0.4rem; }
.shop-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent);
}

/* Subpages */
.breadcrumb {
  font-size: 0.875rem;
  color: var(--muted);
}
.breadcrumb a:hover { color: var(--accent); }
.gallery-grid {
  columns: 1;
  column-gap: 1rem;
}
@media (min-width: 640px) { .gallery-grid { columns: 2; } }
@media (min-width: 1024px) { .gallery-grid { columns: 3; } }
.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
}
.gallery-item a {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  height: auto;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery-item a:hover img { transform: scale(1.03); }
.gallery-item figcaption {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: #404040;
}

/* Contact band */
.contact-band {
  background: linear-gradient(180deg, #fff 0%, #fdf2f4 100%);
  border-top: 1px solid var(--border);
}
.phone-big {
  display: block;
  font-family: 'Geist', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 999px;
  padding: 0.35rem 1.1rem;
  margin-bottom: 0.6rem;
  width: max-content;
  transition: all 0.2s ease;
}
.phone-big:hover { background: var(--accent); color: #fff; }

/* Form */
.form-label {
  display: block;
  font-size: 0.875rem;
  color: #404040;
  margin-bottom: 0.4rem;
}
.form-input {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  color: var(--fg);
  width: 100%;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(231, 28, 70, 0.12);
}
.form-input::placeholder { color: #a3a3a3; }

/* Focus rings for a11y */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.92);
  padding: 4rem 1rem;
}
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: min(1200px, 100%); text-align: center; }
.lightbox img {
  max-height: 80vh;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 10px;
}
.lightbox figcaption { color: #e5e5e5; margin-top: 0.75rem; }
.lightbox-close,
.lightbox-nav {
  position: absolute;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}
.lightbox-close:hover,
.lightbox-nav:hover { background: var(--accent); }
.lightbox-close { top: 1rem; right: 1rem; font-size: 1.4rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* Reveal animation — only hides when JS loaded (progressive enhancement) */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.js-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* Home: photos keep their real proportions (no cropping) */
.home-grid .tile-media { aspect-ratio: auto; background: none; border-radius: 0; }
.home-grid .tile-media img { height: auto; border-radius: 12px; }
.tile-center .tile-media { align-self: stretch; }
.home-grid .tile-thumb { width: 68px; height: 68px; object-fit: contain; border-radius: 6px; }

/* Home: light backdrop with slowly drifting brand-colour glows, dot grid and grain */
.home-fit {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #fff7f8;
}
.home-fit::before {
  content: '';
  position: absolute;
  inset: -25%;
  z-index: -2;
  background:
    radial-gradient(38% 32% at 18% 22%, rgba(231, 28, 70, 0.22), transparent 70%),
    radial-gradient(30% 28% at 82% 18%, rgba(255, 140, 80, 0.22), transparent 70%),
    radial-gradient(42% 38% at 72% 82%, rgba(231, 28, 70, 0.18), transparent 70%),
    radial-gradient(30% 28% at 12% 88%, rgba(255, 159, 182, 0.35), transparent 70%),
    radial-gradient(25% 22% at 50% 50%, rgba(255, 200, 120, 0.18), transparent 70%);
  filter: blur(40px);
  animation: home-glow 26s ease-in-out infinite alternate;
}
.home-fit::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(195, 18, 58, 0.14) 1px, transparent 1.4px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  background-size: 24px 24px, 160px 160px;
  opacity: 0.6;
  mix-blend-mode: multiply;
}
@keyframes home-glow {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(5%, -4%, 0) rotate(9deg) scale(1.1); }
  100% { transform: translate3d(-5%, 4%, 0) rotate(-7deg) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .home-fit::before { animation: none; }
}
.home-fit .tile { box-shadow: 0 14px 34px -20px rgba(120, 10, 40, 0.35); }
.soon-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* Home (desktop): header + tile grid + contact + footer fill exactly one screen */
@media (min-width: 1280px) and (min-height: 1400px) {
  /* header + tiles + contact + footer = one screen; tiles take whatever is left */
  .page-home { display: flex; flex-direction: column; height: 100svh; }
  .page-home > main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .home-fit { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .page-home .contact-band > div { padding-top: 1rem; padding-bottom: 1rem; gap: 1.5rem; align-items: center; }
  .page-home .contact-band h2 { font-size: 1.6rem; }
  .page-home .contact-band > div > :nth-child(1) { grid-column: span 3 / span 3; }
  .page-home .contact-band > div > :nth-child(2) { grid-column: span 6 / span 6; }
  .page-home .contact-band > div > :nth-child(3) { grid-column: span 3 / span 3; }
  .page-home .contact-band .phone-big { display: inline-block; }
  .page-home .contact-form { display: grid; grid-template-columns: 1fr 2.2fr auto; gap: 0.75rem; align-items: end; }
  .page-home .contact-form > * { margin: 0 !important; }
  .page-home .contact-form .form-input { display: block; height: 2.75rem; min-height: 0; padding: 0 0.9rem; line-height: 2.6rem; resize: none; overflow: hidden; }
  .page-home .contact-form .form-label { margin-bottom: 0.3rem; line-height: 1.2; white-space: nowrap; }
  .page-home .contact-form .btn { height: 2.75rem; }
  .page-home .contact-form textarea.form-input { height: 6rem; padding: 0.6rem 0.9rem; line-height: 1.45; overflow: auto; }
  .page-home .contact-form .form-status:empty { display: none; }
  .page-home .contact-band .phone-big { font-size: 1.15rem; padding: 0.35rem 0.9rem; margin-top: 0.4rem; }
  .page-home footer > div { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .home-fit-inner {
    flex: 1;
    min-height: 0;
    width: 100%;
    padding-top: 1rem;
    padding-bottom: 1rem;
    display: flex;
    flex-direction: column;
  }
  .home-fit .home-grid { flex: 1; min-height: 0; grid-template-rows: auto minmax(0, 1fr); gap: 0.85rem; }
  .home-fit .home-col, .home-fit .home-sub { min-height: 0; gap: 0.85rem; }
  .home-fit .tile { padding: 0.85rem; gap: 0.5rem; }
  .home-fit .tile-row { padding: 0.5rem; }
  .home-fit .home-col > .tile:where(:not(.tile-row):not(.tile-center)) { flex: 1 1 auto; }
  .home-fit .home-col > .tile:has(.tile-lead) { flex: 0 0 auto; }
  /* photo box starts at the photo's natural height (--hw = height/width, set inline) and only shrinks
     when the screen is short; contain: size keeps it from inflating anything; never cropped */
  .home-fit .tile:has(> .tile-media) { container-type: inline-size; }
  /* on a short screen only photo tiles give way, and inside them only the photo shrinks */
  .home-fit .home-col > .tile:has(> .tile-media) { min-height: 0; flex-shrink: 1; }
  .home-fit .tile-media { flex: 0 1 calc(100cqw * var(--hw, 0.75)); min-height: 70px; contain: size; display: flex; align-items: flex-start; justify-content: center; }
  .home-fit .tile-media img { width: auto; height: auto; max-width: 100%; max-height: 100%; }
  .home-fit .tile-title { font-size: 1.15rem; }
  .home-fit .tile-title-sm { font-size: 0.95rem; }
  .home-fit .tile-lead { font-size: 0.95rem; line-height: 1.4; }
  .home-fit .tile-list { font-size: 0.85rem; gap: 0.2rem; line-height: 1.35; }
  .home-fit .tile-list-sm { font-size: 0.8rem; gap: 0.05rem; }
  .home-fit .tile-kicker { font-size: 0.9rem; }
  /* the three hall tiles share the height next to "Wyposażenie dodatkowe" */
  .home-fit .home-sub > .tile-row { flex: 1 1 0; gap: 0.6rem; padding: 0.45rem 0.7rem 0.45rem calc(33% + 1.1rem); }
  /* thumb fills the tile height, photo uncropped (contain) */
  .home-fit .tile-thumb { position: absolute; left: 0.5rem; top: 0.5rem; width: 33%; height: calc(100% - 1rem); object-fit: contain; object-position: center; }
  .home-fit .tile-row .tile-kicker { font-size: 1rem; }
  .home-fit .tile-row .tile-list-sm { font-size: 0.85rem; gap: 0.05rem; line-height: 1.3; }
  .home-fit .price-chip { font-size: 0.95rem; padding: 0.15rem 0.7rem; margin-top: 0; }
  .home-fit .tile-more { font-size: 0.9rem; }
  /* column 4: shop + shows keep their natural height, the on-line shop tile takes what is left */
  .home-fit .home-col:has(> .tile-shop) > .tile:not(.tile-shop) { flex-grow: 0; }
  .home-fit .home-col > .tile-shop { flex: 1 1 auto; flex-direction: column; justify-content: center; text-align: center; gap: 1rem; }
  .home-fit .tile-shop .tile-title { font-size: 1.3rem; }
  .home-fit .shop-icon { width: 96px; height: 96px; }
  .home-fit .shop-icon svg { width: 48px; height: 48px; }
  .home-fit .tile-shop .soon-badge { margin-top: 0.6rem; font-size: 0.95rem; padding: 0.4rem 1rem; }
}

/* Contact form: honeypot + status */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  font-size: 0.95rem;
  max-width: 28rem;
  color: var(--muted);
}
.form-status.is-ok { color: #15803d; font-weight: 600; }
.form-status.is-error { color: var(--accent-dark); font-weight: 600; }
.contact-form button[disabled] { opacity: 0.6; cursor: wait; }

/* Google Maps on contact page */
.map-frame {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  aspect-ratio: 16 / 7;
  min-height: 320px;
}
.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
