/* ============================================================
   codeshots.pl — static rebuild
   Design: light, editorial, minimal — matches the original site's
   layout (serif wordmark, thin nav, generous whitespace,
   image + text split panels).
   ============================================================ */

/* ---------- Motywy kolorystyczne ----------
   :root = jasny (domyślny). [data-theme="dark"] nadpisuje tokeny.
   O wyborze decyduje skrypt w <head>, więc nie ma mignięcia przy ładowaniu.
   Wszystkie wartości sprawdzone pod kątem kontrastu WCAG. */
:root {
  --bg: #ffffff;
  --bg-raised: #f6f6f4;
  --ink: #111111;          /* 18,88:1 */
  --ink-dim: #555555;      /*  7,46:1 */
  --ink-faint: #767068;    /*  4,90:1 */
  --accent: #2f5d34;       /*  7,67:1 */
  --hairline: #e4e3df;
  --placeholder-a: #dcdcd8;
  --placeholder-b: #f4f4f2;
  --shade: rgba(0, 0, 0, 0.06);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --frame: 48px;
}

[data-theme="dark"] {
  --bg: #131211;
  --bg-raised: #1c1b19;
  --ink: #ece9e3;          /* 15,44:1 */
  --ink-dim: #a9a49b;      /*  7,55:1 */
  --ink-faint: #8b857a;    /*  5,11:1 */
  --accent: #8fb894;       /*  8,42:1 */
  --hairline: #302e2a;
  --placeholder-a: #262421;
  --placeholder-b: #1a1917;
  --shade: rgba(255, 255, 255, 0.08);
}

/* Zdjęcia bywają jaskrawe na ciemnym tle — delikatne przygaszenie,
   które znika przy najechaniu i w lightboxie. */
[data-theme="dark"] .frame-card img,
[data-theme="dark"] .gallery-item img,
[data-theme="dark"] .package-thumb img {
  filter: brightness(0.92);
  transition: filter 0.2s ease;
}
[data-theme="dark"] .frame-card:hover img,
[data-theme="dark"] .gallery-item:hover img {
  filter: brightness(1);
}

html { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.25;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Placeholder image fill ---------- */
.placeholder-fill {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 35% 35%, var(--placeholder-b), var(--placeholder-a) 75%);
}

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--hairline);
}

.nav-wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: 26px clamp(24px, 4vw, 72px);
  display: flex;
  align-items: center;
  gap: 40px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark span { color: var(--ink); }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  font-family: var(--font-body);
  font-size: 0.94rem;
  color: var(--ink);
}

.nav-links a {
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.nav-links a:hover,
.nav-links a.active {
  border-color: var(--ink);
}

.nav-social {
  margin-left: auto;
  display: flex;
  gap: 14px;
  align-items: center;
}
.nav-social a { display: inline-flex; color: var(--ink); }
.nav-social svg { width: 16px; height: 16px; }

/* ---------- Przełącznik motywu ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  margin-left: 4px;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover {
  background: var(--shade);
  border-color: var(--ink-faint);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Słońce w motywie ciemnym (klik = rozjaśnij), księżyc w jasnym. */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-family: var(--font-body);
  padding: 6px 10px;
  cursor: pointer;
}

/* ---------- Hero (strona główna) ----------
   Uwaga: .hero-frame musi mieć align-self:start. Przy align-items:stretch
   wysokość narzucałby wiersz siatki, a aspect-ratio wyliczałoby z niej
   szerokość — zdjęcie kurczyło się i zostawiało pustkę pośrodku. */
.hero {
  max-width: 1600px;
  margin: 0 auto;
  padding: 48px clamp(24px, 4vw, 72px) 88px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 104px);
  align-items: start;
}

.hero-frame {
  align-self: start;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-raised);
  border-radius: 20px;
}

.hero-copy {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 3% 0;
  min-height: 0;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.1vw, 3.1rem);
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

