/* ═══════════════════════════════════════════════
   MACHIYA — Shared Stylesheet
   ═══════════════════════════════════════════════

   SPIS TREŚCI
   ──────────────────────────────────────────────
    1. FONTY          ← zmiana kroju — tylko tutaj
    2. KOLORY         ← cała paleta — tylko tutaj
    3. TYPOGRAFIA     ← rozmiary, odstępy — tylko tutaj
    4. RESET & BASE
    5. HEADER & NAV
    6. PRZYCISKI
    7. ETYKIETY & SEPARATORY
    8. ANIMACJE REVEAL
    9. HERO (index.html)
   10. SEKCJA FILOZOFII (index.html)
   11. PAGE BAND (nagłówek podstron)
   12. KARUZELA (galeria.html)
   13. KONTAKT (kontakt.html)
   14. FOOTER
   15. HAMBURGER & PANEL MOBILNY
   16. MEDIA QUERIES
   ═══════════════════════════════════════════════ */


/* ─────────────────────────────────────────────
   1. FONTY
   Aby zmienić krój — edytuj zmienne poniżej
   i zaktualizuj link @import nad :root.
   ───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Noto+Serif+JP:wght@300;400&display=swap');

:root {
  /* Trzy rodziny fontów używane w projekcie */
  --font-display:  'Playfair Display', serif;    /* nagłówki, logo, przyciski, etykiety */
  --font-body:     'Cormorant Garamond', serif;   /* treść, cytaty, opisy, em/italic     */
  --font-kanji:    'Noto Serif JP', serif;        /* znaki japońskie                     */


/* ─────────────────────────────────────────────
   2. KOLORY
   Cała paleta w jednym miejscu.
   ───────────────────────────────────────────── */

  --ink:         #1a1410;   /* główny kolor tekstu i tła ciemnych sekcji  */
  --paper:       #f5f0e8;   /* tło strony                                 */
  --cream:       #ede8dc;   /* tło alternatywne (hero right, karty)       */
  --gold:        #b8962e;   /* akcent złoty — CTA, separatory, ikony      */
  --gold-light:  #d4b05a;   /* złoty rozjaśniony — etykiety na ciemnym    */
  --terracotta:  #8b4a2f;   /* akcent ceglany — em/italic w nagłówkach    */
  --ash:         #9a9088;   /* tekst drugorzędny, linki nav               */
  --mist:        #d6d0c4;   /* obramowania, separatory, nieaktywne kropki */
  --white-smoke: #faf8f4;   /* biały tekst na ciemnym tle                 */


