/* Honza IRL public site, shared by every page of honza-irl.com (phase W3): page, header with
 * navigation, mobile menu, popups (<dialog>), footer. Loads after /design/tokens.css and
 * /design/components.css. Layout works from 360 px without media queries: the desktop navigation
 * and the menu button switch with one media query (hidden links must not be reachable with Tab),
 * everything else wraps by itself (flex-wrap, minmax(min(100%, X), 1fr), clamp()). */
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font-body);
       font-size: 18px; line-height: 1.5; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font-pixel); font-weight: 700; margin: 0; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: var(--text); }
.muted { color: var(--muted); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--button); color: var(--button-text); padding: 10px 16px; }
.skip:focus { left: 16px; }

/* ---------- header ---------- */
.site-head { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
             padding: clamp(14px, 2.4vw, 32px) clamp(14px, 5vw, 72px); }
.logo { flex: 0 0 auto; display: flex; align-items: center; font-family: var(--font-pixel); font-weight: 700;
        font-size: clamp(17px, 2.1vw, 30px); letter-spacing: 1px; color: var(--text); text-decoration: none; white-space: nowrap; }
.logo:hover { color: var(--text); }
.logo-dot { display: inline-block; width: .6em; height: .6em; margin: 0 .2em; background: var(--accent);
            box-shadow: .2em 0 0 var(--bg) inset, -.2em 0 0 var(--bg) inset; }
/* Desktop navigation and platform icons from 1120 px; below that the menu button (the only media
   query of the layout: hidden links must not be reachable with Tab) */
.nav-wide { flex: 1 1 0; display: flex; justify-content: center; }
.nav-wide nav { display: flex; gap: 28px; font-size: 18px; white-space: nowrap; padding: 6px 24px; }
.nav-wide a { color: var(--text); text-decoration: none; }
.nav-wide a:hover, .nav-wide a[aria-current] { color: var(--accent); text-decoration: underline; }
.head-right { margin-left: auto; display: flex; align-items: center; gap: 0; }
.head-right > .btn { font-size: clamp(14px, 1.2vw, 16px); padding: 10px clamp(12px, 1.6vw, 22px); }
.platforms-wide { display: flex; padding: 6px 0; }
.platforms-wide .btn { margin: 6px; }
.menu-btn { display: none; padding: 6px 0 6px 6px; }
@media (max-width: 1119px) {
  .nav-wide, .platforms-wide { display: none; }
  .menu-btn { display: block; }
}
.menu-btn .btn { margin: 4px; }
/* "Vote here" (vote.honza-irl.com, new tab): yellow outline, so it never competes with the primary yellow
   "Watch live". In the hero, the phone bar, the menu and on How to vote (not in the header). */
.btn.outline { color: var(--accent); background: var(--bg); }
.btn.outline > .label { color: var(--accent); }
.vote-cta { margin-top: 18px; }

/* ---------- popups: <dialog> with an 8bit "pop" ---------- */
dialog.pop-up { border: 0; padding: 0; margin: auto; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
                color: var(--line); background: var(--card); overflow: visible; }
dialog.pop-up[open] { animation: pxpop .36s steps(1, end) both; }
dialog::backdrop { background: rgba(0, 0, 0, .72); }
.pop-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px 10px 18px;
            background: var(--accent); color: var(--button-text); font-family: var(--font-pixel); font-size: 16px; }
.pop-head h2 { font-size: 16px; font-weight: 400; letter-spacing: 1px; }
.x { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); margin: -6px -8px -6px 0;
     border: 0; background: transparent; color: var(--button-text); cursor: pointer; }
.x .icon { width: 20px; height: 20px; }
.pop-body { padding: 20px 18px 22px; color: var(--text); max-height: calc(100vh - 110px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.pop-body .btn { width: calc(100% - 8px); justify-content: flex-start; }
.pop-body .btn.icon-only { width: var(--tap); justify-content: center; }
.pop-note { font-size: 15px; color: var(--muted); }

/* ---------- mobile menu: a drawer from the right ---------- */
dialog.drawer { border: 0; padding: 0; margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(360px, 100vw);
                background: var(--bg); color: var(--text); border-left: 4px solid var(--accent); }
dialog.drawer[open] { animation: pxdrawer .36s steps(1, end) both; }
.drawer .pop-body { max-height: calc(100vh - 64px); }
.mlink { display: flex; justify-content: space-between; align-items: center; min-height: 56px; text-decoration: none;
         color: var(--text); font-family: var(--font-pixel); font-size: 16px; border-bottom: 4px dashed var(--line); }
.mlink:hover { color: var(--accent); }
.mlink .icon { width: 14px; height: 14px; color: var(--accent); }
.label-small { font-family: var(--font-pixel); font-size: 13px; color: var(--muted); }

/* ---------- footer ---------- */
.site-foot { border-top: 4px solid var(--line); margin-top: clamp(48px, 8vw, 96px); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px;
                   padding-top: 28px; padding-bottom: 36px; }
.site-foot .logo { font-size: 18px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 16px; }

/* ---------- sticky "Watch live" bar on phones (no media query: collapses on wide screens) ---------- */
.phone-bar { display: none; position: sticky; bottom: 0; z-index: 3; background: var(--bg); border-top: 4px solid var(--line); }
@media (max-width: 700px) { .phone-bar { display: grid; } }
.phone-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px; padding: 12px; }
.phone-bar .btn { width: calc(100% - 8px); margin: var(--px); padding: 10px 8px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  dialog.pop-up[open], dialog.drawer[open] { animation: none; }
}

/* ---------- sub-pages (phase W4): How to vote, How this works, Why, For nerdz, Find me, Legal, Privacy ---------- */
.page { max-width: 980px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) 20px 0; display: flex; flex-direction: column; gap: clamp(36px, 5vw, 56px); }
.back { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; min-height: var(--tap);
        font-family: var(--font-pixel); font-size: 14px; text-decoration: none; }
