/* FOTO-STUDIO-EXPRES MACIEJ MASZKIEWICZ – one-pager. Mobile first; breakpoint główny: 641px. */

/* ---------- Fonty (lokalnie, bez CDN) ---------- */
@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/libre-franklin-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/libre-franklin-latin.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;
}

/* ---------- Zmienne ---------- */
:root {
  --ink: #161616;
  --white: #ffffff;
  --text-body: #333331;
  --text-muted: #5e5e5e;
  --text-bar: #4a4a48;
  --text-footer: #c4c3be;
  --bg-tint: #f7f7f5;
  --line: #e8e7e3;
  --line-soft: #ecebe7;
  --line-menu: #f0efeb;
  --line-strong: #d6d5d0;
  --img-bg: #e6e5e1;
  --hero-bg: #1c1a18;

  --gutter: clamp(20px, 5vw, 80px);
  --section-y: clamp(64px, 8vw, 120px);
}

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

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

body {
  margin: 0;
  font-family: "Libre Franklin", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}

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

h1, h2, h3, p, dl, dd, address { margin: 0; }
address { font-style: normal; }

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.container { max-width: 1280px; margin: 0 auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 20;
  padding: 10px 16px; background: var(--ink); color: var(--white); font-size: 15px;
}
.skip-link:focus { top: 12px; }

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

.topbar { display: none; }

.navbar { padding: 14px var(--gutter); }
.navbar__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 4px 40px;
}

.logo {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 0; color: var(--ink);
}
.logo:hover { text-decoration: none; }
.logo svg { flex: none; }
.logo__text { display: flex; flex-direction: column; gap: 4px; }
.logo__name { font-weight: 600; font-size: 18px; line-height: 1; letter-spacing: 0; white-space: nowrap; }
.logo__tag { font-size: 10px; line-height: 1; letter-spacing: 0.22em; text-transform: uppercase; white-space: nowrap; }

.nav-desktop { display: none; }

/* menu mobilne: <details>, działa bez JS */
.nav-mobile summary {
  width: 44px; height: 44px; margin-right: -10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; list-style: none;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile .icon-close,
.nav-mobile[open] .icon-open { display: none; }
.nav-mobile[open] .icon-close { display: block; }

.nav-mobile__panel {
  position: absolute; left: 0; right: 0; top: 100%;
  display: flex; flex-direction: column;
  padding: 8px var(--gutter) 24px;
  /* telefon w poziomie: panel nie może wyjść poza ekran (header ma 77 px) */
  max-height: calc(100vh - 77px);
  max-height: calc(100dvh - 77px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.nav-mobile__panel a {
  padding: 12px 0;
  font-size: 20px; font-weight: 500;
  border-bottom: 1px solid var(--line-menu);
}
.nav-mobile__panel a:last-child { border-bottom: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: clamp(480px, 52vw, 760px);
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--white);
}
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 72% 50%;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.22);
}
.hero__content {
  position: relative; z-index: 1; width: 100%;
  padding: 0 var(--gutter) clamp(40px, 6vw, 96px);
}
.hero__content .container { display: flex; flex-direction: column; gap: 20px; }
.hero h1 {
  font-weight: 600;
  font-size: clamp(34px, 6vw, 88px);
  line-height: 0.98; letter-spacing: -0.025em;
}
/* pełna nazwa firmy: człon główny duży, imię i nazwisko mniejsze pod spodem */
.hero__name { display: block; }
.hero__owner {
  display: block;
  margin-top: 0.35em;
  font-size: max(14px, 0.34em); font-weight: 500; line-height: 1.1;
  letter-spacing: 0.14em;
}
.hero__lead {
  max-width: 560px;
  font-size: clamp(17px, 1.6vw, 22px); line-height: 1.5;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

/* ---------- Oznaczenie zdjęć wygenerowanych przez AI ---------- */
.ai-photo { position: relative; display: block; }
.ai-label {
  position: absolute; right: 8px; bottom: 8px; z-index: 1;
  padding: 2px 7px;
  font-size: 11px; line-height: 1.5; letter-spacing: 0.02em;
  color: var(--white);
  background: rgba(22, 22, 22, 0.72);
  border-radius: 2px;
  pointer-events: none;
}
.ai-label--hero { right: var(--gutter); bottom: 12px; }

/* ---------- Sekcje ---------- */
.section {
  padding: var(--section-y) var(--gutter);
  scroll-margin-top: 80px;
}
.section--tinted { background: var(--bg-tint); }

.section__top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.eyebrow {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text-muted);
}
.to-top { padding: 12px 0; font-size: 13px; color: var(--text-muted); }

