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

:root {
  /* Colors */
  --color-background: #0b1020; /* deep, professional background */
  --color-surface: #101629;    /* elevated surfaces (cards, panels) */
  --color-surface-alt: #151c33;
  --color-text: #f7f9ff;
  --color-text-muted: #b7bed6;

  /* Corporate accent inspired by secure digital payments */
  --color-primary: #2f8cff;    /* main brand / action color */
  --color-primary-soft: rgba(47, 140, 255, 0.12);
  --color-primary-hover: #1f73d6;

  --color-success: #4bbf6b;
  --color-success-soft: rgba(75, 191, 107, 0.12);
  --color-warning: #f5a623;
  --color-warning-soft: rgba(245, 166, 35, 0.16);
  --color-danger: #e55353;
  --color-danger-soft: rgba(229, 83, 83, 0.16);

  /* Neutral grays (for borders, dividers, subtle text) */
  --gray-50:  #f9fafb;
  --gray-100: #eef0f5;
  --gray-200: #d8dce8;
  --gray-300: #b7bed6;
  --gray-400: #8a93b3;
  --gray-500: #6b7392;
  --gray-600: #4e5570;
  --gray-700: #363b52;
  --gray-800: #1f2335;
  --gray-900: #101320;

  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.18);

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-heading: "Inter", 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-snug: 1.35;
  --line-height-normal: 1.6;

  /* 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-7: 1.75rem;  /* 28px */
  --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: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadows (subtle corporate, not playful) */
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.35);
  --shadow-focus: 0 0 0 1px rgba(16, 112, 255, 0.6), 0 0 0 6px rgba(16, 112, 255, 0.25);

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

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

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

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

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

ul, ol {
  list-style: none;
}

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

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

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

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

/* Respect user motion preferences */

@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 Styles
   ======================================================================== */

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;
  text-rendering: optimizeLegibility;
}

main {
  min-height: 60vh;
}

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

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

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

h3 {
  font-size: clamp(1.35rem, 1vw + 1rem, 1.75rem);
  margin-bottom: var(--space-2);
}

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

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

strong {
  font-weight: 600;
}

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

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

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

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

a:focus-visible {
  outline: 2px solid rgba(47, 140, 255, 0.75);
  outline-offset: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border-subtle);
  margin: var(--space-8) 0;
}

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

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

:focus-visible {
  outline: 2px solid rgba(47, 140, 255, 0.9);
  outline-offset: 2px;
}

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

.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  max-width: 1120px; /* optimized for corporate content & Polish locale text */
}

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

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

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

/* Flex helpers */

.flex {
  display: flex;
}

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

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

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

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

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

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

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

.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: minmax(0, 1fr);
  }
}

/* Width helpers */

.w-full {
  width: 100%;
}

/* Text alignment */

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

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

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

/* Spacing utilities (only a small curated set for base) */

.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-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

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

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

/* Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-fast),
              transform var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #2f8cff, #47b2ff);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1f73d6, #3694e6);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn-outline {
  background-color: transparent;
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.42);
}

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

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--color-text);
}

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

.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* Form fields ---------------------------------------------------------- */

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(6, 10, 20, 0.9);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base),
              background-color var(--transition-base);
}

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

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: rgba(47, 140, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(47, 140, 255, 0.75);
  background-color: rgba(7, 12, 26, 0.98);
}

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

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

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

.form-hint {
  font-size: var(--font-size-xs);
  color: var(--gray-400);
  margin-top: var(--space-1);
}

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

.input--error,
.textarea--error,
.select--error {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 1px rgba(229, 83, 83, 0.6);
}

/* Card component ------------------------------------------------------- */

.card {
  background: radial-gradient(circle at top left, rgba(47, 140, 255, 0.16), transparent 55%),
              var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-sm);
}

.card--muted {
  background: var(--color-surface-alt);
}

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

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

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

.card-meta {
  margin-top: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--gray-400);
}

/* Badges / tags -------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

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

.badge-success {
  background-color: var(--color-success-soft);
  color: #e5f8ec;
}

.badge-warning {
  background-color: var(--color-warning-soft);
  color: #fff5e3;
}

.badge-muted {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--gray-300);
}

/* Testimonials / quotes ------------------------------------------------ */

.quote {
  border-left: 3px solid rgba(47, 140, 255, 0.7);
  padding-left: var(--space-4);
  color: var(--color-text-muted);
  font-style: italic;
}

.quote-author {
  margin-top: var(--space-3);
  font-weight: 500;
  color: var(--gray-100);
}

.quote-role {
  font-size: var(--font-size-xs);
  color: var(--gray-400);
}

/* Simple chips for use cases (e.g., entrepreneurs, freelancers) -------- */

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: var(--font-size-xs);
  color: var(--gray-200);
  background: rgba(0, 0, 0, 0.2);
}

/* Blog / meta info ----------------------------------------------------- */

.meta {
  font-size: var(--font-size-xs);
  color: var(--gray-400);
}

/* Alerts (for success/error of contact form) --------------------------- */

.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
}

.alert-success {
  background-color: var(--color-success-soft);
  color: #e5f8ec;
}

.alert-danger {
  background-color: var(--color-danger-soft);
  color: #ffe7e7;
}

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