/* =====================================================================
   Portal klienta — styl jak sprawnymarketing.pl/konferencja:
   jasne tło, Lato, czerwień #ee312f, żółty akcent, bez zaokrągleń.
   Wszystko lokalnie (CSP: style-src 'self', font z własnej domeny).
   ===================================================================== */

@font-face { font-family: 'Lato'; font-weight: 400; src: url('fonts/lato-400.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Lato'; font-weight: 700; src: url('fonts/lato-700.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Lato'; font-weight: 900; src: url('fonts/lato-900.ttf') format('truetype'); font-display: swap; }

:root {
  --bg: #fff;
  --bg-2: #f5f5f5;
  --text: #111;
  --text-2: #3d3d3d;
  --muted: #777;
  --muted-2: #999;
  --line: #e5e5e5;
  --line-2: #ccc;
  --red: #ee312f;
  --red-dark: #b81a18;
  --yellow: #ffff00;
  --maxw: 1240px;
  --font: 'Lato', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; border-radius: 0; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; min-height: 100%; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }
::selection { background: var(--yellow); color: #111; }

h1, h2, h3 { letter-spacing: -0.02em; font-weight: 900; margin: 0; line-height: 1.1; color: var(--text); }
.h-page { font-size: clamp(34px, 5vw, 56px); line-height: 0.98; margin-bottom: 18px; text-wrap: balance; }
.h-section { font-size: 22px; }
.h-card { font-size: 18px; line-height: 1.2; margin: 14px 0 6px; }
.h-watch { font-size: clamp(24px, 3.6vw, 36px); margin: 24px 0 10px; line-height: 1.05; }
.dot { color: var(--red); }

/* Podkreślenie markerem — jak na stronie konferencji. */
.hl {
  background: linear-gradient(180deg, transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%);
  padding: 0 0.06em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* Etykieta nad nagłówkiem: czerwone wersaliki. */
.eyebrow { display: block; font-size: 12px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.page { padding-top: 52px; padding-bottom: 40px; min-height: 60vh; }
.narrow { max-width: 520px; margin: 0 auto; }

.topbar { position: sticky; top: 0; z-index: 60; background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: var(--maxw); margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.logo { display: flex; align-items: baseline; gap: 0; font-weight: 900; font-size: 19px; letter-spacing: -0.02em; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-mark { color: var(--red); }
.logo-rest { color: var(--text); }
.spacer { flex: 1; }
.navlink { color: var(--text); font-size: 14px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.navlink:hover { color: var(--red); }
.inline { display: inline; margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit; font-size: 15px; font-weight: 900; min-height: 48px; padding: 0 22px; border: none; cursor: pointer; text-align: center; transition: background 120ms ease, color 120ms ease, border-color 120ms ease; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.btn-block { width: 100%; margin-top: 14px; }

.card { background: #fff; border: 1px solid var(--line); padding: 24px; }
.card-hover { display: block; color: var(--text-2); transition: border-color 120ms ease; }
.card-hover:hover { border-color: var(--text); color: var(--text-2); }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.tile { padding: 0; }
.tile-body { padding: 4px 18px 18px; }
.thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #111; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 300ms ease; }
.tile:hover .thumb img { transform: scale(1.03); }
/* Zaślepka, gdy nie ma miniatury: czarne pole, czerwony trójkąt, żółty pasek. */
.thumb-empty { display: flex; align-items: flex-end; padding: 16px; }
.thumb-empty::before { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; margin: -22px 0 0 -14px; border-style: solid; border-width: 22px 0 22px 36px; border-color: transparent transparent transparent var(--red); }
.thumb-empty::after { content: ''; position: absolute; left: 0; bottom: 0; width: 34%; height: 6px; background: var(--yellow); }
.thumb-label { position: relative; z-index: 1; color: #fff; font-size: 12px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; max-width: 80%; line-height: 1.3; }

.tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 8px; }
.tag-yellow { background: var(--yellow); color: #111; }
.tag-grey { background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); }
.pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); background: var(--bg-2); border: 1px solid var(--line); padding: 6px 10px; }

.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small { font-size: 13px; }
.lead { font-size: 17px; line-height: 1.6; color: var(--text-2); margin: 0 0 24px; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.crumbs { font-size: 12px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--red); }
.prose { color: var(--text-2); line-height: 1.65; }

.label { display: block; font-size: 12px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); margin: 8px 0 8px; }
.input { font-family: inherit; font-size: 16px; color: var(--text); background: #fff; border: 1px solid var(--line-2); padding: 13px 14px; min-height: 50px; width: 100%; }
.input:focus { outline: none; border-color: var(--text); box-shadow: inset 0 -3px 0 var(--red); }
.input-code { font-size: 30px; font-weight: 900; letter-spacing: 0.32em; text-align: center; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Wyszukiwarka nad listą materiałów. */
.search { position: relative; margin: 0 0 24px; }
.search .input { padding-left: 46px; font-size: 17px; }
.search::before { content: ''; position: absolute; left: 16px; top: 50%; width: 13px; height: 13px; margin-top: -9px; border: 2px solid var(--muted); border-radius: 50%; }
.search::after { content: ''; position: absolute; left: 29px; top: 50%; width: 7px; height: 2px; margin-top: 5px; background: var(--muted); transform: rotate(45deg); }
.search-info { font-size: 13px; color: var(--muted); margin: -12px 0 20px; min-height: 18px; }
.search-empty { display: none; }
.search-empty.is-visible { display: block; }

.alert { padding: 14px 16px; font-size: 14px; line-height: 1.55; margin: 0 0 18px; border: 1px solid var(--line); border-left: 5px solid var(--red); }
.alert-error { background: #fff5f5; color: #8c1513; }
.alert-info { background: var(--bg-2); color: var(--text-2); justify-content: space-between; }

.section-head { position: relative; display: flex; align-items: baseline; gap: 12px; margin: 38px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.section-head::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 70px; height: 4px; background: var(--red); }

.lesson { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); background: #fff; color: var(--text-2); }
a.lesson:hover { border-color: var(--text); color: var(--text-2); }
.lesson-locked { background: var(--bg-2); }
.lesson-locked .lesson-title { color: var(--muted); }
.lesson-current { border-color: var(--text); box-shadow: inset 4px 0 0 var(--yellow); }
.lesson-num { font-size: 12px; font-weight: 900; color: var(--red); letter-spacing: 0.1em; min-width: 26px; }
.lesson-title { flex: 1; font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.35; }
.lesson-speaker { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.lesson-time { font-size: 13px; color: var(--muted); font-weight: 700; white-space: nowrap; }

.watch { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 1000px) { .watch { grid-template-columns: minmax(0, 1fr) 360px; } }
.player { position: relative; aspect-ratio: 16/9; width: 100%; background: #000; overflow: hidden; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.watch-side .lesson { padding: 10px 12px; }
.watch-side .lesson-title { font-size: 14px; }

.footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 70px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 36px 20px 52px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.footer-inner a { color: var(--text-2); }

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .page { padding-top: 30px; }
  .lesson-time { display: none; }
}

/* Strona 404 */
.nf { max-width: 720px; margin: 7vh auto 9vh; }
.nf-code { margin: 0 0 6px; font-size: clamp(96px, 18vw, 180px); font-weight: 900; line-height: .85; letter-spacing: -0.05em; color: var(--red); }
.nf-code::after { content: ""; display: block; width: 72px; height: 8px; margin-top: 18px; background: var(--yellow); }
.nf-lead { font-size: 18px; line-height: 1.55; color: var(--text-2); max-width: 560px; margin: 0 0 8px; }
.nf-actions { margin-top: 22px; }

/* Strony dokumentów (polityka prywatności, regulamin) */
.doc { max-width: 780px; margin: 40px auto 64px; }
.doc-body { font-size: 17px; line-height: 1.7; color: var(--text-2); }
.doc-body h2 { font-size: 24px; margin: 40px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.doc-body h3 { font-size: 18px; margin: 24px 0 8px; }
.doc-body ul { padding-left: 22px; }
.doc-body li { margin: 4px 0; }
.doc-body a { text-decoration: underline; text-underline-offset: 2px; }
