/* ============================================================
   NURT — wariant „Luksus"
   Ciemny, atmosferyczny; mosiądz/szampan, kinowe kadry.
   Tokeny:
     --noc        #14100A  głęboka, ciepła czerń (tło)
     --grafit     #1C1710  ciepły grafit (panele)
     --mosiadz    #B08D57  przygaszony mosiądz (akcent)
     --mosiadz-j  #CFB183  jaśniejszy mosiądz (hover / detale)
     --szampan    #EDE0C8  szampan (nagłówki, światło)
     --tekst      #CCC3B1  ciepła kość (tekst, ~10:1 na tle)
     --przygaszony#A99F8B  stonowany (metadane, ~7:1 na tle)
   ============================================================ */

:root {
  --noc: #14100A;
  --grafit: #1C1710;
  --mosiadz: #B08D57;
  --mosiadz-j: #CFB183;
  --szampan: #EDE0C8;
  --tekst: #CCC3B1;
  --przygaszony: #A99F8B;
  --linia: rgba(237, 224, 200, 0.16);
  --metal: linear-gradient(160deg, #CFB183 0%, #A9854E 55%, #8F6E3F 100%);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sp-xl: clamp(6rem, 12vw, 10.5rem);
  --sp-lg: clamp(4rem, 8vw, 7rem);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}

/* ---------- baza ---------- */

*, *::before, *::after { box-sizing: border-box; }

body, h1, h2, h3, p, ul, ol, figure { margin: 0; }

html { overflow-x: clip; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--noc);
  color: var(--tekst);
  font: 400 1rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }

strong { font-weight: 400; color: var(--szampan); }

::selection { background: var(--mosiadz); color: var(--noc); }

:focus-visible {
  outline: 2px solid var(--mosiadz-j);
  outline-offset: 3px;
}

[id] { scroll-margin-top: 5.5rem; }

.wrap {
  width: min(1180px, 100% - clamp(2rem, 8vw, 6rem));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4.5rem;
  z-index: 100;
  background: var(--mosiadz);
  color: var(--noc);
  padding: 0.85rem 1.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.3s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- typografia wspólna ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--szampan);
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.12;
  text-align: center;
}

.sec-no {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--mosiadz);
  margin-bottom: 1.2rem;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--mosiadz-j);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.eyebrow::before {
  content: "";
  width: 3rem;
  height: 1px;
  background: var(--metal);
  flex: none;
}

/* ---------- nagłówek strony ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(20, 16, 10, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linia);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: 0.16em;
  color: var(--szampan);
  text-decoration: none;
}
.brand span { color: var(--mosiadz-j); }

.brand-mark {
  width: 28px;
  height: auto;
  /* monogram jest ciemny — na ciemnym tle rozjaśniamy go do tonu szampana */
  filter: invert(1) sepia(0.35) saturate(0.9) brightness(0.96);
}

.nav {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.6rem);
  list-style: none;
}

.nav a {
  display: inline-block;
  padding: 0.4rem 0;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--tekst);
  text-decoration: none;
  transition: color 0.45s var(--ease);
}
.nav a:hover { color: var(--szampan); }

.nav a.nav-cta {
  color: var(--mosiadz-j);
  border-bottom: 1px solid rgba(176, 141, 87, 0.55);
}
.nav a.nav-cta:hover { color: var(--szampan); border-bottom-color: var(--szampan); }

/* przycisk menu — tylko na stronie głównej (.has-menu), poniżej 760 px */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--linia);
  cursor: pointer;
  padding: 0;
}
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--szampan);
  transition: transform 0.5s var(--ease), opacity 0.4s;
}
.nav-toggle-icon { position: relative; }
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

.nav-open .nav-toggle-icon { transform: rotate(45deg); }
.nav-open .nav-toggle-icon::before { transform: translateY(6px) rotate(90deg); }
.nav-open .nav-toggle-icon::after { opacity: 0; }

@media (max-width: 760px) {
  .has-menu .nav-toggle { display: inline-flex; }
  .has-menu .nav {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    flex-direction: column;
    gap: 0;
    display: none;
    background: rgba(20, 16, 10, 0.97);
    border-bottom: 1px solid var(--linia);
    padding: 0.6rem 0 1rem;
  }
  .nav-open .has-menu .nav { display: flex; }
  .has-menu .nav a {
    display: block;
    padding: 0.95rem clamp(1rem, 6vw, 2rem);
  }
  .has-menu .nav a.nav-cta { border-bottom: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* kinowa winieta + ciepła poświata od dołu */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 65% at 15% 100%, rgba(176, 141, 87, 0.26), transparent 65%),
    linear-gradient(180deg,
      rgba(20, 16, 10, 0.62) 0%,
      rgba(20, 16, 10, 0.18) 42%,
      rgba(20, 16, 10, 0.55) 74%,
      rgba(20, 16, 10, 0.94) 100%);
}

