/* ============================================================
   Business Ocean — base: fonts, reset, typography, layout prims
   ============================================================ */

/* -- self-hosted fonts -------------------------------------- */
/* Two subsets per family, exactly as Google splits them. latin-ext carries
   the Slovak letters (c d l n r s t z with caron and acute); the US site
   never asks for that file because no page contains those characters. */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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";
  src: url("../fonts/schibsted-grotesk-var-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-var-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  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: "Spline Sans Mono";
  src: url("../fonts/spline-sans-mono-var-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Spline Sans Mono";
  src: url("../fonts/spline-sans-mono-var-latin-ext.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  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;
}
/* metric-compatible local fallbacks (anti-CLS while woff2 loads).
   The weight range matters: without it the browser has one 400 master to
   satisfy a heading asking for 800, and paints faux bold. */
@font-face {
  font-family: "Archivo-fallback";
  src: local("Arial");
  font-weight: 100 900;
  size-adjust: 104%;
  ascent-override: 88%;
  descent-override: 22%;
}
@font-face {
  font-family: "Schibsted-fallback";
  src: local("Arial");
  font-weight: 100 900;
  size-adjust: 99%;
  ascent-override: 92%;
  descent-override: 24%;
}

/* -- reset --------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* clip (not hidden!) so marquee bleed never breaks position: sticky */
  overflow-x: clip;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--size-0);
  line-height: var(--leading-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--ocean);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--ocean);
  outline-offset: 3px;
  border-radius: 2px;
}

/* -- typography --------------------------------------------- */
h1,
h2,
h3,
.display {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--leading-tight);
  letter-spacing: var(--track-tight);
  text-wrap: balance;
}

h1,
h2,
.display {
  /* a missing glyph must show as a fallback, never as a smeared faux bold */
  font-synthesis-weight: none;
  font-stretch: 116%;
  text-transform: uppercase;
  line-height: var(--leading-display);
}

/* Slovak sets words far longer than English: "Porozprávajme" is 474px at the
   phone headline size, wider than a 375px screen, and splitWords() wraps each
   word in an inline-block that cannot break — so the whole page scrolled
   sideways. Only narrow screens need this; on a desktop the word simply
   overruns its measure the way it always has, and nothing overflows. */
@media (max-width: 767px) {
  h1,
  h2,
  .display,
  .has-words .w {
    /* `overflow-wrap: break-word` and nothing else. Automatic hyphenation was
       tried and removed: it split words that fitted perfectly well and dropped
       two letters onto a line of their own ("POROZPRÁVAJ- / ME"), and the
       property that limits where it may break (hyphenate-limit-chars) is not
       honoured everywhere. This breaks a word only when the word alone cannot
       fit a line, which is the case that used to scroll the page sideways. */
    overflow-wrap: break-word;
    /* No automatic hyphenation. It was tried twice: `hyphenate-limit-chars` is
       meant to stop the browser leaving a stub, but it is not honoured
       consistently, and the result was a crop of three-letter tails across the
       blog. Without it a word breaks only when it cannot fit at all, which is
       rare enough to fix in the copy. */
    /* `text-wrap: balance` narrows the measure to even the lines out and then
       pays for it by splitting a word; on a phone the lines are short anyway. */
    text-wrap: wrap;
  }
}

h1 { font-size: var(--size-5); }
h2 { font-size: var(--size-4); }
h3 { font-size: var(--size-2); font-weight: 700; }

p {
  max-width: 62ch;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

p a,
.link {
  color: var(--ocean);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

strong { font-weight: 700; }

.mono,
.mono-label {
  font-family: var(--font-mono);
  font-size: var(--size--1);
  font-weight: 500;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* ink-50 on paper is 3.6:1 — below AA for text this small. ink-70 is 7.4:1.
   Keep ink-50 for decoration and large type only. */
.mono-label {
  color: var(--ink-70);
}

.muted { color: var(--ink-70); }

/* -- layout primitives --------------------------------------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.container--wide {
  width: min(100% - 2 * var(--gutter), var(--container-wide));
  margin-inline: auto;
}

.container--read {
  width: min(100% - 2 * var(--gutter), var(--container-read));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-section);
}

.section--mist {
  background: var(--mist);
}

.section--flush {
  padding-block-start: 0;
}

/* section header row: mono index · big title · action link */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  margin-block-end: var(--space-block);
}

.section-head__eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-block-end: var(--space-4);
}

.section-head h2 {
  max-width: 16ch;
}

.section-head__action {
  flex-shrink: 0;
  max-width: 34ch;
  margin-block-end: 0.5em;
}

/* right-hand cluster of a section head: rail controls + the "all …" link */
.section-head__tools {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.section-head__tools .section-head__action { margin-block-end: 0; }

.hairline {
  border: 0;
  border-block-start: 1px solid var(--line);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* skip link */
.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  padding: var(--space-3) var(--space-5);
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-pill);
  transform: translateY(-300%);
}

.skip-link:focus-visible {
  transform: none;
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(11, 27, 43, 0.4);
    --ink-70: var(--ink);
    --ink-50: rgba(11, 27, 43, 0.75);
  }
}

/* The hidden attribute must win over component display rules: .cta-form and
   .contact-form set `display: grid`, which outranks the UA sheet's [hidden]
   rule and left a submitted form visible next to its success panel. */
[hidden] { display: none !important; }
