/* ============================================================
   Base typography + body styles
   Applies to elements globally (h1-h6, p, body bg, etc.)
   ============================================================ */

html {
  scroll-behavior: smooth;
  overflow-x: clip;   /* spolu s body zabranuje bocnimu scrollu na mobilu (clip != hidden -> nerozbiji sticky) */
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--leading-tight);
  color: var(--color-fg);
  background-color: var(--color-bg);
  overflow-x: clip; /* clip ≠ hidden — doesn't break position:sticky */
}

/* Display headlines (hero, large section headers) */
h1, .h1, .text-display {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
}

h2, .h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: var(--leading-tight);
}

h3, .h3 {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 500;
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-h3);
}

.text-body-l {
  font-size: var(--text-body-l);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-body-l);
}

.text-small {
  font-size: var(--text-small);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-small);
}

.text-caption {
  font-size: var(--text-caption);
  line-height: var(--leading-tight);
}

.text-muted {
  color: var(--color-muted);
}

.text-muted-2 {
  color: var(--color-muted-2);
}

.text-white {
  color: #ffffff;
}

/* Container: centered, with horizontal padding */
.container {
  width: 100%;
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-inline: var(--page-padding);
}

/* Section base */
.section {
  position: relative;
  width: 100%;
}

/* All post-hero elements sit above the sticky hero (z-index: 1) */
main,
.studio,
.contact,
.site-footer {
  position: relative;
  z-index: 2;
}

.section--dark {
  background-color: var(--color-fg);
  color: #ffffff;
}

.section--light {
  background-color: var(--color-bg);
  color: var(--color-fg);
}

/* Selection */
::selection {
  background-color: var(--color-accent);
  color: var(--color-fg);
}