/* ─────────────────────────────────────────────
   3. TYPOGRAFIA
   Zmiana tutaj propaguje się na całą stronę.
   Inline <style> w plikach HTML używają tych
   samych zmiennych — nie trzeba ich edytować.
   ───────────────────────────────────────────── */

  /* Nagłówki */
  --fs-hero-title:     clamp(3rem, 5vw, 5.5rem);      /* H1 hero (index)                 */
  --fs-hero-subtitle:  clamp(1.8rem, 3.2vw, 3.4rem);  /* em kursywa pod H1               */
  --fs-section-h2:     clamp(2rem, 3vw, 3rem);        /* H2 w sekcjach                   */
  --fs-page-band-h1:   clamp(2.8rem, 5vw, 5rem);      /* H1 page-band (galeria, kontakt) */
  --fs-carousel-title: 1.6rem;                        /* tytuł sekcji karuzeli           */

  /* Tekst główny */
  --fs-body:           1.08rem;   /* akapity w sekcjach                  */
  --fs-body-sm:        1rem;      /* mniejszy tekst opisowy              */
  --fs-desc:           1.1rem;    /* opisy hero i page-band              */

  /* UI / mikro */
  --fs-label:          0.7rem;    /* .section-label nad nagłówkami       */
  --fs-nav:            0.75rem;   /* linki nawigacji desktop             */
  --fs-btn:            0.75rem;   /* tekst przycisków                    */
  --fs-logo:           1.5rem;    /* logo w headerze                     */
  --fs-footer-copy:    0.73rem;   /* tekst copyright w stopce            */

  /* Karty i karuzela */
  --fs-slide-title:    0.95rem;   /* tytuł slajdu                        */
  --fs-slide-sub:      0.82rem;   /* podtytuł slajdu                     */

  /* Cytaty */
  --fs-quote:          1.35rem;   /* blockquote (kontakt)                */

  /* Znaki japońskie dekoracyjne */
  --fs-kanji-hero:     4.5rem;    /* kanji w sekcji hero                 */
  --fs-kanji-phil:     3.8rem;    /* kanji w sekcji filozofii            */
  --fs-kanji-deco:     3.5rem;    /* kanji dekoracyjne (kontakt, nav)    */
  --fs-kanji-bg-xl:    26rem;     /* tło kanji duże (filozofia, kontakt) */
  --fs-kanji-bg-lg:    22rem;     /* tło kanji page-band                 */

  /* Odstępy liter */
  --ls-label:  0.38em;   /* .section-label                              */
  --ls-nav:    0.22em;   /* nav a desktop                               */
  --ls-btn:    0.25em;   /* przyciski                                   */
  --ls-logo:   0.18em;   /* logo                                        */

  /* Wysokości linii */
  --lh-hero:   1.05;
  --lh-body:   1.9;
  --lh-dense:  2;        /* filozofia, kontakt                          */
  --lh-quote:  1.75;
}


/* ─────────────────────────────────────────────
   4. RESET & BASE
   ───────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
}

/* Efekt ziarna (noise texture) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}


/* ─────────────────────────────────────────────
   5. HEADER & NAV
   ───────────────────────────────────────────── */

header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 5rem;
  background: rgba(245,240,232,0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--mist);
  transition: padding 0.4s ease, box-shadow 0.4s ease;
}

header.scrolled {
  padding: 0.85rem 5rem;
  box-shadow: 0 2px 24px rgba(26,20,16,0.06);
}

.logo {
  font-family: var(--font-display);
  font-size: var(--fs-logo);
  font-weight: 700;
  letter-spacing: var(--ls-logo);
  color: var(--ink);
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logo-kanji {
  font-family: var(--font-kanji);
  font-size: 1rem;
  color: var(--gold);
  font-weight: 400;
  letter-spacing: 0.05em;
}

nav { display: flex; gap: 3rem; align-items: center; }

nav a {
  font-family: var(--font-display);
  font-size: var(--fs-nav);
  letter-spacing: var(--ls-nav);
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: none;
  position: relative;
  transition: color 0.3s;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.4s ease;
}

nav a:hover, nav a.active { color: var(--ink); }
nav a:hover::after, nav a.active::after { width: 100%; }


/* ─────────────────────────────────────────────
   6. PRZYCISKI
   ───────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-display);
  font-size: var(--fs-btn);
  letter-spacing: var(--ls-btn);
  text-transform: uppercase;
  color: var(--white-smoke);
  background: var(--ink);
  padding: 1rem 2.5rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
  z-index: -1;
}

.btn-primary:hover { color: var(--ink); border-color: var(--gold); }
.btn-primary:hover::before { transform: translateX(0); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-display);
  font-size: var(--fs-btn);
  letter-spacing: var(--ls-btn);
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  padding: 1rem 2.5rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.btn-outline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
  z-index: -1;
}

.btn-outline:hover { color: var(--white-smoke); }
.btn-outline:hover::before { transform: translateX(0); }

/* Przycisk złoty (na ciemnym tle) */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-display);
  font-size: var(--fs-btn);
  letter-spacing: var(--ls-btn);
  text-transform: uppercase;
  color: var(--ink);
  background: var(--gold);
  padding: 1rem 2.5rem;
  text-decoration: none;
  border: 1px solid var(--gold);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.btn-gold::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white-smoke);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
  z-index: -1;
}

