/* ==========================================================================
   KLIMAX Teplice – Design Tokens, Reset & Base Styles
   --------------------------------------------------------------------------
   Single source of truth for all design tokens used across the site.
   Import this file FIRST in your main stylesheet or HTML.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Font: Inter (400–800), hostovaný lokálně – viz css/fonts.css
   -------------------------------------------------------------------------- */
@import url('fonts.css');

/* ==========================================================================
   1. DESIGN TOKENS (Custom Properties)
   ========================================================================== */
:root {
  /* --- Colour Palette: Backgrounds ---------------------------------------- */
  --bg-primary:    #121418;
  --bg-secondary:  #1A1D24;
  --bg-tertiary:   #22262E;
  --bg-elevated:   #2A2E38;

  /* --- Colour Palette: Text ----------------------------------------------- */
  --text-primary:   #F0F2F5;
  --text-secondary: #8B92A0;
  --text-muted:     #5A6170;

  /* --- Colour Palette: KLIMAX Accent (Primary Blue) ----------------------- */
  --accent-klimax:       #1a93d2;
  --accent-klimax-hover:  #1580bc;
  --accent-klimax-glow:   rgba(26, 147, 210, 0.15);
  --accent-klimax-glow-strong: rgba(26, 147, 210, 0.30);

  /* --- Colour Palette: Hisense Accent (Teal – brand-specific only) -------- */
  --accent-hisense:      #00B3AC;
  --accent-hisense-hover: #009E98;
  --accent-hisense-glow:  rgba(0, 179, 172, 0.12);

  /* --- Typography --------------------------------------------------------- */
  --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* --- Borders ------------------------------------------------------------ */
  --border-color:       rgba(255, 255, 255, 0.06);
  --border-color-hover: rgba(255, 255, 255, 0.12);

  /* --- Border Radii ------------------------------------------------------- */
  --radius-sm:  6px;
  --radius-md:  8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 50px;

  /* --- Shadows ------------------------------------------------------------- */
  --shadow-sm:  0 2px  8px rgba(0, 0, 0, 0.20);
  --shadow-md:  0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg:  0 8px 40px rgba(0, 0, 0, 0.35);
  --shadow-glow-klimax:  0 4px 30px rgba(26, 147, 210, 0.15);
  --shadow-glow-hisense: 0 4px 30px rgba(0, 179, 172, 0.12);

  /* --- Transitions -------------------------------------------------------- */
  --transition-fast:   0.2s ease;
  --transition-base:   0.3s ease;
  --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* --- Z-Index Scale ------------------------------------------------------ */
  --z-base:    1;
  --z-card:   10;
  --z-nav:  1000;
  --z-modal: 2000;

  /* --- Spacing Scale (used for reference) --------------------------------- */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 5rem;

  /* --- Nav Height --------------------------------------------------------- */
  --nav-height: 100px;
  --nav-height-scrolled: 70px;

  /* --- Liquid Glass Design Tokens ---------------------------------------- */
  --glass-bg:            rgba(255, 255, 255, 0.04);
  --glass-bg-strong:     rgba(255, 255, 255, 0.07);
  --glass-bg-accent:     rgba(0, 179, 172, 0.06);
  --glass-bg-klimax:     rgba(26, 147, 210, 0.06);
  --glass-border:        rgba(255, 255, 255, 0.08);
  --glass-border-strong: rgba(255, 255, 255, 0.14);
  --glass-border-accent: rgba(0, 179, 172, 0.15);
  --glass-glow:          inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  --glass-glow-strong:   inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
  --glass-glow-edge:     inset 0 0 30px rgba(255, 255, 255, 0.02);
  --glass-blur:          20px;
  --glass-blur-heavy:    40px;
  --glass-shadow:        0 8px 32px rgba(0, 0, 0, 0.25), 0 2px 8px rgba(0, 0, 0, 0.15);
  --glass-shadow-lg:     0 16px 48px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
  --glass-shadow-float:  0 20px 60px rgba(0, 0, 0, 0.35);
  --glass-refraction:    linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.04) 100%);
}


/* ==========================================================================
   2. CSS RESET
   ========================================================================== */

/*
 * Modern CSS reset – removes default browser inconsistencies while
 * preserving accessibility defaults (focus outlines, reduced-motion).
 */

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

/* Remove list styles on ul, ol with a role attribute (indicates navigation) */
ul,
ol {
  list-style: none;
}

/* Anchors: inherit colour, remove underline by default */
a {
  color: inherit;
  text-decoration: none;
}

/* Images & media: block-level, max-width containment */
img,
picture,
video,
canvas {
  display: block;
  max-width: 100%;
}

/* SVGs: block by default, inline when inside flex/inline-flex containers */
svg {
  max-width: 100%;
}

/* Standalone SVGs are block-level */
svg:not([class]) {
  display: block;
}

/* SVGs inside buttons, links, and inline containers stay inline */
.btn svg,
.brand-card__link svg,
.trust-bar__item svg,
.footer__contact-item svg,
.kore-teaser__feature svg,
.service-card__icon svg,
.pillar-card__icon svg {
  display: inline-block;
  flex-shrink: 0;
}

/* Form elements: inherit font */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Remove default button styles */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}


/* ==========================================================================
   3. BASE / BODY STYLES
   ========================================================================== */

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

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh; /* Modern viewport unit */
}


/* ==========================================================================
   4. TYPOGRAPHY SCALE
   ========================================================================== */

/*
 * Fluid typography using clamp() – smoothly scales between breakpoints
 * without abrupt jumps. Values: min / preferred (viewport-relative) / max.
 */

h1,
.h1 {
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 5vw + 1rem, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h2,
.h2 {
  font-family: var(--font-primary);
  font-size: clamp(2rem, 4vw + 0.5rem, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

h3,
.h3 {
  font-family: var(--font-primary);
  font-size: clamp(1.25rem, 2vw + 0.25rem, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h4,
.h4 {
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

@media (min-width: 768px) {
  p {
    font-size: 1.125rem;
  }
}

/* Larger body text variant */
.text-lg {
  font-size: 1.25rem;
  line-height: 1.6;
}

small,
.text-sm {
  font-size: 0.875rem;
  line-height: 1.5;
}


/* ==========================================================================
   5. SELECTION & FOCUS STYLES
   ========================================================================== */

::selection {
  background-color: var(--accent-klimax);
  color: #ffffff;
}

::-moz-selection {
  background-color: var(--accent-klimax);
  color: #ffffff;
}

/* Accessible focus-visible outlines – only on keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent-klimax);
  outline-offset: 2px;
}

/* Remove outline for mouse clicks */
:focus:not(:focus-visible) {
  outline: none;
}


/* ==========================================================================
   6. SCROLLBAR STYLING (Webkit + Firefox)
   ========================================================================== */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-tertiary) var(--bg-primary);
}

/* Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bg-elevated);
}
