/* ============================================================
   SIGMA — Realizacje / shared styles
   Matches the core site design system (index.html)
   ============================================================ */

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

:root {
  --black: #080808;
  --dark: #111111;
  --card: #181818;
  --border: #2A2A2A;
  --gold: #C9A84C;
  --gold-light: #E4C97A;
  --gold-dim: rgba(201, 168, 76, 0.18);
  --white: #FFFFFF;
  --cream: #F5F0E8;
  --muted: #888888;
  --text: #D8D8D8;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-accent: 'Cormorant Garamond', Georgia, serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--dark);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 2px;
}

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

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.eyebrow.centered {
  justify-content: center;
}

.eyebrow.centered::after {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.gold-text {
  color: var(--gold);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .reveal,
  .r-card,
  .r-card img,
  .masonry-item img {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* ============ NAV ============ */
nav.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 14px 0;
  background: rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.06em;
}

.logo-mark span {
  color: var(--gold);
}

.logo-sub {
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 34px;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  position: relative;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--gold);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

.nav-links a.nav-cta {
  background: var(--gold);
  color: var(--black);
  padding: 10px 22px;
  font-weight: 600;
  transition: background 0.3s;
}

.nav-links a.nav-cta::after {
  display: none;
}

.nav-links a.nav-cta:hover {
  background: var(--gold-light);
  color: var(--black);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}

.nav-hamburger span {
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: 0.3s;
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.98);
  backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.5rem;
  transition: color 0.3s;
}

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

.mobile-close {
  position: absolute;
  top: 28px;
  right: 32px;
  font-size: 1.4rem;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }
}

/* ============ PAGE HERO (listing) ============ */
.page-hero {
  padding: 140px 0 52px;
  position: relative;
  background: var(--dark);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.page-hero .eyebrow {
  justify-content: center;
  margin-bottom: 24px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 22px;
}

.page-hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.page-hero p.sub {
  max-width: 620px;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 1rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 15px 34px;
  transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 15px 34px;
  transition: border-color 0.3s, color 0.3s, transform 0.2s;
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* ============ FILTERS ============ */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 40px 0 8px;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 11px 26px;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.filter-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
}

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

/* ============ PROJECT GRID ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 48px 0 110px;
}

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

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

.r-card {
  position: relative;
  display: block;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.4s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
}

.r-card:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
}

.r-card:active {
  transform: translateY(-2px) scale(0.99);
}

.r-card.hidden {
  display: none;
}

.r-card-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

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

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

.r-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 8, 8, 0.55), transparent 45%);
}

.r-card-cat {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(8, 8, 8, 0.82);
  border: 1px solid var(--gold-dim);
  padding: 6px 14px;
  backdrop-filter: blur(6px);
}

.r-card-body {
  padding: 24px 26px 28px;
}

.r-card-title {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
  transition: color 0.3s;
}

.r-card:hover .r-card-title {
  color: var(--gold);
}

.r-card-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.r-card-meta svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 6px;
  color: var(--gold);
}

.r-card-arrow {
  position: absolute;
  right: 24px;
  bottom: 26px;
  color: var(--gold);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.35s, transform 0.35s;
}

.r-card:hover .r-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ============ PROJECT PAGE ============ */
.project-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.project-hero-bg {
  position: absolute;
  inset: 0;
}

.project-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--black) 4%, rgba(8, 8, 8, 0.62) 45%, rgba(8, 8, 8, 0.38));
}

.project-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 200px 0 64px;
}

.breadcrumbs {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s;
}

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

.breadcrumbs span.sep {
  margin: 0 10px;
  color: var(--border);
}

.breadcrumbs span.current {
  color: var(--gold);
}

.project-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 18px;
  max-width: 900px;
}

.project-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

.project-hero-meta strong {
  color: var(--gold);
  font-weight: 500;
}

/* Description */
.project-desc {
  padding: 84px 0 20px;
  max-width: 780px;
}

.project-desc .eyebrow {
  margin-bottom: 22px;
}

.project-desc h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.25;
}

.project-desc p {
  color: var(--muted);
  font-size: 0.98rem;
}

.desc-placeholder {
  border-left: 2px solid var(--gold-dim);
  padding: 6px 0 6px 22px;
  font-family: var(--font-accent);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--muted);
}

/* ============ MASONRY GALLERY ============ */
.gallery-section {
  padding: 64px 0 40px;
}

.gallery-section .eyebrow {
  margin-bottom: 36px;
}

.masonry {
  columns: 3 340px;
  column-gap: 22px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: zoom-in;
  padding: 0;
  width: 100%;
  display: block;
  transition: border-color 0.4s;
}

.masonry-item img {
  width: 100%;
  height: auto;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s;
}

.masonry-item:hover {
  border-color: var(--gold);
}

.masonry-item:hover img {
  transform: scale(1.04);
}

.masonry-item::after {
  content: '+';
  position: absolute;
  right: 14px;
  bottom: 10px;
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.35s;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.masonry-item:hover::after {
  opacity: 1;
}

/* ============ VIDEO SECTION ============ */
.video-section {
  padding: 40px 0 60px;
}

.video-section .eyebrow {
  margin-bottom: 36px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}

.video-grid video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--card);
  border: 1px solid var(--border);
}

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(4, 4, 4, 0.96);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  transition: opacity 0.25s;
}

.lb-btn {
  position: absolute;
  background: rgba(24, 24, 24, 0.7);
  border: 1px solid var(--border);
  color: var(--text);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
  font-size: 1.15rem;
}

.lb-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.lb-close {
  top: 24px;
  right: 24px;
}

.lb-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-counter {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

@media (max-width: 640px) {

  .lb-prev,
  .lb-next {
    top: auto;
    bottom: 70px;
    transform: none;
  }

  .lb-prev {
    left: calc(50% - 62px);
  }

  .lb-next {
    right: calc(50% - 62px);
  }
}

/* ============ PREV / NEXT ============ */
.project-nav {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 70px;
}

.project-nav .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.pn-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 38px 20px;
  text-decoration: none;
  transition: background 0.3s;
}

.pn-link:hover {
  background: var(--dark);
}

.pn-link.next {
  text-align: right;
  border-left: 1px solid var(--border);
}

.pn-label {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.pn-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  transition: color 0.3s;
}

.pn-link:hover .pn-title {
  color: var(--gold);
}

@media (max-width: 640px) {
  .pn-title {
    font-size: 0.95rem;
  }
}

/* ============ CTA ============ */
.cta-band {
  padding: 110px 0;
  text-align: center;
  background: var(--dark);
  border-bottom: 1px solid var(--border);
}

.cta-band .eyebrow {
  justify-content: center;
  margin-bottom: 24px;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 18px;
}

.cta-band h2 em {
  font-style: italic;
  color: var(--gold);
}

.cta-band p {
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 38px;
}

.cta-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============ FOOTER ============ */
footer.site-footer {
  padding: 54px 0;
  text-align: center;
}

footer.site-footer .logo-mark {
  font-size: 1.3rem;
}

footer.site-footer p {
  margin-top: 12px;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

footer.site-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s;
}

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

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .page-hero {
    padding: 110px 0 40px;
  }

  .project-hero-content {
    padding: 160px 0 44px;
  }
}
