/* =========================================================
   Tai Chi Chuan · Mariusz Pietrzak – Bydgoszcz · Toruń
   Minimalistyczny arkusz stylów w duchu tao: odcienie szarości,
   dużo przestrzeni, spokojna typografia.
   ========================================================= */

:root {
  --tusz: #1c1c1c;        /* tusz – prawie czerń */
  --wegiel: #2e2e2e;
  --grafit: #4a4a4a;
  --popiol: #7a7a7a;
  --mgla: #b5b5b5;
  --kamien: #d9d9d9;
  --ryz: #f4f3f0;         /* papier ryżowy – tło */
  --papier: #fbfaf8;
  --bialy: #ffffff;
  --linia: #e3e1dc;
  --radius: 6px;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 300;
  color: var(--wegiel);
  background: var(--papier);
  line-height: 1.75;
  font-size: 1.02rem;
}

/* Żaden obraz ani osadzona mapa nie może być szersza niż jej kontener (telefony) */
img, svg, iframe, video { max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, .serif {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
  color: var(--tusz);
  letter-spacing: 0.01em;
}
a { color: var(--grafit); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--tusz); }
strong { font-weight: 600; color: var(--tusz); }
p { margin-bottom: 1.1rem; }

.section { padding: 6rem 0; }
.section.tight { padding: 4rem 0; }
.bg-ryz { background: var(--ryz); }
.bg-tusz { background: var(--tusz); color: var(--kamien); }
.bg-tusz h2, .bg-tusz h3 { color: var(--bialy); }
@media (max-width: 767.98px) { .section { padding: 4rem 0; } }

.kicker {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--popiol);
  margin-bottom: 1rem;
  font-weight: 400;
}
.section-title { font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.15; margin-bottom: 1.5rem; }
.lead-soft { font-size: 1.15rem; color: var(--grafit); font-weight: 300; }
.rule {
  width: 48px; height: 1px; background: var(--tusz); border: 0; opacity: 1; margin: 1.5rem 0;
}
.rule.center { margin-left: auto; margin-right: auto; }

/* ---------- Przyciski ---------- */
.btn { border-radius: 0; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.78rem; padding: 0.85rem 1.8rem; }
.btn-tusz { background: var(--tusz); color: var(--bialy); border: 1px solid var(--tusz); }
.btn-tusz:hover { background: var(--bialy); color: var(--tusz); border-color: var(--tusz); }
.btn-outline-tusz { background: transparent; color: var(--tusz); border: 1px solid var(--tusz); }
.btn-outline-tusz:hover { background: var(--tusz); color: var(--bialy); }
.btn-outline-light:hover { color: var(--tusz); }

/* ---------- Nawigacja ---------- */
.navbar {
  background: rgba(251, 250, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
  padding: 0.9rem 0;
}
.navbar.scrolled { border-bottom-color: var(--linia); }
.navbar-brand { display: flex; align-items: center; gap: 0.7rem; color: var(--tusz); text-decoration: none; }
.navbar-brand svg { width: 30px; height: 30px; }
.navbar-brand .brand-text { font-family: "Cormorant Garamond", serif; font-size: 1.35rem; line-height: 1; }
.navbar-brand .brand-text small { display: block; font-family: "Inter", sans-serif; font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--popiol); margin-top: 0.25rem; }
.navbar .nav-link {
  font-size: 0.76rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--grafit);
  padding: 0.5rem 0.9rem !important; position: relative;
}
.navbar .nav-link::after {
  content: ""; position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.2rem; height: 1px;
  background: var(--tusz); transform: scaleX(0); transform-origin: left; transition: transform 0.25s;
}
.navbar .nav-link:hover::after, .navbar .nav-link.active::after { transform: scaleX(1); }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--tusz); }
.navbar-toggler { border: 0; }
.navbar-toggler:focus { box-shadow: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background: var(--ryz); overflow: hidden; padding: 7rem 0 4rem;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("../img/zajecia-sala.jpg") center 40% / cover no-repeat;
  filter: grayscale(1) contrast(0.95);
  opacity: 0.22;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(244,243,240,0.4) 0%, rgba(244,243,240,0.75) 60%, var(--ryz) 100%);
}
.hero > .container { position: relative; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.05; font-weight: 400; margin: 1rem 0 1.5rem; }
.hero h1 em { font-style: italic; color: var(--grafit); }
.hero .lead-soft { max-width: 560px; }
.hero-symbol { width: min(260px, 60vw); height: auto; }
.hero-symbol .yin { animation: obrot 60s linear infinite; transform-origin: 50% 50%; }
@keyframes obrot { to { transform: rotate(360deg); } }
.scroll-hint { position: absolute; left: 50%; bottom: 1.5rem; transform: translateX(-50%); color: var(--popiol); font-size: 0.65rem; letter-spacing: 0.3em; text-transform: uppercase; }
.scroll-hint span { display: block; width: 1px; height: 36px; background: var(--mgla); margin: 0.5rem auto 0; }

