:root {
  /* =============================
     Color System
     ============================= */
  --color-background: #0f172a; /* deep blue-gray, technical */
  --color-surface: #111827;
  --color-elevated: #020617;
  --color-text: #e5e7eb;
  --color-text-muted: #9ca3af;
  --color-border: #1f2937;

  --color-primary: #38bdf8; /* cyan / blueprint accent */
  --color-primary-soft: rgba(56, 189, 248, 0.12);
  --color-primary-strong: #0ea5e9;

  --color-success: #22c55e;
  --color-warning: #facc15;
  --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", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-mono: "JetBrains 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 */

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

  /* =============================
     Spacing Scale (px)
     ============================= */
  --space-0: 0;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;
  --space-80: 80px;
  --space-96: 96px;

  /* =============================
     Radius & Shadows
     ============================= */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.45);
  --shadow-sharp: 0 0 0 1px rgba(148, 163, 184, 0.25);

  /* =============================
     Motion
     ============================= */
  --transition-fast: 120ms ease-out;
  --transition-base: 180ms ease-out;
  --transition-slow: 240ms ease;
}

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

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

img,
video {
  height: auto;
}

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

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

ul,
ol {
  list-style: none;
}

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

/* Remove animations if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================
   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 top left, #1f2937 0, #020617 55%, #000 100%);
  color: var(--color-text);
}

main {
  min-height: 60vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
  letter-spacing: 0.03em;
  color: #f9fafb;
}

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

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

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-16);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-12);
}

p {
  margin-bottom: var(--space-16);
  color: var(--color-text-muted);
  line-height: var(--line-height-relaxed);
}

strong {
  font-weight: 600;
}

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

/* Links */
a {
  position: relative;
  cursor: pointer;
  transition: color var(--transition-base),
    opacity var(--transition-fast);
}

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

/* Architectural underline accent for nav / main links when desired */
a[data-underline="architect"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 22px;
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--color-primary),
    rgba(56, 189, 248, 0.15)
  );
  transform-origin: left;
  transform: scaleX(0.3);
  transition: transform var(--transition-base);
}

a[data-underline="architect"]:hover::after,
a[data-underline="architect"][aria-current="page"]::after {
  transform: scaleX(1);
}

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

/* Visually hidden but accessible */
.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
   ============================= */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.section {
  padding-block: clamp(48px, 6vw, 96px);
}

.section--divider {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

/* Flex utilities */
.flex {
  display: 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;
}

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

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

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

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

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

/* Simple spacing utilities for vertical rhythm */
.stack-16 > * + * {
  margin-top: var(--space-16);
}

.stack-24 > * + * {
  margin-top: var(--space-24);
}

.stack-32 > * + * {
  margin-top: var(--space-32);
}

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

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

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

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  color: #0b1120;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.35);
  transition: background var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast),
    border-color var(--transition-base);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.4);
  color: #0b1120;
}

.button:active {
  transform: translateY(0);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.8);
}

.button--ghost {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--color-text)!important;
  box-shadow: none;
}

.button--ghost:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sharp);
}

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

/* Form Elements */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: var(--font-size-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-300);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.92);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition: border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-fast);
}

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

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.7);
  background: #020617;
}

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

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

.input--error:focus-visible,
.textarea--error:focus-visible {
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.75);
}

/* Card - used for services, about highlight, contact data */
.card {
  position: relative;
  padding: var(--space-24);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, #111827 0, #020617 40%, #020617 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(
      135deg,
      rgba(56, 189, 248, 0.18) 0,
      transparent 40%,
      transparent 60%,
      rgba(56, 189, 248, 0.06) 100%
    );
  opacity: 0.25;
  mix-blend-mode: screen;
  pointer-events: none;
}

.card__content {
  position: relative;
}

.card--outlined {
  background: rgba(15, 23, 42, 0.9);
  box-shadow: none;
}

/* Subtle blueprint grid overlay helper */
.blueprint-bg {
  position: relative;
  isolation: isolate;
}

.blueprint-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.35;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: -1;
}

/* =============================
   Helper classes for corporate sections
   ============================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(56, 189, 248, 0.5);
  background: rgba(15, 23, 42, 0.9);
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kpi {
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
}

.kpi-label {
  margin-top: 6px;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Contact info block used for Polish address + representative */
.contact-list {
  display: grid;
  gap: 10px;
  font-size: var(--font-size-sm);
}

.contact-list dt {
  font-weight: 500;
  color: var(--gray-300);
}

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

/* Footer */
.footer {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding-block: var(--space-24);
  background: radial-gradient(circle at top, #020617 0, #020617 70%, #000 100%);
  font-size: var(--font-size-sm);
  color: var(--gray-400);
}

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

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