/*
Theme Name:   GeneratePress Child – SYSTEMO
Theme URI:    https://systemo.com.pl
Description:  Modułowy motyw potomny GeneratePress dla systemo.com.pl. Sekcje landing page'a ładowane przez shortcode [sekcja_slug], style i skrypty wczytywane warunkowo (tylko gdy sekcja występuje na stronie).
Author:       SYSTEMO
Author URI:   https://systemo.eu
Template:     generatepress
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  systemo
Tags:         full-width-template, custom-colors, block-styles
*/

/* ==========================================================================
   1. ZMIENNE GLOBALNE
   ========================================================================== */
:root {
  --color-primary: #F26722;
  --color-primary-dark: #D85510;
  --color-dark: #1A2530;
  --color-text: #4A5560;
  --color-bg-light: #F8F9FA;
  --color-bg-cream: #FBF6EE;
  --color-white: #FFFFFF;
  --color-footer: #0F1620;
  --color-border: #E5E7EB;

  --font-main: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-hand: 'Caveat', 'Comic Sans MS', cursive;

  --container: 1280px;
  --section-py: clamp(60px, 8vw, 100px);
  --header-h: 88px;
  --radius: 8px;
  --shadow-soft: 0 10px 30px rgba(26, 37, 48, .08);
  --shadow-hover: 0 22px 45px rgba(26, 37, 48, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ==========================================================================
   2. FIX FULL WIDTH – NEUTRALIZACJA KONTENERÓW GENERATEPRESS
   Cel: strona "edge-to-edge", zero białych marginesów wokół sekcji.
   ========================================================================== */
.systemo-landing #page,
.systemo-landing .site-content,
.systemo-landing .content-area,
.systemo-landing #primary,
.systemo-landing .site-main,
.systemo-landing .entry-content,
.systemo-landing .inside-article,
.systemo-landing .page-content {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.systemo-landing .site-content {
  display: block !important;
}

.systemo-landing .entry-header,
.systemo-landing .entry-meta,
.systemo-landing .page-header-image,
.systemo-landing .featured-image,
.systemo-landing #right-sidebar,
.systemo-landing #left-sidebar,
.systemo-landing .generate-back-to-top,
.systemo-landing .entry-content > .wp-block-spacer:first-child {
  display: none !important;
}

/* Kasujemy domyślne odstępy akapitów WP wokół shortcode'ów */
.systemo-landing .entry-content > p:empty,
.systemo-landing .entry-content > br {
  display: none !important;
}

.systemo-landing .entry-content > * {
  margin-block: 0 !important;
}

/* Blokada poziomego przewijania przy dekoracjach wychodzących poza ekran */
.systemo-landing,
.systemo-landing body {
  overflow-x: clip;
}

/* ==========================================================================
   3. RESET I TYPOGRAFIA BAZOWA
   ========================================================================== */
.systemo-landing body,
.systemo-section {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.systemo-section *,
.systemo-section *::before,
.systemo-section *::after { box-sizing: border-box; }

.systemo-section img { display: block; max-width: 100%; height: auto; }

/* Linki: bez podkreśleń (domyślny styl przeglądarki w headerze/stopce) */
.systemo-header a,
.systemo-footer a,
.systemo-section a { text-decoration: none; }

.systemo-section a { color: inherit; }

/* --------------------------------------------------------------------------
   FIX SPECYFIKACJI – wyższy priorytet niż reguły ogólne wyżej w tym pliku
   (inaczej .systemo-section h2 (0,1,1) wygrywa z .systemo-cta__title (0,1,0)
   i nagłówki sekcji wychodzą ciemne zamiast białych).
   -------------------------------------------------------------------------- */
.systemo-section .systemo-cta__title,
.systemo-section .systemo-zaplecze__title { color: #fff; }

/* Kolor przycisków wymuszony nad .systemo-section a { color: inherit } */
.systemo-section .systemo-btn--primary,
.systemo-footer .systemo-btn--primary { color: #fff; }
.systemo-section .systemo-btn--outline { color: var(--color-dark); }
.systemo-section .systemo-btn--outline-light,
.systemo-footer .systemo-btn--outline-light { color: #fff; }

/* Kolor linków w stopce (dziedziczenie po ciemnym tle) */
.systemo-footer__links a { color: rgba(255, 255, 255, .72); }
.systemo-footer__links a:hover { color: #fff; }

/* Linki i wartości kontaktowe w sekcjach – nad .systemo-section a { color: inherit } */
.systemo-section .systemo-link-arrow { color: var(--color-primary); }
.systemo-section .systemo-link-arrow:hover { color: var(--color-primary-dark); }
.systemo-section .systemo-kontakt__value { color: var(--color-dark); }
.systemo-section .systemo-kontakt__value:hover { color: var(--color-primary); }
.systemo-section ul { margin: 0; padding: 0; list-style: none; }
.systemo-section h1,
.systemo-section h2,
.systemo-section h3,
.systemo-section h4,
.systemo-section p,
.systemo-section figure { margin: 0; }

.systemo-section h1,
.systemo-section h2,
.systemo-section h3,
.systemo-section h4 {
  color: var(--color-dark);
  font-weight: 800;
  line-height: 1.15;
}

.systemo-section :focus-visible,
.systemo-header :focus-visible,
.systemo-footer :focus-visible {
  outline: 3px solid rgba(242, 103, 34, .55);
  outline-offset: 3px;
}

/* ==========================================================================
   4. KOMPONENTY WSPÓŁDZIELONE
   ========================================================================== */
.systemo-container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.systemo-section { padding: var(--section-py) 0; position: relative; }

.systemo-pretitle {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 18px;
  line-height: 1.5;
}

.systemo-title {
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -.01em;
}

.systemo-text-accent { color: var(--color-primary); }

.systemo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 17px 36px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .3s var(--ease),
              box-shadow .3s var(--ease);
}
.systemo-btn:hover { transform: translateY(-2px); }

.systemo-btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 10px 24px rgba(242, 103, 34, .28);
}
.systemo-btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
  box-shadow: 0 14px 30px rgba(216, 85, 16, .38);
}

.systemo-btn--outline {
  background: transparent;
  color: var(--color-dark);
  border-color: var(--color-dark);
}
.systemo-btn--outline:hover { background: var(--color-dark); color: #fff; }

.systemo-btn--outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .85);
}
.systemo-btn--outline-light:hover { background: #fff; color: var(--color-footer); }

.systemo-icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.systemo-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
  transition: color .3s ease, border-color .3s ease, gap .3s ease;
}
.systemo-link-arrow:hover {
  color: var(--color-primary-dark);
  border-bottom-color: var(--color-primary-dark);
  gap: 16px;
}

/* Wyłączenie podkreślenia/podkreśleń w każdym stanie */
a.systemo-link-arrow,
a.systemo-link-arrow:hover,
a.systemo-link-arrow:focus { text-decoration: none; }

.systemo-skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 1000;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: 700;
  transition: top .2s;
}
.systemo-skip-link:focus { top: 12px; }

.systemo-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Animacja fade-in on scroll */
.js .systemo-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .85s ease, transform .85s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .systemo-reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   5. HEADER (custom, zastępuje header GeneratePress)
   ========================================================================== */
.systemo-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, border-color .3s ease;
}
.systemo-header.scrolled {
  --header-h: 76px;
  box-shadow: 0 8px 28px rgba(26, 37, 48, .08);
  border-bottom-color: var(--color-border);
}
.admin-bar .systemo-header { top: 32px; }

.systemo-header-inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  transition: height .3s ease;
}

.systemo-logo {
  display: flex;
  flex-direction: column;
  gap: 7px;
  line-height: 1;
  flex-shrink: 0;
}
.systemo-logo__mark {
  align-self: flex-start;
  background: var(--color-primary);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 8px 14px 7px;
  border-radius: 3px;
}
.systemo-logo__tag {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--color-text);
  white-space: nowrap;
}

