/* Základ: písmo, farby (tmavý a svetlý režim), reset, tlačidlá. Zdieľa web aj administrácia. */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("../fonts/schibsted-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("../fonts/schibsted-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tmavý režim (predvolený): tmavomodrá ako oblekové sukno, krieda, okrová ako krajčírsky meter */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1520;
  --bg-raised: #131c2a;
  --bg-inset: #0b111a;
  --line: #222e42;
  --line-strong: #34425b;
  --text: #ece9e1;
  --text-2: #b3b9c4;
  --muted: #8a93a3;
  --accent: #d9ae4f;
  --accent-hover: #e6bf66;
  --on-accent: #0e1520;
  --chart: #b38a36;
  --danger: #ef8f7f;
  --ok: #8fc29a;
  --selection: rgba(217, 174, 79, 0.32);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef0f3;
  --bg-raised: #e4e8ed;
  --bg-inset: #f6f7f9;
  --line: #cfd5de;
  --line-strong: #aeb7c4;
  --text: #121a28;
  --text-2: #364154;
  --muted: #5a6577;
  --accent: #8a5e0c;
  --accent-hover: #74500a;
  --on-accent: #ffffff;
  --chart: #9a6a0e;
  --danger: #b03a26;
  --ok: #2f7a43;
  --selection: rgba(138, 94, 12, 0.22);
}

:root {
  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, system-ui, sans-serif;
  --gutter: clamp(16px, 4.2vw, 64px);
  --maxw: 1480px;
  --r-s: 6px;
  --r-m: 12px;
  --r-pill: 999px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Typografická stupnica (klasická: 14 · 16 · 18 · 21 · 24 · 36 · 48) */
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: 1.3125rem;
  --fs-h3: 1.5rem;
  --fs-h2: 2.25rem;
}

@media (min-width: 900px) {
  :root {
    --fs-body: 1.125rem;
    --fs-lead: 1.5rem;
    --fs-h3: 1.75rem;
    --fs-h2: 3rem;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.55;
  font-kerning: normal;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--selection);
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.nobr {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--r-s);
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Tlačidlá ---------- */

.btn {
  --btn-h: 52px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: var(--btn-h);
  padding: 0 1.6em;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 1rem;
  font-weight: 560;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.35s var(--ease-out), border-color 0.35s var(--ease-out), background-color 0.35s var(--ease-out);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent-hover);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-out);
}

.btn-primary:hover::after {
  transform: translateY(0);
}

.btn-quiet {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}

.btn-quiet:hover {
  border-color: var(--text);
}

.btn-danger {
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
  color: var(--danger);
  background: transparent;
}

.btn-danger:hover {
  border-color: var(--danger);
}

.btn-small {
  --btn-h: 40px;
  padding: 0 1.15em;
  font-size: 0.9375rem;
}

.btn-large {
  --btn-h: 60px;
  padding: 0 2em;
  font-size: 1.0625rem;
}

.btn[disabled],
.btn[aria-busy="true"] {
  opacity: 0.6;
  pointer-events: none;
}

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

/* Prepínanie témy cez View Transitions: kruhové odhalenie riadi JS */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
