/* ================================
   IMPORT CZCIONEK
   ================================ */

  /* ONLINE: */

  /* @import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&display=swap'); */

  /* LOCAL: */

@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/InstrumentSans-Regular.ttf') format('truetype');
  font-weight: 400;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/InstrumentSans-Medium.ttf') format('truetype');
  font-weight: 500;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/InstrumentSans-SemiBold.ttf') format('truetype');
  font-weight: 600;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/InstrumentSans-Bold.ttf') format('truetype');
  font-weight: 700;
}

/* ================================
   ZMIENNE CSS
   ================================ */

:root {
  /* Kolory */
  --color-text: black;
  --color-text-light: gray;
  --color-white: white;
  --color-shadow-light: rgba(255, 255, 255, 0.8);
  --color-shadow-dark: rgba(0, 0, 0, 0.2);

  /* Wielkości czcionek - DESKTOP (domyślne) */
  --font-size-base: 1rem;           /* 16px */
  --font-size-medium: 1.5rem;       /* 24px */
  --font-size-large: 2rem;          /* 32px */
  --font-size-xlarge: 2.25rem;      /* 36px */
  --font-size-header: 8vh;

  /* Spacing - DESKTOP */
  --spacing-xs: 10px;
  --spacing-sm: 20px;
  --spacing-md: 30px;
  --spacing-lg: 40px;
  --spacing-xl: 50px;

  /* Layout - DESKTOP */
  --header-width: 200px;
  --artist-box-size: 300px;
  --max-content-width: 1200px;
  --content-margin-right: 220px;

  /* Transitions */
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --transition-slow: 1.5s ease;
}

/* ================================
   RESET I PODSTAWY
   ================================ */

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

html {
  font-size: 16px; /* Base font size - DESKTOP */
  scroll-behavior: smooth;
  min-height: 100vh;
  min-height: 100dvh; /* Fallback dla innych przeglądarek */
  min-height: 100svh; /* Najbezpieczniejsze dla Safari */
}

body {
  font-family: 'Instrument Sans', -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  background-size: cover;
  background-position: center;
  /* background-attachment: fixed; */
  background-repeat: no-repeat;

  /* zapobiega białemu paskowi */
  min-height: 100svh; /* Najbezpieczniejsze dla Safari */
  min-height: 100dvh; /* Fallback dla innych przeglądarek */
  min-height: 100vh;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

/* ================================
   TŁA I EFEKTY
   ================================ */

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;   /* stary fallback (iOS <16) */
  height: 100svh; /* Nowoczesna, dynamiczna jednostka viewportu */
  height: 100dvh; /* Fallback dla Chrome i Android */
  overflow-x: hidden;
  background-image: url('../images/backgrounds/01.jpg');
  background-size: cover;
  background-position: center;
  /* filter: blur(0px); */
  /* transform: scale(1.1); /*włączyć jeśli blur*/*/
  opacity: 1;
  z-index: -1;

/* OPTYMALIZACJA TŁA */
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  /* transform: scale(1.1) translateZ(0); */
  /* -webkit-transform: scale(1.1) translateZ(0); */
}

body.artysci::before {
  background-image: url('../images/backgrounds/06.jpg');
}

body.about::before {
  background-image: url('../images/backgrounds/10.jpg');
}

body.kontakty::before {
  background-image: url('../images/backgrounds/02.jpg');
}

/* ================================
   TYPOGRAFIA
   ================================ */

h1 {
  font-size: var(--font-size-large);
  color: var(--color-white);
  text-shadow: 0 5px 15px var(--color-shadow-light);
}

