/* balon.bruzatko.cz – 2026 */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/bricolage-grotesque-latin-ext-standard-normal.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+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: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(../fonts/bricolage-grotesque-latin-standard-normal.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;
}
@font-face { font-family: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(../fonts/literata-latin-ext-wght-normal.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+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: "Literata"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(../fonts/literata-latin-wght-normal.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; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 200 900; font-display: swap; src: url(../fonts/literata-latin-ext-wght-italic.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+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: "Literata"; font-style: italic; font-weight: 200 900; font-display: swap; src: url(../fonts/literata-latin-wght-italic.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; }

:root {
  --paper: #f6f9fc;
  --surface: #ffffff;
  --ink: #15243b;
  --ink-2: #4a5b73;
  --line: #d5dfea;
  --sky: #e3eef8;
  --balloon: #e0367a;
  --balloon-ink: #b81c5c;
  --ok: #2f8f5b;
  --est: #8a96a8;
  --stale: #c2a14a;
  --bad: #d9483b;

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --text: "Literata", Georgia, "Times New Roman", serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.5rem;
  --step-4: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem);

  --wrap: 72rem;
  --gap: clamp(1rem, 0.6rem + 1.6vw, 2rem);
  --radius-s: 6px;
  --radius-l: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: var(--step-0)/1.6 var(--text);
  font-variant-numeric: tabular-nums;
}
img { max-width: 100%; height: auto; }
a { color: var(--balloon-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--balloon); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
code { font-size: 0.9em; background: var(--sky); padding: 0.1em 0.35em; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.5rem 1rem; z-index: 2000; }
.skip:focus { left: 0; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gap); }
.narrow { max-width: 42rem; }

/* ---------- hlavička / patička ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem var(--gap);
  background: var(--ink); color: #fff;
  position: relative; z-index: 1100;
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; }
.brand-mark { width: 26px; height: 36px; color: #fff; flex: none; }
.brand-text { font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1; display: flex; flex-direction: column; }
.brand-text span { font-family: var(--display); font-weight: 400; font-size: 0.8rem; opacity: 0.75; margin-top: 0.2rem; }
.site-nav { display: flex; gap: 1.1rem; }
.site-nav a { color: #fff; text-decoration: none; font-family: var(--display); font-weight: 600; }
.site-nav a:hover { text-decoration: underline; }

.site-foot { margin-top: 4rem; padding: 2rem var(--gap) 3rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: var(--step--1); }
.site-foot p { max-width: 46rem; margin: 0 auto 0.5rem; text-align: center; }

/* ---------- tlačítka, formuláře ---------- */
.btn {
  font: 600 var(--step--1)/1 var(--display);
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.6rem 1rem; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn:hover { border-color: var(--ink-2); }
.btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-quiet { background: transparent; }
.select { font: inherit; font-size: var(--step--1); padding: 0.4rem 0.6rem; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); }
.check { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--step--1); cursor: pointer; }
.check input { accent-color: var(--balloon); width: 1.05rem; height: 1.05rem; }

/* ---------- živý let ---------- */
.live-dot { display: inline-block; width: 0.7em; height: 0.7em; border-radius: 50%; background: var(--balloon); box-shadow: 0 0 0 0 rgba(224, 54, 122, 0.6); animation: pulse 1.8s infinite; vertical-align: 0.05em; }
@keyframes pulse { 70% { box-shadow: 0 0 0 0.6em rgba(224, 54, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 54, 122, 0); } }

/* ---------- úvodní stránka ---------- */
.home-hero { position: relative; }
.overview-map { height: min(72vh, 640px); min-height: 380px; background: var(--sky); }
.hero-card {
  position: absolute; left: var(--gap); bottom: var(--gap); z-index: 500;
  max-width: 34rem; padding: 1.4rem 1.5rem 1.3rem;
  background: rgba(255, 255, 255, 0.94); border-radius: var(--radius-l);
  box-shadow: 0 10px 30px -12px rgba(21, 36, 59, 0.45);
}
.hero-card h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.025em; line-height: 0.98; margin-bottom: 0.8rem; text-wrap: balance; }
.hero-card p { margin: 0; color: var(--ink-2); }
.hero-card strong { color: var(--ink); }
.live-banner { display: inline-flex; gap: 0.5rem; align-items: center; margin-top: 0.9rem; font-weight: 700; color: var(--ink); }

.home-intro { padding-top: 2.5rem; font-size: var(--step-1); line-height: 1.55; }
.home-intro > * { max-width: 40rem; }

.flights { margin-top: 3rem; }
.flights h2 { margin-bottom: 1rem; }
.flight-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.flight-row {
  display: grid; grid-template-columns: 5.5rem 1fr auto; gap: 0.5rem 1.5rem; align-items: start;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line);
  position: relative;
}
.flight-row.is-hover { background: linear-gradient(90deg, var(--sky), transparent 70%); }
.fr-date { font-family: var(--display); line-height: 1; }
.fr-date .d { display: block; font-size: var(--step-1); font-weight: 700; }
.fr-date .y { display: block; color: var(--ink-2); margin-top: 0.2rem; }
.fr-main h3 a { color: var(--ink); text-decoration: none; }
.fr-main h3 a::after { content: ""; position: absolute; inset: 0; }
.fr-main h3 a:hover { text-decoration: underline; }
.fr-main p { margin: 0.3rem 0 0; color: var(--ink-2); max-width: 38rem; }
.fr-status { font-weight: 700; color: var(--balloon-ink) !important; }
.fr-nums { display: flex; gap: 1.5rem; margin: 0; }
.fr-nums div { min-width: 5.5rem; }
.fr-nums dt { font-size: 0.8rem; color: var(--ink-2); }
.fr-nums dd { margin: 0; font-family: var(--display); font-size: var(--step-1); font-weight: 600; white-space: nowrap; }

