/* ========================================================================
   Variables
   ======================================================================== */
:root {
  /* Colors */
  --color-bg: #f5f5f7;
  --color-surface: #ffffff;
  --color-text: #111111;
  --color-text-muted: #5f626a;

  --color-primary: #0f7cc4; /* professional blue */
  --color-primary-soft: #e2eff8;
  --color-success: #219653;
  --color-warning: #f2c94c;
  --color-danger: #d63c3c;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2933;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --font-size-xs: 0.75rem;  /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem;   /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem;  /* 20px */
  --font-size-2xl: 1.5rem;  /* 24px */
  --font-size-3xl: 1.875rem;/* 30px */
  --font-size-4xl: 2.25rem; /* 36px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (px) */
  --space-0: 0;
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-8: 16px;
  --space-10: 20px;
  --space-12: 24px;
  --space-16: 32px;
  --space-20: 40px;
  --space-24: 48px;
  --space-28: 56px;
  --space-32: 64px;
  --space-40: 80px;
  --space-48: 96px;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows (subtle, to match trustworthy corporate style) */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.18);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 220ms ease-out;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }
}

/* ========================================================================
   Reset / Normalize
   ======================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul[role='list'],
ol[role='list'] {
  list-style: none;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  padding: 0;
  background: none;
}

a {
  color: inherit;
}

/* Remove default focus only when redefined with :focus-visible below */
:focus {
  outline: none;
}

/* ========================================================================
   Base Styles
   ======================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-8);
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
}

p {
  margin-bottom: var(--space-8);
  color: var(--color-text-muted);
}

strong {
  font-weight: 600;
}

small {
  font-size: var(--font-size-sm);
}

a {
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-primary);
}

/* ========================================================================
   Accessibility & Focus States
   ======================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

/* ========================================================================
   Utilities
   ======================================================================== */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-16);
  padding-right: var(--space-16);
  max-width: 1120px; /* solid, slightly narrow corporate layout */
}

@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
}

/* Flex helpers */
.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.gap-8 {
  gap: var(--space-8);
}

.gap-16 {
  gap: var(--space-16);
}

/* Grid helpers */
.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-16);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-16);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Spacing utilities (y-axis for sections) */
.section {
  padding-top: var(--space-40);
  padding-bottom: var(--space-40);
}

.section-sm {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

/* Alignment helpers */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--color-text-muted);
}

.bg-surface {
  background-color: var(--color-surface);
}

.bg-primary-soft {
  background-color: var(--color-primary-soft);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  line-height: 1.1;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: #0c649f;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-primary:active {
  background-color: #0a577f;
  box-shadow: var(--shadow-sm);
  transform: translateY(0);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary-soft);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-text);
}

.btn[disabled],
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-icon {
  padding: 0.5rem;
  border-radius: var(--radius-full);
}

/* Inputs & form controls */
.input,
textarea,
select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  background-color: #ffffff;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

.input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

.input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft);
}

.input[disabled],
textarea[disabled],
select[disabled] {
  background-color: var(--gray-100);
  cursor: not-allowed;
}

label {
  display: inline-block;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--gray-800);
}

/* Cards - useful for services, realizations, testimonials */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
}

.card--elevated {
  box-shadow: var(--shadow-md);
}

.card__header {
  margin-bottom: var(--space-8);
}

.card__title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.card__body {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Badges for status (e.g. "Ponad 10 lat doświadczenia") */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  background-color: var(--gray-100);
  color: var(--gray-700);
}

.badge--primary {
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
}

.badge--success {
  background-color: #e5f7ec;
  color: var(--color-success);
}

/* Simple tag-like list for contact details */
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
  font-size: var(--font-size-sm);
}

.info-label {
  font-weight: 600;
  color: var(--gray-700);
  min-width: 80px;
}

/* Hero layout helpers (for homepage introduction of renovation services) */
.hero {
  padding-top: var(--space-40);
  padding-bottom: var(--space-40);
}

.hero__content {
  max-width: 640px;
}

.hero__kicker {
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.hero__title {
  margin-bottom: var(--space-8);
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
}

/* Simple section title style (for "Usługi", "Realizacje", "Kontakt") */
.section-title {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-4);
}

.section-description {
  max-width: 640px;
  margin-bottom: var(--space-16);
  color: var(--color-text-muted);
}

/* Tables (for structured contact details if needed) */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table th,
.table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  text-align: left;
}

.table th {
  font-weight: 600;
  color: var(--gray-700);
}

/* Footer basic style */
.footer {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.footer a {
  color: var(--color-primary);
}

.footer a:hover {
  text-decoration: underline;
}

/* ========================================================================
   Ultra-narrow mobile (375px+)
   ======================================================================== */
@media (max-width: 480px) {
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }

  .section {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
  }

  .section-sm {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }

  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  h3 {
    font-size: var(--font-size-xl);
  }

  .info-label {
    min-width: 60px;
  }

  .info-list li {
    gap: var(--space-4);
    margin-bottom: var(--space-4);
  }

  .table th,
  .table td {
    padding: 0.375rem 0.5rem;
    font-size: var(--font-size-xs);
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-xs);
  }

  .input,
  textarea,
  select {
    padding: 0.45rem 0.6rem;
    font-size: var(--font-size-sm);
  }

  label {
    font-size: var(--font-size-xs);
  }

  .card {
    padding: var(--space-12);
  }

  .gap-8 {
    gap: var(--space-4);
  }

  .gap-16 {
    gap: var(--space-8);
  }
}
