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

:root {
  /* Color Palette - Technical / Engineering */
  --color-background: #050914; /* deep technical blue-black */
  --color-surface: #0f172a;    /* elevated panel background */
  --color-surface-soft: #111827;
  --color-surface-subtle: #020617;

  --color-text: #e5e7eb;       /* light gray text */
  --color-text-soft: #9ca3af;
  --color-text-muted: #6b7280;

  --color-primary: #1e40af;    /* deep technical blue */
  --color-primary-soft: #1d4ed8;
  --color-primary-subtle: #0b1120;

  --color-accent: #06b6d4;     /* sharp cyan accent */
  --color-accent-soft: #22d3ee;

  --color-success: #16a34a;
  --color-warning: #facc15;
  --color-danger: #dc2626;

  /* Neutral grays (graphite / silver) */
  --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: #1f2933;
  --gray-900: #111827;

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

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

  --line-height-tight: 1.2;
  --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 */

  /* Radius */
  --radius-sm: 0.25rem; /* 4px */
  --radius-md: 0.5rem;  /* 8px */
  --radius-lg: 0.75rem; /* 12px */
  --radius-xl: 1rem;    /* 16px */
  --radius-pill: 999px;

  /* Shadows - crisp, technical */
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 0 0 1px rgba(15, 23, 42, 0.8),
                 0 18px 45px rgba(15, 23, 42, 0.9);

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

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


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

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

html,
body,
div,
span,
applet,
object,
iframe,
 h1,
 h2,
 h3,
 h4,
 h5,
 h6,
 p,
 blockquote,
 pre,
 a,
 abbr,
 acronym,
 address,
 big,
 cite,
 code,
 del,
 dfn,
 em,
 img,
 ins,
 kbd,
 q,
 s,
 samp,
 small,
 strike,
 strong,
 sub,
 sup,
 tt,
 var,
 b,
 u,
 i,
 center,
 dl,
 dt,
 dd,
 ol,
 ul,
 li,
 fieldset,
 form,
 label,
 legend,
 table,
 caption,
 tbody,
 tfoot,
 thead,
 tr,
 th,
 td,
 article,
 aside,
 canvas,
 details,
 embed,
 figure,
 figcaption,
 footer,
 header,
 hgroup,
 menu,
 nav,
 output,
 ruby,
 section,
 summary,
 time,
 mark,
 audio,
 video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article,
aside,
footer,
header,
nav,
section,
main,
figure,
figcaption {
  display: block;
}

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

body {
  min-height: 100vh;
}

ol,
ul {
  list-style: none;
}

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

img,
video {
  height: auto;
}

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

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

textarea {
  resize: vertical;
}

:focus {
  outline: none;
}


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

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

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

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

h2 {
  font-size: clamp(1.875rem, 2.5vw, 2.25rem);
  letter-spacing: 0.015em;
  margin-bottom: var(--space-3);
}

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

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

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-md);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

p + p {
  margin-top: -0.25rem;
}

strong {
  font-weight: 600;
  color: #f9fafb;
}

em {
  font-style: italic;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast),
              text-decoration-color var(--transition-fast),
              opacity var(--transition-fast);
}

a:hover {
  color: var(--color-accent-soft);
}

a:active {
  opacity: 0.85;
}

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

pre {
  background-color: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gray-700), transparent);
  margin: var(--space-8) 0;
}


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

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

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


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

/* Layout container for desktop-width technical content */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}

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

/* Full-width band container */
.container-wide {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* Flex helpers */
.flex {
  display: flex;
}

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

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

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

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

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

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

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

/* Spacing utilities (common) */
.mt-0 { margin-top: 0 !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-8 { margin-top: var(--space-8) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-8 { margin-bottom: var(--space-8) !important; }

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

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


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

/* Buttons - precise, high-contrast */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition-normal),
              color var(--transition-normal),
              border-color var(--transition-normal),
              box-shadow var(--transition-fast),
              transform var(--transition-fast);
  white-space: nowrap;
}

.button-primary {
  background: radial-gradient(circle at 0% 0%, #0ea5e9 0, #1e40af 40%, #020617 100%);
  color: #f9fafb;
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-sm);
}

.button-primary:hover {
  background: radial-gradient(circle at 0% 0%, #22d3ee 0, #1d4ed8 40%, #020617 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.button-ghost:hover {
  background-color: rgba(15, 23, 42, 0.9);
}

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

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

/* Inputs - form fields for technical enquiries */
.input,
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.5);
  background-color: rgba(15, 23, 42, 0.92);
  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,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.5);
}

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

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

/* Cards - for service blocks, case studies, and feature callouts */
.card {
  position: relative;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.16) 0,
              rgba(15, 23, 42, 0.96) 42%, rgba(2, 6, 23, 1) 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% -10%, rgba(56, 189, 248, 0.18), transparent 55%),
              linear-gradient(120deg, rgba(15, 23, 42, 0.4), transparent 65%);
  mix-blend-mode: screen;
  opacity: 0.7;
}

.card > * {
  position: relative;
  z-index: 1;
}

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

.card-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f9fafb;
}

.card-subtitle {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

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

/* Subtle technical grid overlay (optional helper for hero or panels) */
.surface-grid {
  position: relative;
  overflow: hidden;
}

.surface-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.9) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.9) 1px, transparent 1px);
  background-size: 32px 32px;
  mix-blend-mode: soft-light;
  opacity: 0.6;
  pointer-events: none;
}

/* Status tags / chips (for industries, capabilities, etc.) */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gray-200);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.4));
}

.badge-accent {
  border-color: rgba(34, 211, 238, 0.9);
  color: var(--color-accent-soft);
}

/* Simple table styling (for technical data if needed) */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table th,
.table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(55, 65, 81, 0.9);
}

.table th {
  text-align: left;
  font-weight: 500;
  color: #e5e7eb;
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.06), transparent 65%);
}

.table-striped tbody tr:nth-child(even) {
  background-color: rgba(15, 23, 42, 0.9);
}

/* End of base.css */
