/* =========================================
   Variables
   ========================================== */
:root {
  /* Color Palette - modern studio inspired */
  --color-background: #05060a;
  --color-surface: #0b0e16;
  --color-surface-alt: #111623;
  --color-text: #f6f7fb;
  --color-text-muted: #a4a9c0;
  --color-border-subtle: #202535;

  /* Accent / Brand Colors (vibrant, music-inspired) */
  --color-primary: #ff3366; /* energetic magenta */
  --color-primary-soft: rgba(255, 51, 102, 0.12);
  --color-primary-strong: #ff1744;

  --color-success: #2ecc71;
  --color-success-soft: rgba(46, 204, 113, 0.14);

  --color-warning: #f1c40f;
  --color-warning-soft: rgba(241, 196, 15, 0.16);

  --color-danger: #e53935;
  --color-danger-soft: rgba(229, 57, 53, 0.16);

  /* Neutral Grays */
  --gray-50: #f8fafc;
  --gray-100: #edf2f7;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e0;
  --gray-400: #a0aec0;
  --gray-500: #718096;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;
  --gray-900: #0b1120;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Font Sizes (fluid-ish scale for contemporary feel) */
  --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 */
  --font-size-5xl: 3rem;     /* 48px */

  /* Line Heights */
  --line-height-tight: 1.15;
  --line-height-snug: 1.3;
  --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-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* Shadows - subtle, studio lighting inspired */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.65);

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

  /* Layout */
  --container-max-width: 1120px;
  --container-padding-x: var(--space-4);

  /* Focus Ring */
  --focus-ring-color: rgba(255, 51, 102, 0.8);
  --focus-ring-offset: 2px;
  --focus-ring-width: 2px;
}

/* =========================================
   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[role='list'],
ol[role='list'] {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

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

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

textarea {
  resize: vertical;
}

/* Remove default anchor styles while retaining semantics */
a {
  text-decoration: none;
  color: inherit;
}

/* Improve text rendering */
body,
button,
input,
textarea,
select {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   Base Styles
   ========================================== */
body {
  min-height: 100vh;
  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);
}

main {
  min-height: 60vh;
}

/* Headings - bold, contemporary, music-driven hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--line-height-tight);
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-5xl);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-3);
}

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

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

h6 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-1);
}

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

strong, b {
  font-weight: 600;
}

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

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

/* Links - subtle by default, vibrant on interaction */
a {
  position: relative;
  transition: color var(--transition-normal),
              opacity var(--transition-fast);
}

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

a:active {
  opacity: 0.8;
}

/* =========================================
   Accessibility & Motion
   ========================================== */
:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

:focus {
  outline: none;
}

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

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

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding-x);
}

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

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

.section--xl {
  padding-block: var(--space-16);
}

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

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

.gap-xs { gap: var(--space-2); }
.gap-sm { gap: var(--space-3); }
.gap-md { gap: var(--space-4); }
.gap-lg { gap: var(--space-6); }
.gap-xl { gap: var(--space-8); }

/* Grid Helpers */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

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

/* Alignment & Text */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

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

/* Width helpers */
.w-full { width: 100%; }
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 768px; }
.max-w-xl { max-width: 960px; }

/* Spacing Utilities (margin-bottom-focused for content rhythm) */
.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); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }

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

/* Buttons - primary, subtle, and tone variants */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-strong) 100%);
  color: #ffffff;
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-normal),
    opacity var(--transition-fast);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
  opacity: 0.9;
}

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

.button--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: none;
}

.button--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.button--sm {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-xs);
}

.button--lg {
  padding: 0.85rem 1.8rem;
  font-size: var(--font-size-base);
}

/* Inputs & Form Elements */
.input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background-color: rgba(10, 13, 24, 0.95);
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  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 {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary-soft), var(--shadow-sm);
  background-color: #101422;
}

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

.input--success,
textarea--success {
  border-color: var(--color-success);
  background-color: var(--color-success-soft);
}

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

.form-help {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

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

/* Card - used for services, projects, news items */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  background: radial-gradient(circle at top left, rgba(255, 51, 102, 0.12), transparent 50%),
              linear-gradient(145deg, var(--color-surface) 0%, var(--color-surface-alt) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal),
    background var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 51, 102, 0.4);
}

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

.card__title {
  font-family: var(--font-heading);
  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__footer {
  margin-top: var(--space-4);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: var(--space-3);
}

/* Tag / Pill - useful for SIC code, categories, statuses */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.pill--primary {
  border-color: rgba(255, 51, 102, 0.7);
  color: var(--color-primary);
  background: rgba(255, 51, 102, 0.1);
}

.pill--success {
  border-color: rgba(46, 204, 113, 0.7);
  color: var(--color-success);
  background: var(--color-success-soft);
}

/* Hero-style headline helper for dynamic sections */
.headline {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 3vw + 1rem, 3.4rem);
  line-height: var(--line-height-tight);
}

.headline span[data-accent] {
  color: var(--color-primary);
}

.subheadline {
  margin-top: var(--space-3);
  max-width: 34rem;
  font-size: var(--font-size-md);
  color: var(--color-text-muted);
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-block: var(--space-6);
}

/* =========================================
   Responsive Typography Tweaks
   ========================================== */
@media (max-width: 768px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.6rem; }
  .section { padding-block: var(--space-8); }
}

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