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

html,
body {
  min-height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  background: #000;
  color: #fff;
  overflow-y: auto;
}

.ph-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* ============ GÓRNY PASEK ============ */

.ph-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #000;
}

.ph-top-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.ph-top-left {
  justify-self: flex-start;
}

.ph-top-label {
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.ph-top-center {
  justify-self: center;
  margin: -10px;
}

.ph-logo-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.logo-svg {
  display: block;
  width: 110px;
  height: auto;
  margin: -6px 0;
}

.ph-top-right {
  justify-self: flex-end;
}

.top-bar-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-bar-links a {
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.top-bar-links a:hover {
  text-decoration: underline;
}

.top-bar-separator {
  pointer-events: none;
}

/* ============ MAIN / GRID ============ */

.ph-main {
  padding: 120px 24px 120px;
}

.ph-grid-section {
  padding-top: 8px;
}

.ph-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.ph-item {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  transform-origin: center;
}

.ph-item:hover {
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.02);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
}

.ph-thumb-wrap {
  position: relative;
  overflow: hidden;
  background: #000;
}

.ph-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ph-caption {
  padding: 18px 20px 20px;
  text-align: center;
  background: #050505;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ph-caption h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.ph-caption p {
  font-size: 13px;
  opacity: 0.8;
}

.ph-item:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

/* ============ STOPKA ============ */

.ph-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 24px 24px;
  font-size: 12px;
  background: #000;
}

.ph-footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  opacity: 0.8;
  gap: 16px;
}

.ph-footer-left {
  justify-self: flex-start;
}

.ph-footer-right {
  justify-self: flex-end;
}

.ph-footer-center {
  justify-self: center;
  margin: -10px;
}

.ph-footer-button {
  display: inline-block;
  padding: 6px 22px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid #ffffff;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.ph-footer-button:hover {
  background: #ffffff;
  color: #000000;
}

/* ============ RESPONSYWNOŚĆ ============ */

/* tablet */
@media (max-width: 1024px) {
  .ph-main {
    padding: 104px 24px 104px;
  }

  .logo-svg {
    width: 96px;
    margin-bottom: -12px;
    margin-top: -15px;
  }

  .ph-footer {
    padding: 24px 24px 24px;
  }

  .ph-footer-inner {
    align-items: center;
  }

  .ph-grid {
    gap: 24px;
  }
}

/* mobile */
@media (max-width: 768px) {

  .ph-top-label,
  .top-bar-links a {
    font-size: 14px;
    letter-spacing: 0.14em;
  }

  .logo-svg {
    width: 90px;
    margin-bottom: -10px;
    margin-top: -10px;
  }

  .ph-main {
    padding: 96px 16px 96px;
  }

  .ph-top-bar {
    padding: 16px 16px;
  }

  .ph-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ph-caption h2 {
    font-size: 15px;
  }

  .ph-caption p {
    font-size: 12px;
  }

  .ph-footer {
    position: sticky;
    bottom: 0;
    left: auto;
    right: auto;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }
  
  .ph-footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    row-gap: 4px;
  }

  .ph-footer-left,
  .ph-footer-right,
  .ph-footer-center {
    justify-self: center;
  }

  .ph-footer-center {
    order: -1;
    padding-bottom: 5px;
    margin: 0px;
  }

  .ph-footer-right {
    order: 0;
  }

  .ph-footer-left {
    order: 1;
  }
}

@media (max-width: 480px) {
  .ph-top-inner {
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto;
  }

  .ph-top-center {
    justify-self: center;
  }
}
