/* Onsito design system: tokeny a komponenty. Pravidla a duvody: onsito-core/DESIGN.md */

@font-face { font-family: "Sora"; src: url("../fonts/Sora-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("../fonts/MartianMono-var.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }

:root {
  /* Barvy */
  --night: #0D1B1E;      /* podklad */
  --deep: #16353A;       /* plochy, panely */
  --steel: #23464C;      /* linky, okraje */
  --paper: #F2F4F1;      /* text na tmavem, svetly podklad */
  --mist: #9FB3B0;       /* vedlejsi text */
  --signal: #4BF0B5;     /* akcent: bod, data, ktera odchazi; nikdy plocha */
  --signal-deep: #12A47A;/* akcent na svetlem podkladu */
  /* Stavy provozu (jen v datech, nikdy jako dekorace) */
  --st-run: #4BF0B5;
  --st-stop: #FFB547;
  --st-wait: #8FB8FF;

  /* Pismo */
  --f-display: "Sora", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, monospace;

  /* Typograficka skala */
  --t-hero: clamp(2.5rem, 1.6rem + 4.2vw, 5rem);
  --t-h2: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  --t-h3: 1.25rem;
  --t-lead: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  --t-body: 1.0625rem;
  --t-label: 0.6875rem;

  /* Rozmery */
  --r: 4px;              /* jediny radius: hrany jsou ostre jako ramecek detekce */
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --max: 1200px;
  --space: clamp(4.5rem, 3rem + 6vw, 8.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--night); color: var(--paper);
  font: 400 var(--t-body)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* Typografie */
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: var(--t-hero); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: var(--t-h2); line-height: 1.1; }
h3 { font-size: var(--t-h3); line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: var(--t-lead); color: var(--mist); max-width: 38em; }
.label {
  font: 500 var(--t-label)/1.2 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--mist);
}
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--signal); }

/* Tlacitka */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em; min-height: 48px; padding: 0 1.4em;
  border-radius: var(--r); border: 1px solid transparent; text-decoration: none;
  font: 600 0.9375rem/1 var(--f-body); cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--signal); color: var(--night); }
.btn-primary:hover { background: var(--paper); }
.btn-ghost { background: transparent; border-color: var(--steel); color: var(--paper); }
.btn-ghost:hover { border-color: var(--mist); }

/* Ramecek: znacka z loga jako ram (jen hero scena a dulezite vizualy) */
.frame { position: relative; padding: 14px; }
.frame > .frame-c { position: absolute; inset: 0; pointer-events: none; }
.frame::before, .frame::after, .frame > .frame-c::before, .frame > .frame-c::after {
  content: ""; position: absolute; width: 28px; height: 28px; border: 0 solid var(--paper); pointer-events: none;
}
.frame::before { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; }
.frame::after { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; }
.frame > .frame-c::before { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; }
.frame > .frame-c::after { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; }

/* Stavovy stitek */
.status {
  display: inline-flex; align-items: center; gap: 0.5em; padding: 0.35em 0.6em; border-radius: var(--r);
  font: 500 var(--t-label)/1 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase;
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.status::before { content: ""; width: 0.55em; height: 0.55em; border-radius: 50%; background: currentColor; }
.status.run { color: var(--st-run); } .status.stop { color: var(--st-stop); } .status.wait { color: var(--st-wait); }

/* Karta */
.card { background: var(--deep); border-radius: var(--r); padding: clamp(1.25rem, 1rem + 1vw, 2rem); }
.card p { color: var(--mist); margin-top: 0.6em; }

/* Lista souhlasu s merenim (js/consent.js) */
.consent { position: fixed; z-index: 50; left: var(--gutter); right: var(--gutter); bottom: var(--gutter); max-width: 44rem; margin-inline: auto;
  background: var(--deep); border: 1px solid var(--steel); border-radius: var(--r); padding: 1rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; justify-content: space-between; box-shadow: 0 12px 40px rgba(0,0,0,.45); }
.consent p { flex: 1 1 20rem; color: var(--paper); font-size: 0.9375rem; }
.consent a { color: var(--signal); }
.consent-btns { display: flex; gap: 0.5rem; }
