/* =====================================================
   Spirala Świtu — style.css
   Creative Artistic theme: vibrant colors, expressive type, unique accents
   Mobile-first, flexbox-only layouts. No CSS Grid/Columns used.
   ===================================================== */

/* -----------------------------
   CSS RESET / NORMALIZE
------------------------------ */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: inherit; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { background: none; border: 0; font: inherit; cursor: pointer; }
ul, ol { padding-left: 1.2rem; }

/* -----------------------------
   THEME TOKENS
------------------------------ */
:root {
  --color-primary: #1C1B29;
  --color-secondary: #7A2FE0;
  --color-accent: #F4F1FE;
  --color-ink: #1C1B29;
  --color-paper: #FFFFFF;
  --color-muted: #6D6A80;
  --color-success: #12B886;
  --color-danger: #E03131;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --radius-xl: 28px;

  --shadow-s: 0 2px 10px rgba(28,27,41,0.08);
  --shadow-m: 0 10px 24px rgba(28,27,41,0.12);
  --shadow-l: 0 22px 48px rgba(28,27,41,0.16);

  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-60: 60px;
}

/* -----------------------------
   BASE TYPOGRAPHY
------------------------------ */
html { font-size: 16px; }
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: #1C1B29;
  color: var(--color-ink);
  background: #FFFFFF;
  background: var(--color-paper);
  line-height: 1.6;
}

h1, h2, h3, h4 { font-family: "Trebuchet MS", "Segoe UI", Verdana, sans-serif; letter-spacing: 0.2px; }
h1 { font-size: 40px; line-height: 1.15; }
h2 { font-size: 28px; line-height: 1.2; }
h3 { font-size: 20px; line-height: 1.3; }

p, li { font-size: 16px; color: var(--color-ink); }
strong { font-weight: 700; }

/* Artistic headline accent */
h1, h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
}
h2::after {
  content: "";
  display: inline-block;
  width: 46px;
  height: 8px;
  margin-left: 12px;
  border-radius: 4px;
  background: var(--color-secondary);
}

/* Links */
a { color: var(--color-secondary); transition: color 0.2s ease, opacity 0.2s ease; }
a:hover { opacity: 0.9; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 3px; border-radius: 8px; }

/* Small/meta text */
.meta { color: var(--color-muted); font-size: 14px; }

/* -----------------------------
   LAYOUT PRIMITIVES (Flex-only)
------------------------------ */
.container {
  display: flex; /* flex container as required */
  flex-direction: column;
  align-items: center;
  padding: 0 var(--space-20);
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  width: 100%;
  max-width: 1100px;
  padding: var(--space-32) 0;
}
section { margin-bottom: var(--space-60); }

/* MANDATORY SPACING PATTERNS */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.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; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Reusable groupings used in HTML */
.feature-grid, .service-cards, .kpi-grid, .testimonial-list, .event-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-24);
}
.actions { display: flex; flex-wrap: wrap; gap: var(--space-16); align-items: center; }

/* -----------------------------
   HEADER & NAV
------------------------------ */
header { position: relative; z-index: 50; border-bottom: 1px solid rgba(28,27,41,0.08); background: var(--color-paper); }
header .container { padding-top: var(--space-12); padding-bottom: var(--space-12); }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-16); padding: 0; }

.logo img { height: 38px; width: auto; }

.main-nav { display: none; align-items: center; gap: var(--space-16); }
.main-nav a { color: var(--color-ink); font-weight: 600; padding: 10px 12px; border-radius: 10px; }
.main-nav a:hover { background: var(--color-accent); }

/* Mobile burger */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; color: var(--color-paper); background: var(--color-secondary); box-shadow: var(--shadow-s); }
.mobile-menu-toggle:hover { filter: brightness(0.95); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-20);
  padding: var(--space-24);
  background: var(--color-paper);
  transform: translateX(100%);
  transition: transform 0.35s ease;
}
.mobile-menu.open { transform: translateX(0%); }
.mobile-menu-close { align-self: flex-end; width: 40px; height: 40px; border-radius: 10px; background: var(--color-accent); color: var(--color-ink); }
.mobile-nav { display: flex; flex-direction: column; gap: var(--space-12); width: 100%; }
.mobile-nav a { display: flex; align-items: center; padding: 14px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-s); color: var(--color-ink); font-weight: 600; }
.mobile-nav a:hover { background: var(--color-accent); }

