/* ==========================================================================
   Balkan Electricians — main.css
   Design tokens, reset, base typography, layout primitives
   ========================================================================== */

:root {
  /* Brand palette (fixed) */
  --navy: #0F1B2D;
  --steel-blue: #2F5D7C;
  --primary-blue: #2F80ED;
  --primary-blue-hover: #1F6FD1;
  --primary-blue-soft: #EAF3FF;

  --background: #F7F9FC;
  --surface: #FFFFFF;

  --text-primary: #202833;
  --text-secondary: #6B7280;
  --text-on-dark: #E7EDF5;
  --text-on-dark-muted: #9DB0C6;

  --border: #D9E1EA;
  --border-dark: #24344A;

  --success: #25A56A;
  --success-soft: #E7F6EE;
  --gold-accent: #D4A24C;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --fs-xs: 0.8125rem;   /* 13px */
  --fs-sm: 0.9375rem;   /* 15px */
  --fs-base: 1rem;      /* 16px */
  --fs-md: 1.125rem;    /* 18px */
  --fs-lg: 1.375rem;    /* 22px */
  --fs-xl: 1.75rem;     /* 28px */
  --fs-2xl: 2.25rem;    /* 36px */
  --fs-3xl: 2.75rem;    /* 44px */
  --lh-tight: 1.2;
  --lh-normal: 1.6;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 780px;
  --danger: #DC4C5B;
  --danger-soft: #FFF0F2;
  --electric: #65B4FF;
  --radius-sm: 9px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 7px rgba(15, 27, 45, 0.05);
  --shadow: 0 12px 30px rgba(15, 27, 45, 0.10);
  --shadow-lg: 0 24px 60px rgba(7, 21, 41, 0.20);
  --header-h: 72px;
  --transition: 220ms cubic-bezier(.2,.8,.2,1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Stop the off-canvas mobile nav drawer (position:fixed, translated off the
     right) from creating horizontal page overflow. overflow-x:hidden on the
     ROOT element controls the viewport's horizontal scrollbar (this also
     suppresses fixed off-canvas elements); overflow-y stays scrollable so the
     sticky header keeps working. */
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background: linear-gradient(180deg, #F8FAFD 0%, #F3F7FB 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-4);
  line-height: var(--lh-tight);
  color: var(--navy);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

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

a {
  color: var(--primary-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul,
ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.25rem;
}

li {
  margin-bottom: var(--space-2);
}

strong {
  color: var(--navy);
}

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -60px;
  z-index: 1000;
  background: var(--navy);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  transition: top var(--transition);
}

.skip-link:focus {
  top: var(--space-3);
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
  border-radius: 3px;
}

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

.container--narrow {
  max-width: var(--container-narrow);
}

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

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

.section--surface {
  background: var(--surface);
}

.section--navy {
  background: var(--navy);
  color: var(--text-on-dark);
}

.section--navy h2,
.section--navy h3 {
  color: #fff;
}

.section__intro {
  max-width: 720px;
  margin-bottom: var(--space-6);
}

.section__intro--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-blue);
  margin-bottom: var(--space-2);
}

.section--navy .eyebrow {
  color: var(--gold-accent);
}

.lead {
  font-size: var(--fs-md);
  color: var(--text-secondary);
}

.section--navy .lead {
  color: var(--text-on-dark-muted);
}

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

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

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
