/* =============================
   Variables
   ============================= */
:root {
  /* Color palette - cinematic, modern, high-contrast */
  --color-background: #05060a; /* deep near-black */
  --color-surface: #0b0d14; /* elevated panels */
  --color-surface-alt: #151824;
  --color-text: #f5f5f7;
  --color-text-muted: #a0a3b1;

  --color-primary: #e5b96f; /* warm cinematic gold */
  --color-primary-soft: rgba(229, 185, 111, 0.12);
  --color-primary-strong: #f0c87a;

  --color-success: #39c98a;
  --color-warning: #f6c453;
  --color-danger: #ff5c5c;

  /* Neutral grays for borders, dividers, subtle UI */
  --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", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-base: 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.1;
  --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-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Shadows - subtle cinematic depth */
  --shadow-sm: 0 8px 16px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.65);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-base: 220ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout */
  --container-max-width: 1120px;

  /* Focus outline */
  --focus-ring-color: rgba(229, 185, 111, 0.65);
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
}

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

img,
video {
  height: auto;
}

figure {
  margin: 0;
}

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

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

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

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

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

/* Remove tap highlight on mobile */
*:focus {
  outline: none;
}

/* =============================
   Base Typography & Layout
   ============================= */
body {
  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);
  -webkit-font-smoothing: antialiased;
}

main {
  display: block;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(var(--font-size-3xl), 4vw, var(--font-size-5xl));
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(var(--font-size-2xl), 3vw, var(--font-size-4xl));
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(var(--font-size-xl), 2.5vw, var(--font-size-3xl));
  line-height: var(--line-height-snug);
  margin-bottom: var(--space-3);
}

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

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

h6 {
  font-size: var(--font-size-base);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
  color: var(--color-text-muted);
}

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

strong {
  font-weight: 600;
}

/* Links - cinematic underline on hover */
a {
  position: relative;
  transition: color var(--transition-base);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-strong));
  transition: width var(--transition-base);
}

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

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

/* Lists */
ul,
ol {
  padding-left: 1.25rem;
  margin-bottom: var(--space-4);
}

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

@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
   ============================= */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Buttons - primary cinematic CTA */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.75rem;
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
  color: #111;
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-base),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, var(--color-primary-strong), #ffffff);
}

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

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

.btn--outline {
  background: transparent;
  color: var(--color-primary-strong);
  border-color: rgba(229, 185, 111, 0.6);
  box-shadow: none;
}

.btn--outline:hover {
  background: var(--color-primary-soft);
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.1);
}

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

/* Inputs & forms */
.input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background-color: rgba(8, 10, 16, 0.9);
  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);
}

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

.input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--color-primary-strong);
  box-shadow: 0 0 0 1px rgba(229, 185, 111, 0.6);
}

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

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

.form-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.form-row--inline {
  flex-direction: row;
  gap: var(--space-4);
}

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

/* Card - for services, case studies, workflow steps */
.card {
  position: relative;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top left, rgba(229, 185, 111, 0.08), transparent 55%),
              radial-gradient(circle at bottom right, rgba(25, 118, 210, 0.08), transparent 55%),
              var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.card--subtle {
  background: var(--color-surface-alt);
  box-shadow: none;
}

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

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

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

/* Badge - for service types, project tags */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.6rem;
  font-size: var(--font-size-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border: 1px solid rgba(229, 185, 111, 0.55);
  color: var(--color-primary-strong);
  background-color: rgba(229, 185, 111, 0.06);
}

/* Cinematic dividers for sections */
.divider {
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, rgba(229, 185, 111, 0.9), transparent);
  margin: var(--space-4) 0;
}

/* Hero overlay helpers (for video / image backdrops) */
.hero-backdrop {
  position: relative;
  isolation: isolate;
}

.hero-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0, 0, 0, 0.4), transparent 60%),
              linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(5, 6, 10, 1));
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* =============================
   Layout Helpers for Site
   (navigation, footer shells)
   ============================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(5, 6, 10, 0.96), rgba(5, 6, 10, 0.85));
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

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

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #05060a;
  padding-top: var(--space-8);
  padding-bottom: var(--space-6);
  font-size: var(--font-size-sm);
}

.site-footer-meta {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
}

/* Contact details emphasised (phone/email) */
.contact-highlight {
  font-size: var(--font-size-lg);
  font-weight: 500;
}

.contact-highlight a {
  color: var(--color-primary-strong);
}

/* Testimonials & quotes */
.quote {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
}

.quote-mark {
  font-size: var(--font-size-3xl);
  color: var(--color-primary-strong);
  line-height: 0.5;
}

.quote-meta {
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .section {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
  }

  .site-header-inner {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
  }
}
