/*
Theme Name: Zapytaj mnie o slow jogging
Theme URI: https://slowjogging.net
Author: Michał Pronobis-Proński
Description: Lekki, jednostronicowy motyw blokowy dla marki „Zapytaj mnie o slow jogging”. Fonty systemowe, zero zapytań zewnętrznych, kolorystyka: zieleń butelkowa. Treść strony edytuje się jak zwykłą stronę w edytorze WordPressa.
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.4.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zapytajmnie
*/

/* ============================================================
   Zapytaj mnie o slow jogging — style strony
   Kolorystyka: zieleń butelkowa (brand sheet v1.0)
   ============================================================ */

:root {
	--sj-bg: #FCFCFA;
	--sj-ink: #1F2421;
	--sj-accent: #14524A;
	--sj-accent-dark: #0E3B35;
	--sj-panel: #E8E9E5;
	--sj-tint: #D8E4DD;    /* delikatna zieleń — tło sekcji „Biegaj wolno” */
	--sj-line: #E8E9E5;
	--sj-muted: rgba(31, 36, 33, 0.66);
	--sj-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--sj-content: 43rem;
	--sj-wide: 70rem;
	--sj-pad: clamp(1.25rem, 4vw, 2.5rem);
	--sj-gap: 2rem;        /* jednolity rytm pionowy = odstęp tekst → CTA w hero */
	--sj-section: 1rem;    /* padding sekcji = pół rytmu → sekcja↔sekcja = 2 × 1rem = --sj-gap */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--sj-bg);
	color: var(--sj-ink);
	font-family: var(--sj-font);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a { color: var(--sj-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--sj-accent-dark); }

::selection { background: rgba(20, 82, 74, 0.16); }

