/*
Theme Name: Kuchniapolowa
Theme URI: https://kuchniapolowa.smmtesting.pl
Author: Stowarzyszenie 4 Toruński Batalion Zaopatrzenia
Author URI: https://www.facebook.com/kuchniapolowa.fp
Description: Motyw WordPress dla Stowarzyszenia 4 Toruński Batalion Zaopatrzenia – historia wojskowej kuchni polowej, festiwal, edukacja i remonty sprzętu.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kuchniapolowa
Tags: elementor, custom-menu, custom-logo, featured-images, full-width-template, threaded-comments
*/

/* ============================================================
   CSS VARIABLES – PALETA MILITARNA
   ============================================================ */
:root {
  --color-primary:     #4A5320;   /* Oliwkowy / Olive Drab */
  --color-primary-dark:#323A14;
  --color-secondary:   #9C8A5A;   /* Khaki */
  --color-accent:      #C9A84C;   /* Złoto / Bronze */
  --color-dark:        #1C1A17;   /* Czarny mundurowy */
  --color-light:       #F0EAD2;   /* Pergamin */
  --color-white:       #FFFFFF;
  --color-text:        #2C2416;
  --color-muted:       #6B6352;
  --color-border:      #D4C9A8;

  --font-heading: 'Playfair Display', 'Georgia', serif;
  --font-body:    'Open Sans', 'Helvetica Neue', sans-serif;
  --font-military:'Oswald', 'Impact', sans-serif;

  --transition: 0.3s ease;
  --radius: 4px;
  --shadow: 0 4px 20px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.25);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-white);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
  color: var(--color-dark);
  margin-top: 0;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h4 { font-size: 1.25rem; }

.military-label {
  font-family: var(--font-military);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--color-accent);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-light);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--color-light);
}

.section--olive {
  background-color: var(--color-primary);
  color: var(--color-light);
}

.section--parchment {
  background-color: var(--color-light);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-dark);
  border-bottom: 3px solid var(--color-accent);
  box-shadow: var(--shadow);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo img {
  max-height: 52px;
  width: auto;
}

.site-logo__text {
  font-family: var(--font-military);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--color-light);
  text-transform: uppercase;
}

.site-logo__text span {
  display: block;
  font-size: 0.75rem;
  color: var(--color-accent);
  letter-spacing: 0.2em;
}

/* Navigation */
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 32px;
}

.main-navigation a {
  font-family: var(--font-military);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-light);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--color-accent);
  color: var(--color-light);
  padding: 6px 12px;
  cursor: pointer;
  font-family: var(--font-military);
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  text-transform: uppercase;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  background-color: var(--color-dark);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(74,83,32,0.85) 0%, rgba(28,26,23,0.75) 60%);
  z-index: 1;
}

.hero__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 24px;
  margin: 0 auto;
  text-align: center;
}

.hero__badge {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-dark);
  font-family: var(--font-military);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 20px;
  margin-bottom: 24px;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--color-white);
  font-family: var(--font-heading);
  margin-bottom: 24px;
  text-shadow: 2px 2px 12px rgba(0,0,0,0.5);
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--color-light);
  margin-bottom: 40px;
  line-height: 1.8;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: var(--font-military);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-dark);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: transparent;
  color: var(--color-accent);
}

.btn--outline {
  background: transparent;
  color: var(--color-light);
  border-color: var(--color-light);
}

.btn--outline:hover {
  background: var(--color-light);
  color: var(--color-dark);
}

.btn--olive {
  background: var(--color-primary);
  color: var(--color-light);
  border-color: var(--color-primary);
}

.btn--olive:hover {
  background: transparent;
  color: var(--color-primary);
}

/* ============================================================
   MISSION / VALUES CARDS
   ============================================================ */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.value-card {
  text-align: center;
  padding: 40px 24px;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  transition: all var(--transition);
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--color-accent);
}

.value-card__icon {
  width: 64px;
  height: 64px;
  background: var(--color-primary);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
}

.value-card__title {
  font-family: var(--font-military);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 12px;
}

/* ============================================================
   ACTIVITIES SECTION
   ============================================================ */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
}

.activity-item {
  padding: 48px 40px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background var(--transition);
}

.activity-item:hover {
  background: rgba(201,168,76,0.1);
}

