/* =========================================================
   Variables
   ========================================================= */
:root {
  /* Colors */
  --color-bg: #050816;
  --color-bg-alt: #0b1020;
  --color-surface: #111827;
  --color-surface-soft: #1f2937;
  --color-text: #e5e7eb;
  --color-text-muted: #9ca3af;
  --color-primary: #38bdf8;
  --color-primary-soft: rgba(56, 189, 248, 0.12);
  --color-success: #22c55e;
  --color-warning: #facc15;
  --color-danger: #f97373;
  --color-border-subtle: #1f2937;
  --color-border-strong: #4b5563;
  --color-neutral-50: #f9fafb;
  --color-neutral-100: #f3f4f6;
  --color-neutral-200: #e5e7eb;
  --color-neutral-300: #d1d5db;
  --color-neutral-400: #9ca3af;
  --color-neutral-500: #6b7280;
  --color-neutral-600: #4b5563;
  --color-neutral-700: #374151;
  --color-neutral-800: #1f2937;
  --color-neutral-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --font-mono: 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-md: 1.0625rem; /* 17px */
  --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;
  --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-xl: 16px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.35);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.3);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.55);

  /* Transitions */
  --transition-fast: 120ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 280ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-normal: 0ms;
    --transition-slow: 0ms;
  }
}

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

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

body {
  margin: 0;
}

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

ul, ol {
  margin: 0;
  padding: 0;
}

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

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

img {
  border-style: none;
}

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

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

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

html:focus-within {
  scroll-behavior: smooth;
}

/* =========================================================
   Base
   ========================================================= */
body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  background-color: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-neutral-50);
}

h1 {
  font-size: clamp(2.25rem, 3vw, 2.75rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 2.4vw, 2.1rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h1, h2, h3, h4 {
  margin-bottom: var(--space-3);
}

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

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

strong {
  font-weight: 600;
}

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

::selection {
  background-color: rgba(56, 189, 248, 0.15);
  color: var(--color-text);
}

/* =========================================================
   Accessibility & Focus
   ========================================================= */
:focus {
  outline: none;
}

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

/* =========================================================
   Layout & Utilities
   ========================================================= */
.section {
  padding-block: var(--space-16);
}

.section--tight {
  padding-block: var(--space-12);
}

.section--subtle {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 55%),
              radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.08), transparent 55%);
}

.section__header {
  margin-bottom: var(--space-6);
}

.section__eyebrow {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.section__title {
  margin-bottom: var(--space-2);
}

.section__description {
  max-width: 42rem;
}

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

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--space-6);
  }
}

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

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.flex {
  display: flex;
}

.flex--center {
  align-items: center;
  justify-content: center;
}

.flex--between {
  align-items: center;
  justify-content: space-between;
}

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

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

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

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

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

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

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

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

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

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  background-color: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--color-border-subtle);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.badge--primary {
  border-color: rgba(56, 189, 248, 0.4);
  background-color: rgba(15, 23, 42, 0.9);
  color: var(--color-primary);
}

/* Spacing utilities (for modular Polish blocks) */
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mt-8 { margin-top: var(--space-8) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }

/* Screen-reader only */
.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;
}

/* =========================================================
   Links
   ========================================================= */
.link {
  position: relative;
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary), #a855f7);
  transition: width var(--transition-normal);
}

.link:hover::after,
.link:focus-visible::after {
  width: 100%;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-inline: 1.4rem;
  padding-block: 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  line-height: 1.1;
  cursor: pointer;
  background-color: var(--color-surface-soft);
  color: var(--color-text);
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary), #4f46e5);
  border-color: rgba(15, 23, 42, 0.9);
  color: #0b1120;
  box-shadow: 0 14px 30px rgba(56, 189, 248, 0.35);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(56, 189, 248, 0.45);
}

.btn--secondary {
  background-color: rgba(15, 23, 42, 0.9);
  border-color: var(--color-border-subtle);
  color: var(--color-text);
}

.btn--secondary:hover {
  background-color: rgba(15, 23, 42, 1);
  border-color: var(--color-border-strong);
}

.btn--ghost {
  background-color: transparent;
  border-color: rgba(148, 163, 184, 0.4);
  color: var(--color-text-muted);
}

