/* ==========================================================================
   Variables
   ==========================================================================
*/

:root {
  /* Colors */
  --color-background: #f4f5f7;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border-subtle: #e5e7eb;

  --color-primary: #2563eb; /* clean, modern blue */
  --color-primary-soft: #e0edff;
  --color-primary-strong: #1d4ed8;

  --color-success: #16a34a;
  --color-warning: #f59e0b;
  --color-danger: #dc2626;

  --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", 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.2;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

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

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-subtle: 0 2px 8px rgba(15, 23, 42, 0.04);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 180ms ease-out;
  --transition-slow: 240ms ease-out;
}

/* ==========================================================================
   Reset / Normalize
   ==========================================================================
*/

*, *::before, *::after {
  box-sizing: border-box;
}

html,
body,
 h1, h2, h3, h4, h5, h6,
 p, figure, blockquote,
 dl, dd,
 ul, ol,
 button,
 input,
 textarea {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
}

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

img {
  height: auto;
}

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border-radius: 0;
}

button {
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Remove animations for users preferring reduced motion */
@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;
  }
}

/* ==========================================================================
   Base
   ==========================================================================
*/

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: 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-tight);
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.25rem, 3vw, 2.75rem);
  margin-bottom: var(--space-4);
}

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

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

h4 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-4);
  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.95em;
}

::selection {
  background-color: var(--color-primary-soft);
  color: var(--color-text);
}

/* Links */
a {
  position: relative;
  text-decoration: none;
  color: var(--color-primary);
  transition: color var(--transition-normal);
}

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

/* Underline on hover, but keep minimal */
a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

a:not(.btn):hover::after {
  transform: scaleX(1);
}

/* ==========================================================================
   Accessibility
   ==========================================================================
*/

:focus {
  outline: none;
}

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

[tabindex="-1"]:focus {
  outline: none !important;
}

.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;
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

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

.section--muted {
  background-color: var(--gray-50);
}

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

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

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

.max-w-prose {
  max-width: 640px;
}

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

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

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

.flex-row {
  flex-direction: row;
}

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

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

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

.justify-between {
  justify-content: space-between;
}

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

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

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

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

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

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

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

/* Spacing utilities (limited set for cleanliness) */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.pt-8 { padding-top: var(--space-8); }
.pb-8 { padding-bottom: var(--space-8); }

/* Width helpers */
.w-full { width: 100%; }

/* Alignment helpers for Polish content-heavy sections */
.lead {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background-color: var(--color-primary-soft);
  color: var(--color-primary-strong);
}

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

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-fast);
}

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff !important;
  box-shadow: var(--shadow-subtle);
}

.btn-primary:hover {
  background-color: var(--color-primary-strong);
  border-color: var(--color-primary-strong);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--gray-300);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-strong);
  box-shadow: var(--shadow-subtle);
}

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

.btn-ghost:hover {
  background-color: rgba(15, 23, 42, 0.04);
}

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

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
}

/* Form controls */

.input,
.textarea,
.select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  background-color: #ffffff;
  font-size: var(--font-size-sm);
  transition:
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    background-color var(--transition-normal);
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--gray-400);
}

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

.textarea {
  min-height: 120px;
  resize: vertical;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gray-500) 50%),
    linear-gradient(135deg, var(--gray-500) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
}

.field-description {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 4px;
}

.field-error {
  font-size: var(--font-size-xs);
  color: var(--color-danger);
  margin-top: 4px;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--color-danger);
}

/* Cards */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.03);
}

.card--muted {
  background-color: #ffffff;
  box-shadow: var(--shadow-subtle);
}

.card-header {
  margin-bottom: var(--space-4);
}

.card-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-2);
}

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

/* Simple layout helpers for hero / two-column sections */

.layout-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--space-10);
  align-items: center;
}

@media (max-width: 960px) {
  .layout-split {
    grid-template-columns: 1fr;
  }
}

/* Testimonial / case study elements */

.quote {
  position: relative;
  padding-left: var(--space-4);
  border-left: 3px solid var(--color-primary-soft);
  color: var(--color-text);
  font-style: italic;
}

.quote-author {
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
}

.quote-role {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Process / step indicators for explaining how the service works */

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

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: flex-start;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background-color: var(--color-primary-soft);
  color: var(--color-primary-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.step-content-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: 4px;
}

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

/* Tag list for services, technologies, or workspace features */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gray-200);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  background-color: #ffffff;
}

/* Basic header/footer scaffolding (without layout opinion) */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: rgba(244, 245, 247, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-subtle);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: var(--font-size-sm);
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-footer {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  border-top: 1px solid var(--color-border-subtle);
  background-color: #ffffff;
}

.site-footer-meta {
  margin-top: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Simple responsive helper for navigation toggles (no JS here) */

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }
}