.hero-avatar {
  width: clamp(130px, 12vw, 200px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  align-self: center;
  margin: 0;
}

.hero-copy p {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.85;
  max-width: 100%;
  margin: 0;
}

.hero-frame img,
.hero-avatar img,
.contact-frame img,
.wedding-frame img,
.package-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.section {
  max-width: 1600px;
  margin: 0 auto;
  padding: 72px clamp(24px, 4vw, 72px);
  border-top: 1px solid var(--hairline);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.section-head h1,
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  font-weight: 500;
  margin: 0;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.page-title {
  max-width: 1600px;
  margin: 0 auto;
  padding: 56px clamp(24px, 4vw, 72px) 8px;
}
.page-title h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 500;
  margin: 0;
}
.page-title .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

/* ---------- Contact-sheet grid (portfolio categories) ---------- */
.contact-sheet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.frame-card {
  position: relative;
  display: block;
}

.frame-card .frame-image {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-raised);
  margin-bottom: 14px;
}

.frame-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame-card .frame-index {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}

.frame-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}

.frame-card:hover h3 { text-decoration: underline; }

/* ---------- Gallery grid (generated portfolio pages) ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-raised);
  border-radius: 8px;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img { transform: scale(1.03); }

.page-title .eyebrow a {
  color: var(--ink-faint);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-title .eyebrow a:hover { color: var(--ink); }

/* ---------- Lightbox ---------- */
.lb-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(14, 14, 14, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vmin;
  animation: lb-fade 0.18s ease;
}
.lightbox.no-anim { animation: none; }
.lightbox[hidden] { display: none; }

@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

.lb-stage {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lb-image {
  max-width: 100%;
  max-height: calc(100vh - 10vmin - 48px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 0.15s ease;
  /* poziomy swipe ma trafiać do skryptu, nie do gestu przeglądarki */
  touch-action: pan-y;
}
.lightbox.is-loading .lb-image { opacity: 0.25; }

.lb-caption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}

.lb-close,
.lb-nav {
  position: absolute;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lb-close:hover,
.lb-nav:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.5);
}
.lb-close[hidden],
.lb-nav[hidden] { display: none; }

.lb-close {
  top: 3vmin;
  right: 3vmin;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  font-family: var(--font-body);
}

.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
}
.lb-prev { left: 3vmin; }
.lb-next { right: 3vmin; }

.lb-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lb-close:focus-visible,
.lb-nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Na wąskich ekranach strzałki schodzą na dół — są pod kciukiem
   i nie zasłaniają zdjęcia. Swipe działa niezależnie. */
@media (max-width: 640px) {
  .lightbox { padding: 4vmin 3vmin 84px; }
  .lb-nav {
    top: auto;
    bottom: 18px;
    transform: none;
    width: 48px;
    height: 48px;
  }
  .lb-prev { left: 22%; }
  .lb-next { right: 22%; }
  .lb-image { max-height: calc(100vh - 150px); }
  .lb-close { top: 12px; right: 12px; }
}

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ---------- Prose blocks ---------- */
.prose { max-width: 68ch; }
.prose p { color: var(--ink-dim); margin: 0 0 18px; }
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 32px 0 12px;
}

.notice {
  border: 1px solid var(--hairline);
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-dim);
  background: var(--bg-raised);
  margin-bottom: 32px;
}
.notice strong { color: var(--ink); }

/* Link wyróżniony zielenią. Podkreślenie jest istotne — sam kolor
   nie wystarcza, by oznaczyć odnośnik (osoby nierozróżniające barw). */
.link-accent {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.link-accent:hover { text-decoration-thickness: 2px; }

/* ---------- Package cards (Oferta) ---------- */
.offer-block { margin-bottom: 64px; }
.offer-block:last-child { margin-bottom: 0; }

.offer-block-head {
  text-align: center;
  margin-bottom: 28px;
}
.offer-block-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 500;
  margin: 0;
}

.offer-rule {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 0 0 28px;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.package-card {
  border-top: 1px solid var(--ink);
  padding: 22px 0 0;
  display: flex;
  flex-direction: column;
}

.package-thumb {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-raised);
  margin-bottom: 16px;
}

