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

:root {
  /* Colors - Brand palette inspired by modern roadside assistance theme */
  --color-background: #050816; /* deep navy / near-black */
  --color-surface: #0c1724; /* elevated surface navy */
  --color-surface-soft: #121f30;
  --color-text: #f8fafc; /* crisp white-ish */
  --color-text-muted: #cbd5f5; /* soft light blue-gray */

  --color-primary: #ffc800; /* safety yellow */
  --color-primary-dark: #e0ae00;
  --color-primary-soft: rgba(255, 200, 0, 0.1);

  --color-accent: #ff453a; /* energetic red */
  --color-accent-soft: rgba(255, 69, 58, 0.1);

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

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

  --color-border-subtle: rgba(148, 163, 184, 0.35);
  --color-border-strong: rgba(148, 163, 184, 0.7);

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --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.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing scale (0–96px) */
  --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 */

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

  /* Shadows - crisp, modern, suitable for high-contrast hero cards */
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.35);
  --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.45);
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.35);

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

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

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

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li,
figure,
blockquote,
dl,
dd {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

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

img {
  height: auto;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

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

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

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

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

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

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  -webkit-text-size-adjust: 100%;
  background-color: var(--color-background);
  color: var(--color-text);
}

main {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--line-height-tight);
  letter-spacing: 0.02em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(var(--font-size-3xl), 4vw, var(--font-size-5xl));
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(var(--font-size-2xl), 3vw, var(--font-size-4xl));
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(var(--font-size-xl), 2.2vw, var(--font-size-3xl));
  margin-bottom: var(--space-3);
}

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

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

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

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

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

a {
  position: relative;
  cursor: pointer;
}

a:hover {
  text-decoration: none;
}

/* High-contrast link highlight suitable for dark background */
a:not(.btn) {
  color: var(--color-primary);
  transition: color var(--transition-base);
}

a:not(.btn):hover {
  color: var(--color-accent);
}

strong,
b {
  font-weight: 600;
}

code,
pre {
  font-family: var(--font-mono);
}

pre {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: #020617;
  overflow-x: auto;
}

/* ========================================================================== 
   Accessibility & Focus Styles
   ========================================================================== */

:focus {
  outline: none;
}

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

/* Screen reader only - for Polish accessibility texts and labels */
.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;
}

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

/* Responsive container for bold hero layouts & content sections */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  max-width: 1120px;
}

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

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

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

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

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

/* Grid utilities - for service cards, testimonials, etc. */
.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: minmax(0, 1fr);
  }
}

/* Common spacing utilities */
.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

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

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

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

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

/* Buttons - strong CTAs with safety yellow & red accents */
.btn {
  --btn-bg: var(--color-primary);
  --btn-bg-hover: var(--color-primary-dark);
  --btn-text: #000;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-base),
              color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-fast),
              border-color var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background-color: var(--btn-bg-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn-primary {
  --btn-bg: var(--color-primary);
  --btn-bg-hover: var(--color-primary-dark);
  --btn-text: #111827;
}

.btn-accent {
  --btn-bg: var(--color-accent);
  --btn-bg-hover: #e03127;
  --btn-text: #ffffff;
}

.btn-outline {
  --btn-bg: transparent;
  --btn-bg-hover: rgba(15, 23, 42, 0.9);
  --btn-text: var(--color-text);

  border-color: var(--color-border-strong);
  box-shadow: none;
}

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

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

.btn-icon {
  padding-inline: 1rem;
}

/* Inputs - consistent for contact forms, emergency request forms */
.input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-base),
              background-color var(--transition-base),
              box-shadow var(--transition-base);
}

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

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

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

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

.input-error {
  border-color: var(--color-danger);
}

.input-error-message {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

/* Card component - for services, credentials, testimonials */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: linear-gradient(145deg, var(--color-surface), var(--color-surface-soft));
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card--subtle {
  box-shadow: none;
  border-color: rgba(148, 163, 184, 0.18);
}

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

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

.card-meta {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
}

/* Badge / pill - for status indicators like 24/7, emergency */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

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

/* ========================================================================== 
   Media & Hero Helpers
   ========================================================================== */

/* For high-resolution, cinematic roadside imagery */
.hero-image {
  position: relative;
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(255, 200, 0, 0.26), transparent 55%),
              radial-gradient(circle at 100% 100%, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 1));
  pointer-events: none;
}

/* Layer for stats / emergency phone number over hero photo */
.hero-content-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-6);
  background: linear-gradient(to top, rgba(5, 8, 22, 0.95), transparent);
  color: var(--color-text);
}

/* ========================================================================== 
   Helper Classes for High-Contrast Sections
   ========================================================================== */

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

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

.bg-emergency {
  background: radial-gradient(circle at 0 0, rgba(255, 69, 58, 0.18), transparent 60%),
              #050816;
}

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

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

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

.border-subtle {
  border: 1px solid var(--color-border-subtle);
}

.border-strong {
  border: 1px solid var(--color-border-strong);
}

/* ========================================================================== 
   End base.css
   ========================================================================== */