.btn-gold:hover { color: var(--ink); border-color: var(--white-smoke); }
.btn-gold:hover::before { transform: translateX(0); }


/* ─────────────────────────────────────────────
   7. ETYKIETY & SEPARATORY
   ───────────────────────────────────────────── */

.section-label {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::before {
  content: '';
  width: 2rem; height: 1px;
  background: currentColor;
}

.divider-line {
  width: 3rem; height: 1px;
  background: var(--gold);
  margin: 2rem 0;
}


/* ─────────────────────────────────────────────
   8. ANIMACJE REVEAL
   ───────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.22s; }
.reveal-d3 { transition-delay: 0.36s; }
.reveal-d4 { transition-delay: 0.5s; }


/* ─────────────────────────────────────────────
   9. HERO (index.html)
   ───────────────────────────────────────────── */

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-eyebrow::before {
  content: '';
  width: 2.5rem; height: 1px;
  background: var(--gold);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--fs-hero-title);
  font-weight: 600;
  line-height: var(--lh-hero);
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.hero-title em {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  font-size: var(--fs-hero-subtitle);
  color: var(--terracotta);
  display: block;
  margin-top: 0.4rem;
}

.hero-kanji {
  font-family: var(--font-kanji);
  font-size: var(--fs-kanji-hero);
  font-weight: 300;
  color: var(--mist);
  letter-spacing: 0.3em;
  margin: 2rem 0;
  user-select: none;
}

.hero-desc {
  font-size: var(--fs-desc);
  line-height: var(--lh-body);
  color: var(--ash);
  max-width: 380px;
  font-style: italic;
  margin-bottom: 2.5rem;
}

.hero-right-kanji {
  position: absolute;
  font-family: var(--font-kanji);
  font-size: 20rem;
  font-weight: 300;
  color: rgba(184,150,46,0.07);
  user-select: none;
  line-height: 1;
}


/* ─────────────────────────────────────────────
   10. SEKCJA FILOZOFII (index.html)
   ───────────────────────────────────────────── */

.phil-kanji-item span:first-child {
  font-family: var(--font-kanji);
  font-size: var(--fs-kanji-phil);
  font-weight: 300;
  color: var(--gold-light);
  opacity: 0.7;
  line-height: 1;
  min-width: 4rem;
  transition: opacity 0.3s;
}

.phil-kanji-item:hover span:first-child { opacity: 1; }

.phil-kanji-label {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--ash);
}

.phil-content h2 {
  font-family: var(--font-display);
  font-size: var(--fs-section-h2);
  font-weight: 600;
  color: var(--white-smoke);
  line-height: 1.2;
  margin-bottom: 1.8rem;
}

.phil-content p {
  font-size: var(--fs-body);
  line-height: var(--lh-dense);
  color: rgba(255,255,255,0.48);
  font-style: italic;
  margin-bottom: 1.4rem;
}


/* ─────────────────────────────────────────────
   11. PAGE BAND (nagłówek podstron)
   ───────────────────────────────────────────── */

.page-band {
  padding: 12rem 5rem 6rem;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}

.page-band-kanji {
  position: absolute;
  font-family: var(--font-kanji);
  font-size: var(--fs-kanji-bg-lg);
  font-weight: 300;
  color: rgba(255,255,255,0.04);
  user-select: none;
  line-height: 1;
  right: 2rem;
  bottom: -2rem;
}

.page-band h1 {
  font-family: var(--font-display);
  font-size: var(--fs-page-band-h1);
  font-weight: 600;
  color: var(--white-smoke);
  line-height: 1.1;
}

.page-band h1 em {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  color: var(--gold-light);
}

.page-band p {
  margin-top: 1.5rem;
  font-size: var(--fs-desc);
  line-height: var(--lh-body);
  color: rgba(255,255,255,0.45);
  font-style: italic;
  max-width: 520px;
}