/* Desktop nav breakpoint */
@media (min-width: 992px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* -----------------------------
   HERO / SECTION STYLES
------------------------------ */
/* Give the first section a creative accent */
main > section:first-of-type { background: var(--color-accent); border-bottom-left-radius: var(--radius-xl); border-bottom-right-radius: var(--radius-xl); }
main > section:first-of-type .content-wrapper { padding-top: var(--space-48); padding-bottom: var(--space-40); }

/* Text blocks as artistic cards */
.text-section {
  display: flex; flex-direction: column; gap: var(--space-12);
  background: #FFFFFF;
  border: 2px solid var(--color-accent);
  border-left: 6px solid var(--color-secondary);
  border-radius: var(--radius-l);
  padding: var(--space-20);
  box-shadow: var(--shadow-s);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.text-section:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }
.text-section h3 { font-size: 18px; }

/* Cards distribution rules */
.feature-grid .text-section,
.service-cards .text-section,
.event-list .text-section { flex: 1 1 100%; }

@media (min-width: 768px) {
  .feature-grid .text-section { flex: 1 1 calc(50% - 12px); }
  .service-cards .text-section { flex: 1 1 calc(50% - 12px); }
  .event-list .text-section { flex: 1 1 calc(50% - 12px); }
}
@media (min-width: 1100px) {
  .feature-grid .text-section { flex: 1 1 calc(33.333% - 16px); }
  .service-cards .text-section { flex: 1 1 calc(33.333% - 16px); }
  .event-list .text-section { flex: 1 1 calc(33.333% - 16px); }
}

/* KPI tiles */
.kpi-grid .text-section {
  text-align: left;
  background: var(--color-accent);
  border: 2px dashed rgba(122,47,224,0.35);
}
@media (min-width: 768px) {
  .kpi-grid .text-section { flex: 1 1 calc(50% - 12px); }
}
@media (min-width: 1024px) {
  .kpi-grid .text-section { flex: 1 1 calc(25% - 18px); }
}

/* Ordered stepper as flex */
.stepper { display: flex; flex-wrap: wrap; gap: var(--space-12); list-style: decimal inside; }
.stepper li {
  flex: 1 1 100%;
  background: #fff; border: 1px solid var(--color-accent); border-radius: var(--radius-m);
  padding: var(--space-12) var(--space-16);
}
@media (min-width: 768px) { .stepper li { flex: 1 1 calc(50% - 12px); } }
@media (min-width: 1100px) { .stepper li { flex: 1 1 calc(33.333% - 16px); } }

/* Testimonials — high contrast on light background */
.testimonial-list { align-items: stretch; }
.testimonial-card {
  flex: 1 1 100%;
  background: #FFFFFF;
  border: 2px solid var(--color-accent);
  border-left: 6px solid var(--color-secondary);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-s);
}
.testimonial-card blockquote { color: var(--color-ink); font-size: 16px; }
.testimonial-card p { color: var(--color-muted); font-size: 14px; }
@media (min-width: 900px) {
  .testimonial-card { flex: 1 1 calc(33.333% - 16px); }
}

/* CTA panels */
.actions .cta-primary, .actions .cta-secondary { margin-right: 0; }

/* -----------------------------
   BUTTONS / CTAs
------------------------------ */
.cta-primary, .cta-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 14px;
  font-weight: 700; letter-spacing: 0.2px; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.cta-primary {
  background: var(--color-secondary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(122,47,224,0.35);
}
.cta-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(122,47,224,0.45); }
.cta-primary:active { transform: translateY(0); }

.cta-secondary {
  background: var(--color-accent);
  color: var(--color-ink);
  border: 2px solid var(--color-secondary);
}
.cta-secondary:hover { background: #fff; }

/* Generic button utility if needed */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 12px; }
.btn--outline { border: 2px solid var(--color-secondary); color: var(--color-secondary); background: transparent; }
.btn--ghost { background: transparent; color: var(--color-ink); }

/* -----------------------------
   TEXT-IMAGE SECTION RULES
------------------------------ */
.text-image-section { align-items: center; }
.text-image-section > * { flex: 1 1 100%; }
@media (min-width: 900px) {
  .text-image-section { flex-direction: row; }
  .text-image-section > * { flex: 1 1 48%; }
}

