/* --- RESET & NORMALIZE --- */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
}
html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  scroll-behavior: smooth;
}
*, *::before, *::after {
  box-sizing: inherit;
}
body {
  background-color: #F1EEE7;
  color: #2C2320;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
ul, ol {
  list-style: none;
  margin: 0 0 20px 0;
  padding-left: 0;
}
blockquote {
  margin: 0;
  font-style: italic;
}
button, input, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.2;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

/* --- GOOGLE FONTS --- */
@import url('https://fonts.googleapis.com/css?family=Montserrat:700,900&display=swap');
@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap');

/* --- COLOR PALETTE: VINTAGE/RETRO --- */
:root {
  --primary: #1A384A;
  --secondary: #57A8B6;
  --vintage-cream: #F2E2BB;
  --vintage-sand: #E5C9A2;
  --vintage-rust: #B26D3A;
  --retro-orange: #EF7B45;
  --retro-green: #7EB77F;
  --retro-mustard: #E1B646;
  --accent: #F6F9F8;
  --dark: #2C2320;
  --white: #FFFFFF;
  --border-card: #E1B646;
  --border-muted: #E8E2D9;
  --shadow: 0 4px 16px 0 rgba(44,35,32,0.07), 0 1.5px 5px rgba(178,109,58,0.12);
  --font-display: 'Montserrat', Arial, 'Roboto', sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
}

/* --- TYPOGRAPHY --- */
h1, .h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.25rem;
  color: var(--primary);
  text-shadow: 2px 2px 0 var(--vintage-cream);
  margin-bottom: 18px;
  letter-spacing: 2px;
}
h2, .h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--vintage-rust);
  margin-bottom: 14px;
  letter-spacing: 1px;
}
h3, .h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--retro-orange);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
p, li, blockquote {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--dark);
}
strong {
  font-weight: 700;
}

/* --- CONTAINER SYSTEM --- */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  margin: 0 auto;
  max-width: 850px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--vintage-cream);
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 2.5px dashed var(--border-card);
  position: relative;
}

/* --- FLEXBOX LAYOUT CLASSES --- */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--accent);
  border: 2.5px solid var(--border-card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  padding: 24px 18px;
  position: relative;
  transition: box-shadow 0.22s, transform 0.18s;
}
.card:hover {
  box-shadow: 0 8px 24px rgba(178,109,58,0.14);
  transform: translateY(-4px) scale(1.025);
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 2.5px solid var(--retro-orange);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 3px 16px 0 rgba(44,35,32,0.13);
  position: relative;
}
.testimonial-card blockquote {
  color: var(--dark);
  font-size: 1.1rem;
  font-family: var(--font-body);
  line-height: 1.55;
  margin-bottom: 0;
  padding-right: 12px;
}
.testimonial-card p {
  margin: 0;
  color: var(--vintage-rust);
  font-size: 0.98rem;
  font-weight: 700;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* Patterned overlays for retro feel */
.section::before {
  content: '';
  position: absolute;
  left: 10px; top: 12px;
  width: 24px; height: 24px;
  background: repeating-linear-gradient(45deg, var(--vintage-sand), var(--vintage-sand) 4px, transparent 4px, transparent 8px);
  opacity: 0.11;
  border-radius: 100%;
  z-index: 0;
}
/* --- NAVIGATION --- */
header {
  background: var(--primary);
  width: 100%;
  box-shadow: 0 1px 7px 0 rgba(26,56,74,0.06);
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
header nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
header nav a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--vintage-cream);
  padding: 6px 10px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  position: relative;
}
header nav a:not(.btn-primary):hover,
header nav a:not(.btn-primary):focus {
  background: var(--vintage-sand);
  color: var(--primary);
  outline: none;
}
/* Logo */
header a img,
.footer-logo img {
  max-height: 46px;
  width: auto;
  display: block;
}