h2 {
  font-weight: 600;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.1; letter-spacing: -0.02em;
}

/* ---------- O nas ---------- */
.about {
  display: flex; flex-wrap: wrap; align-items: stretch;
  gap: 40px clamp(48px, 6vw, 96px);
  margin-top: 24px;
}
.about__text {
  flex: 1 1 520px; min-width: 0;
  display: flex; flex-direction: column; gap: 24px;
}
.about__body {
  display: flex; flex-direction: column; gap: 18px;
  max-width: 62ch;
  color: var(--text-body);
}
.about__photos {
  flex: 0 1 460px; min-width: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.about__photos img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  background: var(--img-bg);
}

/* ---------- Usługi ---------- */
#uslugi h2 { margin-top: 16px; }

.cards { display: none; }

.accordion {
  margin-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line-strong);
}
.accordion details { border-bottom: 1px solid var(--line-strong); }
.accordion summary {
  display: flex; align-items: center; gap: 16px;
  min-height: 64px; padding: 14px 0;
  cursor: pointer; list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
/* <summary> zawiera jeden nagłówek (wymóg HTML), a nagłówek: nazwę, cenę i strzałkę */
.accordion__head {
  flex: 1 1 auto;
  display: flex; align-items: center; gap: 16px;
  font-weight: 600; font-size: 16px; line-height: 1.4;
}
.accordion__name { flex: 1 1 auto; }
.accordion__price { flex: none; }
.accordion .chev { flex: none; }
.accordion details[open] .chev { transform: rotate(180deg); }
.accordion details > p {
  margin: -2px 32px 22px 0;
  font-size: 15px; color: var(--text-muted);
}
.accordion details > p a { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* ---------- Kontakt ---------- */
.contact {
  display: flex; flex-wrap: wrap; gap: clamp(40px, 6vw, 96px);
  margin-top: 16px;
}
.contact__info {
  flex: 1 1 380px; min-width: 0;
  display: flex; flex-direction: column; gap: 40px;
}
.contact__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px 40px;
}
.contact__block { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.contact__block h3 {
  font-weight: 400; font-size: 12px; line-height: 1.6;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted);
}
.contact__note { font-size: 14px; color: var(--text-muted); }
.contact__block .break { overflow-wrap: anywhere; }

.hours { width: 100%; max-width: 260px; display: flex; flex-direction: column; gap: 6px; }
.hours div { display: flex; justify-content: space-between; gap: 16px; }

.contact__map {
  flex: 1 1 440px; min-width: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.map-frame { position: relative; }
.map-img {
  display: block;
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  background: var(--img-bg);
}
/* podpis jak w OSM: w prawym dolnym rogu mapy */
.map-credit {
  position: absolute; right: 0; bottom: 0;
  margin: 0; padding: 2px 6px;
  font-size: 11px; line-height: 1.4;
  background: rgba(255, 255, 255, 0.75);
}
.map-credit a { color: #161616; }
.map-open { align-self: flex-start; padding: 12px 0; font-size: 15px; font-weight: 500; }

/* ---------- Stopka ---------- */
.site-footer {
  padding: 56px var(--gutter);
  background: var(--ink); color: var(--white);
}
.site-footer__inner { display: flex; justify-content: center; text-align: center; }
.site-footer__info {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-footer);
}
/* na telefonie każda informacja w osobnej linii, od 641 px w rzędzie z kropką między */
.footer-line { display: flex; flex-direction: column; align-items: center; gap: 4px; }
/* telefon i e-mail wyglądają jak zwykły tekst, podkreślenie dopiero po najechaniu */
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
/* link do podstrony wyraźnie jako link */
.site-footer a.footer-nav { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.site-footer a.footer-nav:hover { text-decoration-thickness: 2px; }
.site-footer :focus-visible { outline-color: var(--white); }

/* ---------- Podstrona: polityka prywatności ---------- */
/* link powrotu nad tytułem podstrony – pełny tekst na każdej szerokości */
.legal .back-link { margin: 0 0 16px; color: var(--ink); }
.legal .back-link a {
  display: inline-block; padding: 12px 0;
  font-size: 15px; font-weight: 500;
  text-decoration: none;
}
.legal .back-link a:hover { text-decoration: underline; }
.legal { padding: var(--section-y) var(--gutter); }
.legal__inner { max-width: 72ch; }
.legal h1 {
  font-weight: 600;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.1; letter-spacing: -0.02em;
}
.legal__updated { margin-top: 12px; font-size: 14px; color: var(--text-muted); }
.legal h2 { margin-top: 40px; font-weight: 600; font-size: 21px; line-height: 1.3; letter-spacing: -0.01em; }
.legal p, .legal ul { margin-top: 12px; color: var(--text-body); }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: 6px; }
.legal a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* ---------- ≥ 641px: kafle zamiast listy rozwijanej ---------- */
@media (min-width: 641px) {
  .footer-line { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 4px 0; }
  .footer-line > span + span::before { content: "·"; margin: 0 0.6em; color: var(--text-footer); }

  .accordion { display: none; }
  .cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px;
    margin-top: clamp(32px, 4vw, 48px);
  }
  .card {
    display: flex; flex-direction: column; gap: 10px;
    padding: 28px;
    background: var(--white);
    border: 1px solid var(--line);
  }
  .card--outline { background: transparent; border-color: var(--line-strong); }
  .card h3 { font-weight: 600; font-size: 19px; line-height: 1.3; }
  .card__desc { flex-grow: 1; font-size: 15px; color: var(--text-muted); }
  .card__price { margin-top: 12px; font-weight: 600; font-size: 26px; line-height: 1; }
  .card__unit { font-weight: 400; font-size: 15px; color: var(--text-muted); }
  .card__cta { margin-top: 12px; font-size: 15px; }
  .card__cta a { font-weight: 600; }
}

/* ---------- ≥ 960px: pasek kontaktowy i menu poziome (poniżej: hamburger) ----------
   Pasek w jednej linii potrzebuje ok. 850 px kontenera, czyli ok. 945 px okna. */
@media (min-width: 960px) {
  .topbar {
    display: block;
    padding: 0 var(--gutter);
    background: var(--bg-tint);
    border-bottom: 1px solid var(--line-soft);
    font-size: 13px; color: var(--text-bar);
  }
  .topbar__inner {
    min-height: 40px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 4px 16px;
  }
  .topbar__links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
  .topbar a { color: var(--text-bar); }

  .nav-mobile { display: none; }
  .nav-desktop { display: flex; gap: 28px; }
  .nav-desktop a {
    padding: 12px 0 10px;
    font-size: 15px; line-height: 20px;
    color: var(--text-bar);
    border-bottom: 2px solid transparent;
  }
  .nav-desktop a:hover { color: var(--ink); text-decoration: none; border-bottom-color: var(--line-strong); }
  .nav-desktop a[aria-current] {
    color: var(--ink); font-weight: 600; border-bottom-color: var(--ink);
  }

  .section { scroll-margin-top: 130px; }
}

/* ---------- ≥ 1200px: tekst i zdjęcia „O nas” zawsze obok siebie,
   zdjęcia dopasowane do wysokości tekstu. Poniżej zdjęcia są pod tekstem w proporcji 3:4. ---------- */
@media (min-width: 1200px) {
  .about { flex-wrap: nowrap; }
  .about__photos { contain: size; }
  .about__photos .ai-photo { height: 100%; }
  .about__photos img { aspect-ratio: auto; height: 100%; }
}

/* ---------- Ruch: tylko gdy użytkownik go nie ograniczył ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(22, 22, 22, 0.12);
  }
}
