/* ============================================================
   Irena Porębska-Krupa & Józef Krupa — style.css
   Paleta: sepie, kremy, beże. Mobile-first.
   ============================================================ */

/* --- Reset & Box Model --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Zmienne --- */
:root {
  --cream:       #f5f0e8;
  --beige:       #e8dece;
  --beige-dark:  #d4c4ae;
  --sepia:       #8b6914;
  --sepia-dark:  #5c4209;
  --sepia-light: #c4a44a;
  --ink:         #2c2416;
  --ink-soft:    #4a3d2a;
  --muted:       #7a6a55;
  --white:       #fdfaf5;
  --shadow:      rgba(92, 66, 9, 0.12);

  --font-serif:  'EB Garamond', 'Garamond', 'Georgia', serif;
  --font-sans:   'Inter', 'Segoe UI', 'Helvetica Neue', sans-serif;

  --radius:      6px;
  --transition:  0.25s ease;

  --max-width:   1140px;
  --gap:         clamp(1rem, 3vw, 2rem);
}

/* --- Typografia podstawowa --- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--cream);
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.25;
  color: var(--sepia-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

em, i, blockquote {
  font-family: var(--font-serif);
  font-style: italic;
}

p { max-width: 72ch; }

a {
  color: var(--sepia);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--sepia-dark); }

/* --- Układ --- */
.container {
  width: min(100%, var(--max-width));
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

section {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

/* ============================================================
   NAGŁÓWEK STRONY GŁÓWNEJ
   ============================================================ */
.site-header {
  background-color: var(--sepia-dark);
  color: var(--cream);
  text-align: center;
  padding-block: clamp(3rem, 8vw, 6rem);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(196,164,74,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(196,164,74,0.10) 0%, transparent 60%);
  pointer-events: none;
}

.site-header .tagline {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--sepia-light);
  margin-top: 0.75rem;
  letter-spacing: 0.04em;
}

.site-header h1 {
  color: var(--cream);
  position: relative;
}

.header-ornament {
  display: block;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--sepia-light), transparent);
  margin: 1.25rem auto;
}

/* ============================================================
   NAWIGACJA GŁÓWNA
   ============================================================ */
.site-nav {
  background-color: var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--shadow);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-block: 0.75rem;
}

.nav-brand {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--sepia-light);
  font-size: 1.1rem;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--beige);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  letter-spacing: 0.03em;
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background-color: var(--sepia);
  color: var(--white);
}

/* ============================================================
   MENU SKRÓTÓW (nawigacja po sekcjach)
   ============================================================ */
.section-nav {
  background-color: var(--beige);
  border-bottom: 1px solid var(--beige-dark);
  position: sticky;
  top: 51px;
  z-index: 90;
}

.section-nav .container {
  padding-block: 0.5rem;
}

.section-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  justify-content: center;
}

.section-nav__list a {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--ink);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
  transition: background var(--transition), color var(--transition);
}

.section-nav__list a:hover {
  background-color: var(--sepia);
  color: var(--white);
}

.section-nav__list a.section-nav__highlight {
  background-color: var(--sepia-dark);
  color: var(--white);
  font-weight: 600;
}

.section-nav__list a.section-nav__highlight:hover {
  background-color: var(--ink);
}

/* ============================================================
   SEKCJA WSTĘPU
   ============================================================ */
.intro-section {
  text-align: center;
  background: var(--white);
  border-bottom: 1px solid var(--beige-dark);
}

.intro-section .lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 68ch;
  margin-inline: auto;
  line-height: 1.8;
}

.intro-section .lead + p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
  max-width: none;
}

/* ============================================================
   KAFELKI WEJŚCIOWE (Irena / Józef)
   ============================================================ */
.artists-section {
  background: var(--cream);
}

.artists-section h2 {
  text-align: center;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: var(--gap);
}

.artist-card {
  background: var(--white);
  border: 1px solid var(--beige-dark);
  border-radius: calc(var(--radius) * 2);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.artist-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(92, 66, 9, 0.18);
}

.artist-card__img-wrap {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
}

.artist-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.artist-card:hover .artist-card__img-wrap img {
  transform: scale(1.04);
}

.artist-card__img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  gap: 0.5rem;
}

