/* ============================================================
   VINAYAK ENTERPRISES — GLOBAL DESIGN SYSTEM
   Theme: Precision Engineering
   Palette: Industrial Grey + Safety Orange + Clean White
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── Design Tokens ── */
:root {
  /* Colors */
  --clr-bg-deep:       #0d0f14;
  --clr-bg-dark:       #1a1d23;
  --clr-bg-card:       #22262f;
  --clr-bg-elevated:   #2c3038;
  --clr-border:        #3a3f4a;
  --clr-border-light:  #4a5060;

  --clr-orange:        #ff6b00;
  --clr-orange-bright: #ff8533;
  --clr-orange-glow:   rgba(255, 107, 0, 0.25);
  --clr-orange-subtle: rgba(255, 107, 0, 0.08);

  --clr-white:         #ffffff;
  --clr-off-white:     #f5f5f5;
  --clr-text-primary:  #e8eaed;
  --clr-text-secondary:#9aa3b0;
  --clr-text-muted:    #5c6370;

  --clr-steel:         #8a9bb0;
  --clr-steel-light:   #b0bec5;

  --clr-success:       #22c55e;
  --clr-error:         #ef4444;
  --clr-warning:       #f59e0b;

  /* Typography */
  --font-display:  'Bebas Neue', 'Arial Black', sans-serif;
  --font-body:     'Inter', Arial, sans-serif;
  --font-mono:     'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.6);
  --shadow-orange: 0 0 24px rgba(255,107,0,0.35);
  --shadow-orange-lg: 0 0 48px rgba(255,107,0,0.25);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-spring: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container-max:   1280px;
  --container-wide:  1440px;
  --nav-height:      72px;
  --section-padding: clamp(4rem, 8vw, 6rem);
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--clr-bg-deep);
  color: var(--clr-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(3rem, 8vw, 7rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
  font-family: var(--font-body);
  color: var(--clr-text-secondary);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  line-height: 1.7;
}

a {
  color: var(--clr-orange);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--clr-orange-bright); }

img { max-width: 100%; display: block; }

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.container--wide {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

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

.section--dark { background-color: var(--clr-bg-dark); }
.section--card { background-color: var(--clr-bg-card); }
.section--deep { background-color: var(--clr-bg-deep); }

/* ── Text Utilities ── */
.text-orange    { color: var(--clr-orange); }
.text-steel     { color: var(--clr-steel); }
.text-secondary { color: var(--clr-text-secondary); }
.text-mono      { font-family: var(--font-mono); }
.text-center    { text-align: center; }
.text-upper     { text-transform: uppercase; letter-spacing: 0.12em; }

/* Gradient text */
.text-gradient {
  background: linear-gradient(135deg, var(--clr-orange) 0%, var(--clr-orange-bright) 60%, #ffb347 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section label */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--clr-orange);
  margin-bottom: var(--space-4);
}
.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--clr-orange);
  display: block;
}

/* Section title block */
.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-8); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-6); }

/* Flex */
.flex       { display: 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; }
.gap-4      { gap: var(--space-4); }
.gap-6      { gap: var(--space-6); }
.gap-8      { gap: var(--space-8); }

/* ── Divider ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-border), transparent);
  margin-block: var(--space-8);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--clr-bg-dark); }
::-webkit-scrollbar-thumb { background: var(--clr-border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--clr-orange); }

/* ── Selection ── */
::selection { background: var(--clr-orange); color: var(--clr-white); }

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--clr-orange);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ── Global mobile overflow prevention ── */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Ensure no element causes horizontal overflow */
@media (max-width: 768px) {
  .container, .container--wide {
    padding-inline: 1rem;
  }
  /* Elements using inline grid with two columns */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* Elements using inline grid with 4 columns */
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
