/* ============================================================
 * main.css — design tokens, reset, base typography, layout primitives
 * Load order: main.css -> components.css -> rtl.css
 * Logical properties only (use inline/block axis, never physical sides).
 * ============================================================ */

/* Self-hosted Heebo (weights 400, 500, 700) — see plan 02-02 */
@import url('../fonts/Heebo/font-face.css');

/* ----- Design tokens (lead variant: Industrial & Precise) -----
 * Exposed as CSS custom properties so the plan 02-06 swatch
 * comparison block can override via scoped selector or inline
 * style — a palette swap is a token change, not a refactor. */
:root {
  /* Palette — steel-blue + cool gray + warmer near-white */
  --color-blue-900: #14334C;
  --color-blue-800: #1F4A6B;   /* primary blue — used for logo, headings, CTA */
  --color-blue-700: #2A5A7E;
  --color-blue-600: #3B6E94;
  --color-blue-100: #E6EEF5;   /* subtle blue tint for hover/borders */

  --color-gray-900: #1A1F2A;   /* body text */
  --color-gray-700: #3A4250;
  --color-gray-500: #6B7280;   /* secondary text */
  --color-gray-300: #D1D5DB;   /* borders, dividers */
  --color-gray-100: #F4F6F8;   /* section alt background */
  --color-gray-50:  #F7F8FA;   /* warm near-white page background */
  --color-white:    #FFFFFF;

  --color-text:          var(--color-gray-900);
  --color-text-muted:    var(--color-gray-500);
  --color-bg:            var(--color-gray-50);
  --color-bg-alt:        var(--color-white);
  --color-primary:       var(--color-blue-800);
  --color-primary-hover: var(--color-blue-700);
  --color-border:        var(--color-gray-300);

  /* Typography */
  --font-family-base: 'Heebo', 'Arial Hebrew', 'David Libre', Arial, sans-serif;

  --font-size-small:   0.875rem;  /* 14px */
  --font-size-body:    1.0625rem; /* 17px — slightly larger than 16 for "warm" feel */
  --font-size-h2:      1.5rem;    /* 24px */
  --font-size-h1:      2rem;      /* 32px */
  --font-size-display: 2.75rem;   /* 44px — hero heading */

  --font-weight-regular: 400;
  --font-weight-medium:  500;
  --font-weight-bold:    700;

  --line-height-tight: 1.25;   /* headings */
  --line-height-base:  1.7;    /* body (Hebrew needs 1.6-1.8) */

  /* Spacing scale (rem-based, 4px increment derived) */
  --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;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 6px;   /* default button radius — friendly, not pill, not sharp */
  --radius-lg: 10px;

  /* Layout */
  --container-max: 1200px;
  --container-pad-inline: var(--space-5);

  /* Breakpoint reference (documentation only — used in @media literals below) */
  --bp-mobile: 360px;
  --bp-tablet: 768px;
  --bp-desktop: 1024px;
}

/* ----- Modern minimal reset (Andy Bell flavour) ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { block-size: 100%; }
body { -webkit-font-smoothing: antialiased; }
img, picture, svg, video { display: block; max-inline-size: 100%; }
input, button, textarea, select { font: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

/* ----- Base body + typography ----- */
html { font-size: 16px; }

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-body);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
p  { line-height: var(--line-height-base); }

/* Display class for hero headings */
.display {
  font-size: var(--font-size-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

/* Hebrew-specific rule: NO inter-glyph tracking on body or headings.
 * Hebrew is a connected script — adding tracking breaks visual cohesion.
 * (No tracking property is declared anywhere in this file; this comment is the guardrail.) */

/* ----- Layout primitives (logical properties throughout) ----- */
.container {
  max-inline-size: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad-inline);
}

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

.section--alt {
  background: var(--color-gray-100);
}

/* Visually-hidden utility for skip-link + accessible labels */
.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link — appears when focused */
.skip-link {
  position: absolute;
  inset-block-start: var(--space-2);
  inset-inline-start: var(--space-2);
  padding-block: var(--space-2);
  padding-inline-start: var(--space-4);
  padding-inline-end: var(--space-4);
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-md);
  transform: translateY(-200%);
  transition: transform 0.15s ease;
  z-index: 100;
}
.skip-link:focus { transform: translateY(0); }

/* Flow utility — applies block-axis spacing between flow-content children */
.flow > * + * { margin-block-start: var(--space-5); }

/* ----- Mobile-first responsive: scale type up at larger viewports ----- */
@media (min-width: 768px) {
  :root {
    --font-size-h1: 2.25rem;
    --font-size-display: 3.25rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --font-size-h1: 2.5rem;
    --font-size-display: 3.75rem;
    --container-pad-inline: var(--space-6);
  }
}