/* --- BUTTONS --- */
.btn-primary,
header nav .btn-primary,
.btn-secondary {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  padding: 12px 26px;
  border-radius: 9px;
  letter-spacing: 1px;
  transition: background 0.21s, color 0.16s, transform 0.16s, box-shadow 0.16s;
  cursor: pointer;
  border: none;
  outline: none;
  display: inline-block;
  margin-top: 8px;
  margin-bottom: 8px;
  box-shadow: 0 2px 10px 0 rgba(178,109,58,0.093);
  position: relative;
}
.btn-primary,
header nav .btn-primary {
  background: var(--retro-orange);
  color: var(--white);
  text-shadow: 1px 1px 0 var(--vintage-sand);
  border: 2px solid var(--retro-orange);
}
.btn-primary:hover,
header nav .btn-primary:hover,
.btn-primary:focus {
  background: var(--white);
  color: var(--retro-orange);
  border-color: var(--retro-orange);
  transform: translateY(-2px) scale(1.03);
}
.btn-secondary {
  background: var(--retro-mustard);
  color: var(--primary);
  border: 2px solid var(--retro-mustard);
}
.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--primary);
  color: var(--vintage-sand);
  border-color: var(--primary);
  transform: translateY(-2px) scale(1.03);
}

/* --- FOOTER --- */
footer {
  background: var(--vintage-sand);
  padding: 38px 0 14px 0;
  border-top: 4px solid var(--vintage-rust);
  margin-top: 60px;
  position: relative;
}
footer .container {
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-logo {
  margin-bottom: 18px;
}
footer nav {
  display: flex;
  flex-direction: row;
  gap: 19px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
footer nav a {
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  border-radius: 5px;
  padding: 5px 8px;
  text-shadow: none;
  transition: background 0.18s, color 0.18s;
}
footer nav a:hover, 
footer nav a:focus {
  background: var(--retro-orange);
  color: var(--white);
}
.footer-links, .footer-contact, .footer-social, .footer-legal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--primary);
  margin-top: 10px;
}
.footer-links a {
  color: var(--vintage-rust);
  text-decoration: underline dotted;
}
.footer-social {
  flex-direction: row;
  gap: 13px;
  align-items: center;
  margin-top: 8px;
}
.footer-legal {
  font-size: 0.81rem;
  color: var(--retro-orange);
  margin-top: 22px;
}

/* --- LIST STYLES (Retro Bullets) --- */
ul {
  list-style: none;
  padding-left: 0;
}
ul li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 1rem;
  font-family: var(--font-body);
}
ul li::before {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  top: 9px;
  width: 15px;
  height: 6px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(90deg, var(--retro-orange), var(--retro-mustard));
  opacity: 0.78;
}
ol {
  list-style-type: decimal-leading-zero;
  margin-left: 20px;
  color: var(--vintage-rust);
  font-family: var(--font-display);
}

/* --- BLOG --- */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.blog-list article {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 22px 14px;
  border: 2px solid var(--retro-green);
  transition: box-shadow 0.2s, transform 0.17s;
  margin-bottom: 14px;
}
.blog-list article:hover {
  box-shadow: 0 4px 14px rgba(126,183,127,0.10);
  transform: scale(1.015);
  background: var(--accent);
}
.categories-list ul {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.categories-list li {
  background: var(--retro-green);
  color: var(--white);
  padding: 6px 17px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
}

/* --- CASE STUDIES & SOLUTIONS GRID (Rozwiązania/Realizacje) --- */
.solutions-grid, .case-study-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.case-study-list .testimonial-card {
  flex: 1 1 330px;
  min-width: 220px;
  margin-bottom: 0;
}
.case-study-teasers ul li {
  background: var(--vintage-sand);
  border-radius: 7px;
  padding: 10px 13px;
  color: var(--retro-orange);
  font-weight: 700;
  margin-bottom: 9px;
}

.quality-guarantees p {
  background: var(--retro-mustard);
  padding: 12px 17px;
  border-radius: 10px;
  margin-top: 12px;
  color: var(--primary);
  font-weight: 700;
}

/* --- CUSTOM CONTENT COMPONENTS --- */
.confirmation-message, .next-steps {
  background: var(--vintage-cream);
  border: 2px solid var(--retro-mustard);
  border-radius: 11px;
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1.5px 6px rgba(225,182,70,0.09);
}

.contact-info {
  padding: 18px 15px;
  border-left: 5px solid var(--retro-green);
  background: var(--white);
  margin-bottom: 14px;
  border-radius: 10px;
}

.map-embed {
  max-width: 320px;
  margin: 0 auto;
}

/* --- TYPOGRAPHY SPACING --- */
section h1, section h2, section h3 {
  margin-bottom: 11px;
}

h1 + p,
h2 + p,
h3 + p,
h2 + ul,
h1 + ul {
  margin-top: 1px;
}

/* --- MOBILE MENU & RESPONSIVE HEADER --- */
.mobile-menu-toggle {
  display: none;
  background: var(--retro-orange);
  color: var(--white);
  font-size: 2.2rem;
  border-radius: 8px;
  border: none;
  width: 52px; height: 48px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, color 0.16s, transform 0.15s;
  z-index: 1001;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: var(--primary);
  color: var(--retro-mustard);
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--primary);
  z-index: 1999;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(.42,.78,.36,1.03);
  display: flex;
  flex-direction: column;
  padding: 0;
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.open {
  transform: translateX(0);
  pointer-events: auto;
  opacity: 1;
}
.mobile-menu-close {
  font-size: 2.3rem;
  color: var(--vintage-cream);
  background: transparent;
  border: none;
  align-self: flex-end;
  margin: 16px 26px 12px 0;
  cursor: pointer;
  transition: color 0.15s, transform 0.12s;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  color: var(--retro-orange);
}
.mobile-nav {
  display: flex !important;
  flex-direction: column;
  gap: 30px;
  align-items: center;
  margin-top: 42px;
}
.mobile-nav a {
  color: var(--vintage-cream);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.32rem;
  padding: 13px 0px;
  border-radius: 7px;
  width: 100%;
  text-align: center;
  transition: background .15s, color .12s;
  outline: none;
  touch-action: manipulation;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--retro-mustard);
  color: var(--primary);
  outline: none;
}

