/* ========================================================================== 
   Variables
   ========================================================================== */
:root {
  /* Color Palette - Metallic, Cool, Professional */
  --color-bg: #0c1014; /* deep graphite */
  --color-surface: #151a21; /* elevated panels */
  --color-surface-muted: #1e242d;

  --color-text: #e5eaf0;
  --color-text-muted: #9aa3b3;

  --color-primary: #3b82f6; /* main brand blue */
  --color-primary-soft: rgba(59, 130, 246, 0.12);
  --color-primary-strong: #2563eb;

  --color-success: #22c55e;
  --color-warning: #facc15;
  --color-danger: #ef4444;

  --color-border-subtle: #252b35;
  --color-border-strong: #3b4250;

  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2933;
  --color-gray-900: #111827;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Roboto", "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-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.5;
  --line-height-relaxed: 1.7;

  /* Spacing Scale (px) */
  --space-0: 0;
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-8: 16px;
  --space-10: 20px;
  --space-12: 24px;
  --space-16: 32px;
  --space-20: 40px;
  --space-24: 48px;
  --space-28: 56px;
  --space-32: 64px;
  --space-40: 80px;
  --space-48: 96px;

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

  /* Shadows - subtle metallic depth */
  --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);

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

  /* Layout */
  --container-max-width: 1120px;
  --container-padding-x: 16px;

  /* Focus */
  --focus-ring-color: rgba(59, 130, 246, 0.8);
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;
}

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

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

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

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
}

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

ul,
ol {
  padding-left: 1.25rem;
}

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

img {
  height: auto;
}

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

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

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

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

/* Remove default link styles baseline */
a {
  color: inherit;
  text-decoration: none;
}

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

/* ========================================================================== 
   Base Styles
   ========================================================================== */
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;
  -moz-osx-font-smoothing: grayscale;
}

main {
  min-height: 60vh;
}

/* Headings – structured, modern scaling */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

h3 {
  font-size: clamp(1.4rem, 2.3vw, 1.75rem);
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

p {
  font-size: var(--font-size-md);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-muted);
}

p + p {
  margin-top: var(--space-4);
}

p + h2,
p + h3,
p + h4 {
  margin-top: var(--space-16);
}

h1 + p,
h2 + p,
h3 + p {
  margin-top: var(--space-4);
}

/* Links – subtle, precise */
a {
  position: relative;
  cursor: pointer;
  color: var(--color-primary);
  transition: color var(--transition-base), opacity var(--transition-base);
}

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

a:active {
  opacity: 0.85;
}

/* Underline on hover for content links */
a.inline-link {
  text-decoration: none;
}

a.inline-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), rgba(148, 163, 184, 0.9));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

a.inline-link:hover::after {
  transform: scaleX(1);
}

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

strong {
  font-weight: 600;
}

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-subtle), transparent);
  margin: var(--space-16) 0;
}

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

:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

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

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* ========================================================================== 
   Utilities
   ========================================================================== */
/* Layout */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding-x);
  padding-right: var(--container-padding-x);
}

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

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

.section--muted {
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 55%),
              radial-gradient(circle at bottom right, rgba(148, 163, 184, 0.12), transparent 55%);
}

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

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

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

.flex-col {
  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-end {
  justify-content: flex-end;
}

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

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

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

/* Grid utilities */
.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: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

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

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

/* Width helpers */
.w-full {
  width: 100%;
}

.max-w-narrow {
  max-width: 48rem;
}

/* Spacing utilities (small curated set) */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-16 { margin-top: var(--space-16); }
.mt-24 { margin-top: var(--space-24); }

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

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

.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }

/* ========================================================================== 
   Components
   ========================================================================== */
/* Buttons - sleek primary actions for booking & contact */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at 10% 0%, rgba(148, 163, 184, 0.3), transparent 55%),
              linear-gradient(135deg, #0f172a, #020617);
  color: var(--color-text);
  font-weight: 500;
  font-size: var(--font-size-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast),
    color var(--transition-base),
    opacity var(--transition-base);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.8), var(--shadow-sm);
}

.button--primary {
  background: linear-gradient(135deg, #3b82f6, #0ea5e9);
  border-color: rgba(59, 130, 246, 0.8);
  color: #0b1120;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 18px 40px rgba(37, 99, 235, 0.45);
}

.button--ghost {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(148, 163, 184, 0.4);
}

.button--danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  border-color: rgba(248, 113, 113, 0.9);
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.6), var(--shadow-md);
}

.button--primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), var(--shadow-sm);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

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

/* Inputs – forms for booking & quotes */
.input,
.textarea,
.select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background: radial-gradient(circle at 0% 0%, rgba(148, 163, 184, 0.16), transparent 55%),
              #020617;
  color: var(--color-text);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base),
    transform var(--transition-fast);
}

.input::placeholder,
.textarea::placeholder {
  color: rgba(148, 163, 184, 0.7);
}

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 1), 0 0 0 1px rgba(59, 130, 246, 0.45);
  background-color: #020617;
}

.input--invalid,
.textarea--invalid,
.select--invalid {
  border-color: var(--color-danger);
}

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

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

.form-field {
  margin-bottom: var(--space-12);
}

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

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

/* Card – for services, pricing, & technicians */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: var(--space-16);
  background: radial-gradient(circle at 0% 0%, rgba(148, 163, 184, 0.18), transparent 55%),
              linear-gradient(145deg, #020617, #020617 45%, #020617 60%, #020617 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(59, 130, 246, 0.18), transparent 25%, transparent 75%, rgba(15, 23, 42, 0.8));
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.card:hover::before {
  opacity: 1;
}

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

.card__title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-4);
}

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

/* Tag / Pill – for service categories, statuses */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: rgba(15, 23, 42, 0.8);
}

.badge--primary {
  border-color: rgba(59, 130, 246, 0.7);
  background: rgba(37, 99, 235, 0.16);
  color: #dbeafe;
}

.badge--success {
  border-color: rgba(34, 197, 94, 0.7);
  background: rgba(22, 163, 74, 0.16);
  color: #bbf7d0;
}

/* Callout / Alert – for booking confirmations, info */
.callout {
  border-radius: var(--radius-md);
  padding: var(--space-12);
  border: 1px solid var(--color-border-subtle);
  background: radial-gradient(circle at 0% 0%, rgba(148, 163, 184, 0.18), transparent 55%),
              rgba(15, 23, 42, 0.95);
  font-size: var(--font-size-sm);
}

.callout--info {
  border-color: rgba(59, 130, 246, 0.7);
}

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

.callout--warning {
  border-color: rgba(250, 204, 21, 0.8);
}

.callout--danger {
  border-color: rgba(239, 68, 68, 0.8);
}

/* Navigation shell (basic) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.82));
  border-bottom: 1px solid rgba(30, 64, 175, 0.7);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-footer {
  border-top: 1px solid var(--color-border-subtle);
  background: #020617;
  padding: var(--space-16) 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Hero visual overlay helper */
.hero-overlay {
  position: relative;
  overflow: hidden;
}

.hero-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.35), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(30, 64, 175, 0.35), transparent 55%),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.4), #020617);
  pointer-events: none;
}

/* Appointment layout helper */
.booking-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--space-20);
}

@media (max-width: 960px) {
  .booking-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}