.support { margin-top: 3.5rem; }
.support h2 { margin-bottom: 0.5rem; }
.donate { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.donate-item { flex: 1 1 16rem; max-width: 22rem; padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); text-align: center; }
.donate-item h3 { font-size: var(--step-0); margin-bottom: 0.8rem; }
.donate-item img { width: 180px; height: auto; image-rendering: auto; }
.donate-item img.pixelated { image-rendering: pixelated; }
.donate-item p { font-size: var(--step--1); overflow-wrap: anywhere; margin: 0.6rem 0 0; }

/* ---------- stránka letu ---------- */
.map-wrap { position: relative; }
.flight-map { height: min(74vh, 720px); min-height: 420px; background: var(--sky); }
.map-title {
  position: absolute; z-index: 500; left: var(--gap); top: var(--gap);
  max-width: min(30rem, calc(100% - 2 * var(--gap)));
  padding: 1rem 1.2rem; background: rgba(255, 255, 255, 0.94); border-radius: var(--radius-l);
  box-shadow: 0 10px 30px -14px rgba(21, 36, 59, 0.5);
}
.map-title h1 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
.map-sub { margin: 0.35rem 0 0; color: var(--ink-2); }
.status { margin: 0.55rem 0 0; font-weight: 700; color: var(--balloon-ink); }
.status-ago { font-weight: 400; color: var(--ink-2); }
.map-tools { position: absolute; z-index: 500; right: var(--gap); bottom: calc(var(--gap) + 1.2rem); display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.map-tools .btn { box-shadow: 0 4px 14px -6px rgba(21, 36, 59, 0.5); }
.map-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; z-index: 400; font-family: var(--display); font-size: var(--step-1); color: var(--ink-2); }

.map-legend {
  position: absolute; z-index: 500; left: var(--gap); bottom: calc(var(--gap) + 1.2rem);
  padding: 0.5rem 0.75rem; background: rgba(255, 255, 255, 0.92); border-radius: var(--radius-s);
  font-size: 0.8rem; color: var(--ink-2); width: 14rem;
}
.map-legend .ramp { height: 8px; border-radius: 4px; margin: 0.3rem 0 0.15rem; }
.map-legend .ramp-labels { display: flex; justify-content: space-between; }

.point-card {
  position: absolute; z-index: 600; right: var(--gap); top: var(--gap);
  width: min(19rem, calc(100% - 2 * var(--gap)));
  padding: 0.9rem 1rem; background: var(--surface); border-radius: var(--radius-l);
  box-shadow: 0 12px 30px -12px rgba(21, 36, 59, 0.55); font-size: var(--step--1);
}
.point-card h3 { font-size: var(--step-0); padding-right: 1.5rem; }
.point-card dl { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.8rem; margin: 0.6rem 0 0; }
.point-card dt { color: var(--ink-2); }
.point-card dd { margin: 0; text-align: right; }
.point-card .pc-flag { margin: 0.4rem 0 0; color: var(--ink-2); }
.point-card .pc-close { position: absolute; right: 0.5rem; top: 0.45rem; border: 0; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 0.2rem 0.4rem; }
.point-card .pc-gw { margin: 0.6rem 0 0; color: var(--ink-2); }

.balloon-icon { filter: drop-shadow(0 3px 3px rgba(21, 36, 59, 0.35)); }
.start-icon span { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.leaflet-container { font-family: var(--text); }
.leaflet-tooltip { font-family: var(--text); }
.gw-tip { font-size: 0.8rem; }

.readout { margin-top: 1.5rem; }
.readout dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0; margin: 0; border-top: 2px solid var(--ink); }
.readout dl > div { padding: 0.8rem 1rem 0.9rem 0; border-bottom: 1px solid var(--line); }
.readout dt { font-size: 0.85rem; color: var(--ink-2); }
.readout dd { margin: 0.15rem 0 0; font-family: var(--display); font-size: var(--step-1); font-weight: 600; }