.package-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 6px;
}

.package-price {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.package-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}
.package-list li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 10px;
  font-size: 0.92rem;
  color: var(--ink-dim);
  line-height: 1.5;
}
.package-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--ink-faint);
}

/* Wedding split block */
.wedding-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.wedding-frame {
  border-radius: 18px;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  background: var(--bg-raised);
}
.wedding-copy h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 14px;
}
.wedding-copy p { color: var(--ink-dim); margin: 0 0 12px; }
.wedding-copy .price-line {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ---------- Zespół fotografów (oferta ślubna) ---------- */
.wedding-team-intro {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 56px;
}
.wedding-team-photo {
  position: relative;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: var(--bg-raised);
}
.wedding-team-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wedding-team-lead {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 640px;
  margin: 0 auto;
}
.team-member { text-align: center; }
.team-avatar {
  width: clamp(120px, 15vw, 168px);
  aspect-ratio: 1 / 1;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: var(--bg-raised);
}
.team-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-member h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}

@media (max-width: 760px) {
  .wedding-team-intro { grid-template-columns: 1fr; gap: 28px; }
  .team-grid { grid-template-columns: 1fr; max-width: 260px; gap: 28px; }
}

/* ---------- Contact page ---------- */
.contact-hero {
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px clamp(24px, 4vw, 72px) 96px;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: center;
}

.contact-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2rem);
  font-weight: 500;
  margin: 0 0 44px;
}

.contact-block { margin-bottom: 30px; }
.contact-block h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0 0 12px;
  color: var(--ink);
}
.contact-block a.link-line {
  display: block;
  font-size: 0.95rem;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--ink);
}
.contact-block a.link-line:hover { color: var(--accent); }

.contact-frame {
  position: relative;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-radius: 22px;
  background: var(--bg-raised);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 32px clamp(24px, 4vw, 72px) 64px;
}
.footer-inner {
  max-width: 1600px;
  margin: 0 auto;
}
.footer-email {
  font-size: 0.92rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--ink);
}
.footer-meta {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-meta a { color: var(--ink-faint); }
.footer-meta a:hover { color: var(--ink); }

/* ---------- Buttons (used sparingly) ---------- */
.btn {
  display: inline-block;
  font-size: 0.88rem;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }

.btn-lg {
  font-size: 1rem;
  padding: 15px 34px;
}
.btn-solid {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-solid:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
/* W ciemnym motywie akcent jest jasny — biały tekst byłby nieczytelny,
   więc na przycisku dajemy ciemny (kontrast ~9:1 zamiast 2,2:1).
   Po najechaniu tło robi się jasne (--ink), więc tekst zostaje ciemny (--bg). */
[data-theme="dark"] .btn-solid { color: var(--bg); }
[data-theme="dark"] .btn-solid:hover { color: var(--bg); }

/* Pasek zachęty na dole strony głównej — kieruje klienta do oferty. */
.home-cta {
  max-width: 1600px;
  margin: 0 auto;
  padding: 72px clamp(24px, 4vw, 72px) 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  border-top: 1px solid var(--hairline);
}
.home-cta-text {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  margin: 0;
  max-width: 24ch;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 24px clamp(20px, 5vw, 40px) 64px;
    gap: 36px;
  }
  .hero-copy {
    align-self: auto;
    padding: 0;
    gap: 30px;
  }
  .contact-sheet { grid-template-columns: repeat(2, 1fr); }
  .package-grid { grid-template-columns: 1fr; }
  .contact-hero { grid-template-columns: 1fr; gap: 40px; }
  .wedding-block { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --frame: 24px; }
  .nav-wrap { flex-wrap: wrap; gap: 14px; }
  .nav-links {
    order: 3;
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--hairline);
    margin-top: 12px;
    padding-top: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; border-bottom: 1px solid var(--hairline); }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-social { margin-left: 0; }
  .contact-sheet { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