h2 {
  font-size: var(--font-size-large);
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

h3 {
  text-align: center;
  margin-bottom: 1rem;
  margin-top: 1rem;
  font-size: var(--font-size-large);
}


/* ================================
   LAYOUT - VERTICAL HEADER
   ================================ */

.vertical-header {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--header-width);
  height: 100vh;
  z-index: 100;
  display: flex;
  color: var(--color-text);
  flex-direction: column;
  justify-content: stretch;
  align-items: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.vertical-title {
  font-size: var(--font-size-header);
  font-weight: bold;
  color: var(--color-text);
  text-align: center;
  padding: 0;
  letter-spacing: 1vh;
  line-height: 1;
  font-family: Helvetica, sans-serif;
  height: 100vh;
  width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  transform: rotate(90deg);
  transform-origin: center center;
  white-space: nowrap;
}

/* ================================
   NAVIGATION
   ================================ */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 90;
}

.nav {
  max-width: var(--max-content-width);
  padding: var(--spacing-sm);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  font-size: var(--font-size-medium);
  font-weight: 550;
  color: var(--color-text);
  transition: color var(--transition-fast), filter var(--transition-fast);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--color-text-light);
  filter: blur(1px);
}

.nav-links a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* ================================
   LANGUAGE SWITCHER
   ================================ */

.lang-switcher {
  display: flex;
  opacity: 0.6;
  gap: var(--spacing-xs);
  overflow: hidden;
}

.lang-switcher button {
  all: unset;
  font-size: var(--font-size-base);
  color: var(--color-text);
  cursor: pointer;
  padding: 8px 12px;
  text-transform: uppercase;
  transition: color var(--transition-fast), opacity var(--transition-fast), filter var(--transition-fast);
  opacity: 0.7;
}

.lang-switcher button:hover,
.lang-switcher button:focus-visible {
  opacity: 0.8;
  filter: blur(1px);
}

.lang-switcher button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.lang-switcher button.active {
  background: var(--color-text-light);
  opacity: 1;
}

/* ================================
   MAIN CONTENT
   ================================ */
.main-content {
  margin: var(--spacing-lg) auto;
  /* padding: 0 var(--spacing-sm); */
  margin-right: var(--content-margin-right);

  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top));
  padding-bottom: calc(16px + env(safe-area-inset-bottom));

}

.section-title {
  text-align: center;
  font-size: var(--font-size-xlarge);
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: var(--spacing-xl);
}

/* ================================
   SIATKA ARTYSTÓW
   ================================ */

.artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--artist-box-size), 1fr));
  gap: var(--spacing-md);
  margin-bottom: 60px;
  justify-content: left;
}

.artist-box {
  position: relative;
  width: var(--artist-box-size);
  height: var(--artist-box-size);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  will-change: transform, box-shadow;
}

.artist-box:hover,
.artist-box:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var(--color-shadow-dark);
}

.artist-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.artist-name {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  text-shadow: 0 2px 30px var(--color-shadow-light);
  font-size: var(--font-size-medium);
  text-align: center;
  transition: opacity var(--transition-medium);
  z-index: 2;
  padding: var(--spacing-sm);
}

.artist-box:hover .artist-image {
  opacity: 1;
}

.artist-box:hover .artist-name {
  opacity: 0;
}


/* ================================
   OPISY KOLEKCJI
   ================================ */

.collection-description {
  padding: var(--spacing-lg) var(--spacing-sm);
}

.collection-description .container {
  max-width: 70vw;
  /* max-width: min(800px, 90vw); */
  margin: 0 auto;
}

.collection-description p {
  font-size: var(--font-size-medium);
  line-height: 1.6;
  color: var(--00lor-text);
  margin-bottom: 0;
  text-align: justify;
  text-indent: 50px;
  hyphens: auto;
}

.collection-description p.autor {
  text-align: right;
  margin-top: 2em;
  text-indent: 0;
}

/* ================================
   MAIL & FOOTER
   ================================ */

.mail {
  position: fixed;
  top: 30vh;
  top: 30svh;
  top: 30dvh;
  text-align: center;
  left: 50%;
  transform: translateX(-50%); /* wyśrodkowanie w poziomie  */
}