.artist-card__img-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.artist-card__body {
  padding: 1.75rem 2rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.artist-card__name {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: var(--sepia-dark);
  margin-bottom: 0.5rem;
}

.artist-card__role {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--sepia);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.artist-card__desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.7;
  flex: 1;
}

.artist-card__link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.6rem 1.5rem;
  background-color: var(--sepia-dark);
  color: var(--white);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  align-self: flex-start;
  transition: background var(--transition);
}

.artist-card__link:hover {
  background-color: var(--sepia);
  color: var(--white);
}

/* ============================================================
   SEKCJA RAZEM (galeria wspólnych zdjęć)
   ============================================================ */
.together-section {
  background: var(--white);
  border-top: 1px solid var(--beige-dark);
  border-bottom: 1px solid var(--beige-dark);
}

#gallery-razem {
  columns: 1;
  max-width: 820px;
  margin-inline: auto;
}

#gallery-razem a {
  border-radius: calc(var(--radius) * 2);
  overflow: hidden;
}

#gallery-razem img {
  width: 100%;
  display: block;
  border-radius: calc(var(--radius) * 2);
}

.together-section h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.together-section .section-sub {
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--muted);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

/* ============================================================
   GALERIA PHOTOSWIPE — SIATKA MINIATUREK
   ============================================================ */
.gallery-grid {
  columns: 4;
  column-gap: 0.75rem;
}

.gallery-grid a {
  display: block;
  break-inside: avoid;
  margin-bottom: 0.75rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--beige);
  box-shadow: 0 2px 8px var(--shadow);
  transition: box-shadow var(--transition);
}

.gallery-grid a:hover {
  box-shadow: 0 4px 16px rgba(92, 66, 9, 0.22);
}

.gallery-grid img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease;
}

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

@media (max-width: 900px) {
  .gallery-grid { columns: 3; }
}

@media (max-width: 600px) {
  .gallery-grid { columns: 2; }
}

.gallery-empty {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--muted);
  text-align: center;
  padding: 2rem;
  border: 1px dashed var(--beige-dark);
  border-radius: var(--radius);
}

/* ============================================================
   SEKCJA WSPOMNIENIE
   ============================================================ */
.tribute-section {
  background: var(--white);
  border-top: 1px solid var(--beige-dark);
  border-bottom: 1px solid var(--beige-dark);
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.tribute-body {
  max-width: 780px;
  margin-inline: auto;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
}

.tribute-title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 500;
  color: var(--sepia-dark);
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.tribute-meta {
  font-size: 0.85rem;
  font-family: var(--font-sans);
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}

.tribute-body p {
  margin-bottom: 1rem;
}

.tribute-body ul {
  margin: 0.5rem 0 1rem 1.5rem;
}

.tribute-body li {
  margin-bottom: 0.35rem;
}

.tribute-closing {
  font-style: italic;
  color: var(--ink-soft);
}

.tribute-photo {
  margin: 1.5rem 0 2rem;
  text-align: center;
}

.tribute-photo img {
  max-width: 100%;
  width: 640px;
  border-radius: calc(var(--radius) * 2);
  box-shadow: 0 6px 28px var(--shadow);
  display: inline-block;
}

.tribute-photo figcaption {
  margin-top: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   SEKCJA KSIĘGA GOŚCI (Giscus placeholder)
   ============================================================ */
.guestbook-section {
  background: var(--cream);
}

.guestbook-section h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Formularz księgi gości */
.gb-form {
  background: var(--white);
  border: 1px solid var(--beige-dark);
  border-radius: calc(var(--radius) * 2);
  padding: 2rem 2.5rem;
  margin-top: 2rem;
  max-width: 640px;
}
.gb-form__row { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.25rem; }
.gb-form__row label { font-family: var(--font-sans); font-size: 0.82rem; color: var(--muted); }
.gb-form__row input,
.gb-form__row textarea {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius);
  padding: 0.55rem 0.85rem;
  transition: border-color var(--transition);
  resize: vertical;
}
.gb-form__row input:focus,
.gb-form__row textarea:focus { outline: none; border-color: var(--sepia-light); }
.gb-form__btn {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  padding: 0.55rem 1.5rem;
  background: var(--sepia-dark);
  color: var(--white);
  border: none;
  border-radius: 99px;
  cursor: pointer;
  transition: background var(--transition);
}
.gb-form__btn:hover { background: var(--sepia); }
.gb-form__btn:disabled { opacity: 0.6; cursor: default; }
.gb-form__status { font-family: var(--font-serif); font-style: italic; font-size: 0.9rem; color: var(--sepia); margin-top: 0.75rem; }

/* Wpisy */
.gb-entries { margin-top: 2.5rem; }
.gb-loading, .gb-empty { font-family: var(--font-serif); font-style: italic; color: var(--muted); }
.gb-entry {
  border-bottom: 1px solid var(--beige-dark);
  padding: 1.25rem 0;
}
.gb-entry:first-child { border-top: 1px solid var(--beige-dark); }
.gb-entry__header { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.gb-entry__name { font-family: var(--font-serif); font-size: 1.05rem; color: var(--sepia-dark); }
.gb-entry__date { font-family: var(--font-sans); font-size: 0.78rem; color: var(--muted); }
.gb-entry__msg { font-family: var(--font-serif); font-size: 1rem; line-height: 1.75; color: var(--ink); margin: 0; }

/* ============================================================
   STOPKA
   ============================================================ */
.site-footer {
  background-color: var(--ink);
  color: var(--beige);
  text-align: center;
  padding-block: 2.5rem;
  font-size: 0.875rem;
}

.site-footer p + p {
  margin-top: 0.35rem;
}

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

.site-footer .footer-ornament {
  display: block;
  width: 60px;
  height: 1px;
  background: var(--sepia);
  margin: 1rem auto;
}

/* ============================================================
   PODSTRONY — NAGŁÓWEK ARTYSTY
   ============================================================ */
.artist-header {
  background-color: var(--sepia-dark);
  color: var(--cream);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
}

.artist-header h1 { color: var(--cream); }

.artist-header .artist-roles {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--sepia-light);
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-top: 0.5rem;
}

/* ============================================================
   ZAKŁADKI (TABS) — serie galerii
   ============================================================ */
.tabs {
  margin-bottom: 2rem;
}

.tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  border-bottom: 2px solid var(--beige-dark);
  padding-bottom: 0;
  margin-bottom: 1.5rem;
  list-style: none;
}