/* ---------- Motto ---------- */
.motto { text-align: center; }
.motto blockquote {
  font-family: "Cormorant Garamond", serif; font-size: clamp(1.5rem, 2.8vw, 2.3rem); font-weight: 400; font-style: italic;
  line-height: 1.45; color: var(--tusz); max-width: 900px; margin: 0 auto 1.5rem;
}
.motto blockquote::before { content: "„"; color: var(--mgla); }
.motto blockquote::after { content: "”"; color: var(--mgla); }
.motto cite { font-style: normal; font-size: 0.78rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--popiol); }
.hexagram { display: inline-block; margin: 0 auto 2rem; }
.hexagram line { stroke: var(--tusz); stroke-width: 6; stroke-linecap: butt; }
.bg-tusz .hexagram line { stroke: var(--bialy); }
.hexagram-caption { font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--popiol); }

/* ---------- Korzyści ---------- */
.benefit { padding: 2rem 0; border-top: 1px solid var(--linia); display: grid; grid-template-columns: 56px 1fr; gap: 1.25rem; }
.benefit:last-child { border-bottom: 1px solid var(--linia); }
.benefit .num { font-family: "Cormorant Garamond", serif; font-size: 2rem; color: var(--mgla); line-height: 1; }
.benefit h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.benefit p { margin: 0; color: var(--grafit); }

/* ---------- Nauczyciel ---------- */
.photo-frame { position: relative; }
.photo-frame img { width: 100%; height: auto; display: block; filter: grayscale(1) contrast(1.02); }
.photo-frame::after {
  content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255,255,255,0.6); pointer-events: none;
}
.photo-caption { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--popiol); margin-top: 0.75rem; }
.timeline-min { list-style: none; padding: 0; margin: 2rem 0 0; }
.timeline-min li { display: grid; grid-template-columns: 70px 1fr; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--linia); }
.timeline-min li span:first-child { font-family: "Cormorant Garamond", serif; font-size: 1.25rem; color: var(--tusz); }
.timeline-min li span:last-child { color: var(--grafit); font-size: 0.95rem; }

/* ---------- Zajęcia – zakładki miast ---------- */
.city-tabs { display: flex; justify-content: center; gap: 0; border-bottom: 1px solid var(--linia); margin-bottom: 3rem; }
.city-tabs .nav-link {
  border: 0; border-radius: 0; background: transparent; color: var(--popiol);
  font-family: "Cormorant Garamond", serif; font-size: 1.6rem; padding: 0.75rem 2rem; position: relative;
}
.city-tabs .nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--tusz);
  transform: scaleX(0); transition: transform 0.25s;
}
.city-tabs .nav-link.active { color: var(--tusz); }
.city-tabs .nav-link.active::after { transform: scaleX(1); }
.info-card { background: var(--bialy); border: 1px solid var(--linia); padding: 2.2rem; height: 100%; }
.info-card h3 { font-size: 1.5rem; margin-bottom: 1.25rem; }
.info-row { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: 0.85rem 0; border-top: 1px solid var(--linia); }
.info-row:last-child { border-bottom: 1px solid var(--linia); }
.info-row .label { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--popiol); padding-top: 0.3rem; }
.info-row .value { color: var(--wegiel); }
.info-row .value strong { font-weight: 500; }
.price { font-family: "Cormorant Garamond", serif; font-size: 2.2rem; color: var(--tusz); line-height: 1; }
.price small { font-family: "Inter", sans-serif; font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--popiol); display: block; margin-top: 0.4rem; }
.badge-start {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  border: 1px solid var(--tusz); padding: 0.35rem 0.9rem; color: var(--tusz); margin-bottom: 1.25rem;
}
.map-link { font-size: 0.85rem; }