/* -----------------------------
   FOOTER
------------------------------ */
footer { border-top: 1px solid rgba(28,27,41,0.08); background: #fff; }
footer .content-wrapper { gap: var(--space-20); }
footer nav, footer .text-section { color: var(--color-muted); }
footer a { color: var(--color-secondary); }

/* -----------------------------
   ACCESSIBILITY & STATES
------------------------------ */
::selection { background: rgba(122,47,224,0.2); }
[disabled], .is-disabled { opacity: 0.6; pointer-events: none; }

/* -----------------------------
   COOKIES: Banner + Modal
------------------------------ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998;
  display: flex; flex-direction: column; gap: var(--space-16);
  padding: var(--space-16) var(--space-20);
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 -8px 24px rgba(28,27,41,0.22);
  transform: translateY(110%);
  transition: transform 0.35s ease;
}
.cookie-banner.show { transform: translateY(0%); }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.cookie-banner .btn-accept { background: var(--color-secondary); color: #fff; padding: 10px 14px; border-radius: 12px; }
.cookie-banner .btn-reject { background: #fff; color: var(--color-ink); padding: 10px 14px; border-radius: 12px; }
.cookie-banner .btn-settings { background: transparent; color: #fff; border: 2px solid #fff; padding: 8px 12px; border-radius: 12px; }

.cookie-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  background: rgba(28,27,41,0.6);
}
.cookie-modal.open { display: flex; }
.cookie-modal .cookie-modal-content {
  display: flex; flex-direction: column; gap: var(--space-16);
  width: 94%; max-width: 720px;
  background: #fff; color: var(--color-ink);
  padding: var(--space-24);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-l);
}
.cookie-categories { display: flex; flex-direction: column; gap: var(--space-12); }
.cookie-category { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); padding: 12px; border: 1px solid var(--color-accent); border-radius: var(--radius-m); }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); justify-content: flex-end; }

/* -----------------------------
   FORMS (generic if needed)
------------------------------ */
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--color-accent);
  background: #fff; color: var(--color-ink);
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(122,47,224,0.35); border-color: var(--color-secondary); }

/* -----------------------------
   UTILITIES
------------------------------ */
.hidden { display: none !important; }
.center { display: flex; align-items: center; justify-content: center; }
.wrap { display: flex; flex-wrap: wrap; gap: var(--space-16); }
.mt-20 { margin-top: 20px; }

/* -----------------------------
   RESPONSIVE TYPE & SPACING
------------------------------ */
@media (min-width: 576px) {
  h1 { font-size: 44px; }
  h2 { font-size: 30px; }
  h3 { font-size: 20px; }
}
@media (min-width: 992px) {
  h1 { font-size: 56px; }
  h2 { font-size: 36px; }
  h3 { font-size: 22px; }
  .content-wrapper { gap: var(--space-24); }
}

/* -----------------------------
   CREATIVE MICRO-DETAILS
------------------------------ */
/* Subtle animated underline for links in content */
.content-wrapper a:not(.cta-primary):not(.cta-secondary):not(.mobile-menu-toggle):not(.mobile-menu-close) {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: 0 100%;
  transition: background-size 0.25s ease;
}
.content-wrapper a:hover:not(.cta-primary):not(.cta-secondary):not(.mobile-menu-toggle):not(.mobile-menu-close) {
  background-size: 100% 2px;
}

/* Decorative corner on cards */
.text-section::after, .testimonial-card::after {
  content: ""; display: block; width: 22px; height: 22px;
  border-top-right-radius: 6px;
  border-top: 6px solid var(--color-secondary);
  border-right: 6px solid var(--color-secondary);
  align-self: flex-end; margin-top: 6px;
}

/* Ensure adequate spacing between all content blocks */
section .text-section + .text-section { margin-top: var(--space-20); }

/* -----------------------------
   CONTRAST SAFEGUARDS (Testimonials/Reviews)
------------------------------ */
/* Force dark text on light bg in testimonials to ensure readability */
.testimonial-card, .testimonial-card * { color: var(--color-ink); }
.testimonial-list .testimonial-card { background: #fff; }

/* -----------------------------
   PRINT (basic)
------------------------------ */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}
