/**
 * Albi — base.css
 * Reset, design tokens, typography defaults.
 */

/* ----------------------------------------
   Modern CSS reset
   ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
}

body {
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

ul, ol {
  list-style: none;
  padding: 0;
}

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

/* ----------------------------------------
   Design tokens (CSS custom properties)
   ---------------------------------------- */
:root {
  /* Brand */
  --albi-red: #d8121f;
  --albi-red-dark: #b00f19;
  --albi-red-soft: #fdf0f1;

  /* Neutrals */
  --albi-text: #1a1a1a;
  --albi-text-muted: #6b6b6b;
  --albi-text-faint: #9a9a9a;
  --albi-bg: #ffffff;
  --albi-bg-soft: #e8e8e8;
  --albi-bg-page: #ffffff;
  --albi-border: #e8e8e8;
  --albi-border-strong: #d4d4d4;

  /* Status */
  --albi-success: #198038;
  --albi-success-soft: #e8f4ec;
  --albi-warning: #b45309;
  --albi-warning-soft: #fef5e6;
  --albi-danger: #b91c1c;
  --albi-danger-soft: #fde7e7;

  /* Spacing scale */
  --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;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.08);

  /* Layout */
  --container: 1240px;
  --container-narrow: 960px;

  /* Motion */
  --transition-fast: 120ms ease-out;
  --transition-base: 200ms ease-out;

  /* Type stack — system fonts, no web fonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Consolas, "Cascadia Mono", "Roboto Mono", monospace;

  /* ----------------------------------------
     Header / v2 design tokens (brief sekcija 1)
     Globalno dostupni; PDP scope (.albi-pdp) override-a iste imena identičnim
     vrijednostima, pa je migracija sigurna.
     ---------------------------------------- */
  --red:       #DC2626;
  --red-deep:  #B91C1C;
  --red-soft:  #FEF2F2;
  --red-line:  #FECACA;

  --ink-1: #0B0B0C;
  --ink-2: #1F2024;
  --ink-3: #3F4148;
  --ink-4: #6B6E76;
  --ink-5: #9CA0A8;

  --line-1: #EDEEF1;
  --line-2: #E3E5E9;
  --line-3: #D7DAE0;

  --bg:   #FFFFFF;
  --bg-2: #FAFAFB;
  --bg-3: #F4F4F6;
}

/* ----------------------------------------
   Typography
   ---------------------------------------- */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--albi-text);
  background: var(--albi-bg-page);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

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

p { line-height: 1.6; }

a {
  color: var(--albi-red);
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--albi-red-dark);
}

strong, b { font-weight: 600; }

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

/* ----------------------------------------
   Focus, selection, a11y
   ---------------------------------------- */
:focus-visible {
  outline: 2px solid var(--albi-red);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: var(--albi-red);
  color: white;
}

.albi-skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--albi-text);
  color: white;
  padding: var(--space-3) var(--space-4);
  z-index: 9999;
  text-decoration: underline;
}
.albi-skip-link:focus {
  top: 0;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
