/*
Theme Name: Fesnak
Theme URI: https://andrzejfesnak.pl
Author: Aderlo Cloud
Description: Motyw blokowy dla bloga dr. Andrzeja Fesnaka. „Plan na kartce": spokojna kolumna tekstu, liczby w kroju kalkulatora, magenta marki jako akcent.
Version: 0.1.0
Requires at least: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: fesnak
*/

/* Układ i drobne komponenty, których theme.json nie wyrazi. Kolory i kroje biorą się z presetów. */
:root{--fx-radius:8px;--fx-line:1px solid var(--wp--preset--color--line)}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
h1,h2,h3,h4{text-wrap:balance}
.fx-mono,.fx-num{font-family:var(--wp--preset--font-family--mono);font-variant-numeric:tabular-nums}
.fx-eyebrow{font-family:var(--wp--preset--font-family--display);font-size:.78rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--wp--preset--color--magenta);margin:0}
:focus-visible{outline:2px solid var(--wp--preset--color--magenta);outline-offset:2px}

/* Nagłówek */
.fx-header{position:sticky;top:0;z-index:50;border-bottom:var(--fx-line)}
.admin-bar .fx-header{top:32px}
.fx-header .fx-bar{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:24px;max-width:1120px;margin-inline:auto}
.fx-header .fx-bar>.wp-block-group{display:flex;flex-wrap:nowrap;align-items:center;gap:24px}
.fx-footer>.wp-block-columns,.fx-footer>p{max-width:1120px;margin-inline:auto;width:100%}
.fx-logo{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--wp--preset--color--ink);font-family:var(--wp--preset--font-family--display);font-weight:800;font-size:1.05rem;letter-spacing:-.02em}
.fx-logo .fx-mark{width:34px;height:34px;border-radius:8px;background:var(--wp--preset--color--magenta);color:#fff;display:grid;place-items:center;font-size:.95rem}
.fx-header .wp-block-navigation{font-size:.95rem;color:var(--wp--preset--color--muted)}
.fx-header .wp-block-navigation a:hover{color:var(--wp--preset--color--petrol)}
.fx-cta .wp-block-button__link{white-space:nowrap}
@media (max-width:781px){.fx-header .fx-cta{display:none}}

/* Strona główna */
.fx-hero{padding-block:clamp(40px,7vw,88px) clamp(32px,5vw,56px)}
.fx-hero h1 em{font-style:normal;color:var(--wp--preset--color--magenta)}
.fx-hero .fx-lead{font-family:var(--wp--preset--font-family--serif);font-size:1.2rem;color:var(--wp--preset--color--muted);max-width:46ch}
.fx-creds{display:flex;flex-wrap:wrap;gap:12px 28px;margin-top:28px}
.fx-creds p{margin:0;font-family:var(--wp--preset--font-family--display);font-size:.85rem;color:var(--wp--preset--color--muted)}
.fx-creds b{display:block;font-family:var(--wp--preset--font-family--mono);font-size:1.25rem;color:var(--wp--preset--color--ink);font-weight:600}
.fx-portrait{position:relative;margin:0}
.fx-portrait img{border-radius:var(--fx-radius);aspect-ratio:4/4.4;object-fit:cover;object-position:62% 20%;width:100%;height:auto;background:var(--wp--preset--color--petrol-soft)}
.fx-portrait figcaption{position:absolute;left:14px;right:14px;bottom:14px;margin:0;background:var(--wp--preset--color--surface);border:var(--fx-line);border-radius:6px;padding:10px 14px;font-family:var(--wp--preset--font-family--display);font-size:.82rem;color:var(--wp--preset--color--muted);text-align:left}
.fx-portrait figcaption strong{display:block;color:var(--wp--preset--color--ink);font-size:.95rem}
.fx-section{padding-block:clamp(36px,5vw,64px)}
.fx-section-head{display:flex;justify-content:space-between;align-items:baseline;gap:16px;flex-wrap:wrap;margin-bottom:22px}
.fx-section-head h2{margin:0}
.fx-paths{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.fx-path{display:grid;gap:8px;align-content:start;border:var(--fx-line);border-radius:var(--fx-radius);padding:20px;background:var(--wp--preset--color--surface);text-decoration:none;color:inherit;transition:border-color .15s}
.fx-path:hover{border-color:var(--wp--preset--color--petrol)}
.fx-path b{font-family:var(--wp--preset--font-family--display);font-size:1.1rem}
.fx-path span{font-size:.95rem;color:var(--wp--preset--color--muted);font-family:var(--wp--preset--font-family--display)}
.fx-path .fx-go{color:var(--wp--preset--color--petrol);font-weight:600;font-size:.9rem}
.fx-pillars{display:flex;flex-wrap:wrap;gap:8px}
.fx-pillars a{font-family:var(--wp--preset--font-family--display);font-size:.88rem;padding:6px 12px;border:var(--fx-line);border-radius:999px;text-decoration:none;color:var(--wp--preset--color--ink);background:var(--wp--preset--color--surface)}
.fx-pillars a:hover,.fx-pillars a[aria-current]{border-color:var(--wp--preset--color--petrol);color:var(--wp--preset--color--petrol)}
@media (max-width:781px){.fx-paths{grid-template-columns:1fr}}

/* Odcinek „600 sekund" */
.fx-episode{border-radius:var(--fx-radius);overflow:hidden}
.fx-episode .wp-block-post-featured-image{margin:0;height:100%}
.fx-episode .wp-block-post-featured-image img{height:100%;object-fit:cover}
.fx-episode .wp-block-post-title a{color:inherit;text-decoration:none}
.fx-badge{display:inline-flex;align-items:center;gap:8px;font-family:var(--wp--preset--font-family--mono);font-size:.8rem;letter-spacing:.06em;padding:4px 10px;border-radius:999px;border:1px solid currentColor;opacity:.9;margin:0}

/* Karty wpisów */
.fx-cards{gap:28px 22px}
.fx-card{display:grid;gap:10px;align-content:start}
.fx-card .wp-block-post-featured-image{margin:0}
.fx-card .wp-block-post-featured-image img{border-radius:6px;aspect-ratio:16/9;object-fit:cover}
.fx-card .wp-block-post-title{margin:0;font-size:1.08rem;line-height:1.3}
.fx-card .wp-block-post-title a{text-decoration:none;color:var(--wp--preset--color--ink)}
.fx-card .wp-block-post-title a:hover{color:var(--wp--preset--color--petrol)}
.fx-card .wp-block-post-terms{font-family:var(--wp--preset--font-family--display);font-size:.78rem;letter-spacing:.08em;text-transform:uppercase}
.fx-card .wp-block-post-terms a{color:var(--wp--preset--color--magenta);text-decoration:none}
.fx-card .wp-block-post-date{font-family:var(--wp--preset--font-family--display);font-size:.82rem;color:var(--wp--preset--color--muted)}

/* Zapis na listę */
.fx-signup{border:1px dashed var(--wp--preset--color--magenta);border-radius:var(--fx-radius)}

/* Artykuł */
.fx-article{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:clamp(28px,4vw,56px);align-items:start;max-width:1120px;margin-inline:auto}
.fx-article-main>*{max-width:680px}
.fx-aside{position:sticky;top:96px;display:grid;gap:18px}
.fx-crumbs{font-family:var(--wp--preset--font-family--display);font-size:.85rem;color:var(--wp--preset--color--muted);margin:0 0 12px}
.fx-crumbs a{color:inherit;text-decoration:none}.fx-crumbs a:hover{color:var(--wp--preset--color--petrol)}
.fx-byline{display:flex;gap:12px;align-items:center;font-family:var(--wp--preset--font-family--display);font-size:.88rem;color:var(--wp--preset--color--muted);padding-bottom:18px;border-bottom:var(--fx-line);margin-bottom:8px}
.fx-byline .fx-av{width:40px;height:40px;border-radius:50%;object-fit:cover;object-position:74% 22%;flex:none;background:var(--wp--preset--color--magenta-soft)}
.fx-byline b{color:var(--wp--preset--color--ink);font-weight:600}
.fx-tldr{background:var(--wp--preset--color--petrol-soft);border-radius:var(--fx-radius);padding:18px 22px;margin:22px 0}
.fx-tldr>p:first-child{font-family:var(--wp--preset--font-family--display);font-size:.78rem;letter-spacing:.1em;text-transform:uppercase;color:var(--wp--preset--color--petrol);font-weight:600;margin:0 0 6px}
.fx-tldr>p:last-child{margin:0}
.wp-block-post-content.fx-prose{font-family:var(--wp--preset--font-family--serif);font-size:1.075rem;line-height:1.7}
.fx-prose h2,.fx-prose h3{font-family:var(--wp--preset--font-family--display);margin-top:1.8em;scroll-margin-top:96px}
.fx-prose a{color:var(--wp--preset--color--petrol);text-underline-offset:3px}
.fx-prose iframe,.fx-prose .wp-block-embed{max-width:100%;border-radius:6px}
.fx-prose iframe[src*="youtube"]{width:100%;height:auto;aspect-ratio:16/9}
.fx-toc{border-left:2px solid var(--wp--preset--color--line);padding-left:14px;display:grid;gap:7px;font-family:var(--wp--preset--font-family--display);font-size:.88rem}
.fx-toc p{margin:0;font-size:.75rem;letter-spacing:.1em;text-transform:uppercase;font-weight:600}
.fx-toc a{color:var(--wp--preset--color--muted);text-decoration:none}.fx-toc a:hover{color:var(--wp--preset--color--magenta)}
.fx-author{border:var(--fx-line);border-radius:var(--fx-radius);padding:18px;display:grid;gap:10px;font-family:var(--wp--preset--font-family--display);font-size:.9rem;background:var(--wp--preset--color--surface)}
.fx-author img{width:56px;height:56px;border-radius:50%;object-fit:cover;object-position:74% 22%}
.fx-author b{font-size:1rem}.fx-author p{margin:0;color:var(--wp--preset--color--muted)}
.fx-author-wide{grid-template-columns:72px minmax(0,1fr);align-items:start;margin-top:36px}
.fx-author-wide img{width:72px;height:72px}
.fx-disclaimer{font-family:var(--wp--preset--font-family--display);font-size:.82rem;color:var(--wp--preset--color--muted);border-top:var(--fx-line);padding-top:14px;margin-top:32px}
.fx-related{margin-top:44px}
.fx-related ul{list-style:none;padding:0;margin:12px 0 0;display:grid;gap:10px}
.fx-related a{font-family:var(--wp--preset--font-family--display);font-weight:600;color:var(--wp--preset--color--ink);text-decoration:none}
.fx-related a:hover{color:var(--wp--preset--color--petrol)}
.fx-related small{display:block;font-weight:400;color:var(--wp--preset--color--muted)}
@media (max-width:960px){.fx-article{grid-template-columns:1fr}.fx-aside{position:static}}

/* Kalkulator w stylu rejestrów HP 10bII+ */
.fx-calc{border-radius:10px;background:#16262C;color:#E8F0EE;padding:18px;display:grid;gap:14px;margin:24px 0;font-family:var(--wp--preset--font-family--display)}
.fx-calc-t{font-weight:700;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.fx-calc-t span{font-family:var(--wp--preset--font-family--mono);font-size:.72rem;opacity:.6;font-weight:400}
.fx-regs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.fx-regs label{display:grid;gap:4px;font-family:var(--wp--preset--font-family--mono);font-size:.72rem;letter-spacing:.05em;color:#9FB8B4}
.fx-regs input{font-family:var(--wp--preset--font-family--mono);font-size:1.05rem;padding:9px 10px;border-radius:5px;border:1px solid #33474E;background:#0E1A1E;color:#E8F0EE;width:100%;font-variant-numeric:tabular-nums}
.fx-lcd{background:#B9C7A8;color:#1C2614;border-radius:6px;padding:12px 14px;font-family:var(--wp--preset--font-family--mono);display:grid;gap:6px;font-variant-numeric:tabular-nums}
.fx-lcd .fx-big{font-size:1.75rem;font-weight:600;text-align:right}
.fx-lcd div{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:.82rem}
.fx-calc small{font-size:.75rem;opacity:.65}
@media (max-width:560px){.fx-regs{grid-template-columns:1fr}}

/* Stopka */
.fx-footer{border-top:var(--fx-line)}
.fx-footer a{color:var(--wp--preset--color--muted);text-decoration:none}.fx-footer a:hover{color:var(--wp--preset--color--petrol)}
.fx-footer h2{font-size:.78rem;letter-spacing:.1em;text-transform:uppercase;color:var(--wp--preset--color--muted)}
.fx-footer ul{list-style:none;padding:0;margin:0;display:grid;gap:6px}

/* Strona „O mnie" */
.fx-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.fx-facts>div{border-top:1px solid var(--wp--preset--color--ink);padding-top:10px}
.fx-facts b{display:block;font-family:var(--wp--preset--font-family--mono);font-size:1.4rem;font-weight:600}
.fx-facts p{margin:4px 0 0;font-family:var(--wp--preset--font-family--display);font-size:.92rem;color:var(--wp--preset--color--muted)}
.fx-timeline{list-style:none;padding:0;margin:0;display:grid;gap:0;border-left:2px solid var(--wp--preset--color--line)}
.fx-timeline li{padding:0 0 18px 18px;position:relative;font-family:var(--wp--preset--font-family--display)}
.fx-timeline li::before{content:"";position:absolute;left:-6px;top:6px;width:10px;height:10px;border-radius:50%;background:var(--wp--preset--color--magenta)}
.fx-timeline time{font-family:var(--wp--preset--font-family--mono);font-size:.85rem;color:var(--wp--preset--color--petrol);display:block}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Globalne style zestawu Elementora (kit) nadpisują kolory linków; przyciski i karta odcinka muszą je wygrać. */
body .wp-block-button__link.wp-element-button,body .wp-block-button__link.wp-element-button:visited{color:var(--wp--preset--color--surface)}
body .is-style-outline .wp-block-button__link.wp-element-button{color:var(--wp--preset--color--petrol);background:transparent;border:1px solid var(--wp--preset--color--petrol)}
body .wp-block-button__link.wp-element-button:hover{color:var(--wp--preset--color--surface);background:var(--wp--preset--color--ink)}
body .fx-episode,body .fx-episode a,body .fx-episode .wp-block-post-title{color:var(--wp--preset--color--surface)}
body .fx-episode a:hover{color:var(--wp--preset--color--magenta-soft)}
body .fx-cards.is-layout-grid,body .fx-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:960px){body .fx-cards.is-layout-grid,body .fx-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){body .fx-cards.is-layout-grid,body .fx-cards{grid-template-columns:1fr}}
.fx-section{padding-block:clamp(28px,4vw,48px)}

/* Formularze z treści (bloki Spectra na stronie kontaktu, formularze zapisu) */
.uagb-forms-submit-message-hide{display:none}
.uagb-forms-main-form{display:grid;gap:16px;max-width:560px}
.uagb-forms-field-set{display:grid;gap:6px}
.uagb-forms-input-label{font-weight:600;font-size:.92rem}
.uagb-forms-input,.wp-block-post-content input[type=text],.wp-block-post-content input[type=email],.wp-block-post-content textarea{width:100%;padding:11px 12px;border:1px solid var(--wp--preset--color--line);border-radius:6px;background:var(--wp--preset--color--surface);color:var(--wp--preset--color--ink);font:inherit}
.uagb-forms-input:focus,.wp-block-post-content input:focus,.wp-block-post-content textarea:focus{outline:2px solid var(--wp--preset--color--petrol);outline-offset:1px;border-color:var(--wp--preset--color--petrol)}
.uagb-forms-main-submit-button{border:0;cursor:pointer}
