@charset "UTF-8";

/* ==========================================================================
   KotMaurycy.pl - Base CSS (Variables, Reset, Layout, Header, Buttons, Footer, Cookies)
   Extracted from style.css to serve as the shared foundation across pages
   ========================================================================== */

/* CSS Variables - Brand Book */
:root {
  /* Brand Colors */
  --km-navy: #0B2545;          /* Tło, powaga, nowoczesność */
  --km-blue: #3B82F6;          /* CTA, akcenty */
  --km-orange: #F59E0B;        /* Postać kota, element wyróżniający */
  --km-white: #FFFFFF;         /* Tekst, czystość */
  
  /* Accent underline tuning */
  --km-highlight-offset: 0.06em;    /* dodatnie = bliżej tekstu (w górę) */
  --km-highlight-thickness: 0.14em; /* grubość podkreślenia skaluje się z fontem */
  
  /* Extended Colors */
  --km-gray-50: #F8FAFC;
  --km-gray-100: #F1F5F9;
  --km-gray-200: #E2E8F0;
  --km-gray-300: #CBD5E1;
  --km-gray-400: #94A3B8;
  --km-gray-500: #64748B;
  --km-gray-600: #475569;
  --km-gray-700: #334155;
  --km-gray-800: #1E293B;
  --km-gray-900: #0F172A;
  
  /* Gradients */
  --km-gradient-primary: linear-gradient(135deg, var(--km-navy), #1e40af);
  --km-gradient-hero: linear-gradient(135deg, var(--km-navy) 0%, #1e40af 50%, var(--km-blue) 100%);
  --km-gradient-orange: linear-gradient(135deg, var(--km-orange), #ea580c);
  
  /* Shadows */
  --km-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --km-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --km-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --km-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --km-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Typography */
  --km-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  --km-font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  
  /* Spacing */
  --km-space-xs: 0.5rem;
  --km-space-sm: 1rem;
  --km-space-md: 1.5rem;
  --km-space-lg: 2rem;
  --km-space-xl: 3rem;
  --km-space-2xl: 4rem;
  --km-space-3xl: 6rem;
  
  /* Border Radius */
  --km-radius-sm: 0.375rem;
  --km-radius-md: 0.5rem;
  --km-radius-lg: 0.75rem;
  --km-radius-xl: 1rem;
  --km-radius-2xl: 1.5rem;
  --km-radius-full: 9999px;
  
  /* Transitions */
  --km-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --km-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: clamp(17px, 1vw + 14px, 19px);
  /* Prevent unintended horizontal scrolling caused by full-bleed effects */
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--km-font-primary);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--km-gray-700);
  background-color: var(--km-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile viewport and safe-area adjustments (2024/2025 best practices) */
@supports (height: 100dvh) {
  .km-body,
  body { min-height: 100dvh; }
}

/* Respect iOS/Android safe areas when viewport-fit=cover */
body, .km-body {
  padding-right: max(env(safe-area-inset-right, 0px), 0px);
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 0px);
  padding-left: max(env(safe-area-inset-left, 0px), 0px);
}

/* Ensure fixed header accounts for safe-area */
.km-header { padding-top: env(safe-area-inset-top, 0px); }

/* Respect bottom safe-area for footers and banners */
.km-footer { padding-bottom: calc(var(--km-space-lg) + env(safe-area-inset-bottom, 0px)); }
.km-cookie-banner { bottom: max(var(--km-space-md), env(safe-area-inset-bottom, 0px)); }

/* Prevent iOS Safari auto-zoom on form controls by ensuring base font-size >= 16px */
input, select, textarea, button { font-size: 16px; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--km-font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--km-navy);
}

/* Nicer line breaks for headings and paragraphs */
h1, .km-section-title { text-wrap: balance; }
p, .km-section-subtitle { text-wrap: pretty; }

h1 { font-size: 3.5rem; font-weight: 800; }
h2 { font-size: 2.5rem; font-weight: 700; }
h3 { font-size: 1.875rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 var(--km-space-sm); }

a {
  color: var(--km-blue);
  text-decoration: none;
  transition: var(--km-transition-fast);
}

a:hover { color: var(--km-navy); }

/* ==========================================================================
   Layout Components
   ========================================================================== */

.km-container { max-width: 1200px; margin: 0 auto; padding: 0 var(--km-space-sm); }

.km-section { padding: var(--km-space-2xl) 0; scroll-margin-top: 100px; }

/* Tighter spacing helper: remove bottom padding to eliminate gaps before footer/contact */
.km-section-tight-after { padding-bottom: 0; }

/* Tighter spacing helper: remove top padding when previous section already provides separation */
.km-section-tight-before { padding-top: 0; }

/* When a section uses tight spacing, avoid inner components adding big bottom gaps */
.km-section-tight-after .km-target-testimonials { margin-bottom: 0; padding-bottom: var(--km-space-xl); }

.km-section-header { text-align: center; margin-bottom: var(--km-space-2xl); }
.km-section-title { margin-bottom: var(--km-space-sm); }
.km-section-subtitle { font-size: 1.2rem; color: var(--km-gray-600); max-width: 680px; margin: 0 auto; }

/* Skip Link */
.km-skip { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.km-skip:focus {
  position: fixed; top: var(--km-space-sm); left: var(--km-space-sm);
  width: auto; height: auto; background: var(--km-white); color: var(--km-navy);
  padding: var(--km-space-sm) var(--km-space-md); border: 2px solid var(--km-orange);
  border-radius: var(--km-radius-md); z-index: 9999; font-weight: 600;
}

/* ==========================================================================
   Header
   ========================================================================== */

.km-header {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--km-gray-200);
  z-index: 50; transition: var(--km-transition); transform: translateY(0);
}

.km-header-scrolled { background: rgba(255, 255, 255, 0.98); box-shadow: var(--km-shadow-md); }
.km-header-hidden { transform: translateY(-100%); }

.km-header-row { display: flex; align-items: center; justify-content: space-between; height: 80px; }

.km-logo-wrap { display: flex; align-items: center; gap: var(--km-space-sm); min-width: 0; flex: 1 1 auto; overflow: hidden; }
.km-logo { display: flex; align-items: center; gap: var(--km-space-xs); font-family: var(--km-font-heading); font-weight: 800; font-size: 1.25rem; color: var(--km-navy); text-decoration: none; transition: var(--km-transition-fast); }
.km-logo:hover { color: var(--km-blue); transform: translateY(-1px); }
.km-logo-icon { font-size: 1.5rem; }

/* Keep nav from shrinking and overlapping left cluster */
.km-nav { flex: 0 0 auto; }

/* Subpage indicator (used on /dolacz) */
.km-subtitle-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--km-gray-600); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.km-subtitle-dot { color: var(--km-gray-300); font-size: 1.25rem; line-height: 1; }
.km-subtitle-text { color: var(--km-gray-600); overflow: hidden; text-overflow: ellipsis; max-width: 26ch; }
.km-subtitle-back { color: var(--km-blue); font-weight: 600; border-radius: var(--km-radius-full); padding: 2px 8px; background: rgba(59, 130, 246, 0.06); border: 1px solid rgba(59, 130, 246, 0.15); flex-shrink: 0; }
.km-subtitle-back:hover { background: rgba(59, 130, 246, 0.12); color: var(--km-navy); }