.systemo-nav { margin-left: auto; margin-right: 36px; }
.systemo-nav ul { display: flex; align-items: center; gap: 30px; margin: 0; padding: 0; list-style: none; }

.systemo-nav__link {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-dark);
  transition: color .25s ease;
}
.systemo-nav__link::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s var(--ease);
}
.systemo-nav__link:hover,
.systemo-nav__link.active { color: var(--color-primary); }
.systemo-nav__link:hover::after,
.systemo-nav__link.active::after { transform: scaleX(1); }

.systemo-nav__cta {
  display: inline-block;
  padding: 11px 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-dark);
  border: 2px solid var(--color-primary);
  border-radius: 6px;
  line-height: 1.2;
  transition: background-color .3s ease, color .3s ease;
}
.systemo-nav__cta:hover,
.systemo-nav__cta.active { background: var(--color-primary); color: #fff; }

.systemo-header-phone { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.systemo-header-phone__icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(242, 103, 34, .12);
  color: var(--color-primary);
  font-size: 20px;
  transition: background-color .3s ease, color .3s ease, transform .3s ease;
}
.systemo-header-phone:hover .systemo-header-phone__icon {
  background: var(--color-primary); color: #fff; transform: rotate(-12deg);
}
.systemo-header-phone__text { display: flex; flex-direction: column; line-height: 1.25; }
.systemo-header-phone__text small { font-size: 11px; font-weight: 600; color: var(--color-text); }
.systemo-header-phone__text strong { font-size: 16px; font-weight: 800; color: var(--color-dark); white-space: nowrap; }

.systemo-nav-toggle {
  display: none;
  position: relative;
  width: 46px; height: 46px;
  margin-left: 10px;
  padding: 0;
  background: transparent;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .3s ease;
}
.systemo-nav-toggle:hover { border-color: var(--color-primary); }
.systemo-nav-toggle span {
  position: absolute;
  left: 11px;
  width: 20px; height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform .35s var(--ease), opacity .2s ease, top .35s var(--ease);
}
.systemo-nav-toggle span:nth-child(1) { top: 13px; }
.systemo-nav-toggle span:nth-child(2) { top: 20px; }
.systemo-nav-toggle span:nth-child(3) { top: 27px; }
.systemo-nav-toggle.is-open span:nth-child(1) { top: 20px; transform: rotate(45deg); background: var(--color-primary); }
.systemo-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.systemo-nav-toggle.is-open span:nth-child(3) { top: 20px; transform: rotate(-45deg); background: var(--color-primary); }

body.systemo-menu-open { overflow: hidden; }

/* ==========================================================================
   6. FOOTER (custom, zastępuje footer GeneratePress)
   ========================================================================== */
.systemo-footer {
  position: relative;
  overflow: hidden;
  background: var(--color-footer);
  color: rgba(255, 255, 255, .72);
  isolation: isolate;
}
.systemo-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--footer-bg, none) center / cover no-repeat;
  opacity: .1;
}
.systemo-footer__main { padding: 90px 0 70px; }
.systemo-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 64px; }

