/* =========================================================
   COLORIS — PRACOWNIA STOLARSKA
   Spis treści:
   1. Zmienne / reset
   2. Wspólne komponenty (ramka, przyciski, formularze)
   3. Nagłówek / nawigacja
   4. Hero (sekcja startowa)
   5. Sekcje: O nas / Aktualności / Wycena / Kontakt
   6. Stopka
   7. Responsywność
   ========================================================= */


/* ---------------------------------------------------------
   1. ZMIENNE / RESET
--------------------------------------------------------- */
:root{
  --c-black: #0a0908;
  --c-black-2: #14120e;
  --c-black-3: #1c1914;
  --c-gold: #c9a24d;
  --c-gold-light: #ecd08c;
  --c-gold-dim: #8a6f34;
  --c-cream: #efe7d8;
  --c-cream-dim: #a89f8c;
  --line: rgba(201,162,77,.28);
  --shadow-gold: 0 0 40px rgba(201,162,77,.12);
  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html{ scroll-behavior: smooth; }

body{
  background: var(--c-black);
  color: var(--c-cream);
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4{
  font-family: 'Fraunces', serif;
  font-weight: 560;
  line-height: 1.12;
  color: var(--c-cream);
  letter-spacing: .2px;
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }
button{ font-family: inherit; cursor: pointer; }

::selection{ background: var(--c-gold); color: var(--c-black); }
:focus-visible{ outline: 2px solid var(--c-gold); outline-offset: 3px; }

.wrap{ max-width: 1180px; margin: 0 auto; padding: 0 32px; }


/* ---------------------------------------------------------
   2. WSPÓLNE KOMPONENTY
--------------------------------------------------------- */

/* Motyw "ramki" — nawiązuje do złotej ramki w logo Coloris.
   Używany wokół zdjęć, formularza wyceny i bloku kontaktowego. */
.framed{
  position: relative;
  border: 1px solid var(--line);
}
.framed::before,
.framed::after,
.framed .tick-a,
.framed .tick-b{
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--c-gold);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
}
.framed::before{ top: -1px; left: -1px;  border-top-width: 2px; border-left-width: 2px; }
.framed::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.framed .tick-a{ top: -1px; right: -1px;  border-top-width: 2px; border-right-width: 2px; }
.framed .tick-b{ bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }

/* Przyciski */
.btn{
  display: inline-block;
  padding: 15px 30px;
  font-size: 14.5px;
  border: 1px solid var(--c-gold);
  border-radius: 2px;
  letter-spacing: .3px;
  transition: background .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.btn-solid{ background: var(--c-gold); color: var(--c-black); }
.btn-solid:hover{ background: var(--c-gold-light); box-shadow: var(--shadow-gold); }
.btn-ghost{ color: var(--c-cream); border-color: var(--line); }
.btn-ghost:hover{ border-color: var(--c-gold); color: var(--c-gold-light); }

/* Pola formularzy (wycena, w przyszłości inne) */
label{
  display: block;
  margin-bottom: 8px;
  font-size: 13.5px;
  color: var(--c-cream-dim);
  letter-spacing: .2px;
}
input[type=text],
input[type=email],
input[type=tel],
textarea,
input[type=file],
select{
  width: 100%;
  padding: 13px 14px;
  background: var(--c-black-3);
  border: 1px solid var(--line);
  color: var(--c-cream);
  font-family: 'Jost', sans-serif;
  font-size: 15px;
  transition: border-color .3s;
}
input:focus, textarea:focus, select:focus{ border-color: var(--c-gold); outline: none; }
textarea{ resize: vertical; min-height: 110px; }
input[type=file]{ padding: 10px 14px; font-size: 13.5px; color: var(--c-cream-dim); }

.form-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-row.single{ grid-template-columns: 1fr; }

/* Nagłówek sekcji (eyebrow + tytuł + opis), używany w każdej sekcji */
.eyebrow{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--c-gold);
  font-size: 14px;
  letter-spacing: .4px;
}
.eyebrow::before{ content: ""; width: 26px; height: 1px; background: var(--c-gold); }

.section-head{ max-width: 620px; margin-bottom: 56px; }
.section-head h2{ font-size: clamp(28px, 3.6vw, 42px); }
.section-head p{ margin-top: 16px; color: var(--c-cream-dim); font-size: 16.5px; }

section{ padding: 120px 0; }


/* ---------------------------------------------------------
   3. NAGŁÓWEK / NAWIGACJA
--------------------------------------------------------- */
header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
/* klasa .solid dodawana przez JS po przewinięciu strony */
header.solid{
  background: rgba(10,9,8,.92);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}

/* Cienki pasek kontaktowy nad główną nawigacją (ukryty na mniejszych ekranach) */
.topbar{
  border-bottom: 1px solid var(--line);
}
.topbar-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0;
  font-size: 13px;
  color: var(--c-cream);
}
.topbar-left{ display: flex; align-items: center; gap: 20px; }
.topbar-logo{ height: 28px; width: auto; }
.topbar-divider{ width: 1px; height: 16px; background: var(--line); }
.topbar-contact{ display: flex; gap: 26px; }
.topbar-contact a{ color: var(--c-cream); transition: color .3s; }
.topbar-contact a:hover{ color: var(--c-gold-light); }
.topbar-social{ display: flex; align-items: center; gap: 7px; }
.topbar-social svg{ display: block; flex-shrink: 0; }
.topbar-tag{ color: var(--c-gold-light); letter-spacing: .3px; }

