/* =========================================================
   VVisuals — arkusz stylów
   Kolory i fonty zmienisz w jednym miejscu: sekcja :root
   ========================================================= */

/* Font Archivo (licencja SIL OFL) — trzymany na Twoim serwerze, bez łączenia z Google */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --black: #000000;
  --white: #ffffff;
  --grey: #6b6b6b;      /* tekst pomocniczy */
  --line: #d4d4d4;      /* linie i obramowania */
  --paper: #f2f2f2;     /* tło pod zdjęciami */

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --pad: clamp(1.25rem, 4vw, 3.5rem);  /* margines boczny strony */
  --max: 1440px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 4px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* ---------- Nagłówek ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--black);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.logo { display: block; line-height: 0; }
.logo img {
  height: 2.8rem;
  width: auto;
  margin-left: -0.47rem;   /* plik logo ma wewnętrzny margines; to wyrównuje znak do krawędzi treści */
}

.nav { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); }

.nav a {
  font-weight: 500;
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}

.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--black); }

/* ---------- Strona "O mnie": hero ---------- */

.hero {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 1.5rem;
  align-items: end;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 8vw, 7rem);
  border-bottom: 1px solid var(--black);
}

.mark {
  grid-column: 1 / 7;
  display: block;
  width: 100%;
  height: auto;
  transform: translateX(-4.2%);   /* wyrównanie V do lewej krawędzi tekstu */
  overflow: visible;
}

.hero-text { grid-column: 8 / 13; padding-bottom: 0.5rem; }

.hero-text h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(1.125rem, 1.5vw, 1.3rem);
  line-height: 1.45;
}

/* Jedyna animacja: trójkąt „play” wjeżdża obok V przy wejściu na stronę */
@media (prefers-reduced-motion: no-preference) {
  .mark-play {
    animation: play 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
  }
  @keyframes play {
    from { transform: translateX(-38px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
  }
}

/* ---------- Sekcje ---------- */

.section {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 1.5rem;
  padding-block: clamp(3rem, 7vw, 6rem);
  border-bottom: 1px solid var(--line);
}

.section:last-of-type { border-bottom: 0; }

.section > h2 {
  grid-column: 1 / 5;
  margin: 0 0 2rem;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.section-body { grid-column: 5 / 13; }

/* O mnie: zdjęcie + tekst */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.about img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper); }

.about p { margin: 0 0 1.1em; max-width: 60ch; }
.about p:first-child { font-size: 1.25rem; line-height: 1.45; }

/* Zakres usług */
.services { margin: 0; }

.services div {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1.5rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--black);
}

.services div:last-child { border-bottom: 1px solid var(--black); }

.services dt { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.services dd { margin: 0; color: var(--grey); max-width: 52ch; }

/* Kontakt */
.contact-mail {
  display: inline-block;
  font-size: clamp(1.75rem, 5.2vw, 4.5rem);
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1;
  letter-spacing: -0.03em;
  text-decoration: none;
  border-bottom: 0.08em solid var(--black);
  padding-bottom: 0.06em;
  word-break: break-all;
}

.contact-mail:hover { color: var(--white); background: var(--black); }

.contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-meta span { display: block; color: var(--grey); font-size: 0.9375rem; }
.contact-meta a { font-weight: 500; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

/* ---------- Strona "Projekty" ---------- */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--black);
}

.page-head h1 {
  margin: 0;
  font-size: clamp(3.5rem, 12vw, 10rem);
  font-weight: 900;
  font-stretch: 125%;
  line-height: 0.85;
  letter-spacing: -0.045em;
}

.page-head p { margin: 0; color: var(--grey); max-width: 30ch; }

.projects {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(2.5rem, 5vw, 4.5rem) 1.5rem;
  margin: 0;
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(4rem, 8vw, 7rem);
  list-style: none;
}

/* Układ siatki: szeroki / wąski na zmianę */
.project            { grid-column: span 6; }
.project.wide       { grid-column: span 8; }
.project.narrow     { grid-column: span 4; }
.project.offset     { margin-top: clamp(0rem, 8vw, 8rem); }

.project figure { margin: 0; }

.project button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--paper);
  cursor: zoom-in;
  overflow: hidden;
}

.project img { width: 100%; height: auto; transition: filter 0.3s ease; }
.project button:hover img { filter: contrast(1.15); }

.project figcaption {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--black);
  margin-top: 0.9rem;
}

.project h2 { margin: 0; font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.project .year { font-variant-numeric: tabular-nums; color: var(--grey); }
.project .type { grid-column: 1 / -1; color: var(--grey); font-size: 0.9375rem; }

/* Podgląd zdjęcia (lightbox) */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: var(--pad);
  border: 0;
  background: var(--black);
  color: var(--white);
}

.lightbox[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
}

.lightbox::backdrop { background: var(--black); }

.lightbox-close {
  justify-self: end;
  font: inherit;
  font-weight: 500;
  color: var(--white);
  background: none;
  border: 1px solid var(--white);
  padding: 0.5rem 1.1rem;
  cursor: pointer;
}

.lightbox-close:hover { background: var(--white); color: var(--black); }
.lightbox-close:focus-visible { outline-color: var(--white); }

.lightbox img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.lightbox p { margin: 0; }

/* ---------- Stopka ---------- */

.site-footer { border-top: 1px solid var(--black); }

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem;
  font-size: 0.9375rem;
  color: var(--grey);
}

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

/* ---------- Telefon i tablet ---------- */

@media (max-width: 900px) {
  .mark { grid-column: 1 / -1; width: 70%; margin-bottom: 2.5rem; }
  .hero-text { grid-column: 1 / -1; }
  .section > h2,
  .section-body { grid-column: 1 / -1; }
  .project,
  .project.wide,
  .project.narrow { grid-column: span 6; }
  .project.offset { margin-top: 0; }
}

@media (max-width: 640px) {
  .about { grid-template-columns: 1fr; }
  .services div { grid-template-columns: 1fr; gap: 0.25rem; }
  .project,
  .project.wide,
  .project.narrow { grid-column: 1 / -1; }
  .logo img { height: 2.3rem; margin-left: -0.38rem; }
  .mark { width: 78%; }
}
