/* ==========================================================================
   DefCzech — base styles
   Tokens, font faces, reset, typography, buttons and shared utilities.
   Breakpoints used across the site:
     phone   < 640px
     tablet  640px – 1023px
     desktop ≥ 1024px
   ========================================================================== */

@font-face {
  font-family: "Roboto Mono";
  src: url("../assets/fonts/RobotoMono-Variable.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Mono";
  src: url("../assets/fonts/RobotoMono-Italic-Variable.woff2") format("woff2");
  font-weight: 100 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Colour — one deliberate night palette */
  --c-ground: #000000;
  --c-surface: #0b0b0a;
  --c-surface-2: #141412;
  --c-line: #26251f;
  --c-line-strong: #3b3931;
  --c-text: #f1efe8;
  --c-muted: #a5a298;
  --c-faint: #6f6c63;
  --c-gold: #ffd700;
  --c-gold-soft: rgba(255, 215, 0, 0.14);
  --c-gold-line: rgba(255, 215, 0, 0.55);
  --c-beam: #fff7dc;
  --c-ok: #8fd694;

  /* Type */
  --font: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --fs-label: 0.72rem;
  --fs-small: 0.84rem;
  --fs-body: 0.97rem;
  --fs-lead: clamp(1.02rem, 0.96rem + 0.3vw, 1.18rem);
  --fs-h3: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
  --fs-h2: clamp(1.55rem, 1.2rem + 1.6vw, 2.6rem);
  --fs-h1: clamp(2.3rem, 1.4rem + 4.2vw, 5.4rem);
  --fs-display: clamp(3rem, 1.2rem + 9vw, 9.5rem);

  /* Space & layout */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --header-h: 64px;
  --radius: 4px;
  --section-y: clamp(4rem, 3rem + 5vw, 8rem);

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark;
}

@media (max-width: 639px) {
  :root { --header-h: 56px; }
}

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  min-height: 100vh;
  background: var(--c-ground);
  color: var(--c-text);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

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

img,
video { height: auto; }

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

button { cursor: pointer; }

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

::selection {
  background: var(--c-gold);
  color: #000;
}

:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 250;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }

p { text-wrap: pretty; }

strong { font-weight: 600; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.65;
  color: var(--c-text);
}

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

.measure { max-width: 60ch; }

/* Small uppercase label — the "spec sheet" voice of the site */
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
  line-height: 1.4;
}

.label--gold { color: var(--c-gold); }

.label--rule::before {
  content: "";
  width: 2.2em;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

/* The LΔSΞR wordmark */
.wordmark {
  font-weight: 200;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.wordmark b {
  font-weight: inherit;
  color: var(--c-gold);
}

.wordmark-inline { text-transform: none; letter-spacing: 0.04em; }

.num { font-variant-numeric: tabular-nums; }

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: calc(880px + var(--gutter) * 2); }

.section { padding-block: var(--section-y); }

.section--tight { padding-block: calc(var(--section-y) * 0.6); }

.section--line { border-top: 1px solid var(--c-line); }

.stack > * + * { margin-top: var(--stack, 1.1rem); }

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

.skip-link {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--c-gold);
  color: #000;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}

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

/* Section heading row: label on top, heading, optional intro */
.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

@media (min-width: 1024px) {
  .section-head--split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: end;
    column-gap: clamp(2rem, 5vw, 6rem);
  }

  .section-head--split .label { grid-column: 1 / -1; }
}

.section-head p { color: var(--c-muted); max-width: 58ch; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--c-text);
  --btn-fg: #000;
  --btn-bd: var(--c-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease-out);
}

.btn:hover {
  --btn-bg: transparent;
  --btn-fg: var(--c-text);
}

.btn:active { transform: translateY(1px); }

.btn--gold {
  --btn-bg: var(--c-gold);
  --btn-bd: var(--c-gold);
}

.btn--gold:hover {
  --btn-bg: transparent;
  --btn-fg: var(--c-gold);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--c-text);
  --btn-bd: var(--c-line-strong);
}

.btn--ghost:hover {
  --btn-bd: var(--c-text);
  --btn-bg: transparent;
}

.btn--small {
  min-height: 38px;
  padding: 0.45rem 0.95rem;
  font-size: 0.74rem;
}

.btn .icon { width: 1.05em; height: 1.05em; transition: transform 0.25s var(--ease-out); }
.btn:hover .icon--arrow { transform: translateX(3px); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-line-strong);
  padding-bottom: 0.3em;
  transition: color 0.2s, border-color 0.2s;
}

.link-arrow:hover {
  color: var(--c-gold);
  border-color: var(--c-gold);
}

.link-arrow .icon { width: 1em; height: 1em; transition: transform 0.25s var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(3px); }

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Status chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.28em 0.7em;
  border: 1px solid var(--c-line-strong);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-muted);
  white-space: nowrap;
  line-height: 1.3;
}

.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-faint);
}

.chip--live { color: var(--c-text); border-color: var(--c-gold-line); }
.chip--live::before { background: var(--c-gold); box-shadow: 0 0 8px var(--c-gold); }

/* ---------- Reveal on scroll ----------
   Only elements that start below the fold get .is-pending (added by JS),
   so the first screen is always fully visible, with or without JS. */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal].is-pending {
    opacity: 0;
    transform: translateY(18px);
  }

  [data-reveal] {
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
    transition-delay: var(--delay, 0s);
  }
}
