/* ============================================================
   Stacks Garage — base.css
   Design tokens, reset, typography, dark & light themes
   ============================================================ */

:root {
  /* ---------- Brand / Workshop palette ---------- */
  --blueprint-50:  #eef5fa;
  --blueprint-100: #d7e7f2;
  --blueprint-200: #aecfe4;
  --blueprint-300: #7fb0d0;
  --blueprint-400: #4c86b0;
  --blueprint-500: #386f97;
  --blueprint-600: #2c5878;
  --blueprint-700: #1f3f57;
  --signal-500: #0038a8;
  --signal-600: #002d86;
  --torque-400: #4d8dff;
  --ink-base: #05080d;
  --paper-base: #eef2f8;

  /* ---------- Brand / Logo accent (glow applied around fixed logo art) ---------- */
  --brand-navy: #041c3f;
  --brand-navy-soft: rgba(4, 28, 63, 0.5);
  --brand-line: rgba(0, 56, 168, 0.28);
  --logo-glow: rgba(0, 56, 168, 0.45);

  /* ---------- Dark theme (default) — "Night shift" ---------- */
  --bg: #05080d;
  --bg-alt: #070c14;
  --bg-elev: #0c131d;
  --surface: rgba(76, 134, 176, 0.06);
  --surface-strong: rgba(76, 134, 176, 0.12);
  --border: rgba(76, 134, 176, 0.22);
  --border-strong: rgba(76, 134, 176, 0.42);
  --text: #f5f7fb;
  --text-soft: #c7ccd6;
  --text-muted: #93a0b3;
  --text-dim: #626d80;
  --accent: #2f7dff;
  --accent-hover: #6fa8ff;
  --accent-soft: rgba(47, 125, 255, 0.16);
  --blueprint: rgba(76, 134, 176, 0.35);
  --torque: #4d8dff;
  --shadow-glow: 0 0 24px rgba(47, 125, 255, 0.35);
  --shadow-card: 0 14px 32px -12px rgba(0, 0, 0, 0.55);
  --header-bg: rgba(5, 8, 13, 0.94);
  --logo: 'white';

  /* ---------- Typography ---------- */
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Archivo', 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  --font-bn: 'Noto Sans Bengali', 'Inter', sans-serif;

  /* ---------- Spacing & radius ---------- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  /* ---------- Layout ---------- */
  --container: 1200px;
  --container-narrow: 960px;
  --nav-h: 120px;

  /* ---------- Motion ---------- */
  --t-fast: 150ms;
  --t-base: 300ms;
  --t-slow: 600ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme — applied per-section via .section-light — "Workshop floor" */
.section-light {
  --bg: #eef2f8;
  --bg-alt: #ffffff;
  --bg-elev: #ffffff;
  --surface: rgba(0, 56, 168, 0.045);
  --surface-strong: rgba(0, 56, 168, 0.08);
  --border: rgba(0, 56, 168, 0.16);
  --border-strong: rgba(0, 56, 168, 0.32);
  --text: #0b1626;
  --text-soft: #33415a;
  --text-muted: #566380;
  --text-dim: #7c88a0;
  --accent: #0038a8;
  --accent-hover: #002d86;
  --accent-soft: rgba(0, 56, 168, 0.12);
  --blueprint: rgba(0, 56, 168, 0.22);
  --torque: #2f6fe0;
  --shadow-glow: 0 0 24px rgba(0, 56, 168, 0.18);
  --shadow-card: 0 14px 32px -12px rgba(20, 24, 29, 0.14);
  --header-bg: rgba(238, 242, 248, 0.96);
  --logo: 'black';
  --text-soft-light: #33415a;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color var(--t-slow) var(--ease), color var(--t-slow) var(--ease);
}

body.lang-bn { font-family: var(--font-bn), var(--font-sans); }

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

button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

input, textarea, select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

::selection { background: var(--accent); color: var(--bg); }

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p { color: var(--text-soft); }

.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--torque) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.section-light .text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}
.section-heading p {
  margin-top: 1rem;
  color: var(--text-muted);
}

/* ============================================================
   Utilities
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 24px;
}
.container--narrow { max-width: var(--container-narrow); }

.section {
  position: relative;
  padding: 100px 0;
  background: var(--bg);
  color: var(--text);
  transition: background-color var(--t-slow) var(--ease), color var(--t-slow) var(--ease);
}
.section--alt { background: var(--bg-alt); }

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  width: 100%;
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Generic two-column content split (copy + visual) — collapses to
   one column at 900px, see responsive.css */
.grid-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.grid-split--wide { grid-template-columns: 1.4fr 1fr; }

/* Two-column service split (copy + info panel) — collapses to one
   column at 900px, see responsive.css */
.service-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 120px;
}
.service-split:last-child { margin-bottom: 0; }
.service-split__panel {
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  position: relative;
  overflow: hidden;
}
.service-split__badge {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

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

/* ============================================================
   Keyboard focus — visible, brand-colored ring; silent for mouse/touch
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible,
.faq__question:focus-visible,
.portfolio-card:focus-visible,
.demo-modal__close:focus-visible,
.nav__burger:focus-visible {
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

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

/* ============================================================
   Logo — nameplate lockup: opaque royal-blue plate, so it is
   rounded and lifted off the header like a mounted badge rather
   than styled as flat line-art.
   ============================================================ */
.nav__logo .nav__logo-img {
  height: 56px;
  width: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 6px 18px -4px var(--logo-glow), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.nav__logo:hover .nav__logo-img {
  box-shadow: 0 8px 24px -4px var(--logo-glow), 0 0 0 1px rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}
.footer__brand .nav__logo-img { height: 64px; }

/* ============================================================
   Hero watermark — large faded mark behind hero text
   ============================================================ */
.hero__watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(720px, 90vw);
  height: min(720px, 90vw);
  transform: translate(-50%, -50%);
  opacity: 0.06;
  filter: blur(0.4px);
  pointer-events: none;
  z-index: 1;
}
.section-light .hero__watermark { opacity: 0.08; filter: blur(0.6px); }
@media (max-width: 900px) {
  .hero__watermark { width: 480px; height: 480px; opacity: 0.05; }
}
