/* ==================================================================
   Variables
   ================================================================== */
:root {
  /* Colors */
  --color-background: #0f172a; /* deep blue-gray for a modern, professional feel */
  --color-surface: #111827; /* slightly lighter for cards/sections */
  --color-surface-alt: #020617; /* hero/headers contrast */
  --color-text: #e5e7eb; /* light gray text for dark background */
  --color-text-muted: #9ca3af;
  --color-border: #1f2937;

  /* Brand accent inspired by warm, efficient home lighting */
  --color-primary: #fbbf24; /* warm amber */
  --color-primary-soft: rgba(251, 191, 36, 0.12);

  --color-success: #22c55e;
  --color-warning: #f97316;
  --color-danger: #ef4444;

  --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: #1f2937;
  --gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", 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.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (px values) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;

  /* Shadows evoking subtle light glow */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.5);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.7);
  --shadow-soft-glow: 0 0 40px rgba(251, 191, 36, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 300ms ease-out;

  /* Layout */
  --layout-max-width: 1120px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure {
  margin: 0;
}

/* Remove default focus outlines, we will re-add accessible styles */
:focus {
  outline: none;
}

/* ==================================================================
   Base Styles
   ================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background: radial-gradient(circle at 0 0, rgba(251, 191, 36, 0.15), transparent 55%),
              radial-gradient(circle at 100% 0, rgba(56, 189, 248, 0.12), transparent 55%),
              var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

h1,
 h2,
 h3,
 h4,
 h5,
 h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--line-height-snug);
  color: #f9fafb;
}

h1 {
  font-size: clamp(2rem, 2.8vw, var(--font-size-4xl));
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.75rem, 2.4vw, var(--font-size-3xl));
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.5rem, 2vw, var(--font-size-2xl));
  margin-bottom: var(--space-2);
}

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

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

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  color: #fedf89;
}

a:active {
  opacity: 0.85;
}

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

strong {
  font-weight: 600;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9em;
}

hr {
  border: 0;
  height: 1px;
  background-color: var(--color-border);
  margin: var(--space-6) 0;
}

/* ==================================================================
   Utilities
   ================================================================== */

/* Layout container */
.container {
  width: 100%;
  max-width: var(--layout-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

/* 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;
}

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

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

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

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

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

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

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

/* Spacing utilities (commonly used) */
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }

.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-surface-alt { background-color: var(--color-surface-alt); }

.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }

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

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

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

/* Buttons: primary, secondary, ghost */
.button,
.btn {
  --btn-bg: var(--color-primary);
  --btn-color: #111827;
  --btn-border: transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--btn-border);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background-color: var(--btn-bg);
  color: var(--btn-color);
  box-shadow: var(--shadow-sm), var(--shadow-soft-glow);
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast),
    border-color var(--transition-fast);
}

.button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md), var(--shadow-soft-glow);
}

.button:active,
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.button--primary,
.btn-primary {
  --btn-bg: var(--color-primary);
  --btn-color: #111827;
  --btn-border: rgba(15, 23, 42, 0.7);
}

.button--primary:hover,
.btn-primary:hover {
  --btn-bg: #fedf89;
  color: #000 !important;
}

.button--secondary,
.btn-secondary {
  --btn-bg: rgba(15, 23, 42, 0.8);
  --btn-color: var(--color-text);
  --btn-border: var(--color-border);
}

.button--secondary:hover,
.btn-secondary:hover {
  --btn-bg: rgba(15, 23, 42, 1);
}

.button--ghost,
.btn-ghost {
  --btn-bg: transparent;
  --btn-color: var(--color-text);
  --btn-border: rgba(148, 163, 184, 0.4);
  box-shadow: none;
}

.button--ghost:hover,
.btn-ghost:hover {
  --btn-bg: rgba(15, 23, 42, 0.8);
}

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

/* Form elements */
.input,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

.input:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.5);
  background-color: rgba(15, 23, 42, 1);
}

input[disabled],
select[disabled],
textarea[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: #e5e7eb;
}

/* Card: for service highlights, process steps, etc. */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% -10%, rgba(251, 191, 36, 0.12), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}

.card > * {
  position: relative;
}

.card--soft {
  background-color: rgba(15, 23, 42, 0.85);
  box-shadow: var(--shadow-sm);
}

/* Section pattern for main pages like "O nas", "Oferta", etc. */
.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section--alt {
  background-color: rgba(15, 23, 42, 0.95);
}

.section-heading {
  margin-bottom: var(--space-6);
}

.section-heading span {
  display: inline-block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.section-heading h2 {
  max-width: 32rem;
}

/* ==================================================================
   Accessibility & Motion
   ================================================================== */

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* Make sure focus is visible on key UI elements */
.button:focus-visible,
.btn:focus-visible,
a.button:focus-visible,
a.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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

/* ==================================================================
   Helper classes tuned for this brand
   ================================================================== */

/* Light-themed tag, e.g. "Projektowanie", "Instalacja", "Konfiguracja" */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  background-color: rgba(15, 23, 42, 0.85);
  color: var(--color-text-muted);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Hero accent line */
.hero-accent {
  position: relative;
  padding-left: 1.5rem;
}

.hero-accent::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 0;
  width: 1rem;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, var(--color-primary), transparent);
}

/* Icon circle background for features */
.icon-circle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0, rgba(251, 191, 36, 0.6), rgba(15, 23, 42, 0.9));
  color: #0b1120;
  box-shadow: var(--shadow-soft-glow);
}

/* Process step for consultation -> planning -> installation -> setup */
.process-step {
  position: relative;
  padding-left: 2.5rem;
}

.process-step-number {
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(251, 191, 36, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  color: var(--color-primary);
  background: rgba(15, 23, 42, 0.9);
}

/* Pricing highlight (for consultation / wycena) */
.price-highlight {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: #fef3c7;
}

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

/* Footer subtle border */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  background-color: rgba(15, 23, 42, 0.95);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.85));
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

.logo-text {
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-sm);
}

.nav-links a {
  position: relative;
  color: var(--color-text-muted);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 1px;
  background-color: var(--color-primary);
  transition: width var(--transition-normal);
}

.nav-links a:hover {
  color: var(--color-text);
}

.nav-links a:hover::after {
  width: 100%;
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* intended to be replaced by a mobile nav toggle in actual layout */
  }
}