.km-nav-toggle {
  display: none; background: none; border: 2px solid var(--km-gray-300); border-radius: var(--km-radius-md);
  padding: var(--km-space-xs) var(--km-space-sm); font-size: 1.125rem; cursor: pointer; transition: var(--km-transition-fast);
  min-width: 44px; min-height: 44px;
}
.km-nav-toggle:hover { border-color: var(--km-blue); background-color: var(--km-gray-50); }

.km-menu { display: flex; align-items: center; gap: var(--km-space-lg); list-style: none; margin: 0; padding: 0; }
.km-menu a { font-weight: 500; color: var(--km-gray-700); padding: var(--km-space-xs) var(--km-space-sm); border-radius: var(--km-radius-md); transition: var(--km-transition-fast); display: inline-flex; align-items: center; gap: 6px; min-height: 44px; line-height: 1.2; }
.km-menu a:hover { color: var(--km-blue); background-color: var(--km-gray-50); }

/* Header CTA badge aligned with nav links */
.km-menu a.km-nav-cta {
  padding: var(--km-space-xs) var(--km-space-sm);
  border-radius: var(--km-radius-full);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(59, 130, 246, 0.06) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
  font-weight: 700;
  line-height: 1;
  color: var(--km-gray-700);
  white-space: nowrap;
  margin: 0;
}
.km-menu a.km-nav-cta:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(59, 130, 246, 0.09) 100%);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--km-navy);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .km-nav-toggle { display: block; }
  .km-subtitle-badge { display: none; }
  .km-menu {
    display: none; position: absolute; top: 100%; right: var(--km-space-sm);
    background: var(--km-white); border: 1px solid var(--km-gray-200); border-radius: var(--km-radius-lg);
    box-shadow: var(--km-shadow-xl); padding: var(--km-space-sm);
    flex-direction: column; align-items: stretch; min-width: 200px;
  }
  .km-menu[style*="flex"] { display: flex; }
  .km-menu-opening { animation: menuSlideIn 0.3s ease-out; }
  @keyframes menuSlideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
  .km-menu a { padding: var(--km-space-sm); text-align: center; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.km-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--km-space-xs);
  font-family: var(--km-font-heading); font-weight: 600; text-decoration: none;
  border: none; border-radius: var(--km-radius-full);
  padding: var(--km-space-sm) var(--km-space-lg); cursor: pointer; transition: var(--km-transition-fast);
  position: relative; overflow: hidden;
  min-height: 44px;
}
.km-btn:hover { transform: translateY(-2px); }