.activity-item__number {
  font-family: var(--font-military);
  font-size: 3rem;
  color: var(--color-accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 8px;
}

.activity-item__title {
  font-family: var(--font-military);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 1.1rem;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.activity-item__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.activity-item__list li {
  padding: 6px 0 6px 20px;
  position: relative;
  color: var(--color-light);
  font-size: 0.95rem;
}

.activity-item__list li::before {
  content: '▪';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* ============================================================
   FESTIVAL SECTION
   ============================================================ */
.festival-stats {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  margin: 48px 0;
}

.stat-item {
  text-align: center;
  flex: 1;
  min-width: 140px;
}

.stat-item__number {
  display: block;
  font-family: var(--font-military);
  font-size: 3.5rem;
  color: var(--color-accent);
  line-height: 1;
}

.stat-item__label {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 8px;
}

/* ============================================================
   PRODUCTS / KONSERWY SECTION
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

.product-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all var(--transition);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.product-card__image {
  height: 240px;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__body {
  padding: 28px;
}

.product-card__tag {
  font-family: var(--font-military);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.product-card__title {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.product-card__desc {
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================================
   RECIPE CALLOUT
   ============================================================ */
.recipe-box {
  background: var(--color-dark);
  border-left: 5px solid var(--color-accent);
  padding: 40px 48px;
  margin: 48px 0;
}

.recipe-box h3 {
  color: var(--color-accent);
  font-family: var(--font-military);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.recipe-box p,
.recipe-box li {
  color: var(--color-light);
}

.recipe-box ul {
  list-style: none;
  padding: 0;
}

.recipe-box ul li {
  padding: 4px 0 4px 20px;
  position: relative;
}

.recipe-box ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-dark);
  border-top: 3px solid var(--color-accent);
  color: var(--color-light);
  padding: 60px 0 30px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-brand__name {
  font-family: var(--font-military);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.footer-brand__mission {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.7;
}

.footer-heading {
  font-family: var(--font-military);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li + li {
  margin-top: 10px;
}

.footer-nav a {
  color: var(--color-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--color-accent);
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.footer-social a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-family: var(--font-military);
  letter-spacing: 0.05em;
}

.footer-social a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  text-align: center;
  padding: 24px;
  margin-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: var(--color-muted);
  font-size: 0.85rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   BREADCRUMBS & PAGE HEADER
   ============================================================ */
.page-header {
  background: var(--color-primary);
  padding: 60px 24px;
  text-align: center;
}

.page-header__title {
  color: var(--color-white);
  margin-bottom: 8px;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-family: var(--font-military);
  letter-spacing: 0.05em;
}

.breadcrumbs a {
  color: var(--color-light);
}

/* ============================================================
   DIVIDERS & DECORATIVE
   ============================================================ */
.divider {
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 20px auto;
}

.divider--left {
  margin-left: 0;
}

.section-label {
  font-family: var(--font-military);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.text-accent { color: var(--color-accent); }
.text-primary { color: var(--color-primary); }
.text-light { color: var(--color-light); }
.text-center { text-align: center; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }

  .menu-toggle { display: block; }

  .main-navigation {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-dark);
    padding: 16px 24px;
    border-top: 1px solid var(--color-accent);
  }

  .main-navigation.is-open { display: block; }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }

  .main-navigation li + li {
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .main-navigation a {
    display: block;
    padding: 14px 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .festival-stats {
    gap: 24px;
  }

  .activities-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero__title { font-size: 2rem; }
  .btn { padding: 12px 24px; }
}

/* ============================================================
   ACCESSIBILITY: CONTRAST FIXES (WCAG AA) — added 2026-05-17
   Gold #C9A84C fails AA on white (2.0); muted #6B6352 fails on
   dark #1C1A17 (2.6). New vars + targeted overrides below; dark
   surfaces keep original gold via .section--dark / .recipe-box.
   ============================================================ */
:root {
  --color-accent-on-light: #8B6F1E;   /* darker gold, ~5.0 on #FFF */
  --color-muted-on-dark:   #B5A98C;   /* lighter khaki, ~7+ on #1C1A17 */
}

/* Accent text/links on light surfaces */
a:hover { color: var(--color-accent-on-light); }
.military-label,
.section-label,
.text-accent,
.product-card__tag,
.breadcrumbs {
  color: var(--color-accent-on-light);
  font-weight: 600;
}

/* Restore brand gold inside dark surfaces */
.section--dark .military-label,
.section--dark .section-label,
.section--dark .text-accent,
.section--dark .product-card__tag,
.recipe-box .military-label,
.recipe-box .section-label,
.site-header .military-label {
  color: var(--color-accent);
}

/* Page header has olive bg — switch breadcrumbs to parchment */
.page-header .breadcrumbs { color: var(--color-light); }
.page-header .breadcrumbs a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Muted text on dark surfaces */
.footer-brand__mission,
.footer-nav a,
.footer-social a,
.footer-bottom {
  color: var(--color-muted-on-dark);
}
.section--dark .stat-item__label,
.section--dark .product-card__desc {
  color: var(--color-muted-on-dark);
}

/* Hover restores gold against dark footer */
.footer-nav a:hover,
.footer-social a:hover { color: var(--color-accent); }

/* ============================================================
   HEADER + HERO: SHARED CONTINUOUS BACKGROUND — 2026-05-17
   Elementor header (template 31, section d6719643) and .hero now
   share a viewport-anchored gradient so the split appears as one
   surface. Header keeps readability when scrolled past hero
   because the fixed gradient stays olive→dark.
   ============================================================ */
.elementor-31 .elementor-element.elementor-element-d6719643:not(.elementor-motion-effects-element-type-background),
.elementor-31 .elementor-element.elementor-element-d6719643 > .elementor-motion-effects-container > .elementor-motion-effects-layer,
.hero {
  background-color: var(--color-dark);
  background-image: linear-gradient(135deg, rgba(74,83,32,0.92) 0%, rgba(28,26,23,0.85) 60%);
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Old hero gradient overlay no longer needed — would double-darken */
.hero::before { display: none; }

/* Hero image keeps its place beneath the shared gradient */
.hero__bg { z-index: 0; opacity: 0.45; }
.hero__content { z-index: 2; }

/* Mobile: fixed bg-attachment is buggy on iOS; fall back to scroll */
@media (max-width: 768px) {
  .elementor-31 .elementor-element.elementor-element-d6719643:not(.elementor-motion-effects-element-type-background),
  .hero {
    background-attachment: scroll;
  }
}

/* ============================================================
   TYPOGRAPHY HARDENING — 2026-05-17 (impeccable typeset)
   Identity preserved: Playfair Display / Open Sans / Oswald.
   Improves hierarchy ramp, OpenType features, numeric alignment,
   display tracking, line-length cap. References DESIGN.md
   tokens (display/headline/title/body/label/micro-label).
   ============================================================ */
:root {
  /* Modular ramp: 1.333 base, fluid clamps for long-form headings */
  --text-display: clamp(2.75rem, 6vw, 5.25rem);
  --text-h1:      clamp(2.25rem, 5vw, 3.75rem);
  --text-h2:      clamp(1.75rem, 4vw, 2.625rem);
  --text-h3:      clamp(1.375rem, 3vw, 1.9rem);
  --text-h4:      clamp(1.125rem, 1.6vw, 1.35rem);
  --text-body:    1rem;
  --text-small:   0.875rem;
  --text-micro:   0.75rem;

  --leading-display: 1.05;
  --leading-heading: 1.25;
  --leading-body:    1.7;
  --leading-body-on-dark: 1.75;

  --tracking-display: -0.012em;
  --tracking-heading: -0.005em;
  --tracking-body:     0;
  --tracking-label:    0.15em;
  --tracking-micro:    0.22em;

  --measure-prose: 70ch;
}

/* OpenType features per family --------------------------------- */
h1, h2, h3, h4, h5, h6,
.hero__title,
.hero__subtitle {
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "dlig" 1, "lnum" 1, "pnum" 1;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

body,
p, li, dd, dt, blockquote, figcaption {
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

/* Oswald labels: tabular numeric figures so counters and codes
   line up vertically. Tight kerning at small caps sizes. */
.military-label,
.section-label,
.footer-heading,
.product-card__tag,
.breadcrumbs,
.main-navigation a,
.activity-item__title,
.btn,
.stat-item__label {
  font-feature-settings: "kern" 1, "liga" 1, "tnum" 1, "lnum" 1, "ss01" 1;
  font-variant-numeric: tabular-nums lining-nums;
}

/* Numeric displays — always tabular so digits don't jitter -------- */
.stat-item__number,
.activity-item__number,
.kp-counter,
.woocommerce .price,
.woocommerce .price .amount,
.kp-card-price,
.kp-timeline-year {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1, "kern" 1;
}

/* Hierarchy ---------------------------------------------------- */
h1 {
  font-size: var(--text-h1);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-display);
}
h2 {
  font-size: var(--text-h2);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}
h3 {
  font-size: var(--text-h3);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
}
h4 {
  font-size: var(--text-h4);
  line-height: var(--leading-heading);
  letter-spacing: 0;
}

.hero__title {
  font-size: var(--text-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
}

/* Body line-length cap on long-form text columns -----------------
   Targets paragraphs and lists that sit directly inside a .section
   .container, plus the festiwal/edukacja text columns. Does not
   constrain product grids, hero, footer columns, or full-bleed
   blocks. */
.section > .container > p,
.section > .container > ul:not(.activity-item__list):not(.products-grid):not(.values-grid):not(.festival-stats),
.section > .container > ol,
.section > .container > h1,
.section > .container > h2,
.section > .container > h3,
.section > .container > .divider,
.section > .container > p.section-label {
  max-width: var(--measure-prose);
}

/* Festiwal/Edukacja two-column inner text — same prose cap */
#festiwal .container > div > div > p,
#edukacja .container > div > div > p,
#dlaczego .container > h2,
#misja .container > p {
  max-width: var(--measure-prose);
}

/* Body line-height: tighter on light, looser on dark (light type
   reads as lighter weight against dark, needs more breathing). */
body { line-height: var(--leading-body); }
.section--dark,
.section--dark p,
.section--dark li,
.recipe-box,
.recipe-box p,
.recipe-box li,
.site-footer,
.footer-brand__mission,
.footer-nav,
.footer-bottom {
  line-height: var(--leading-body-on-dark);
}

/* Hero subtitle: slightly looser leading on dark; cap measure */
.hero__subtitle {
  line-height: 1.75;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* Polish diacritics: Playfair handles them but enforce locale so
   any future font swap keeps the right cuts. */
html[lang^="pl"] h1,
html[lang^="pl"] h2,
html[lang^="pl"] h3,
html[lang^="pl"] h4 {
  font-language-override: "PLK";
}

/* Body floor: never below 16px even at small viewports */
body { font-size: max(1rem, 16px); }

/* Long-form list rhythm: tighter than paragraphs but not cramped */
.section > .container > ul:not(.activity-item__list):not(.products-grid):not(.values-grid):not(.festival-stats) li,
.section > .container > ol li {
  line-height: 1.6;
  margin-bottom: 6px;
}

/* Section labels on dark sit on top of the section, give them a
   stronger ascent above the h2 they introduce. */
.section--dark .section-label,
.section--olive .section-label,
.recipe-box .military-label {
  margin-bottom: 14px;
}

/* Stat counters: explicit display size + tighter leading; the
   numeral is the design element. */
.stat-item__number,
.activity-item__number,
.kp-counter {
  line-height: 0.95;
  letter-spacing: -0.01em;
}

/* Drop a few px on small viewports to avoid orphans on stat row */
@media (max-width: 480px) {
  .stat-item__number { font-size: 2.75rem; }
  .activity-item__number { font-size: 2.5rem; }
}

/* ============================================================
   LAYOUT HARDENING — 2026-05-17 (impeccable layout)
   Adds: semantic space scale, fluid section rhythm per surface
   mode, asymmetric two-col grids, values-grid feature cell,
   activities-grid ledger hairlines, z-index scale.
   Identity preserved: no card shape changes, no nested cards,
   no card-on-card. Override scope limited to theme markup;
   Elementor sections (header, kp-product-card grids) untouched.
   ============================================================ */

:root {
  /* Spacing ramp (linear, rem-anchored) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  80px;
  --space-10: 112px;
  --space-11: 144px;

  /* Section vertical rhythm — fluid, varied per surface in rules below */
  --section-y:        clamp(56px, 9vw, 112px);
  --section-y-roomy:  clamp(72px, 11vw, 144px);
  --section-y-tight:  clamp(40px, 6vw, 72px);

  /* Z-index scale — semantic, no arbitrary 9999s */
  --z-base:        1;
  --z-content:     2;
  --z-overlay:     5;
  --z-sticky:      100;
  --z-header:      1000;
  --z-back-to-top: 1500;
  --z-mobile-bar:  9000;
  --z-mobile-nav:  9050;
  --z-banner:      9100;
  --z-page-trans:  9500;
}

/* Section vertical rhythm — three modes ------------------------- */
.section { padding: var(--section-y) 0; }
.section--parchment { padding: var(--section-y-roomy) 0; }
.section--olive    { padding: var(--section-y) 0; }
.section--dark     { padding: var(--section-y-roomy) 0; }

/* First section in flow: tighten top, the hero already provides air */
.site-content > .section:first-of-type,
.hero + .section {
  padding-top: var(--section-y-tight);
}

/* Container side padding: fluid so the page breathes wider on big screens */
.container {
  padding-left:  clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}

/* ============================================================
   ASYMMETRIC TWO-COL GRIDS
   Inline `grid-template-columns:1fr 1fr` lives in front-page.php.
   Override by attribute selector + section id; inline style still
   wins on shorthand, so use full longhand to outrank it.
   ============================================================ */
@media (min-width: 900px) {
  #festiwal .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 7fr 5fr !important;
    column-gap: var(--space-9) !important;
  }
  #sprzet .container > div[style*="grid-template-columns:1fr 1fr"],
  #konserwy .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 7fr 5fr !important;
    column-gap: var(--space-9) !important;
  }
  /* Edukacja flips the weight: text first, asset second */
  #edukacja .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 5fr 7fr !important;
    column-gap: var(--space-9) !important;
  }
}

/* Mobile: collapse to single column for every two-col grid */
@media (max-width: 899px) {
  .section .container > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    row-gap: var(--space-7) !important;
  }
}

/* ============================================================
   VALUES-GRID: break the identical-card-grid pattern
   First card spans 2 columns on wide screens, doubles internal
   padding, gets a left rule of 1px parchment-border-on-dark.
   Five identical icon+title+text cards becomes one anchor card
   plus four supporting cards.
   ============================================================ */
.values-grid {
  gap: var(--space-6);
}
@media (min-width: 1024px) {
  .values-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .values-grid > .value-card:first-child {
    grid-column: span 2;
    grid-row: span 1;
    padding: var(--space-7) var(--space-6);
  }
}

/* ============================================================
   ACTIVITIES-GRID: ledger hairlines between cells
   Currently each .activity-item has its own 1px border, producing
   doubled lines and uneven internal padding. Replace with cell-
   shared hairlines so the grid reads as a single ledger page.
   ============================================================ */
.activities-grid {
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-left: 1px solid rgba(255,255,255,0.08);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.activity-item {
  border: 0;
  border-right: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: clamp(32px, 4vw, 56px) clamp(28px, 3vw, 44px);
}
.activity-item:hover {
  background: rgba(201,168,76,0.07);
}
/* Mobile: full-width stacked cells, restore some breathing */
@media (max-width: 767px) {
  .activities-grid {
    border: 0;
    grid-template-columns: 1fr;
  }
  .activity-item {
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: var(--space-7) var(--space-5);
  }
  .activity-item:last-child { border-bottom: 0; }
}

/* ============================================================
   HERO: pull content left of the diagonal split so title fights
   neither the seam nor the right-side darkness.
   ============================================================ */
@media (min-width: 900px) {
  .hero__content {
    margin: 0 auto 0 0;
    padding-left: clamp(40px, 8vw, 96px);
    text-align: left;
    max-width: 720px;
  }
}

/* ============================================================
   STAT ROW: fluid gap, vertical rhythm above the CTA
   ============================================================ */
.festival-stats {
  gap: clamp(24px, 4vw, 56px);
  margin: var(--space-7) 0 var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(74,83,32,0.18);
}
.section--dark .festival-stats,
.section--olive .festival-stats {
  border-top-color: rgba(201,168,76,0.18);
}

/* ============================================================
   FOOTER: relax the 3-col into a left-weighted ledger
   ============================================================ */
@media (min-width: 900px) {
  .footer-inner {
    grid-template-columns: 5fr 3fr 4fr;
    column-gap: var(--space-8);
  }
}

/* ============================================================
   SECTION RHYTHM INSIDE — tight grouping, generous separation
   Label sits 12px above heading, divider 20px below heading,
   first paragraph 24px below divider; that group is then
   separated from subsequent content by 32-48px.
   ============================================================ */
.section .section-label   { margin-bottom: var(--space-3); }
.section h2               { margin-top: 0; margin-bottom: var(--space-5); }
.section h3               { margin-top: var(--space-7); margin-bottom: var(--space-3); }
.section .divider         { margin: var(--space-5) 0 var(--space-6); }
.section .divider--left   { margin-left: 0; }
.section .container > p   { margin-top: 0; margin-bottom: var(--space-5); }
.section .container > p + p { margin-top: var(--space-5); }

/* ============================================================
   Z-INDEX MIGRATION: replace random values with scale tokens
   ============================================================ */
.site-header        { z-index: var(--z-header); }
#back-to-top        { z-index: var(--z-back-to-top); }
.hero__bg           { z-index: var(--z-base); }
.hero::before       { z-index: var(--z-overlay); }
.hero__content      { z-index: var(--z-content); }
