/* ==========================================================================
   BASE – Design tokens, reset, typography
   ========================================================================== */

/* Google Fonts jsou načteny přes <link> tag v html.html.twig */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg:                       #0b1326;
  --surface:                  #0b1326;
  --surface-dim:              #0b1326;
  --surface-container-lowest: #060e20;
  --surface-container-low:    #131b2e;
  --surface-container:        #171f33;
  --surface-container-high:   #222a3d;
  --surface-container-highest:#2d3449;
  --surface-variant:          #2d3449;
  --surface-bright:           #31394d;

  /* On-surface */
  --on-background:            #dae2fd;
  --on-surface:               #dae2fd;
  --on-surface-variant:       #c4c5d9;

  /* Primary */
  --primary:                  #b8c3ff;
  --primary-container:        #2e5bff;
  --on-primary:               #002388;
  --on-primary-fixed:         #001356;
  --on-primary-container:     #efefff;

  /* Secondary */
  --secondary:                #b7c8e1;
  --secondary-container:      #3a4a5f;
  --on-secondary:             #213145;
  --on-secondary-container:   #a9bad3;

  /* Tertiary (cyan accent) */
  --tertiary:                 #00dce5;
  --tertiary-container:       #00797e;
  --on-tertiary:              #003739;
  --on-tertiary-container:    #bbfbff;

  /* Outline */
  --outline:                  #8e90a2;
  --outline-variant:          #434656;

  /* Error */
  --error:                    #ffb4ab;
  --error-container:          #93000a;

  /* Typography */
  --font-headline: 'Space Grotesk', system-ui, sans-serif;
  --font-body:     'Inter', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, monospace;

  /* Type scale */
  --text-xs:   0.7rem;    /* ~11px */
  --text-sm:   0.8rem;    /* ~13px */
  --text-base: 1rem;      /* 16px */
  --text-md:   1.1rem;    /* ~18px */
  --text-lg:   1.15rem;   /* ~18.5px */
  --text-xl:   1.3rem;    /* ~21px */
  --text-2xl:  1.6rem;    /* ~26px */
  --text-3xl:  2rem;      /* 32px */
  --text-4xl:  2.5rem;    /* 40px */
  --text-5xl:  3rem;      /* 48px */
  --text-6xl:  3.5rem;    /* 56px */
  --text-7xl:  4.5rem;    /* 72px */

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Border radius */
  --radius-sm:   0.25rem;
  --radius:      0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  /* Layout */
  --header-height: 5rem;
  --sidebar-width: 16rem;
  --content-max:   80rem;

  /* Transitions */
  --t-fast:   150ms ease;
  --t-base:   200ms ease;
  --t-slow:   700ms ease;

  /* Shadows / glows */
  --glow-primary:  0 0 24px rgba(46, 91, 255, 0.15);
  --glow-tertiary: 0 0 15px rgba(0, 220, 229, 0.30);
  --glow-header:   0 4px 20px rgba(46, 91, 255, 0.10);
}

/* --------------------------------------------------------------------------
   2. Global 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-body);
  font-size: var(--text-md);
  line-height: 1.6;
  background-color: var(--bg);
  color: var(--on-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: rgba(0, 220, 229, 0.25);
  color: var(--on-surface);
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--t-base);
}
a:hover {
  color: var(--tertiary);
}
a:focus-visible {
  outline: 2px solid var(--tertiary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

ul, ol {
  list-style: none;
}

/* Drupal form resets */
input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}
button {
  cursor: pointer;
  border: none;
  background: none;
}

/* --------------------------------------------------------------------------
   3. Typography utilities
   -------------------------------------------------------------------------- */
.font-headline { font-family: var(--font-headline); }
.font-mono     { font-family: var(--font-mono); }

.text-display-lg {
  font-family: var(--font-headline);
  font-size: clamp(var(--text-4xl), 7vw, var(--text-7xl));
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.text-display {
  font-family: var(--font-headline);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.text-headline-lg {
  font-family: var(--font-headline);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.2;
}
.text-headline {
  font-family: var(--font-headline);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.25;
}
.text-title-lg {
  font-family: var(--font-headline);
  font-size: var(--text-xl);
  font-weight: 600;
}
.text-label-sm {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Material Symbols font settings */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 1.5rem;
  line-height: 1;
  display: inline-block;
  user-select: none;
  speak: never;
}

/* Drupal skip link */
.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
#skip-to-main-content:focus {
  position: fixed;
  top: var(--sp-4);
  left: var(--sp-4);
  z-index: 1000;
  padding: var(--sp-3) var(--sp-6);
  background: var(--primary-container);
  color: var(--on-primary-fixed);
  border-radius: var(--radius-lg);
  font-weight: 700;
  clip: auto;
  width: auto;
  height: auto;
}

/* Drupal system messages */
.messages-list {
  margin: var(--sp-4) var(--sp-8);
}
.messages {
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--radius-lg);
  background: var(--surface-container);
  border-left: 4px solid var(--outline-variant);
  margin-bottom: var(--sp-4);
}
.messages--status  { border-color: var(--tertiary); }
.messages--warning { border-color: #f0a500; }
.messages--error   { border-color: var(--error); }

/* Code blocks */
code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
pre {
  background: var(--surface-container-lowest);
  padding: var(--sp-4);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  border-left: 3px solid var(--tertiary);
}
