/* ============================================================
   Bāze — fonti, reset, skatuve, kioska uzvedība
   ============================================================ */

@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("../assets/fonts/BarlowSemiCondensed-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: block;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("../assets/fonts/BarlowSemiCondensed-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: block;
}
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("../assets/fonts/BarlowSemiCondensed-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: block;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #1a1a1a;
}

body {
  font-family: var(--fonts);
  font-stretch: var(--fonts-stretch, normal);
  font-weight: 400;
  color: var(--teksts);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Kioska uzvedība: nekādas iezīmēšanas, izceltņu, vilkšanas vai
   dubultklikšķa tālummaiņas. Vienīgais žests ir pieskāriens. */
body {
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
img { -webkit-user-drag: none; user-select: none; }

/* ---- Skatuve --------------------------------------------------------
   1920×1080 laukums, centrēts. Uz 16:9 aizpilda visu; citur letterbox. */
.skatuve {
  position: relative;
  width: calc(var(--u) * 1920);
  height: calc(var(--u) * 1080);
  margin: 0 auto;
  top: 50%;
  translate: 0 -50%;
  overflow: hidden;
  isolation: isolate;
}

/* Koka fons ir lielāks par skatuvi (3000×2000 dizainā) — tas ir
   apzināti, lai attract ekrānā būtu ko kustināt. */
.fons {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("../assets/img/koks.webp");
  background-repeat: no-repeat;
  /* Dizainā slānis sākas (0,-1), tāpēc redzam attēla augšējo kreiso
     stūri, nevis centru. 3000 / 1920 = 156,25 %. */
  background-size: 156.25% auto;
  background-position: left top;
  background-color: #2b2b2b;
}

/* ---- Pogas ---------------------------------------------------------- */
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

/* Uz skārienekrāna hover nav; :active ir vienīgā atgriezeniskā saite. */
@media (hover: hover) {
  .nospiezams:hover { filter: brightness(1.15); }
}
.nospiezams {
  transition: filter var(--t-hover) var(--likne-hover), scale var(--t-hover) var(--likne-hover);
}
.nospiezams:active { scale: 0.98; filter: brightness(1.25); }

/* ---- Pieejamība ----------------------------------------------------- */
/* `hidden` jāuzvar pār display:block, ko dodam ikonu SVG. */
[hidden] { display: none !important; }

.tikai-lasitajam {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible {
  outline: calc(var(--u) * 3) solid #fff;
  outline-offset: calc(var(--u) * 3);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 820px) {
  html, body { overflow: auto; }
  .skatuve {
    width: 100%;
    height: auto;
    min-height: 100svh;
    top: 0;
    translate: none;
  }
  .fons { position: fixed; }
}