.km-btn-primary { background: var(--km-gradient-orange); color: var(--km-white); box-shadow: var(--km-shadow-md); }
.km-btn-primary:hover { box-shadow: var(--km-shadow-xl); color: var(--km-white); }
.km-btn-primary::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 50%; height: 200%;
  background: linear-gradient(45deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-200%); transition: transform 0.8s ease;
}
.km-btn-primary:hover::before { transform: translateX(300%); }

.km-btn-secondary { background: var(--km-white); color: var(--km-navy); border: 2px solid var(--km-blue); }
.km-btn-secondary:hover { background: var(--km-blue); color: var(--km-white); }

.km-btn-large { padding: var(--km-space-md) var(--km-space-2xl); font-size: 1.125rem; font-weight: 700; }

.km-btn-tertiary { background: var(--km-white); color: var(--km-navy); border: 1px solid var(--km-gray-300); }
.km-btn-ghost { background: transparent; color: var(--km-gray-700); border: 1px solid transparent; }
.km-btn-accept { background: var(--km-gradient-orange); color: var(--km-white); }

/* ==========================================================================
   Footer (standard variant used on content pages)
   ========================================================================== */

.km-footer { background: var(--km-navy); color: var(--km-white); padding: var(--km-space-2xl) 0 var(--km-space-lg); }
.km-footer-content { display: grid; grid-template-columns: 1fr 2fr; gap: var(--km-space-2xl); margin-bottom: var(--km-space-xl); }
.km-footer-logo { display: flex; align-items: center; gap: var(--km-space-xs); font-family: var(--km-font-heading); font-weight: 800; font-size: 1.25rem; margin-bottom: var(--km-space-sm); }
.km-footer-tagline { opacity: 0.8; font-size: 0.875rem; }
.km-footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--km-space-lg); }
.km-footer-column h4 { color: var(--km-white); margin-bottom: var(--km-space-md); font-size: 1.125rem; }
.km-footer-column ul { list-style: none; padding: 0; margin: 0; }
.km-footer-column ul li { margin-bottom: var(--km-space-xs); }
.km-footer-column a { color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 0.9rem; transition: var(--km-transition-fast); }
.km-footer-column a:hover { color: var(--km-orange); }
.km-footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: var(--km-space-lg); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--km-space-sm); }
.km-footer-bottom p { margin: 0; font-size: 0.875rem; opacity: 0.8; }
.km-footer-maurycy { font-style: italic; color: var(--km-orange); }

/* ==========================================================================
   Animations & Reveals (shared helper)
   ========================================================================== */

[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition-property: transform, opacity; transition-duration: 420ms;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* Shared micro-animations used across sections */
@keyframes gentle-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes gentle-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.9; } }

/* Focus States */
.km-btn:focus-visible,
.km-logo:focus-visible,
.km-menu a:focus-visible,
.km-contact-link:focus-visible {
  outline: 3px solid var(--km-orange);
  outline-offset: 2px;
  border-radius: var(--km-radius-sm);
}

/* ==========================================================================
   Print Styles (general)
   ========================================================================== */

@media print {
  .km-header,
  .km-nav-toggle,
  .km-menu,
  .km-btn,
  .km-contact-minimal,
  .km-footer-minimal,
  .km-footer-ai-promo { display: none; }
  .km-hero { background: none; color: black; }
  .km-section { page-break-inside: avoid; }
}

/* ========================================================================== */
/* Cookie Banner & Privacy Modal                                               */
/* ========================================================================== */