/* --- MOBILE FIRST & RESPONSIVE DESIGN --- */
@media (max-width: 1080px) {
  .container {
    max-width: 96vw;
  }
  .content-wrapper {
    max-width: 98vw;
  }
  .footer-logo img, header a img {
    max-width: 160px;
    max-height: 44px;
  }
}
@media (max-width: 960px) {
  .card-container, .content-grid, .solutions-grid, .case-study-list {
    gap: 14px;
  }
  .footer-logo img, header a img {
    max-width: 120px;
    max-height: 36px;
  }
}
@media (max-width: 768px) {
  .container {
    max-width: 100vw;
    padding: 0 7px;
  }
  .section {
    margin-bottom: 38px;
    padding: 22px 7px;
  }
  .content-wrapper {
    max-width: 100vw;
    gap: 12px;
  }
  .card,
  .testimonial-card {
    padding: 15px 8px;
  }
  nav {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: flex !important;
  }
  header .container {
    flex-direction: row;
    align-items: center;
    gap: 0;
  }
  .text-image-section {
    flex-direction: column !important;
    align-items: flex-start;
    gap: 18px;
  }
  .card-container, .content-grid, .solutions-grid, .case-study-list {
    flex-direction: column;
    gap: 18px;
  }
}
@media (max-width: 520px) {
  h1, .h1 {
    font-size: 1.45rem;
  }
  h2, .h2 {
    font-size: 1.11rem;
  }
  .footer-social a img {
    max-height: 24px;
  }
  .footer-logo img, header a img {
    max-width: 90px;
    max-height: 27px;
  }
  .btn-primary, .btn-secondary {
    padding: 9px 13px;
    font-size: 0.99rem;
  }
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  background: var(--retro-mustard);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 1rem;
  z-index: 2999;
  box-shadow: 0 -2px 10px rgba(44,35,32,0.13);
  display: flex;
  flex-direction: column;
  padding: 20px;
  align-items: center;
  gap: 16px;
  animation: banner-in 0.65s cubic-bezier(.44,.79,.29,1.05);
}
@keyframes banner-in {
  0% { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.cookie-banner .cookie-banner-text {
  font-size: 1.01rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 7px;
}
.cookie-banner .cookie-btn {
  background: var(--primary);
  color: var(--vintage-cream);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 7px;
  border: none;
  padding: 7px 23px;
  margin: 0 8px;
  cursor: pointer;
  transition: background 0.18s, color 0.15s, transform 0.15s;
}
.cookie-banner .cookie-btn:hover, 
.cookie-banner .cookie-btn:focus {
  background: var(--retro-orange);
  color: var(--white);
  transform: translateY(-2px);
}
.cookie-banner .cookie-btn.cookie-settings {
  background: var(--retro-green);
  color: var(--white);
}
.cookie-banner .cookie-btn.cookie-settings:hover {
  background: var(--white);
  color: var(--retro-green);
}

/* Cookie settings modal */
.cookie-modal-overlay {
  position: fixed; left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(44,35,32,0.73);
  z-index: 3999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s;
}
.cookie-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal {
  background: var(--vintage-cream);
  border-radius: 16px;
  box-shadow: 0 8px 42px 0 rgba(44,35,32,0.21);
  padding: 32px 24px 20px 24px;
  max-width: 430px;
  min-width: 260px;
  width: 94vw;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 4000;
  position: relative;
  animation: modal-in 0.46s cubic-bezier(.48,.65,.29,1.04);
}
@keyframes modal-in {
  0% { transform: scale(0.93); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.cookie-modal h2 {
  font-family: var(--font-display);
  color: var(--retro-orange);
  font-size: 1.32rem;
  margin-bottom: 13px;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent);
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 1.02rem;
  margin-bottom: 7px;
}
.cookie-modal .cookie-category .cat-title {
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--primary);
}
/* Category toggle switches */
.cookie-toggle {
  width: 44px; height: 24px;
  border-radius: 12px;
  background: var(--retro-green);
  position: relative;
  cursor: pointer;
  transition: background 0.18s;
  border: 2px solid var(--border-muted);
  flex-shrink: 0;
}
.cookie-toggle[aria-checked="false"] {
  background: #D2DAD4;
}
.cookie-toggle .toggle-knob {
  position: absolute; left: 3px; top: 2px;
  width: 20px; height: 18px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(44,35,32,0.10);
  transition: left 0.17s;
}
.cookie-toggle[aria-checked="true"] .toggle-knob {
  left: 21px;
}
.cookie-modal .cookie-btn {
  align-self: flex-end;
}
.cookie-modal .cookie-close {
  position: absolute; top: 14px; right: 14px;
  background: none;
  border: none;
  font-size: 1.22rem;
  color: var(--retro-orange);
  cursor: pointer;
  transition: color 0.14s, transform 0.14s;
  z-index: 20;
}
.cookie-modal .cookie-close:hover, .cookie-modal .cookie-close:focus {
  color: var(--primary);
  transform: scale(1.15);
}

@media (max-width: 560px) {
  .cookie-modal {
    padding: 21px 7px 10px 7px;
    max-width: 98vw;
  }
  .cookie-modal h2 {
    font-size: 1.09rem;
  }
}

/* --- ANIMATIONS & MICRO-INTERACTIONS --- */
.btn-primary, .btn-secondary, .cookie-btn {
  will-change: transform;
  backface-visibility: hidden;
}

.card, .testimonial-card, .blog-list article {
  transition: box-shadow 0.2s, background 0.19s, transform 0.15s;
}

.card:hover, .testimonial-card:hover, .blog-list article:hover {
  box-shadow: 0 10px 18px 0 rgba(178,109,58,0.12);
  background: var(--vintage-sand);
  z-index: 1;
}

a:active, button:active {
  transform: scale(0.97);
}

/* --- VISUAL RETRO ACCENTS --- */
h1, h2, h3 {
  text-shadow: 1px 1px 0 #f7dec0, 2px 2px 0 #e6c28e;
}
.card, .testimonial-card, .blog-list article {
  border-style: double;
}
.section {
  background:
    repeating-linear-gradient(135deg, #ebe7d7 0, #f3ecc9 8px, #f3ecc9 14px, #ebe7d7 20px),
    var(--vintage-cream);
}

/* --- MISC: FORMS, UTILS --- */
input[type="text"], input[type="email"], textarea {
  background: var(--accent);
  border: 2px solid var(--retro-green);
  padding: 11px 15px;
  margin-bottom: 14px;
  border-radius: 7px;
  font-size: 1rem;
  color: var(--primary);
  transition: border 0.17s;
}
input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
  border-color: var(--retro-orange);
}
label {
  font-family: var(--font-body);
  color: var(--dark);
  font-weight: 500;
}

/* --- ACCESSIBILITY --- */
:focus-visible {
  outline: 2.5px solid var(--retro-orange);
  outline-offset: 2px;
}

/* --- PRINT OVERRIDE (clean retro palette) --- */
@media print {
  body, .section, .card, .testimonial-card, header, footer {
    background: #FFF !important;
    color: #000 !important;
    box-shadow: none !important;
    border: none !important;
  }
}