.footer,
.footer_white {
  text-align: center;
  padding: var(--spacing-sm);
  margin-top: var(--spacing-xl);
  padding-bottom: 20px;
}

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

.footer_white {
  color: var(--color-white);
}

/* LISTA */
ul {
  text-align: center;
}

ul p {
  font-size: var(--font-size-medium);
  margin-bottom: 0.5rem;
}

/* ================================
   STICKY FOOTER - ustawienia body dla "contact"
   ================================ */

body.sticky-footer {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

body.sticky-footer .main-content {
  flex: 1 0 auto;
}

body.sticky-footer .footer,
body.sticky-footer .footer_white {
  flex-shrink: 0;
  margin-top: auto;
}


/* ================================
   HAMBURGER BUTTON - domyślnie ukryty
   ================================ */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1000;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: #000;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.active {
  opacity: 1;
}

body.menu-open {
  overflow: hidden;
}

/* ================================
   WYŁĄCZONY MODAL DOMYŚLNIE
   ================================ */


.modal-close {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  opacity: 0; /* Zmień z 50% na 0 */
  visibility: hidden; /* Dodaj to */
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #333;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
  z-index: 10000;
  touch-action: auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Pokaż przycisk gdy modal jest aktywny */
.image-modal.active .modal-close {
  opacity: 0.5;
  visibility: visible;
}

.image-modal.active .modal-close:hover {
  opacity: 1;
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1);
}

.modal-close:active {
  transform: scale(0.95);
}


/* ================================
   RESPONSIVE - LAPTOP (1024px - 1299px)
   ================================ */

@media (max-width: 1299px) {
  html {
    font-size: 14px; /* 94% z 16px */
  }
  .artist-box {
    /* weight: 200px; */
  }

  :root {
    /* Czcionki - LAPTOP */
    --font-size-base: 0.95rem;        /* ~15px */
    --font-size-medium: 1.4rem;       /* ~21px */
    --font-size-large: 1.85rem;       /* ~28px */
    --font-size-xlarge: 2.1rem;       /* ~31px */
    /* --font-size-header: 7vh; */

    /* Layout - LAPTOP */
    --artist-box-size: 220px;
    --content-margin-right: 140px;
    --header-width: 140px;

    /* Spacing - LAPTOP */
    --spacing-xs: 9px;
    --spacing-sm: 18px;
    --spacing-md: 15px;
    --spacing-lg: 35px;
    --spacing-xl: 45px;
  }

  .vertical-header {
    width: 180px;
  }

  .vertical-title {
    width: 130px;
  }
  .artists-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .collection-description .container {
    max-width: 70vw;
  }

  .collection-description p {
    text-indent: 40px;
  }

  .mail {
    margin-top: 5vh;
  }
}

/* ================================
   RESPONSIVE - TABLET (768px - 1023px)
   ================================ */

@media (max-width: 1023px) {
  html {
    font-size: 13px; /* 87.5% z 16px */
  }

  :root {
    /* Czcionki - TABLET */
    --font-size-base: 0.9rem;         /* ~12.5px */
    --font-size-medium: 1.3rem;       /* ~18px */
    --font-size-large: 1.7rem;        /* ~24px */
    --font-size-xlarge: 1.9rem;       /* ~27px */
    /* --font-size-header: 6vh; */

    /* Layout - TABLET */
    --artist-box-size: 260px;
    --content-margin-right: 150px;
    --header-width: 150px;

    /* Spacing - TABLET */
    --spacing-xs: 8px;
    --spacing-sm: 15px;
    --spacing-md: 15px;
    --spacing-lg: 30px;
    --spacing-xl: 40px;
  }

  .vertical-header {
    width: 150px;
  }

  .vertical-title {
    width: 110px;
    letter-spacing: 0.8vh;
  }

  .artists-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .collection-description .container {
    max-width: 70vw;
  }

  .collection-description p {
    text-indent: 40px;
  }

  .mail {
    margin-top: 5vh;
  }

}