.btn--ghost:hover {
  border-color: rgba(148, 163, 184, 0.9);
  color: var(--color-text);
}

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

.btn--block {
  width: 100%;
}

/* =========================================================
   Forms & Inputs
   ========================================================= */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field__label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
}

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

.field__error {
  font-size: var(--font-size-xs);
  color: var(--color-danger);
}

.input,
.textarea,
.select {
  width: 100%;
  padding-inline: 0.9rem;
  padding-block: 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(15, 23, 42, 0.8);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

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

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.7);
  background-color: rgba(15, 23, 42, 1);
}

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

/* =========================================================
   Cards & Repeated Blocks
   ========================================================= */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.09), transparent 55%),
              linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(31, 41, 55, 0.95);
  box-shadow: var(--shadow-soft);
}

.card--soft {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.96));
  box-shadow: none;
}

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

.card__title {
  font-size: var(--font-size-lg);
}

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

.card__cta {
  margin-top: var(--space-3);
}

.card--feature {
  border-image: linear-gradient(135deg, rgba(56, 189, 248, 0.7), rgba(129, 140, 248, 0.4)) 1;
}

.card--mechanic {
  border-left: 2px solid rgba(56, 189, 248, 0.6);
}

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

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

/* Step / How-it-works blocks */
.step-list {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .step-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.step {
  position: relative;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 41, 55, 0.95);
  background-color: rgba(15, 23, 42, 0.95);
}

.step__index {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 600;
  background: radial-gradient(circle at 30% 0%, rgba(56, 189, 248, 0.7), rgba(79, 70, 229, 0.7));
  color: #0b1120;
  margin-bottom: var(--space-2);
}

/* =========================================================
   Hero / Page header
   ========================================================= */
.hero {
  padding-block: var(--space-20) var(--space-16);
}

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

@media (min-width: 900px) {
  .hero__layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
  }
}

.hero__title {
  max-width: 24rem;
}

.hero__lead {
  font-size: var(--font-size-md);
  max-width: 30rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* =========================================================
   Content patterns for Polish block-based layout
   ========================================================= */
.section-blocks {
  display: grid;
  gap: var(--space-4);
}

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

.section-block {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 41, 55, 0.95);
  background-color: rgba(15, 23, 42, 0.96);
}

.section-block__title {
  font-size: var(--font-size-md);
  margin-bottom: var(--space-2);
}

.section-block__text {
  font-size: var(--font-size-sm);
}

/* Updates / News list */
.post-list {
  display: grid;
  gap: var(--space-4);
}

.post {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 41, 55, 0.95);
  background-color: rgba(15, 23, 42, 0.98);
}

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

.post__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.post__excerpt {
  font-size: var(--font-size-sm);
}

/* =========================================================
   Status / Pill tags for mechanics & systems
   ========================================================= */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  background-color: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 1);
  color: var(--color-text-muted);
}

.pill--success {
  border-color: rgba(34, 197, 94, 0.7);
  color: var(--color-success);
}

.pill--warning {
  border-color: rgba(250, 204, 21, 0.7);
  color: var(--color-warning);
}

.pill--danger {
  border-color: rgba(239, 68, 68, 0.7);
  color: var(--color-danger);
}

/* =========================================================
   Page-level helpers for smoothpathultimate.com
   ========================================================= */
.page-header {
  padding-block: var(--space-12) var(--space-8);
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.05), transparent 55%);
}

.page-header__title {
  margin-bottom: var(--space-2);
}

.page-header__description {
  max-width: 36rem;
}

.page-section {
  padding-block: var(--space-12);
  border-bottom: 1px solid rgba(17, 24, 39, 1);
}

.page-section:last-child {
  border-bottom: none;
  padding-bottom: var(--space-16);
}

/* Simple header / nav base for consistency */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px);
  background-color: rgba(5, 8, 22, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.95);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.8rem;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-sm);
}

.site-nav a {
  padding-block: 0.25rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--color-text);
  border-bottom-color: rgba(56, 189, 248, 0.7);
}

.site-footer {
  padding-block: var(--space-8);
  border-top: 1px solid rgba(15, 23, 42, 0.95);
  background-color: #020617;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

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

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