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

:root {
  /* Colors */
  --color-background: #f4f7fb;
  --color-surface: #ffffff;
  --color-surface-alt: #f0f3f8;
  --color-text: #111827;
  --color-text-muted: #6b7280;

  /* Brand / Accent (cool blues & steel grays) */
  --color-primary: #2563eb; /* main brand blue */
  --color-primary-soft: #dbeafe;
  --color-primary-strong: #1d4ed8;
  --color-accent: #22a6f2; /* secondary accent blue */

  /* Status */
  --color-success: #16a34a;
  --color-success-soft: #dcfce7;
  --color-warning: #f97316;
  --color-warning-soft: #fff7ed;
  --color-danger: #dc2626;
  --color-danger-soft: #fee2e2;

  /* Neutral grays (steel-inspired) */
  --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 */
  --font-size-5xl: 3rem;     /* 48px */

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.75;

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

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

  /* Shadows (subtle, professional) */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.12);

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

  /* Layout */
  --container-max-width: 1120px;
  --container-padding: 1.5rem;
}

/* ========================================================================
   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,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

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

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

textarea {
  resize: vertical;
}

/* Remove default focus outlines, we'll reintroduce 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);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  min-height: 60vh;
}

/* Headings: modern, clean hierarchy suitable for corporate logistics site */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--gray-900);
}

h1 {
  font-size: clamp(2.25rem, 3vw, 3rem);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-16);
}

h2 {
  font-size: clamp(1.875rem, 2.4vw, 2.25rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-12);
}

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

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

h5 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-4);
}

h6 {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

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

p.lead {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-muted);
}

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

strong {
  font-weight: 600;
}

/* Links: understated, professional */

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

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

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

/* Lists */

ul,
ol {
  margin: 0 0 var(--space-16) var(--space-24);
  padding: 0;
}

li + li {
  margin-top: var(--space-4);
}

/* Horizontal rule */

hr {
  border: 0;
  border-top: 1px solid var(--gray-200);
  margin: var(--space-24) 0;
}

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

/* Container for readable content width */

.container {
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* 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-column {
  display: flex;
  flex-direction: column;
}

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

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

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

/* Grid helpers */

.grid {
  display: grid;
}

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

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

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

/* Spacing utilities (common only, more can be added per project) */

.mt-0 { margin-top: 0; }
.mt-16 { margin-top: var(--space-16); }
.mt-24 { margin-top: var(--space-24); }
.mt-32 { margin-top: var(--space-32); }

.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: var(--space-16); }
.mb-24 { margin-bottom: var(--space-24); }
.mb-32 { margin-bottom: var(--space-32); }

.pt-32 { padding-top: var(--space-32); }
.pb-32 { padding-bottom: var(--space-32); }

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

/* 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 CTAs for Polish B2B logistics audience */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-weight: 500;
  font-size: var(--font-size-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 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);
}

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

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

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: rgba(37, 99, 235, 0.4);
}

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

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

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

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

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

/* Form inputs: consistent, clear for business forms */

.input,
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  background-color: #ffffff;
  color: var(--color-text);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
}

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

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

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

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

.form-field {
  margin-bottom: var(--space-16);
}

.form-helper {
  margin-top: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

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

/* Card: for case studies, testimonials, leadership bios */

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

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

.card-title {
  font-size: var(--font-size-xl);
  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);
}

/* Hero image / media wrapper for logistics photography */

.media-cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.media-cover img,
.media-cover picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Simple tag / badge for service labels, statuses */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background-color: var(--color-primary-soft);
  color: var(--color-primary-strong);
}

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

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

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