.back .icon { width: 14px; height: 14px; }
.page-head { display: flex; flex-direction: column; gap: 12px; }
.page-head .level { font-family: var(--font-pixel); font-size: 14px; color: var(--accent); }
.page-head h1 { font-size: clamp(32px, 6vw, 64px); line-height: 1.05; overflow-wrap: anywhere; }
.lead { font-size: clamp(17px, 1.8vw, 20px); color: var(--muted); max-width: 52ch; }
.page h2 { font-size: clamp(22px, 3vw, 32px); margin-bottom: 18px; }
.page section > p + p { margin-top: 12px; }
.page section p { max-width: 64ch; }
/* numbered steps */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.step-n { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; background: var(--accent); color: var(--button-text);
          font-family: var(--font-pixel); font-size: 16px; }
.step-t { display: block; font-family: var(--font-pixel); font-size: 16px; letter-spacing: 1px; color: var(--text); }
.step-d { display: block; color: var(--muted); }
/* cards with a yellow title */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; }
.cards .card { display: flex; flex-direction: column; gap: 10px; }
.card-t { font-family: var(--font-pixel); font-size: 16px; letter-spacing: 1px; color: var(--accent); }
.card-d { color: var(--text); }
/* quick answers */
.faq { display: flex; flex-direction: column; gap: 20px; margin: 0; }
.faq .card { margin: var(--px); }
.faq dt { font-family: var(--font-pixel); font-size: 16px; letter-spacing: 1px; color: var(--text); }
.faq dd { margin: 8px 0 0; color: var(--muted); }
/* formula / code-like line */
.mono { font-family: var(--font-pixel); font-size: 15px; color: var(--accent); background: var(--bg); padding: 12px 16px; overflow-wrap: anywhere; }
/* platform cards (Where to find me) */
.channels { display: flex; flex-direction: column; gap: 20px; }
.channel { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.channel .platform { width: 44px; height: 44px; }
.channel-name { flex: 1 1 140px; display: flex; flex-direction: column; color: var(--text); }
.channel .btn { margin-left: auto; }
/* long text pages (Legal, Privacy) */
.prose h2 { font-size: clamp(18px, 2.4vw, 24px); margin: 8px 0 12px; }
.prose p, .prose li { color: var(--muted); max-width: 70ch; }
.prose ul { padding-left: 22px; margin: 8px 0; }
.prose section + section { margin-top: 28px; }

/* ---------- video slot: nothing loads from YouTube before the click (no cookies) ---------- */
.video { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; width: calc(100% - 8px); margin: var(--px);
         color: var(--line); background: var(--card); overflow: hidden; }
.video-in { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px; text-align: center; color: var(--text); }
.video .play { width: clamp(48px, 9vw, 112px); height: clamp(48px, 9vw, 112px); color: var(--accent); }
.video-label { font-family: var(--font-pixel); font-size: clamp(16px, 2.6vw, 30px); letter-spacing: 2px; }
.video-title { font-family: var(--font-pixel); font-size: clamp(13px, 1.8vw, 20px); color: var(--muted); letter-spacing: 2px; }
.video-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The preview picture already carries the level and its title: only the play button and a small note on top of it. */
.video-thumb + .video-in .play { position: absolute; right: 7%; top: 9%; z-index: 1; width: clamp(40px, 8vw, 88px); height: clamp(40px, 8vw, 88px); filter: drop-shadow(3px 3px 0 #000); }
.video-thumb + .video-in .video-label, .video-thumb + .video-in .video-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.video-thumb + .video-in .video-note { position: absolute; left: 12px; bottom: 10px; z-index: 1; padding: 4px 8px; background: rgba(15, 17, 20, .85); color: var(--text); font-size: 13px; }
.video-note { font-size: 14px; color: var(--muted); }
.video[hidden] { display: none; }
button.video { border: 0; cursor: pointer; font: inherit; }
button.video:hover .play { color: var(--text); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- on air (phase W5) ---------- */
.ut { font-family: var(--font-body); letter-spacing: 0; }   /* towns and destinations: Pixelify Sans (accents) */
.watch-row .live-badge { color: var(--live); font-size: 13px; }
.watch-row .live-badge[hidden] { display: none; }
#watch-status { display: flex; align-items: center; gap: 10px; }
.phone-bar .live-dot[hidden] { display: none; }

.menu-platforms { display: flex; gap: 12px; }
.menu-platforms .menu-platform { flex: 1 1 0; flex-direction: column; gap: 8px; padding: 14px 8px; text-align: center; }
.menu-platforms .menu-platform .label { font-size: 14px; }