h1, h2, h3 { margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 {
	font-size: clamp(2rem, 1.4rem + 2.6vw, 2.75rem);
	font-weight: 700;
	line-height: 1.15;
	max-width: 24ch;
}
h2 {
	font-size: clamp(1.375rem, 1.25rem + 0.75vw, 1.625rem);
	font-weight: 600;
	line-height: 1.25;
}
/* nagłówki sekcji w kolorze akcentu (zieleń butelkowa);
   H1 hero zostaje w kolorze tekstu. Kontakt ma własny biały override niżej. */
.sj-section h2 { color: var(--sj-accent); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

/* ------- układ ------- */
.sj-wrap {
	max-width: var(--sj-wide);
	margin-inline: auto;
	padding-inline: var(--sj-pad);
}

.sj-section { padding-block: var(--sj-section); }

.sj-prose { max-width: var(--sj-content); }
.sj-prose h1, .sj-prose h2 { max-width: none; }

/* etykieta nad nagłówkiem */
p.sj-kicker {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--sj-accent);
	margin-bottom: 1.1rem;
}

/* lead w hero */
p.sj-lead {
	font-size: 1.0625rem;
	max-width: 38rem;
	margin-block: 1.4rem 2rem;
}

/* wiersz z przyciskiem */
.sj-cta-row { margin-top: 1.8rem; }

/* adres e-mail pod przyciskiem */
p.sj-mail-hint { font-size: 0.875rem; color: var(--sj-muted); margin-top: 0.9rem; }
p.sj-mail-hint a { color: inherit; }

/* ------- przyciski (blok core/button + link .sj-btn) ------- */
.sj-btn,
.wp-block-button__link {
	display: inline-block;
	background: var(--sj-accent);
	color: #fff;
	font-family: var(--sj-font);
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1;
	padding: 1.05rem 1.9rem;
	text-decoration: none;
	border: 1px solid var(--sj-accent);
	border-radius: 0;
	transition: background-color 0.18s ease, border-color 0.18s ease;
}
.sj-btn:hover,
.wp-block-button__link:hover {
	background: var(--sj-accent-dark);
	border-color: var(--sj-accent-dark);
	color: #fff;
}
.sj-btn:focus-visible,
.wp-block-button__link:focus-visible { outline: 2px solid var(--sj-ink); outline-offset: 3px; }

/* przycisk odwrócony (na zielonym tle) */
.sj-btn--invert .wp-block-button__link,
a.sj-btn--invert {
	background: var(--sj-bg);
	color: var(--sj-accent);
	border-color: var(--sj-bg);
}
.sj-btn--invert .wp-block-button__link:hover,
a.sj-btn--invert:hover { background: #fff; border-color: #fff; color: var(--sj-accent-dark); }

/* ------- separator: rytm kroków (lewa-prawa) ------- */
hr.sj-dots {
	border: 0;
	margin: 0 auto;
	width: 5.5rem;
	height: 0.875rem;
	max-width: none;
	background-color: transparent;
	background-image:
		radial-gradient(circle 3px at 4px 11px,  var(--sj-accent) 97%, transparent),
		radial-gradient(circle 3px at 24px 4px,  var(--sj-accent) 97%, transparent),
		radial-gradient(circle 3px at 44px 11px, var(--sj-accent) 97%, transparent),
		radial-gradient(circle 3px at 64px 4px,  var(--sj-accent) 97%, transparent);
	background-repeat: no-repeat;
}
hr.sj-dots.sj-dots-lead { margin: 0 auto var(--sj-section); }

/* ------- zdjęcia -------
   Zdjęcia są dostarczane po finalnej obróbce kolorystycznej (folder
   „zdjęcia właściwe”) — celowo bez dodatkowego filtra CSS. */
.wp-block-image { margin: 0; }
.wp-block-image img { display: block; }
/* rdzeń WP dokłada .wp-block-columns margin-bottom ~1.75em — zerujemy,
   bo o odstępach między sekcjami decyduje wyłącznie padding sekcji */
.wp-block-columns { margin-block: 0; }

/* ------- nagłówek strony ------- */
.sj-header { border-bottom: 1px solid var(--sj-line); background: var(--sj-bg); }

.sj-header-bar {
	max-width: var(--sj-wide);
	margin-inline: auto;
	padding: 0.9rem var(--sj-pad);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.sj-brand {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	text-decoration: none;
	color: var(--sj-ink);
}
.sj-brand svg { height: 34px; width: auto; flex: none; }
/* kolory znaku przez zmienne — sygnet sam dostosowuje się do kolorystyki strony */
.sj-brand svg rect { fill: var(--sj-accent); }
.sj-brand svg circle { fill: var(--sj-bg); }

.sj-brand-name {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	line-height: 1.35;
	color: var(--sj-accent);
}
.sj-brand-name span { display: block; font-weight: 400; color: var(--sj-ink); }

.sj-header .sj-btn { padding: 0.75rem 1.3rem; font-size: 0.9375rem; }

/* ikony social w nagłówku (same glify; obszar klikalny 44×44 wg brand sheet) */
.sj-header-actions { display: flex; align-items: center; gap: 0.1rem; }
.sj-header-actions .sj-btn { margin-left: 0.65rem; }

/* przełącznik języka (PL <-> EN) — dyskretny, w rytmie ikon social */
.sj-lang {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 0.2rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--sj-muted);
	transition: color 0.15s ease;
}
.sj-lang:hover { color: var(--sj-accent); }
.sj-lang:focus-visible { outline: 2px solid var(--sj-accent); outline-offset: 2px; }
.sj-header-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	transition: opacity 0.15s ease;
}
.sj-header-social img,
.sj-header-social svg { width: 22px; height: 22px; display: block; }
.sj-header-social:hover { opacity: 0.7; }
.sj-header-social:focus-visible { outline: 2px solid var(--sj-accent); outline-offset: 2px; }

@media (max-width: 600px) {
	.sj-header .sj-btn { display: none; }
	.sj-header-actions .sj-btn { margin-left: 0; }
}

/* animacja sygnetu: kropki lądują w rytmie 180 kroków/min (cykl 5 s)
   Uwaga: kropki to koła w kolorze tła nagłówka — .sj-header musi mieć
   zawsze tło --sj-bg, żeby iluzja „dziury” w znaku się nie rozpadła. */
.sj-mark-dot {
	transform-box: fill-box;
	transform-origin: center;
	animation: sj-step 5s infinite;
}
circle.sj-mark-dot:nth-of-type(2) { animation-name: sj-step2; }
circle.sj-mark-dot:nth-of-type(3) { animation-name: sj-step3; }
circle.sj-mark-dot:nth-of-type(4) { animation-name: sj-step4; }

/* lądowanie 0.3 s z wygaszeniem easeOutCubic (wejścia co 1/3 s od 1.2 s) */
@keyframes sj-step {
	0%, 24%   { opacity: 0; transform: translateY(-9px) scale(1.3); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
	30%, 71%  { opacity: 1; transform: translateY(0) scale(1); }
	74%, 100% { opacity: 0; transform: translateY(0) scale(0.6); }
}
@keyframes sj-step2 {
	0%, 30.67%    { opacity: 0; transform: translateY(-9px) scale(1.3); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
	36.67%, 73.2% { opacity: 1; transform: translateY(0) scale(1); }
	76.2%, 100%   { opacity: 0; transform: translateY(0) scale(0.6); }
}
@keyframes sj-step3 {
	0%, 37.33%    { opacity: 0; transform: translateY(-9px) scale(1.3); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
	43.33%, 75.4% { opacity: 1; transform: translateY(0) scale(1); }
	78.4%, 100%   { opacity: 0; transform: translateY(0) scale(0.6); }
}
@keyframes sj-step4 {
	0%, 44%     { opacity: 0; transform: translateY(-9px) scale(1.3); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
	50%, 77.6%  { opacity: 1; transform: translateY(0) scale(1); }
	80.6%, 100% { opacity: 0; transform: translateY(0) scale(0.6); }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.sj-mark-dot { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ------- hero ------- */
.sj-hero { padding-block: clamp(1.75rem, 3.5vw, 3rem) 0; }
.sj-hero .wp-block-image { margin: clamp(2.5rem, 6vw, 4rem) 0 0; }

/* sekcja bez górnego odstępu (po separatorze/pasie zdjęcia) */
.sj-section-tight { padding-top: 0; }

/* ------- kolumny (core/columns) ------- */
.sj-wrap > .wp-block-columns { gap: clamp(2rem, 5vw, 4.5rem); }

/* „Moja historia”: stały kadr 4:5, „dozoomowany” przez object-fit: cover —
   rozmiar niezależny od długości tekstu, wyrównany do góry kolumny. */
#historia .sj-photo img {
	width: 100%;
	aspect-ratio: 4 / 5;
	height: auto;
	object-fit: cover;
	object-position: 50% 32%;
}

/* ------- pas zdjęcia na całą szerokość ------- */
.sj-band { margin: var(--sj-section) 0; } /* 1rem góra/dół → 2rem do sąsiedniej sekcji */
.sj-band img {
	width: 100%;
	height: clamp(180px, 30vw, 320px);
	object-fit: cover;
}
/* pas hero — pełna szerokość; odstęp CTA → zdjęcie równy rytmowi (--sj-gap).
   Delikatny „dozoom”: na szerokim ekranie pełny kadr (49.44vw = proporcje zdjęcia),
   w miarę zwężania łagodnie przycina — przy najwęższym ok. 20% wysokości
   (15% u góry, 5% u dołu; object-position 75% ustawia ten podział). */
.sj-band--hero { margin-top: var(--sj-gap); }
.sj-band--hero img {
	height: min(calc(53.5vw - 52px), 49.44vw);
	object-position: 50% 75%;
}

/* ------- panel „Dla kogo” / karta info ------- */
.sj-tint { background: var(--sj-tint); }

.sj-card {
	background: var(--sj-bg);
	border-left: 2px solid var(--sj-accent);
	padding: 1.4rem 1.6rem;
	margin-top: 1.8rem;
	max-width: var(--sj-content);
}
.sj-card p { margin: 0; }
.sj-card strong { display: block; margin-bottom: 0.35rem; }

/* pull-quote: zdanie-serce marki — traktowanie cytatowe WYŁĄCZNIE w sekcji „Moja historia” */
h2.sj-pullquote {
	font-size: clamp(1.375rem, 1.25rem + 0.75vw, 1.625rem); /* jak pozostałe nagłówki */
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--sj-accent);
	max-width: 22ch;
	text-indent: -0.45ch; /* wiszący cudzysłów */
	margin-bottom: 0.9em;
}

/* linki do profili social (glify z pakietu identyfikacji) */
.sj-social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 2rem;
	margin-top: 1.6rem;
}
.sj-social a {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 44px; /* obszar klikalny wg brand sheet */
	font-weight: 600;
	color: var(--sj-accent);
	text-decoration: none;
	transition: opacity 0.15s ease;
}
.sj-social a:hover { opacity: 0.7; color: var(--sj-accent); }
.sj-social a:focus-visible { outline: 2px solid var(--sj-accent); outline-offset: 3px; }
.sj-social img,
.sj-social svg { width: 24px; height: 24px; display: block; flex: none; }

/* wyróżniony akapit-zastrzeżenie */
p.sj-aside {
	border-left: 2px solid var(--sj-accent);
	padding: 0.35rem 0 0.35rem 1.4rem;
	margin-top: 1.6rem;
}

/* ------- pas kontaktu ------- */
/* kolorowy blok CTA: odstęp przed nim równy rytmowi (grupa 1rem + margin 1rem = --sj-gap),
   ale wnętrze zielonego bloku zostaje przestronne */
.sj-contact {
	background: var(--sj-accent);
	color: #fff;
	margin-top: var(--sj-section);
	padding-block: clamp(2.75rem, 6vw, 4rem);
}
.sj-contact h2 { color: #fff; }
.sj-contact p { color: #fff; }
.sj-contact a { color: #fff; }
.sj-contact p.sj-mail-hint { color: rgba(255, 255, 255, 0.85); }
figure.sj-contact-mark { margin: 0; }
.sj-contact .sj-contact-mark svg { height: 40px; width: auto; margin-bottom: 1.4rem; display: block; }
/* sygnet na zielonym tle: dymek biały, kropki w kolorze tła (akcent) = „dziury”;
   klasa sj-mark-dot uruchamia tę samą animację co w nagłówku */
.sj-contact-mark svg rect { fill: var(--sj-bg); }
.sj-contact-mark svg circle { fill: var(--sj-accent); }
.sj-contact-text { max-width: 38rem; }

/* wskaźnik focusa widoczny na zielonym tle (WCAG 2.2, non-text 3:1) */
.sj-contact .wp-block-button__link:focus-visible,
.sj-contact a:focus-visible,
.sj-contact .sj-btn:focus-visible { outline-color: #fff; }

/* ------- stopka ------- */
.sj-footer { padding-block: 2.2rem; }
.sj-footer-bar {
	max-width: var(--sj-wide);
	margin-inline: auto;
	padding-inline: var(--sj-pad);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.8rem;
	font-size: 0.875rem;
	color: var(--sj-muted);
}
.sj-footer-bar p { margin: 0; }
.sj-footer-bar a { color: inherit; }
.sj-footer-bar hr.sj-dots { margin: 0; }

/* ------- podstrony (np. Polityka prywatności) ------- */
.sj-page { padding-block: clamp(2.5rem, 6vw, 4rem); }
.sj-page .sj-wrap { max-width: calc(var(--sj-content) + 2 * var(--sj-pad)); }
.sj-page h1 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.375rem); margin-bottom: 1.2em; }
.sj-page h2 { font-size: 1.25rem; margin-top: 1.6em; }

/* ------- dostępność / drobiazgi ------- */
:target { scroll-margin-top: 5rem; }

.screen-reader-text {
	position: absolute !important;
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	overflow: hidden;
	white-space: nowrap;
}

/* skip-link generowany przez WordPressa */
.skip-link.screen-reader-text:focus {
	clip-path: none;
	width: auto;
	height: auto;
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 100;
	background: var(--sj-bg);
	color: var(--sj-accent);
	padding: 0.7rem 1rem;
	outline: 2px solid var(--sj-accent);
}