/* ─────────────────────────────────────────────
   12. KARUZELA (galeria.html)
   ───────────────────────────────────────────── */

.carousel-section { margin-bottom: 5rem; }

.carousel-title-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.carousel-section-title {
  font-family: var(--font-display);
  font-size: var(--fs-carousel-title);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.carousel-section-title em {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  color: var(--terracotta);
}

.carousel-controls { display: flex; gap: 0.6rem; }

.carousel-btn {
  width: 48px; height: 48px;
  border: 1px solid var(--mist);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--ash);
}

.carousel-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--cream);
}

.carousel-btn svg { width: 16px; height: 16px; }

.carousel-track-wrap {
  overflow: hidden;
  cursor: grab;
}
.carousel-track-wrap:active { cursor: grabbing; }

.carousel-track {
  display: flex;
  gap: 1.4rem;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  user-select: none;
}

.carousel-slide {
  flex-shrink: 0;
  width: 300px;
  height: 400px;
  position: relative;
  overflow: hidden;
}

.carousel-slide-inner {
  width: 100%; height: 100%;
  position: relative;
  overflow: hidden;
}

.carousel-slide:hover .slide-img-wrap { transform: scale(1.05); }

.slide-img-wrap {
  width: 100%; height: 100%;
  transition: transform 0.7s ease;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,20,16,0.75) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.6rem;
}

.carousel-slide:hover .slide-overlay { opacity: 1; }

.slide-title {
  font-family: var(--font-display);
  font-size: var(--fs-slide-title);
  font-weight: 600;
  color: var(--white-smoke);
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.slide-sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--fs-slide-sub);
  color: rgba(255,255,255,0.6);
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.8rem;
}

.dot {
  width: 24px; height: 2px;
  background: var(--mist);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--ink);
  width: 48px;
}

/* Placeholder kanji w slajdach galerii */
.ph-kanji {
  font-family: var(--font-kanji);
  font-size: 5rem;
  font-weight: 300;
  color: rgba(184,150,46,0.12);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  user-select: none;
  line-height: 1;
}

.placeholder-label {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.2);
  white-space: nowrap;
}


/* ─────────────────────────────────────────────
   13. KONTAKT (kontakt.html)
   ───────────────────────────────────────────── */

.contact-info h2 {
  font-family: var(--font-display);
  font-size: var(--fs-section-h2);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.contact-info h2 em {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  color: var(--terracotta);
}

.contact-info p {
  font-size: var(--fs-body);
  line-height: var(--lh-dense);
  color: var(--ash);
  font-style: italic;
  max-width: 400px;
  margin-bottom: 1.4rem;
}

.cc-text strong {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  display: block;
  margin-bottom: 0.3rem;
}

.cc-text span {
  font-size: var(--fs-body-sm);
  color: var(--ash);
  font-style: italic;
}

.contact-quote::before {
  content: '"';
  font-family: var(--font-body);
  font-size: 8rem;
  color: var(--gold);
  opacity: 0.15;
  position: absolute;
  top: 0.5rem;
  left: 1.5rem;
  line-height: 1;
}

.contact-quote blockquote {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--fs-quote);
  line-height: var(--lh-quote);
  color: var(--ink);
  position: relative;
  z-index: 2;
}

.contact-quote cite {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-style: normal;
}

.contact-kanji-deco span {
  font-family: var(--font-kanji);
  font-size: var(--fs-kanji-deco);
  font-weight: 300;
  color: var(--mist);
  line-height: 1;
  user-select: none;
  transition: color 0.3s;
}

.contact-kanji-deco span:hover { color: var(--gold-light); }

.info-strip-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}

.info-strip-value {
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  font-style: italic;
}


/* ─────────────────────────────────────────────
   14. FOOTER
   ───────────────────────────────────────────── */

footer {
  background: var(--ink);
  padding: 2.8rem 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white-smoke);
}

