/* o_portalu.css — veřejná prezentační stránka /o-portalu (bez přihlášení).
   Samostatný stylesheet: NAČÍTÁ SE JEN s templates/o_portalu.html, dashboard.css
   se sem záměrně nelinkuje (stránka nemá widgety ani grid → žádné souboje
   specificity). Tokeny berou z themes.css, téma je natvrdo midnight jako
   u base_auth.html (pre-auth, není session.theme).

   Dvě barvy nesou význam a nemíchají se:
     --mkt-solar (jantar)  = energie/výroba — křivka, vrchol, akcenty sekcí
     --mkt-grid  (modrá)   = síť/distribuce — přerušená křivka odběru
   Fialový --accent zůstává barvou PRODUKTU (tlačítka, brand), ne dat. */

.mkt {
  --mkt-solar: #f5a430;
  --mkt-grid: #3b82f6;
  --mkt-rail: 11rem;
  --mkt-gut: 2.5rem;
  --mkt-display: 'Manrope', 'Inter', system-ui, sans-serif;
  --mkt-body: 'Inter', system-ui, -apple-system, sans-serif;
}

body.mkt {
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--mkt-body);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

.mkt-wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 3.25rem;
}

/* ── horní lišta ─────────────────────────────────────────────── */
.mkt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
}
.mkt-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mkt-mark {
  width: 40px; height: 40px;
  border-radius: var(--chrome-radius, 12px);
  background-color: rgba(255, 255, 255, 0.08);
  background-size: 76%;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}
.mkt-brand-text {
  font-family: var(--mkt-display);
  font-size: 16px; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.25;
}
.mkt-brand-sub { font-size: 12px; color: var(--text-dim); }

.mkt-cta {
  font-family: var(--mkt-display);
  font-size: 14px; font-weight: 600;
  padding: .6rem 1.15rem;
  border-radius: var(--chrome-radius, 12px);
  background: var(--accent-grad);
  color: var(--accent-text, #fff);
  text-decoration: none;
  white-space: nowrap;
  transition: box-shadow .15s, transform .15s;
}
.mkt-cta:hover { box-shadow: 0 6px 24px var(--accent-glow); transform: translateY(-1px); }
.mkt-cta:focus-visible { outline: 2px solid var(--accent-link); outline-offset: 3px; }

/* ── hlavička ────────────────────────────────────────────────── */
.mkt-hero { display: flex; flex-direction: column; gap: 1.5rem; }
.mkt-eyebrow {
  font-family: var(--mkt-display);
  font-size: .78rem; font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mkt-solar);
}
.mkt h1 {
  font-family: var(--mkt-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6.4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
.mkt h1 em { font-style: normal; color: var(--mkt-solar); }
.mkt-lede {
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 42ch;
  text-wrap: pretty;
  margin: 0;
}

.mkt-curve {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--chrome-radius, 12px);
  background: var(--bg-panel);
}

/* ── proužek čísel ───────────────────────────────────────────── */
.mkt-meters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--chrome-radius, 12px);
  overflow: hidden;
}
.mkt-meter {
  background: var(--bg-widget);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.mkt-meter b {
  font-family: var(--mkt-display);
  font-size: 1.85rem; font-weight: 700;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.mkt-meter small {
  font-size: .74rem; font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ── sekce: rejstříková lišta + obsah ────────────────────────── */
.mkt-band {
  display: grid;
  grid-template-columns: var(--mkt-rail) 1fr;
  gap: var(--mkt-gut);
  align-items: start;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  position: relative;
}
.mkt-band::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 2.25rem; height: 2px;
  background: var(--mkt-solar);
}
.mkt-rail {
  font-family: var(--mkt-display);
  font-size: .8rem; font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1.35;
  padding-top: .2rem;
}
.mkt-rail span {
  display: block;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .06em;
  color: var(--border-strong);
  margin-top: .35rem;
}
.mkt-bandbody {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.mkt h2 {
  font-family: var(--mkt-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
  color: var(--text);
}
.mkt-intro { color: var(--text-muted); max-width: 62ch; margin: 0; }

/* ── karty schopností ────────────────────────────────────────── */
.mkt-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--chrome-radius, 12px);
  overflow: hidden;
}
.mkt-card {
  background: var(--bg-widget);
  padding: 1.15rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.mkt-card h3 {
  font-family: var(--mkt-display);
  font-size: 1.02rem; font-weight: 700;
  margin: 0;
  color: var(--text);
}
.mkt-card p { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--text-muted); }

/* ── zdroje dat ──────────────────────────────────────────────── */
.mkt-feeds {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--chrome-radius, 12px);
  overflow: hidden;
  margin: 0;
}
.mkt-feed {
  background: var(--bg-widget);
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 1.25rem;
  padding: .95rem 1.15rem;
  align-items: baseline;
}
.mkt-feed dt {
  font-family: var(--mkt-display);
  font-weight: 700; font-size: .95rem;
  color: var(--text);
}
.mkt-feed dt i {
  display: block;
  font-style: normal;
  font-size: .72rem; font-weight: 500;
  letter-spacing: .04em;
  color: var(--mkt-grid);
  margin-top: .15rem;
}
.mkt-feed dd { margin: 0; font-size: .92rem; color: var(--text-muted); line-height: 1.5; }

/* ── technologie ─────────────────────────────────────────────── */
.mkt-stack { display: flex; flex-wrap: wrap; gap: .5rem; }
.mkt-chip {
  font-size: .82rem;
  padding: .32rem .65rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-widget);
  color: var(--text-muted);
  white-space: nowrap;
}
.mkt-chip.is-key {
  border-color: var(--accent);
  color: var(--accent-link);
  background: var(--accent-bg);
}

.mkt-notes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.mkt-notes li { position: relative; padding-left: 1.2rem; color: var(--text-muted); font-size: .94rem; }
.mkt-notes li::before {
  content: "";
  position: absolute;
  left: 0; top: .68em;
  width: .55rem; height: 2px;
  background: var(--mkt-solar);
}
.mkt-notes strong { color: var(--text); font-weight: 600; }

/* ── provoz ──────────────────────────────────────────────────── */
.mkt-ops {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--chrome-radius, 12px);
  overflow: hidden;
}
.mkt-op { background: var(--bg-widget); padding: 1.05rem 1.15rem; display: flex; flex-direction: column; gap: .3rem; }
.mkt-op b {
  font-size: .74rem; font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.mkt-op span { font-size: .93rem; color: var(--text-muted); }
.mkt-op span code {
  font-family: ui-monospace, 'Consolas', monospace;
  font-size: .88em;
  color: var(--accent-link);
}

/* ── závěr ───────────────────────────────────────────────────── */
.mkt-closer {
  border: 1px solid var(--border-strong);
  border-radius: var(--chrome-radius, 12px);
  background: var(--bg-panel);
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .85rem;
}
.mkt-closer p { margin: 0; color: var(--text-muted); max-width: 52ch; }
.mkt-closer .mkt-addr {
  font-family: var(--mkt-display);
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.mkt-foot {
  font-size: .82rem;
  color: var(--text-dim);
  text-align: center;
}

@media (max-width: 820px) {
  .mkt { --mkt-gut: 0; }
  .mkt-band { grid-template-columns: 1fr; gap: .9rem; }
  .mkt-rail { padding-top: 0; }
  .mkt-rail span { display: inline; margin-left: .6rem; }
  .mkt-feed { grid-template-columns: 1fr; gap: .3rem; }
  .mkt-closer { padding: 1.5rem 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mkt-cta { transition: none; }
  .mkt-cta:hover { transform: none; }
}