.tabs__nav button {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--muted);
  border-radius: var(--radius) var(--radius) 0 0;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.tabs__nav button:hover {
  color: var(--sepia-dark);
  background: var(--beige);
}

.tabs__nav button.active {
  color: var(--sepia-dark);
  border-bottom-color: var(--sepia);
  font-weight: 600;
}

.tabs__panel {
  display: none;
}

.tabs__panel.active {
  display: block;
}

/* ============================================================
   SEKCJA BIOGRAMU
   ============================================================ */
.bio-section {
  background: var(--white);
  border-bottom: 1px solid var(--beige-dark);
}

.bio-section blockquote {
  border-left: 3px solid var(--sepia-light);
  padding: 0.75rem 1.5rem;
  margin: 1.5rem 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ============================================================
   SEKCJA PISARSTWA
   ============================================================ */
.writing-section {
  background: var(--cream);
}

.writing-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.writing-list li {
  background: var(--white);
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.writing-list li strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--sepia-dark);
  margin-bottom: 0.3rem;
}

.writing-list li span {
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
  font-family: var(--font-serif);
}

/* ============================================================
   SEKCJA ZDJĘĆ ARCHIWALNYCH
   ============================================================ */
.archive-section {
  background: var(--beige);
  border-top: 1px solid var(--beige-dark);
}

/* ============================================================
   NAGŁÓWKI SEKCJI — wspólny styl
   ============================================================ */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-header h2,
.section-header h3 {
  margin: 0;
}

.section-divider {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--beige-dark), transparent);
}

/* ============================================================
   RESPONSYWNOŚĆ
   ============================================================ */
@media (max-width: 600px) {
  .artist-card__body {
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
  }

  .nav-links a {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }

  .tabs__nav button {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }
}

/* ============================================================
   PRZYCISK POKAZU SLAJDÓW (nad galerią)
   ============================================================ */
.gallery-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.45rem 1.1rem;
  background: var(--sepia-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--transition);
}

.gallery-play-btn:hover,
.gallery-play-btn.active {
  background: var(--sepia);
}

/* ============================================================
   GOOGLE FONTS IMPORT (z backendu — wklejane w <head>)
   @import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Inter:wght@400;600&display=swap');
   ============================================================ */
