/* ==========================================================================
   EMMA INTERNATIONAL · BASE & RESET
   ========================================================================== */

@layer reset {
  *, ::before, ::after {
    box-sizing: border-box;
  }
  * {
    margin: 0;
  }
  html {
    -webkit-text-size-adjust: 100%;
    interpolate-size: allow-keywords;
    scroll-padding-block-start: var(--odstup-2xl);
  }
  @media (prefers-reduced-motion: no-preference) {
    html {
      scroll-behavior: smooth;
    }
  }
  img, picture, svg, video {
    block-size: auto;
    max-inline-size: 100%;
    display: block;
  }
  input, button, textarea, select {
    font: inherit;
    color: inherit;
  }
  p, li, h1, h2, h3, h4 {
    overflow-wrap: break-word;
  }
}

@layer base {
  body {
    background-color: var(--povrch);
    color: var(--text);
    font-family: var(--pismo-text);
    font-size: var(--velkost-m);
    font-weight: 400;
    line-height: var(--vyska-riadku);
    text-wrap: pretty;
    min-height: 100vh;
  }
  h1, h2, h3, h4 {
    font-family: var(--pismo-display);
    font-weight: 400;
    line-height: var(--vyska-riadku-nadpis);
    text-wrap: balance;
  }
  h1 { font-size: calc(var(--velkost-3xl) * 0.78); color: var(--akcent); }
  h2 { font-size: var(--velkost-2xl); color: var(--text-jasny); }
  h3 { font-size: var(--velkost-xl); color: var(--akcent); }
  h4 { font-size: var(--velkost-l); color: var(--text-jasny); }
  
  a {
    color: var(--akcent);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--akcent) 40%, transparent);
    text-underline-offset: 0.25em;
    transition: color var(--prechod), text-decoration-color var(--prechod);
    text-decoration-thickness: 1px;
  }
  a:hover {
    color: var(--akcent-lesk);
    text-decoration-color: var(--akcent);
    text-decoration-thickness: 2px;
  }
  :focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: var(--polomer);
  }
  .preskocit {
    z-index: 100;
    min-block-size: 44px;
    padding: var(--odstup-2xs) var(--odstup-s);
    background-color: var(--text);
    color: var(--povrch);
    border-radius: var(--polomer);
    transition: transform var(--prechod);
    align-items: center;
    display: inline-flex;
    position: absolute;
    inset-block-start: var(--odstup-2xs);
    inset-inline-start: var(--odstup-2xs);
    transform: translateY(-200%);
  }
  .preskocit:focus {
    transform: translateY(0);
  }
  ::selection {
    background-color: var(--zlato);
    color: var(--text-na-pergamene);
  }
}