.km-cookie-banner {
  position: fixed; left: 50%; bottom: var(--km-space-md); transform: translateX(-50%);
  width: min(960px, calc(100% - 2*var(--km-space-md)));
  background: linear-gradient(135deg, var(--km-white) 0%, rgba(248, 250, 252, 0.95) 100%);
  border: 1px solid var(--km-gray-200); border-radius: var(--km-radius-2xl);
  box-shadow: var(--km-shadow-2xl); padding: var(--km-space-lg); z-index: 10000; display: none;
}
.km-cookie-banner.km-slim { width: min(720px, calc(100% - 2*var(--km-space-md))); padding: var(--km-space-sm) var(--km-space-md); border-radius: var(--km-radius-xl); }
.km-cookie-banner.km-show { display: block; animation: cookieSlideUp 320ms cubic-bezier(0.22,1,0.36,1); }
@keyframes cookieSlideUp { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

.km-cookie-inner { display: grid; grid-template-columns: 1fr auto; gap: var(--km-space-lg); align-items: center; }
.km-cookie-banner.km-slim .km-cookie-inner { gap: var(--km-space-sm); }
.km-cookie-text h4 { margin: 0 0 var(--km-space-xs); font-size: 1.125rem; color: var(--km-navy); }
.km-cookie-banner.km-slim .km-cookie-text h4 { font-size: 0.95rem; margin: 0; }
.km-cookie-text p { margin: 0; font-size: 0.95rem; color: var(--km-gray-700); }
.km-cookie-banner.km-slim .km-cookie-text p { font-size: 0.85rem; color: var(--km-gray-600); }
/* Cookie banner actions: vertical stack, full width, clean hierarchy */
.km-cookie-actions { display: flex; flex-direction: column; gap: var(--km-space-xs); align-items: stretch; justify-content: flex-start; width: min(260px, 100%); }
.km-cookie-actions .km-btn { width: 100%; flex: none; }
.km-cookie-banner.km-slim .km-cookie-actions .km-btn { padding: 0.5rem 0.9rem; font-weight: 700; }
.km-cookie-banner [data-cookie-decline] { display: none !important; }
.km-cookie-banner.km-slim .km-btn-accept { background: var(--km-gradient-orange); color: var(--km-white); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2), 0 6px 16px rgba(11, 37, 69, 0.15); }
.km-cookie-banner.km-slim .km-btn-tertiary,
.km-cookie-banner.km-slim .km-btn-ghost { opacity: 0.8; font-weight: 600; }
.km-cookie-banner.km-slim .km-btn-ghost { color: var(--km-gray-600); }

/* Force reliable diacritics rendering on cookie buttons (use Inter instead of Poppins) */
.km-cookie-actions .km-btn {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.km-privacy-backdrop {
  position: fixed; inset: 0; background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  z-index: 10000; display: none;
}
.km-privacy-backdrop.km-show { display: grid; place-items: center; }

.km-privacy-modal {
  width: min(720px, calc(100% - 2*var(--km-space-lg)));
  background: linear-gradient(135deg, var(--km-white) 0%, rgba(248, 250, 252, 0.95) 100%);
  border: 1px solid var(--km-gray-200); border-radius: var(--km-radius-2xl);
  box-shadow: var(--km-shadow-2xl); padding: var(--km-space-xl); position: relative;
  max-height: min(80vh, 820px); overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}
.km-privacy-title { margin: 0 0 var(--km-space-sm); }
.km-privacy-desc { color: var(--km-gray-600); margin: 0 0 var(--km-space-lg); }
.km-consent-groups { display: grid; gap: var(--km-space-md); }
.km-consent-card { border: 1px solid var(--km-gray-200); border-radius: var(--km-radius-lg); padding: var(--km-space-md); background: var(--km-white); }
.km-consent-card h5 { margin: 0 0 4px; color: var(--km-navy); }
.km-consent-card p { margin: 0; color: var(--km-gray-600); font-size: 0.95rem; }

.km-switch { display: inline-flex; align-items: center; gap: var(--km-space-xs); cursor: pointer; }
.km-switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--km-gray-300); position: relative; outline: none; transition: var(--km-transition-fast); }
.km-switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: var(--km-white); border-radius: 50%; box-shadow: var(--km-shadow-sm); transition: var(--km-transition-fast); }
.km-switch input:checked { background: linear-gradient(135deg, var(--km-blue), var(--km-orange)); }
.km-switch input:checked::after { transform: translateX(18px); }

.km-privacy-actions { display: flex; justify-content: flex-end; gap: var(--km-space-sm); margin-top: var(--km-space-lg); }
.km-privacy-close { position: absolute; top: var(--km-space-md); right: var(--km-space-md); background: transparent; border: none; color: var(--km-gray-500); font-size: 1.25rem; cursor: pointer; }

/* Lock page scroll when modal is open */
html.km-modal-open,
body.km-modal-open { overflow: hidden; height: 100%; touch-action: none; }

/* Cookie & Modal responsive tweaks */
@media (max-width: 640px) {
  .km-cookie-inner { grid-template-columns: 1fr; }
  .km-cookie-actions { width: 100%; }
  .km-cookie-actions .km-btn { flex: none; }
}
@media (max-width: 640px) {
  .km-cookie-banner.km-slim { width: calc(100% - 2*var(--km-space-md)); bottom: var(--km-space-sm); padding: var(--km-space-sm); }
  .km-cookie-banner.km-slim .km-cookie-actions .km-btn { flex: none; }
}

/* Modal height tuning on modern viewports */
@supports (height: 100dvh) { .km-privacy-modal { max-height: min(80dvh, 820px); } }