/* ================================
   RESPONSIVE - MOBILE (481px - 767px)
   ================================ */

@media (max-width: 767px) {
  html {
    font-size: 12px; /* 81% z 16px */
  }

  :root {
    /* Czcionki - MOBILE */
    --font-size-base: 0.85rem;        /* ~11px */
    --font-size-medium: 1.2rem;       /* ~15.5px */
    --font-size-large: 1.55rem;       /* ~20px */
    --font-size-xlarge: 1.7rem;       /* ~22px */
    --font-size-header: 5vh;

    /* Layout - MOBILE */
    --artist-box-size: 300px;
    --content-margin-right: 0;
    --header-width: 100%;

    /* Spacing - MOBILE */
    --spacing-xs: 6px;
    --spacing-sm: 12px;
    --spacing-md: 18px;
    --spacing-lg: 25px;
    --spacing-xl: 35px;
  }

  body {
    margin-right: 0;
  }

  /* VERTICAL HEADER */
  .vertical-header {
    position: relative;
    width: 100%;
    height: auto;
    writing-mode: horizontal-tb;
    text-orientation: initial;
    order: -1;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;  }

  .vertical-title {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    transform: none;
    font-size: var(--font-size-large);
    height: auto;
    width: auto;
    letter-spacing: 0.2em;
    padding: 0;
  }

  .vertical-header-png {
    display: none;
  }

  /* NAVIGATION */
  .top-nav {
    margin-right: 0;
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    backdrop-filter: blur(4px);
    background: rgba(255, 255, 255, 0.98) opcity(0.1);
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .top-nav.active {
    right: 0;
  }

  .nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
  }

  .nav-links {
    flex-direction: column;
    gap: 25px;
    width: 100%;
    text-align: center;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    font-size: 1.5rem;
    color: white;
  }

  .lang-switcher {
    width: 100%;
    justify-content: center;
    opacity: 1;
  }

  .lang-switcher button {
    font-size: var(--font-size-base);
    padding: 8px 15px;
    opacity: 1;
    color: white;
  }

  /* CONTENT */
  .main-content {
    margin-right: 0;
    padding: 0 var(--spacing-sm);
  }

  .artists-grid {
    grid-template-columns: 1fr;
    padding: 0 var(--spacing-sm);
  }

  .artist-box {
    width: 100%;
    max-width: 300px;
    height: 300px;
    margin: 0 auto;

    /* USUWA HOVER EFFECTS */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }

  .artist-box:hover,
  .artist-box:focus-within {
    transform: none;
    box-shadow: none;
  }

  .static-box {
    width: 100%;
    max-width: 400px;
    height: 300px;
  }

  .collection-description .container {
    max-width: 80vw;
  }

  .collection-description p {
    text-indent: 30px;
  }

  .mail {
    margin-top: 5vh;
  }

  /* HAMBURGER - POKAŻ W MOBILE */
  .hamburger {
    display: flex;
  }

  /* OVERLAY */
  .overlay.active {
    display: block;
  }

  body.menu-open {
    overflow: hidden;
  }


/* ================================
   MODAL PEŁNOEKRANOWY (Mobile Safari/Chrome)
   ================================ */


.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100svh;
  height: 100dvh;
  height: 100vh;
  background: rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  /* Blokada overscroll na iOS */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
 touch-action: none;
  overflow: hidden;
}

.image-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-content {
  position: relative;
  width: 90vw;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.modal-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  opacity: 50%;
  border: none;
  /* border-radius: 50%; */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #333;
  /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); */
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 10000;
  /* Przywróć touch dla przycisku */
  touch-action: auto;
  /* Blokada zaznaczania */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.modal-close:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1);
}

.modal-close:active {
  transform: scale(0.95);
}

/* ================================
   ACCESSIBILITY
   ================================ */

@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;
  }
}

/* Focus visible dla keyboard navigation */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}