.main-nav{ padding: 22px 0; transition: padding .4s var(--ease); }
header.solid .main-nav{ padding: 14px 0; }
header .wrap{ display: flex; align-items: center; justify-content: space-between; }

/* Logo jest plikiem PNG z prawdziwą przezroczystością (bez tła) */
.brand img{
  height: 58px;
  width: auto;
}

nav{ display: flex; gap: 36px; }
nav a{
  position: relative;
  padding-bottom: 4px;
  font-size: 15px;
  color: var(--c-cream-dim);
  transition: color .3s;
}
nav a::after{
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--c-gold);
  transition: width .35s var(--ease);
}
nav a:hover{ color: var(--c-cream); }
nav a:hover::after{ width: 100%; }

.nav-toggle{ display: none; background: none; border: 0; color: var(--c-gold); font-size: 26px; }


/* ---------------------------------------------------------
   4. HERO
--------------------------------------------------------- */
.hero{
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 160px 24px 80px;
  overflow: hidden;
}

/* Tło z delikatnie unoszącymi się złotymi drobinkami (canvas, patrz js/main.js) */
#grain-canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .55;
}

/* Animowane linie przypominające słoje drewna, rysujące się przy wejściu na stronę */
.hero-lines{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .35;
}
.hero-lines path{
  fill: none;
  stroke: var(--c-gold);
  stroke-width: 1;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 3.2s var(--ease) forwards;
}
.hero-lines path:nth-child(2){ animation-delay: .15s; }
.hero-lines path:nth-child(3){ animation-delay: .3s; }
@keyframes draw{ to{ stroke-dashoffset: 0; } }

.hero-inner{ position: relative; z-index: 2; max-width: 760px; }

.hero-mark{
  width: 170px;
  margin: 0 auto 30px;
  opacity: 0;
  transform: scale(.85);
  animation: reveal-mark 1s var(--ease) .2s forwards;
}
@keyframes reveal-mark{ to{ opacity: 1; transform: scale(1); } }