.footer-kanji {
  font-family: var(--font-kanji);
  font-size: 1.4rem;
  color: var(--gold);
  opacity: 0.45;
  font-weight: 300;
}

.footer-copy {
  font-size: var(--fs-footer-copy);
  color: rgba(255,255,255,0.28);
  font-style: italic;
  letter-spacing: 0.05em;
}


/* ─────────────────────────────────────────────
   15. HAMBURGER & PANEL MOBILNY
   ───────────────────────────────────────────── */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  position: relative;
  z-index: 500;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.35s ease, opacity 0.35s ease;
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

#navPanel {
  position: fixed;
  top: 0; right: 0;
  width: min(75vw, 280px);
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding: 5rem 2rem 3rem;
  background: var(--paper);
  border-left: 1px solid var(--mist);
  box-shadow: -6px 0 30px rgba(26,20,16,0.15);
  transform: translateX(110%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0s linear 0.4s;
  z-index: 400;
  visibility: hidden;
  pointer-events: none;
}

#navPanel.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              visibility 0s linear 0s;
}

#navPanel a {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: none;
  padding: 1.1rem 0.5rem;
  width: 100%;
  border-bottom: 1px solid var(--mist);
  display: block;
  transition: color 0.25s ease, padding-left 0.25s ease;
}

#navPanel a:last-child { border-bottom: none; }

#navPanel a:hover,
#navPanel a.active {
  color: var(--ink);
  padding-left: 1rem;
}

#navBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(26,20,16,0.4);
  z-index: 390;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#navBackdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Pomocniczy placeholder obrazka */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}


/* ─────────────────────────────────────────────
   16. MEDIA QUERIES
   ───────────────────────────────────────────── */

/* MOBILE */
@media (max-width: 768px) {

  :root {
    /* Korekty typograficzne dla mobile — nadpisują tokeny z sekcji 3 */
    --fs-kanji-hero:   3rem;
    --fs-kanji-phil:   2.8rem;
    --fs-kanji-deco:   2.8rem;
    --fs-desc:         1rem;
    --fs-body:         1rem;
    --fs-label:        0.62rem;
    --ls-label:        0.28em;
    --fs-btn:          0.7rem;
  }

  header {
    padding: 0 1.5rem;
    height: 60px;
  }

  header.scrolled {
    padding: 0 1.5rem;
    height: 54px;
    box-shadow: 0 2px 20px rgba(26,20,16,0.08);
  }

  .logo { font-size: 1.1rem; }
  .logo-kanji { font-size: 0.8rem; }

  header nav { display: none; }
  .nav-toggle { display: flex; }

  .page-band { padding: 7rem 1.5rem 4rem; }
  .page-band-kanji { font-size: 10rem; }
  .page-band h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .page-band p { margin-top: 1rem; }

  .btn-primary, .btn-outline, .btn-gold {
    padding: 0.9rem 1.8rem;
    width: 100%;
    justify-content: center;
  }

  .carousel-section { margin-bottom: 3.5rem; }

  .carousel-title-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
  }

  .carousel-section-title { font-size: 1.3rem; }

  .carousel-slide {
    width: calc(80vw - 1.5rem);
    height: 340px;
  }

  .slide-overlay { opacity: 1; }

  footer {
    flex-direction: column;
    gap: 0.8rem;
    padding: 2rem 1.5rem;
    text-align: center;
  }

  .footer-kanji { font-size: 1.1rem; }
  .footer-copy { font-size: 0.68rem; }
}

/* TABLET */
@media (min-width: 769px) and (max-width: 1024px) {
  header { padding: 1.2rem 2.5rem; }
  header.scrolled { padding: 0.85rem 2.5rem; }
  nav { gap: 2rem; }
  nav a { font-size: 0.68rem; }
  .page-band { padding: 10rem 3rem 5rem; }
  footer { padding: 2.5rem 3rem; }
  .carousel-slide { width: 260px; height: 360px; }
}
