/* GX1 – gx1.gsmain.cz
   Barvy a rytmus navazují na technický list (docs/datasheet). */

:root {
  --navy: #1b3557;
  --navy-deep: #12263f;
  --cyan: #00a9e0;
  --cyan-soft: #d9f1fb;
  --ink: #1c2430;
  --muted: #5b6673;
  --paper: #f6f8fa;
  --line: #dfe4ea;
  --white: #ffffff;
  --in: #2e8b57;  --in-bg: #e5f4ea;
  --out: #d9731a; --out-bg: #fdeede;
  --max: 1120px;
  --radius: 6px;
  --font-body: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "IBM Plex Sans Condensed", "IBM Plex Sans", "Arial Narrow", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "DejaVu Sans Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cyan); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Typografie ---------- */
h1, h2, h3 { font-family: var(--font-display); color: var(--navy); line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; margin-bottom: 0.6em; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.35em; }
p { margin: 0 0 1em; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 0.9em; display: block;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; }
p code, li code, td code { background: var(--paper); border: 1px solid var(--line); padding: 0 0.3em; border-radius: 3px; }

/* ---------- Hlavička ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.94); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand .mark { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--navy); letter-spacing: -0.01em; }
.brand .mark span { color: var(--cyan); }
.brand .sub { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { font-size: 0.95rem; text-decoration: none; color: var(--ink); }
.nav a:hover { color: var(--cyan); }
.nav .maker { display: flex; align-items: center; gap: 8px; padding-left: 18px; border-left: 1px solid var(--line); }
.nav .maker img { width: 22px; height: 22px; }

/* ---------- Tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: 1rem; text-decoration: none; line-height: 1;
  border: 2px solid var(--navy); color: var(--navy); background: transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--navy); color: var(--white); }
.btn.primary { background: var(--navy); color: var(--white); }
.btn.primary:hover { background: var(--cyan); border-color: var(--cyan); color: var(--white); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn small { font-weight: 400; opacity: .75; font-size: 0.85em; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--paper);
  background-image: radial-gradient(circle, #c7d0da 1px, transparent 1.2px);
  background-size: 18px 18px;
  border-bottom: 1px solid var(--line);
}
.hero::after { /* zjemnění mřížky směrem dolů */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(246,248,250,0) 0%, rgba(246,248,250,.92) 100%);
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { margin-bottom: 0.25em; }
.hero h1 .model { color: var(--cyan); }
.hero .tag { font-family: var(--font-display); font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 400; color: var(--navy); margin-bottom: 1em; line-height: 1.25; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 8px 22px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.hero .facts b { color: var(--navy); font-weight: 600; }
.hero .visual img { filter: drop-shadow(0 18px 30px rgba(18,38,63,.22)); }

/* ---------- Sekce ---------- */
.section { padding: 80px 0; }
.section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 40px; }

/* Vlastnosti */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; }
.feature { border-top: 3px solid var(--cyan); padding-top: 16px; }
.feature .val { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1; margin-bottom: 6px; }
.feature .val small { font-size: 0.55em; font-weight: 600; color: var(--muted); margin-left: 4px; }
.feature p { color: var(--muted); font-size: 0.97rem; margin: 0; }

/* Kompatibilita */
.compat { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.compat ul { margin: 0; padding-left: 1.2em; }
.compat li { margin-bottom: 0.5em; }
.compat .card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; }
.compat .card h3 { margin-bottom: 0.6em; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding-left: 28px; position: relative; margin-bottom: 0.6em; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 14px; height: 8px; border-left: 3px solid var(--in); border-bottom: 3px solid var(--in); transform: rotate(-45deg); }

/* Parametry */
.params { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
table.spec { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.spec th, table.spec td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.spec th { width: 36%; font-weight: 600; color: var(--navy); font-family: var(--font-display); font-size: 1rem; }
table.spec tr:first-child th, table.spec tr:first-child td { border-top: 2px solid var(--navy); }
.params figure { margin: 0; position: sticky; top: 90px; }
.params figcaption { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-top: 10px; }
.params .more { margin-top: 18px; font-size: 0.95rem; }

/* Ke stažení */
.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dl {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px;
  transition: border-color .15s, box-shadow .15s;
}
.dl:hover { border-color: var(--cyan); box-shadow: 0 6px 22px rgba(18,38,63,.08); }
.dl.main { grid-column: span 2; flex-direction: row; align-items: center; gap: 26px; }
.dl.main .thumb { flex: none; width: 150px; aspect-ratio: 210/297; background: var(--navy); border-radius: 3px; position: relative; overflow: hidden; }
.dl.main .thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .95; }
.dl .type { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); }
.dl h3 { margin: 0; }
.dl p { color: var(--muted); font-size: 0.95rem; margin: 0; flex: 1; }
.dl .links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 6px; font-size: 0.95rem; }
.dl .links a { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.dl .links a:hover { text-decoration: underline; }
.dl .links svg { width: 16px; height: 16px; }
.dl .meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }

/* Protokol */
.proto { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.console {
  background: var(--navy-deep); color: #dbe4f0; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.6; padding: 18px 22px;
  overflow-x: auto; box-shadow: 0 14px 34px rgba(18,38,63,.25); white-space: pre-wrap; overflow-wrap: anywhere;
}
.console .bar { display: flex; gap: 6px; margin-bottom: 12px; }
.console .bar i { width: 10px; height: 10px; border-radius: 50%; background: #2f4666; display: block; }
.console .bar i:first-child { background: var(--cyan); }
.console .c { color: #7f8ea3; }
.console .k { color: #8fd3ff; }
.console .s { color: #b5e7a0; }
.console .n { color: #ffd28a; }
.console .tx::before { content: "→ "; color: var(--cyan); }
.console .rx::before { content: "← "; color: #b5e7a0; }
.proto ul { padding-left: 1.2em; }
.proto li { margin-bottom: 0.5em; }

/* Výrobce */
.maker-block { display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 34px 40px; }
.maker-block img { width: 72px; height: 72px; }
.maker-block h2 { color: var(--white); margin-bottom: 0.3em; }
.maker-block p { margin: 0; color: #c9d6e6; }
.maker-block address { font-style: normal; font-size: 0.95rem; color: #c9d6e6; line-height: 1.6; }
.maker-block address a { color: var(--white); }
.maker-block .btn { border-color: var(--white); color: var(--white); }
.maker-block .btn:hover { background: var(--white); color: var(--navy); }

/* Patička */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 0.88rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer a { color: var(--muted); }

/* ---------- Responzivita ---------- */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 48px; }
  .hero .visual { order: -1; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .compat, .params, .proto { grid-template-columns: 1fr; }
  .params figure { position: static; }
  .downloads { grid-template-columns: 1fr 1fr; }
  .dl.main { grid-column: span 2; }
  .maker-block { grid-template-columns: 1fr; padding: 28px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .nav a:not(.maker) { display: none; }
  .features, .downloads { grid-template-columns: 1fr; }
  .dl.main { grid-column: auto; flex-direction: column; align-items: stretch; }
  .dl.main .thumb { width: 110px; }
  .hero .actions .btn { width: 100%; justify-content: center; }
}

/* --- drobnosti pro úzké displeje --- */
@media (max-width: 640px) {
  .brand .sub { display: none; }
  .nav .maker { white-space: nowrap; padding-left: 0; border-left: 0; }
}
