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

:root {
  /* Colors */
  --color-background: #0b1020; /* deep navy background accent */
  --color-surface: #101625;    /* dark panel background */
  --color-surface-alt: #161d2b;
  --color-text: #f5f7fb;
  --color-text-muted: #a0a7b8;

  --color-primary: #127ea6;           /* muted industrial teal */
  --color-primary-soft: #12314a;      /* soft navy/teal surface */

  --color-success: #2fa76f;
  --color-warning: #d7a138;
  --color-danger: #e6524a;

  --color-border-subtle: #242b3a;
  --color-border-strong: #3a4254;

  /* Neutral grays (industrial / metallic) */
  --gray-50:  #f7f8fb;
  --gray-100: #e3e6ef;
  --gray-200: #c9cedb;
  --gray-300: #a9b0c2;
  --gray-400: #8b92a3;
  --gray-500: #6b7280;
  --gray-600: #4b5263;
  --gray-700: #353b4a;
  --gray-800: #232837;
  --gray-900: #151823;

  /* Metallic accent */
  --color-metallic: #b3bac5;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --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-md: 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.15;
  --line-height-snug: 1.3;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.8;

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

  /* Radius */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Shadows (subtle industrial, not fluffy) */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);

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

  /* Layout */
  --container-max-width: 1200px;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-md: 0ms;
    --transition-slow: 0ms;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================================
   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;
  padding: 0;
  margin: 0;
}

body {
  min-height: 100vh;
}

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

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

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

a {
  color: inherit;
}

/* Remove default focus outline, we'll re-add focus-visible */
:focus {
  outline: none;
}

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

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  background-color: var(--color-background);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  display: block;
}

/* Headings: modern industrial scale */

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

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

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

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

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

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

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

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

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

strong {
  font-weight: 600;
}

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

/* Links: understated, with industrial accent on hover */

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

a:hover {
  color: #19a0d3;
  text-decoration: underline;
  text-decoration-color: currentColor;
}

/* Lists */

ul,
ol {
  padding-left: 1.25rem;
  margin: 0 0 var(--space-8);
}

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

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

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

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

/* Container */

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

@media (max-width: 768px) {
  .container {
    padding-left: var(--space-10);
    padding-right: var(--space-10);
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

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

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

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

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

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

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

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

.grid {
  display: grid;
}

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

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

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

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

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

.m-auto {
  margin: auto;
}

.mt-section {
  margin-top: var(--space-40);
}

.mb-section {
  margin-bottom: var(--space-40);
}

@media (max-width: 768px) {
  .mt-section,
  .mb-section {
    margin-top: var(--space-32);
    margin-bottom: var(--space-32);
  }
}

/* Simple spacing utilities (example subset) */

.mt-0 { margin-top: 0; }
.mt-8 { margin-top: var(--space-8); }
.mt-16 { margin-top: var(--space-16); }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: var(--space-8); }
.mb-16 { margin-bottom: var(--space-16); }

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

/* Surfaces */

.surface {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
}

.surface-alt {
  background-color: var(--color-surface-alt);
  border-radius: var(--radius-md);
}

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

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--transition-md),
    color var(--transition-md),
    border-color var(--transition-md),
    box-shadow var(--transition-md),
    transform var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #127ea6, #0c566f);
  color: var(--gray-50)!important;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #19a0d3, #0f6b8a);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn-outline {
  background-color: transparent;
  border-color: var(--color-border-strong);
  color: var(--gray-50);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  background-color: rgba(18, 126, 166, 0.1);
}

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

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

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

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

/* Form controls */

.input,
textarea,
select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  background-color: #0b101c;
  color: var(--gray-50);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition:
    border-color var(--transition-md),
    box-shadow var(--transition-md),
    background-color var(--transition-md);
}

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

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

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

label {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--gray-200);
}

/* Cards – for process steps, industries, etc. */

.card {
  background: linear-gradient(145deg, #101625, #141b2b);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(179, 186, 197, 0.12);
  box-shadow: var(--shadow-sm);
  padding: var(--space-16);
  color: var(--color-text);
}

.card--outline {
  background: rgba(9, 13, 23, 0.8);
  border-style: dashed;
  border-color: rgba(179, 186, 197, 0.35);
}

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

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

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

.card-body {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Media inside cards */

.card img {
  border-radius: var(--radius-md);
}

/* Hero/media framing with industrial feel */

.media-frame {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(179, 186, 197, 0.32);
  box-shadow: var(--shadow-md);
  background: radial-gradient(circle at top left, #12314a 0, #050711 55%, #000 100%);
}

/* Tag / badge for industries, process steps, etc. */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(179, 186, 197, 0.5);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-200);
  background: rgba(10, 15, 28, 0.9);
}

.badge-primary {
  border-color: rgba(18, 126, 166, 0.7);
  color: #c9e6f1;
  background: rgba(18, 126, 166, 0.15);
}

/* Simple section divider line */

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(179, 186, 197, 0.5), transparent);
  margin: var(--space-24) 0;
}

/* Tables (for technical data, production parameters) */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

th,
td {
  padding: 0.75rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border-subtle);
}

th {
  font-weight: 500;
  color: var(--gray-200);
  background-color: #101625;
}

tr:nth-child(even) td {
  background-color: rgba(15, 20, 34, 0.7);
}

/* Status chips – for showing etap status, SLA etc. */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
}

.status-pill--success {
  background-color: rgba(47, 167, 111, 0.16);
  color: #c4f3dd;
}

.status-pill--warning {
  background-color: rgba(215, 161, 56, 0.18);
  color: #ffe3b4;
}

.status-pill--danger {
  background-color: rgba(230, 82, 74, 0.18);
  color: #ffd0cc;
}

/* End of base.css */