.profile { margin-top: 2.5rem; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0 0.5rem; }
.chart-head h2 { font-size: var(--step-1); }
.chart-note { margin: 0; color: var(--ink-2); font-size: var(--step--1); }
.chart { width: 100%; min-height: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 0.5rem 0.25rem 0; overflow: hidden; }
.chart-small { min-height: 180px; }
.uplot { font-family: var(--display); }
.u-legend { font-size: 0.8rem; }

.story { margin-top: 3rem; }
.story > * { max-width: 42rem; }

.prose { line-height: 1.6; }
.prose p, .prose ul { margin: 0 0 1em; }
.prose .center { text-align: center; }
.prose img { border-radius: var(--radius-l); display: block; margin: 1rem auto; }
.prose table.plain { border-collapse: collapse; margin: 1rem 0; width: 100%; }
.prose table.plain td { vertical-align: top; padding: 0.4rem; }
.prose s { color: var(--ink-2); }

.data { margin-top: 3rem; }
.data-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.data-tools { display: flex; align-items: center; gap: 0.6rem 1rem; flex-wrap: wrap; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); max-height: 70vh; overflow-y: auto; }
.data-table { border-collapse: collapse; width: 100%; font-size: var(--step--1); white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.data-table th { position: sticky; top: 0; background: var(--ink); color: #fff; text-align: right; font-weight: 700; padding: 0.55rem 0.7rem; z-index: 1; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table th { padding: 0; }
.th-sort {
  all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: flex-end; gap: 0.3rem;
  width: 100%; padding: 0.55rem 0.7rem; cursor: pointer; font: inherit; color: inherit; white-space: nowrap;
}
.data-table th:first-child .th-sort { justify-content: flex-start; }
.th-sort:hover { background: rgba(255, 255, 255, 0.1); }
.th-sort:focus-visible { outline: 3px solid var(--balloon); outline-offset: -3px; }
.sort-ind { font-size: 0.7em; min-width: 0.8em; color: #f7a8c8; }
.data-table td { padding: 0.4rem 0.7rem; text-align: right; border-bottom: 1px solid var(--line); }
.data-table tbody tr { cursor: pointer; }
.data-table tbody tr:hover { background: var(--sky); }
.data-table tbody tr.is-selected { background: #fbe3ed; }
.data-table tr.f-none td, .data-table tr.f-stale td:not(:first-child) { color: var(--ink-2); }
.data-table tr.f-bad td, .data-table tr.f-jump td { color: var(--ink-2); text-decoration: line-through rgba(217, 72, 59, 0.5); }
.data-table tr.f-bad td:first-child, .data-table tr.f-jump td:first-child { text-decoration: none; }
.more { text-align: center; }

.flag { display: inline-block; width: 0.7em; height: 0.7em; border-radius: 50%; margin-right: 0.45em; vertical-align: 0.02em; }
.flag-ok { background: var(--ok); }
.flag-est { background: transparent; border: 2px dashed var(--est); }
.flag-stale { background: var(--stale); }
.flag-bad, .flag-jump { background: var(--bad); border-radius: 2px; transform: rotate(45deg) scale(0.8); }
.flag-none { background: var(--line); }
.flag-legend { list-style: none; padding: 0; }
.flag-legend li { margin-bottom: 0.3rem; }
.legend { margin-top: 1.5rem; font-size: var(--step--1); color: var(--ink-2); max-width: 46rem; }
.legend h3 { font-size: var(--step-0); color: var(--ink); margin-bottom: 0.5rem; }
.legend b { color: var(--ink); }

.notfound { padding-top: 4rem; }
.notfound h1 { font-size: var(--step-3); margin-bottom: 1rem; }

/* ---------- mobil ---------- */
@media (max-width: 720px) {
  .brand-text span { display: none; }
  .site-nav { gap: 0.8rem; font-size: var(--step--1); }
  .hero-card { position: relative; left: auto; bottom: auto; margin: 0; border-radius: 0; box-shadow: none; max-width: none; border-bottom: 1px solid var(--line); }
  .overview-map { height: 52vh; min-height: 300px; }
  .flight-row { grid-template-columns: 4rem 1fr; }
  .fr-nums { grid-column: 2; gap: 1rem; flex-wrap: wrap; }
  .fr-nums div { min-width: 0; }
  .flight-map { height: 62vh; min-height: 340px; }
  .map-title { position: static; max-width: none; border-radius: 0; box-shadow: none; background: var(--surface); padding: 1rem var(--gap); border-bottom: 1px solid var(--line); }
  .map-title h1 { font-size: var(--step-2); }
  .map-tools { bottom: 2rem; right: 0.6rem; }
  .map-legend { display: none; }
  .point-card { top: auto; bottom: 4.5rem; right: 0.6rem; left: 0.6rem; width: auto; max-height: 45vh; overflow: auto; }
  .home-intro { font-size: var(--step-0); }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  * { scroll-behavior: auto !important; }
}