/* ---------- Plan zajęć ---------- */
.schedule { border-top: 1px solid var(--linia); }
.sched-row { display: grid; grid-template-columns: 100px 120px 1fr; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--linia); align-items: baseline; }
.sched-row .day { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--popiol); }
.sched-row .time { font-family: "Cormorant Garamond", serif; font-size: 1.35rem; color: var(--tusz); white-space: nowrap; }
.sched-row .grp { color: var(--wegiel); }
.sched-row .grp .tag { display: inline-block; font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; border: 1px solid var(--tusz); padding: 0.15rem 0.5rem; margin-left: 0.5rem; vertical-align: 2px; }
@media (max-width: 575.98px) { .sched-row { grid-template-columns: 1fr; gap: 0.15rem; } }
.sched-sub { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--popiol); margin: 1.75rem 0 0.5rem; }
.map-embed { position: relative; width: 100%; aspect-ratio: 4 / 3; background: var(--kamien); overflow: hidden; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(0.95); }
.map-embed:hover iframe { filter: grayscale(0.4); }
.directions { font-size: 0.92rem; color: var(--grafit); }

/* ---------- Linia przekazu ---------- */
.lineage { border-top: 1px solid var(--linia); padding-top: 3rem; margin-top: 4rem; }
.lineage-card { background: var(--bialy); border: 1px solid var(--linia); padding: 2rem; height: 100%; }
.lineage-card h3 { font-size: 1.6rem; margin-bottom: 0.25rem; }
.lineage-card .role { font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--popiol); margin-bottom: 1.25rem; }
.lineage-card .emblem { display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.lineage-card .emblem img { max-height: 180px; max-width: 100%; width: auto; height: auto; filter: grayscale(1); }
.lineage-card .emblem img.wide { max-height: none; width: 100%; max-width: 420px; }
@media (max-width: 575.98px) {
  .lineage-card { padding: 1.5rem; }
  .lineage-card .emblem img { max-height: 150px; }
  .lineage-chain { font-size: 1.05rem; gap: 0.4rem 0.8rem; }
}
.lineage-card p { font-size: 0.95rem; color: var(--grafit); }
.lineage-card p:last-child { margin-bottom: 0; }
.lineage-chain { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.75rem 1.25rem; font-family: "Cormorant Garamond", serif; font-size: 1.25rem; color: var(--tusz); margin-bottom: 2.5rem; }
.lineage-chain i { color: var(--mgla); font-size: 0.9rem; }

/* ---------- Galeria ---------- */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; }
.gallery .photo-frame { height: 100%; }
.gallery .photo-frame img { height: 100%; object-fit: cover; }
@media (max-width: 767.98px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery .photo-frame:first-child { grid-column: 1 / -1; } }

/* ---------- Kontakt ---------- */
.contact-item { padding: 1.5rem 0; border-top: 1px solid var(--grafit); }
.contact-item:last-child { border-bottom: 1px solid var(--grafit); }
.contact-item .label { font-size: 0.68rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--mgla); margin-bottom: 0.3rem; }
.contact-item a { color: var(--bialy); font-family: "Cormorant Garamond", serif; font-size: 1.5rem; text-decoration: none; }
.contact-item a:hover { color: var(--mgla); }
.contact-item .contact-sub { font-size: 0.85rem; color: var(--mgla); margin-top: 0.25rem; }
.contact-item .contact-sub a { font-family: "Inter", sans-serif; font-size: 0.85rem; color: var(--kamien); text-decoration: underline; text-underline-offset: 3px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--tusz); }
.social a { color: var(--kamien); margin-right: 1.5rem; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; }
.social a:hover { color: var(--bialy); }
.social i { margin-right: 0.4rem; }

/* ---------- Stopka ---------- */
footer { padding: 2.5rem 0; font-size: 0.78rem; color: var(--popiol); letter-spacing: 0.05em; background: var(--ryz); border-top: 1px solid var(--linia); }
footer a { color: var(--popiol); }

/* ---------- Do góry ---------- */
#toTop {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1030; width: 44px; height: 44px;
  border: 1px solid var(--tusz); background: var(--papier); color: var(--tusz);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#toTop.show { opacity: 1; pointer-events: auto; }
#toTop:hover { background: var(--tusz); color: var(--bialy); }

/* ---------- Pojawianie ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-symbol .yin { animation: none; }
  html { scroll-behavior: auto; }
}