.hero-panel {
  width: 100%;
  padding: 9rem 0 clamp(3.5rem, 9vh, 6.5rem);
}

.hero .eyebrow,
.hero .lead {
  text-shadow: 0 1px 22px rgba(20, 16, 10, 0.95), 0 0 3px rgba(20, 16, 10, 0.7);
}

.hero h1 {
  text-shadow: 0 2px 34px rgba(20, 16, 10, 0.6);
  font-size: clamp(2.7rem, 7.2vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: 0.005em;
  margin-top: 1.6rem;
  max-width: 14em;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--mosiadz-j);
}

.lead {
  margin-top: 1.5rem;
  max-width: 44ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.75;
  color: var(--tekst);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.6rem;
}

.btn {
  display: inline-block;
  padding: 0.95rem 2.1rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--noc);
  background: var(--metal);
  border: 1px solid rgba(207, 177, 131, 0.55);
  transition: filter 0.5s var(--ease), color 0.5s var(--ease), background-color 0.5s var(--ease);
}
.btn:hover { filter: brightness(1.1); }

.btn-line {
  background: none;
  background-color: transparent;
  color: var(--szampan);
  border-color: var(--mosiadz);
}
.btn-line:hover {
  filter: none;
  background-color: rgba(176, 141, 87, 0.14);
}

/* ---------- projekty ---------- */

.projects { padding-top: var(--sp-xl); }

.project { margin-top: var(--sp-xl); }

/* sygnatura wariantu: pełnoekranowy, kinowy kadr projektu */
.project-frame {
  position: relative;
  height: min(88svh, 820px);
  overflow: hidden;
  border-block: 1px solid rgba(176, 141, 87, 0.28);
  isolation: isolate;
}

.project-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.project-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(20, 16, 10, 0.38) 0%,
    rgba(20, 16, 10, 0) 30%,
    rgba(20, 16, 10, 0) 58%,
    rgba(20, 16, 10, 0.8) 100%);
}

/* wielki, wtopiony w kadr numer projektu */
.project-frame::after {
  content: attr(data-no);
  position: absolute;
  right: clamp(1rem, 4vw, 3.5rem);
  bottom: -0.18em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(6.5rem, 17vw, 14rem);
  line-height: 1;
  color: rgba(237, 224, 200, 0.16);
  letter-spacing: 0.02em;
  pointer-events: none;
}

@media (max-width: 700px) {
  .project-frame { height: min(68svh, 560px); }
}

.project-head {
  max-width: 760px;
  text-align: center;
  padding-top: clamp(3rem, 6vw, 4.5rem);
}

.project-no {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--mosiadz);
  letter-spacing: 0.22em;
}
.project-no::before,
.project-no::after {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--metal);
}

.project-head h3 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.1;
  margin-top: 0.9rem;
}

.project-head p {
  color: var(--przygaszony);
  line-height: 1.8;
  max-width: 56ch;
  margin: 1.3rem auto 0;
}

.project-head .project-tags {
  margin-top: 1.1rem;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mosiadz);
}

/* reszta zdjęć — cicha siatka */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 2vw, 24px);
  width: min(1280px, 100% - clamp(2rem, 6vw, 6rem));
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

.gallery img:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  aspect-ratio: 21 / 9;
}

@media (max-width: 600px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery img,
  .gallery img:last-child:nth-child(odd) {
    grid-column: auto;
    aspect-ratio: 16 / 10;
  }
}

/* ---------- pracownia ---------- */

.studio {
  margin-top: var(--sp-xl);
  padding-block: var(--sp-xl);
  background:
    radial-gradient(70% 90% at 85% 0%, rgba(176, 141, 87, 0.1), transparent 60%),
    var(--grafit);
  border-block: 1px solid var(--linia);
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(170px, 280px) 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.studio h2 { text-align: left; }

.studio-logo {
  width: min(220px, 100%);
  height: auto;
}

.studio-grid .big {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  line-height: 1.3;
  color: var(--szampan);
}

.studio-grid p {
  max-width: 58ch;
  line-height: 1.85;
}

.studio-grid p + p { margin-top: 1.4rem; }

@media (max-width: 820px) {
  .studio-grid { grid-template-columns: 1fr; }
  .studio-logo { width: 150px; }
}

/* ---------- proces ---------- */

.process { padding-block: var(--sp-xl); }

.steps {
  list-style: none;
  counter-reset: krok;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--linia);
  border: 1px solid var(--linia);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: 0;
}