.systemo-footer__logo { display: inline-flex; flex-direction: column; gap: 8px; margin-bottom: 24px; line-height: 1; }
.systemo-footer__logo-mark {
  align-self: flex-start;
  padding: 8px 14px 7px;
  border: 2px solid #fff;
  border-radius: 3px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .08em;
}
.systemo-footer__logo-tag {
  font-size: 8.5px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: rgba(255, 255, 255, .6);
}
.systemo-footer__about { margin-bottom: 30px; max-width: 400px; font-size: 15px; }

.systemo-footer__title {
  position: relative;
  margin-bottom: 32px;
  padding-bottom: 16px;
  font-size: 17px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}
.systemo-footer__title::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 46px; height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
}

.systemo-footer__links { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.systemo-footer__links a {
  display: inline-flex; align-items: center; gap: 0;
  padding: 5px 0; font-size: 15px;
  transition: color .25s ease, gap .3s var(--ease);
}
.systemo-footer__links a::before {
  content: "\203A";
  width: 0; overflow: hidden;
  color: var(--color-primary);
  font-weight: 800;
  transition: width .3s var(--ease);
}
.systemo-footer__links a:hover { color: #fff; gap: 8px; }
.systemo-footer__links a:hover::before { width: 10px; }

.systemo-footer__eu p { margin-bottom: 30px; font-size: 15px; }
.systemo-footer__eu-lead { font-size: 20px !important; font-weight: 700; line-height: 1.4; color: #fff; }

.systemo-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 26px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, .55);
}

/* ==========================================================================
   7. RESPONSYWNOŚĆ GLOBALNA
   ========================================================================== */
@media (max-width: 1200px) {
  .systemo-nav { margin-right: 24px; }
  .systemo-nav ul { gap: 20px; }
  .systemo-nav__link { font-size: 14px; }
  .systemo-nav__cta { padding: 10px 18px; font-size: 12px; }
  .systemo-logo__tag, .systemo-footer__logo-tag { font-size: 8px; letter-spacing: .09em; }
  .systemo-header-phone__text small { display: none; }
  .systemo-header-phone__text strong { font-size: 15px; }
  .systemo-footer__grid { gap: 44px; }
}

@media (max-width: 992px) {
  :root { --header-h: 72px; }
  .systemo-header.scrolled { --header-h: 68px; }
  .admin-bar .systemo-header { top: 46px; }

  .systemo-nav-toggle { display: block; }
  .systemo-header-phone { margin-left: auto; }
  .systemo-header-phone__text { display: none; }

  .systemo-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    margin: 0;
    padding: 8px 24px 28px;
    background: #fff;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 24px 40px rgba(26, 37, 48, .14);
    max-height: calc(100svh - var(--header-h));
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .3s ease, transform .35s var(--ease), visibility .3s;
  }
  .systemo-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .systemo-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .systemo-nav li { border-bottom: 1px solid var(--color-border); }
  .systemo-nav li:last-child { border-bottom: 0; padding-top: 22px; }
  .systemo-nav__link { display: block; padding: 16px 0; font-size: 16px; }
  .systemo-nav__link::after { display: none; }
  .systemo-nav__link.active { padding-left: 14px; box-shadow: inset 3px 0 0 var(--color-primary); }
  .systemo-nav__cta { display: block; text-align: center; padding: 15px 20px; font-size: 13px; }

  .systemo-footer__grid { grid-template-columns: 1fr 1fr; gap: 56px 44px; }
  .systemo-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .systemo-section, .systemo-header, .systemo-footer { font-size: 15.5px; }
  .systemo-pretitle { font-size: 12px; letter-spacing: .14em; }
  .systemo-footer__main { padding: 60px 0 44px; }
  .systemo-footer__grid { grid-template-columns: 1fr; gap: 44px; }
  .systemo-footer__brand { grid-column: auto; }
}

@media (max-width: 480px) {
  .systemo-container { padding: 0 18px; }
  .systemo-logo__mark, .systemo-footer__logo-mark { font-size: 20px; padding: 7px 12px 6px; }
  .systemo-logo__tag { font-size: 6.6px; letter-spacing: .05em; }
  .systemo-header-phone__icon { width: 42px; height: 42px; }
  .systemo-nav-toggle { width: 44px; height: 44px; margin-left: 8px; }
  .systemo-nav-toggle span { left: 10px; }
  .systemo-nav-toggle span:nth-child(1) { top: 12px; }
  .systemo-nav-toggle span:nth-child(2) { top: 19px; }
  .systemo-nav-toggle span:nth-child(3) { top: 26px; }
  .systemo-nav-toggle.is-open span:nth-child(1),
  .systemo-nav-toggle.is-open span:nth-child(3) { top: 19px; }
  .systemo-nav { padding: 6px 18px 24px; }
  .systemo-footer__brand .systemo-btn,
  .systemo-footer__eu .systemo-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .systemo-section *, .systemo-header *, .systemo-footer * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .js .systemo-reveal { opacity: 1; transform: none; }
}