.hero h1{
  font-size: clamp(34px, 5.4vw, 62px);
  opacity: 0;
  transform: translateY(16px);
  animation: reveal-up 1s var(--ease) .5s forwards;
}
.hero h1 em{
  font-style: italic;
  background: linear-gradient(90deg, var(--c-gold-dim), var(--c-gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p{
  max-width: 520px;
  margin: 22px auto 0;
  color: var(--c-cream-dim);
  font-size: 18px;
  opacity: 0;
  transform: translateY(16px);
  animation: reveal-up 1s var(--ease) .75s forwards;
}
@keyframes reveal-up{ to{ opacity: 1; transform: translateY(0); } }

.hero-cta{
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 38px;
  opacity: 0;
  transform: translateY(16px);
  animation: reveal-up 1s var(--ease) 1s forwards;
}

.scroll-cue{
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  width: 1px; height: 52px;
  background: linear-gradient(var(--c-gold), transparent);
  opacity: .6;
}
.scroll-cue::after{
  content: "";
  position: absolute;
  left: -2px; top: 0;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c-gold);
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue{ 0%{ top:0; opacity:1; } 90%{ opacity:0; } 100%{ top:100%; opacity:0; } }


/* ---------------------------------------------------------
   5. SEKCJE
--------------------------------------------------------- */

/* --- O nas --- */
.about{
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: 80px;
  align-items: center;
}
.about-text h2{ margin-bottom: 22px; font-size: clamp(28px, 3.6vw, 40px); }
.about-text p{ max-width: 52ch; margin-bottom: 16px; color: var(--c-cream-dim); font-size: 16.5px; }

.about-stats{ display: flex; gap: 40px; margin-top: 34px; }
.about-stats strong{
  display: block;
  font-family: 'Fraunces', serif;
  font-weight: 560;
  font-size: 30px;
  color: var(--c-gold-light);
}
.about-stats span{ font-size: 13.5px; color: var(--c-cream-dim); }

.about-visual{
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--c-black-3);
}
.about-visual img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Aktualności ---
   Karty realizacji są wpisane bezpośrednio w HTML (index.html).
   Aby dodać nową realizację: skopiuj jeden blok <article class="news-card">
   w sekcji #aktualnosci i podmień zdjęcie/wideo, tytuł, datę i opis. */
#news-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.news-card{ padding: 16px; transition: transform .4s var(--ease); }
.news-card:hover{ transform: translateY(-6px); }

.news-media{
  aspect-ratio: 4/3;
  width: 100%;
  overflow: hidden;
  background: var(--c-black-3);
}
.news-media img,
.news-media video{ width: 100%; height: 100%; object-fit: cover; display: block; }

.news-card h3{ margin-top: 16px; font-size: 19px; }
.news-card .meta{ margin-top: 6px; color: var(--c-gold); font-size: 13px; letter-spacing: .3px; }
.news-card p{ margin-top: 8px; color: var(--c-cream-dim); font-size: 14.5px; }

/* Karta jest klikalna — otwiera galerię (patrz js/main.js) */
.news-card{ cursor: pointer; }
.news-media{ position: relative; }
.news-media::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(10,9,8,0), rgba(10,9,8,.55));
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.news-card:hover .news-media::after{ opacity: 1; }
.news-media::before{
  content: "Zobacz galerię";
  position: absolute;
  left: 50%; bottom: 16px;
  transform: translate(-50%, 8px);
  z-index: 1;
  color: var(--c-gold-light);
  font-size: 13px;
  letter-spacing: .3px;
  opacity: 0;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  pointer-events: none;
}
.news-card:hover .news-media::before{ opacity: 1; transform: translate(-50%, 0); }


/* ---------------------------------------------------------
   GALERIA — LIGHTBOX
--------------------------------------------------------- */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10,9,8,.96);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
.lightbox.open{ opacity: 1; visibility: visible; }

.lb-stage{
  position: relative;
  width: 100%;
  max-width: 1100px;
  padding: 0 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
}
.lb-image{
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--line);
  background: var(--c-black-3);
  opacity: 0;
  transform: scale(.98);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.lb-image.show{ opacity: 1; transform: scale(1); }

.lb-close{
  position: absolute;
  top: 26px; right: 30px;
  z-index: 2;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--c-cream);
  font-size: 18px;
  border-radius: 2px;
  transition: border-color .3s, color .3s;
}
.lb-close:hover{ border-color: var(--c-gold); color: var(--c-gold-light); }

.lb-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 52px; height: 52px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--c-gold);
  font-size: 26px;
  line-height: 1;
  border-radius: 2px;
  transition: border-color .3s, color .3s, background .3s;
}
.lb-nav:hover{ border-color: var(--c-gold); color: var(--c-gold-light); background: rgba(201,162,77,.08); }
.lb-prev{ left: 24px; }
.lb-next{ right: 24px; }
.lb-nav[hidden], .lb-close[hidden]{ display: none; }