.steps li {
  counter-increment: krok;
  background: var(--noc);
  padding: clamp(1.8rem, 3vw, 2.8rem);
}

.steps li::before {
  content: counter(krok, decimal-leading-zero);
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  line-height: 1;
  color: var(--mosiadz);
  margin-bottom: 1.3rem;
}

.steps h3 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 0.7rem;
}

.steps p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--przygaszony);
}

@media (max-width: 980px) {
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- kontakt ---------- */

.contact {
  padding-block: var(--sp-xl);
  text-align: center;
  border-top: 1px solid var(--linia);
  background: radial-gradient(60% 85% at 50% 100%, rgba(176, 141, 87, 0.16), transparent 70%);
}

.contact-person {
  margin-top: 2.8rem;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--przygaszony);
}

.contact-phone {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.05;
  color: var(--szampan);
  text-decoration: none;
  transition: color 0.5s var(--ease);
}
.contact-phone:hover { color: var(--mosiadz-j); }

.contact-mail {
  display: inline-block;
  margin-top: 1rem;
  color: var(--mosiadz-j);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-decoration: underline;
  text-decoration-color: rgba(207, 177, 131, 0.45);
  text-underline-offset: 6px;
  transition: color 0.45s var(--ease);
}
.contact-mail:hover { color: var(--szampan); }

.contact-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem clamp(2.5rem, 8vw, 7rem);
  max-width: 760px;
  margin: clamp(3rem, 6vw, 5rem) auto 0;
  padding-top: 2.6rem;
  border-top: 1px solid var(--linia);
  text-align: left;
}

.contact-meta h3 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--mosiadz);
  margin-bottom: 0.6rem;
}

.contact-meta p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--przygaszony);
}

/* ---------- stopka ---------- */

.site-footer {
  border-top: 1px solid var(--linia);
  padding: 2.1rem 0 2.4rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--przygaszony);
}

.footer-inner a {
  color: var(--tekst);
  text-decoration: none;
  padding: 0.2rem 0;
  transition: color 0.45s var(--ease);
}
.footer-inner a:hover { color: var(--szampan); }

.footer-legal { display: flex; gap: 1.6rem; }

/* ---------- podstrony prawne ---------- */

.legal {
  padding: calc(4.5rem + clamp(2.5rem, 7vw, 4.5rem)) 0 var(--sp-lg);
}

.legal .wrap { max-width: 760px; }

.legal h1 {
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin-top: 0.6rem;
}

.legal-meta {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--przygaszony);
  margin: 1rem 0 2.6rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--linia);
}

.legal h2 {
  text-align: left;
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 2.8rem 0 0.9rem;
}

.legal p {
  margin: 0.9rem 0;
  line-height: 1.85;
}

.legal ul {
  margin: 0.9rem 0;
  padding-left: 1.3rem;
  line-height: 1.85;
}

.legal li { margin: 0.55rem 0; padding-left: 0.25rem; }
.legal li::marker { color: var(--mosiadz); }

.legal a {
  color: var(--mosiadz-j);
  text-decoration: underline;
  text-decoration-color: rgba(207, 177, 131, 0.45);
  text-underline-offset: 4px;
  transition: color 0.45s var(--ease);
}
.legal a:hover { color: var(--szampan); }

/* ---------- ruch: wyłanianie ze światła + parallax ---------- */

@media (prefers-reduced-motion: no-preference) {

  /* elementy .rv startują prześwietlone i wyłaniają się ze światła
     (stan ukryty tylko gdy działa JS — klasa .js na <html>) */
  .js .rv {
    opacity: 0;
    transform: translateY(26px);
    filter: brightness(1.6);
    transition:
      opacity 0.9s var(--ease),
      transform 1.2s var(--ease),
      filter 1.5s var(--ease);
  }
  .js .rv.in {
    opacity: 1;
    transform: none;
    filter: brightness(1);
  }
  .js .rv-d1 { transition-delay: 0.12s; }
  .js .rv-d2 { transition-delay: 0.24s; }
  .js .rv-d3 { transition-delay: 0.36s; }

  /* powolne „oddech" hero przy wejściu */
  .hero-img {
    animation: hero-zoom 2.6s var(--ease) both;
  }
  @keyframes hero-zoom {
    from { transform: scale(1.06); }
    to { transform: scale(1); }
  }

  /* subtelny parallax kadrów — CSS scroll-driven animations;
     bez wsparcia (m.in. starsze iOS/Safari) kadr jest po prostu statyczny */
  @supports (animation-timeline: view()) {
    .project-frame img {
      height: 118%;
      animation: kadr-plx linear both;
      animation-timeline: view();
    }
    @keyframes kadr-plx {
      from { transform: translateY(-11%); }
      to { transform: translateY(0); }
    }
  }
}