.lb-footer{
  width: 100%;
  max-width: 1100px;
  padding: 20px 24px 34px;
  text-align: center;
}
.lb-caption{
  font-family: 'Fraunces', serif;
  font-size: 17px;
  color: var(--c-cream);
  margin-bottom: 6px;
}
.lb-counter{
  font-size: 13px;
  color: var(--c-cream-dim);
  letter-spacing: .3px;
  margin-bottom: 16px;
}
.lb-thumbs{
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  max-height: 90px;
  overflow-y: auto;
}
.lb-thumbs img{
  width: 64px; height: 64px;
  object-fit: cover;
  border: 1px solid var(--line);
  opacity: .5;
  cursor: pointer;
  transition: opacity .3s, border-color .3s;
}
.lb-thumbs img:hover{ opacity: .8; }
.lb-thumbs img.active{ opacity: 1; border-color: var(--c-gold); }

body.lb-locked{ overflow: hidden; }

@media (max-width: 640px){
  .lb-stage{ padding: 0 56px; }
  .lb-nav{ width: 42px; height: 42px; font-size: 20px; }
  .lb-prev{ left: 10px; }
  .lb-next{ right: 10px; }
  .lb-close{ top: 16px; right: 16px; width: 38px; height: 38px; }
  .lb-thumbs img{ width: 50px; height: 50px; }
}

/* --- Wycena --- */
.quote{ display: grid; grid-template-columns: 1.15fr .85fr; }

.quote-form{ padding: 52px; background: var(--c-black-2); }
.quote-form .submit-row{ display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.form-status{ font-size: 13.5px; color: var(--c-gold-light); }

.quote-side{
  padding: 52px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.quote-side h3{ margin-bottom: 20px; font-size: 24px; }

.steps{ list-style: none; }
.steps li{ display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.steps li:first-child{ border-top: none; }
.steps .num{ min-width: 28px; font-family: 'Fraunces', serif; font-weight: 560; font-size: 20px; color: var(--c-gold); }
.steps .txt strong{ display: block; margin-bottom: 4px; font-size: 15.5px; }
.steps .txt span{ font-size: 14px; color: var(--c-cream-dim); }

/* --- Kontakt --- */
.contact{ display: grid; grid-template-columns: .9fr 1.1fr; }

.contact-info{
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px;
  background: var(--c-black-2);
}
.contact-info h3{ margin-bottom: 22px; font-size: 26px; }

.info-row{ display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.info-row:first-of-type{ border-top: none; }
.info-row strong{ display: block; margin-bottom: 4px; font-size: 14px; color: var(--c-cream-dim); }
.info-row span{ font-size: 15.5px; }

.map-wrap{
  min-height: 380px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.map-wrap iframe{
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
  filter: grayscale(.5) invert(.92) contrast(.85);
}


/* ---------------------------------------------------------
   6. STOPKA
--------------------------------------------------------- */
footer{ padding: 60px 0 40px; border-top: 1px solid var(--line); }
footer .wrap{ display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }

.f-brand{ display: flex; align-items: center; gap: 12px; }
.f-brand img{ height: 44px; }
.f-brand span{ font-size: 13px; color: var(--c-cream-dim); }

.f-links{ display: flex; gap: 28px; }
.f-links a{ font-size: 14px; color: var(--c-cream-dim); transition: color .3s; }
.f-links a:hover{ color: var(--c-gold-light); }

.f-copy{ margin-top: 26px; text-align: center; font-size: 12.5px; color: #6b6455; }


/* ---------------------------------------------------------
   7. RESPONSYWNOŚĆ
--------------------------------------------------------- */
@media (max-width: 900px){
  .topbar{ display: none; }

  .hero{ padding-top: 120px; }

  .about{ grid-template-columns: 1fr; gap: 50px; }
  .about-visual{ max-width: 340px; margin: 0 auto; }
  #news-grid{ grid-template-columns: repeat(2, 1fr); }
  .quote{ grid-template-columns: 1fr; }
  .quote-side{ border-right: 1px solid var(--line); }
  .contact{ grid-template-columns: 1fr; }
}

@media (max-width: 640px){
  nav{
    position: fixed;
    top: 0; right: 0;
    width: 78vw; max-width: 320px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 100px 36px;
    background: var(--c-black-2);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform .4s var(--ease);
  }
  nav.open{ transform: translateX(0); }
  .nav-toggle{ display: block; }

  #news-grid{ grid-template-columns: 1fr; }
  .form-row{ grid-template-columns: 1fr; }
  section{ padding: 80px 0; }
  .quote-form, .quote-side, .contact-info{ padding: 32px; }
}

@media (prefers-reduced-motion: reduce){
  *{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html{ scroll-behavior: auto; }
}
