/* Madlit Games — one-page web. Písma lokálně (OFL): Unbounded, Inter, JetBrains Mono. */
@font-face { font-family: 'Unbounded'; font-weight: 500 900; font-display: swap; src: url('../fonts/unbounded-latin-ext.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+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Unbounded'; font-weight: 500 900; font-display: swap; src: url('../fonts/unbounded-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212; }
@font-face { font-family: 'Inter'; font-weight: 400 700; font-display: swap; src: url('../fonts/inter-latin-ext.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+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-weight: 400 700; font-display: swap; src: url('../fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212; }

:root {
  --ink: #100d0a;
  --ink-2: #1a1511;
  --ink-3: #251e17;
  --paper: #f5efe6;
  --paper-2: #ebe3d6;
  --text: #f5efe6;
  --muted: #ab9f93;
  --accent: #ff6a1f;
  --peach: #ffd8a8;
  --line: rgba(245, 239, 230, .12);
  --r: 14px;
  --r-lg: 22px;
  --wrap: 1240px;
  --pad: clamp(20px, 4vw, 40px);
  --nav-h: 68px;
  --f-display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --f-text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 17px/1.6 var(--f-text); -webkit-font-smoothing: antialiased; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.06; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--f-mono); font-weight: 500; letter-spacing: .04em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--ink); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.eyebrow { font: 500 13px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--muted); max-width: 40ch; }

/* tlačítka: jeden pár */
.btn { --bg: var(--accent); --fg: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border: 2px solid var(--bg); border-radius: 999px; background: var(--bg); color: var(--fg); font: 600 16px/1 var(--f-text); text-decoration: none; cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s; box-shadow: 0 0 0 0 rgba(255, 106, 31, 0); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(255, 106, 31, .55); }
.btn:active { transform: translateY(0) scale(.97); }
.btn--ghost { --bg: transparent; --fg: var(--text); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--text); box-shadow: none; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn--xl { min-height: 64px; padding: 0 38px; font-size: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions--center { justify-content: center; }

/* navigace */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); transition: background .25s, border-color .25s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(16, 13, 10, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.nav__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 17px/1 var(--f-display); letter-spacing: -.01em; }
.logo b { font-weight: 500; color: var(--accent); margin-left: 3px; }
.logo__mark { width: 32px; height: 32px; transition: transform .25s var(--ease); }
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.06); }
.nav__links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav__links a:not(.btn) { text-decoration: none; color: var(--muted); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: color .2s, background-size .25s var(--ease); padding: 4px 0; }
.nav__links a:not(.btn):hover { color: var(--text); background-size: 100% 1px; }
.nav__lang { font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; }
.nav__toggle { display: none; }

/* hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 32px) 0 48px; overflow: hidden; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 1px 1px, rgba(245, 239, 230, .09) 1px, transparent 0) 0 0 / 28px 28px; mask-image: radial-gradient(ellipse 80% 70% at 60% 45%, #000 30%, transparent 80%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 45%, #000 30%, transparent 80%); }
.hero::after { content: ''; position: absolute; z-index: -1; width: 60vmax; height: 60vmax; right: -18vmax; top: -12vmax; background: radial-gradient(circle, rgba(255, 106, 31, .14), transparent 62%); pointer-events: none; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(40px, 5.6vw, 80px); font-weight: 800; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: var(--accent); display: inline-block; position: relative; }
.hero h1 em::after { content: ''; position: absolute; left: 0; right: 0; bottom: .02em; height: .1em; background: var(--peach); border-radius: 4px; transform-origin: left; animation: draw 1s .5s var(--ease) both; }
@keyframes draw { from { transform: scaleX(0); } }
.hero__sub { margin: 26px 0 34px; font-size: clamp(18px, 1.5vw, 20px); color: var(--muted); max-width: 46ch; }
.hero__fact { margin-top: 30px; display: flex; align-items: center; gap: 10px; font: 500 14px/1.4 var(--f-mono); color: var(--muted); }
.blink { width: 9px; height: 9px; border-radius: 50%; background: var(--peach); box-shadow: 0 0 0 0 rgba(255, 216, 168, .6); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 216, 168, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 216, 168, 0); } }

/* arkáda */
.arcade { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 106, 31, .06), 0 0 80px -30px rgba(255, 106, 31, .35); }
.arcade__top { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 12px; font-size: 12px; color: var(--muted); }
.arcade__top b { color: var(--accent); margin: 0 4px; }
.arcade__hud span { color: var(--text); font-size: 15px; }
.arcade__hud small { font-size: 11px; text-transform: uppercase; margin-left: 4px; }
.arcade__screen { position: relative; aspect-ratio: 4 / 4.4; max-height: calc(100svh - 220px); min-height: 360px; width: 100%; border-radius: var(--r); overflow: hidden; background: #0c0a08; touch-action: none; user-select: none; -webkit-user-select: none; }
.arcade__screen canvas { width: 100%; height: 100%; cursor: none; }
.arcade__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; background: radial-gradient(ellipse at center, rgba(12, 10, 8, .55), rgba(12, 10, 8, .88)); }
.arcade__overlay[hidden] { display: none; }
.arcade__title { font: 700 clamp(20px, 2.2vw, 28px)/1.15 var(--f-display); max-width: 14ch; letter-spacing: -.02em; }
.arcade__help { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.arcade__label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }
.arcade__score { font: 900 clamp(56px, 7vw, 88px)/1 var(--f-display); color: var(--accent); letter-spacing: -.04em; margin-top: -8px; }
.arcade__best { font-size: 13px; color: var(--muted); margin-top: -6px; }
.arcade__line { max-width: 26ch; font-size: 17px; line-height: 1.45; margin-bottom: 4px; }

/* sekce */
.sec { padding: clamp(88px, 11vw, 140px) 0; }
.sec--light { background: var(--paper); color: var(--ink); }
.sec--light .lead { color: #62584e; }
.sec__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: end; margin-bottom: clamp(44px, 6vw, 72px); }
.sec__head:has(> :only-child) { grid-template-columns: 1fr; }
.sec h2 { font-size: clamp(32px, 4.2vw, 58px); letter-spacing: -.03em; max-width: 16ch; }
h3 { font-size: 20px; letter-spacing: -.01em; line-height: 1.2; }

/* proč — karty s malými UI vizuály */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 14px 28px; transition: transform .2s var(--ease), border-color .2s; }
.card:hover { transform: translateY(-2px); border-color: rgba(255, 106, 31, .35); }
.card h3 { margin: 26px 14px 10px; }
.card p { margin: 0 14px; color: var(--muted); font-size: 16px; }
.card__vis { height: 210px; border-radius: var(--r); background: var(--ink-3); display: grid; place-items: center; overflow: hidden; position: relative; }
.ring { --p: 72%; position: relative; width: 140px; height: 140px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: conic-gradient(var(--accent) 0 var(--p), rgba(245, 239, 230, .08) 0); animation: ring 3.2s var(--ease) infinite; }
.ring::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: var(--ink-3); }
.ring span, .ring small { position: relative; z-index: 1; }
.ring span { font-size: 26px; color: var(--text); }
.ring small { font: 500 11px/1 var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-top: 6px; }
@property --p { syntax: '<percentage>'; inherits: true; initial-value: 72%; }
@keyframes ring { 0% { --p: 8%; } 70%, 100% { --p: 72%; } }

.share { width: 62%; max-width: 200px; height: 168px; border-radius: 16px; background: linear-gradient(160deg, var(--accent), #ff9a4d 55%, var(--peach)); padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; color: var(--ink); transform: rotate(-4deg); transition: transform .3s var(--ease); }
.card:hover .share { transform: rotate(-1deg) translateY(-3px); }
.share__score { font: 800 32px/1 var(--f-display); letter-spacing: -.03em; }
.share__q { font-weight: 600; font-size: 15px; }
.share__bar { height: 4px; border-radius: 4px; background: rgba(16, 13, 10, .2); overflow: hidden; }
.share__bar i { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: left; animation: story 3s linear infinite; }
@keyframes story { from { transform: scaleX(0); } }

.vis-bars { align-content: end; padding: 22px 22px 0; display: grid; place-items: stretch; }
.vis-bars__t { position: absolute; top: 18px; left: 20px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 150px; }
.bars i { display: block; border-radius: 6px 6px 0 0; background: rgba(245, 239, 230, .14); height: var(--h); transform-origin: bottom; animation: bar 3.4s var(--ease) infinite; }
.bars i:nth-child(1) { --h: 32%; } .bars i:nth-child(2) { --h: 46%; animation-delay: .08s; } .bars i:nth-child(3) { --h: 40%; animation-delay: .16s; } .bars i:nth-child(4) { --h: 64%; animation-delay: .24s; } .bars i:nth-child(5) { --h: 78%; animation-delay: .32s; } .bars i:nth-child(6) { --h: 70%; animation-delay: .4s; }
.bars i:nth-child(7) { --h: 96%; background: var(--accent); animation-delay: .48s; }
@keyframes bar { 0% { transform: scaleY(.15); } 40%, 100% { transform: scaleY(1); } }

/* co stavíme */
.formats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.format { position: relative; padding: 28px 24px 8px 0; border-right: 1px solid rgba(16, 13, 10, .14); }
.format + .format { padding-left: 24px; }
.format:last-child { border-right: 0; }
.format__n { font-size: 13px; color: #7a6e62; }
.format__i { width: 56px; height: 56px; margin: 34px 0 30px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.format:hover .format__i { transform: translateY(-4px) rotate(-4deg); }
.format h3 { margin-bottom: 10px; }
.format p { color: #54493f; font-size: 16px; }
.format::before { content: ''; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.format:hover::before { transform: scaleX(1); }

/* ukázka */
.case { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.case h2 { margin-bottom: 22px; }
.ticks { list-style: none; padding: 0; margin: 30px 0 38px; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: baseline; }
.ticks li::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); transform: translateY(-1px) rotate(45deg); }
.phone { justify-self: center; width: min(100%, 330px); padding: 10px; border-radius: 44px; background: linear-gradient(145deg, #2c241c, #130f0b); box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9), 0 0 0 1px var(--line), 0 0 120px -40px rgba(255, 106, 31, .45); overflow: hidden; }
.phone img { width: 100%; height: auto; aspect-ratio: 780 / 1560; object-fit: cover; object-position: top; border-radius: 34px; transition: transform .5s var(--ease); }
.phone:hover img { transform: scale(1.025); }

/* jak */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: s; }
.step { background: #fff; border-radius: var(--r-lg); padding: 28px 26px 30px; border: 1px solid rgba(16, 13, 10, .08); transition: transform .2s var(--ease), box-shadow .2s; }
.step:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -24px rgba(16, 13, 10, .35); }
.step__n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: var(--accent); font: 700 18px/1 var(--f-display); margin-bottom: 40px; }
.step h3 { margin-bottom: 10px; }
.step p { color: #54493f; font-size: 16px; }
.chips { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { font: 500 14px/1 var(--f-mono); padding: 11px 16px; border-radius: 999px; border: 1.5px solid var(--ink); transition: background .2s, color .2s, transform .2s var(--ease); }
.chips li:hover { background: var(--ink); color: var(--accent); transform: translateY(-2px); }

/* kontakt */
.close { position: relative; overflow: hidden; isolation: isolate; text-align: center; min-height: 80svh; display: flex; align-items: center; }
.close::before { content: ''; position: absolute; z-index: -1; left: 50%; top: 50%; width: 90vmax; height: 90vmax; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(255, 106, 31, .22), transparent 55%); }
.close__in { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.close h2 { font-size: clamp(38px, 6.4vw, 92px); max-width: 14ch; font-weight: 800; letter-spacing: -.04em; }
.close .lead { max-width: 44ch; margin-bottom: 10px; }
.close__mail { color: var(--muted); text-decoration: none; font-size: 15px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .25s var(--ease), color .2s; }
.close__mail:hover { color: var(--text); background-size: 100% 1px; }

.foot { border-top: 1px solid var(--line); padding: 26px 0; font-size: 14px; color: var(--muted); }
.foot__in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }

/* 404 */
.nf { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 40px var(--pad); }
.nf h1 { font-size: clamp(34px, 5vw, 64px); margin: 18px 0 16px; }
.nf p { color: var(--muted); margin-bottom: 32px; }
.nf__code { font: 900 clamp(90px, 16vw, 200px)/1 var(--f-display); color: var(--accent); letter-spacing: -.05em; }

/* tablet */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero { padding-top: calc(var(--nav-h) + 40px); }
  .arcade { max-width: 560px; width: 100%; }
  .arcade__screen { max-height: none; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child { grid-column: 1 / -1; }
  .formats { grid-template-columns: 1fr 1fr; }
  .format:nth-child(2) { border-right: 0; }
  .format:nth-child(3) { padding-left: 0; }
  .format:nth-child(n+3) { border-top: 1px solid rgba(16, 13, 10, .14); margin-top: 20px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .sec__head { grid-template-columns: 1fr; }
}

/* mobil */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav__toggle { display: grid; place-content: center; gap: 6px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: transparent; cursor: pointer; }
  .nav__toggle i { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease); }
  .nav__toggle[aria-expanded='true'] i:first-of-type { transform: translateY(4px) rotate(45deg); }
  .nav__toggle[aria-expanded='true'] i:last-of-type { transform: translateY(-4px) rotate(-45deg); }
  .nav__links { position: absolute; top: var(--nav-h); left: 0; right: 0; height: calc(100svh - var(--nav-h)); overflow-y: auto; flex-direction: column; align-items: stretch; gap: 0; padding: 24px var(--pad); background: var(--ink); font-size: 22px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .25s var(--ease), visibility .2s; }
  .nav__links a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--line); font-family: var(--f-display); font-weight: 600; color: var(--text); }
  .nav__links .btn { margin-top: 28px; min-height: 56px; font-size: 17px; }
  .nav.is-open { background: var(--ink); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav.is-open .nav__links { opacity: 1; transform: none; visibility: visible; }
  .hero { padding: calc(var(--nav-h) + 28px) 0 40px; min-height: auto; }
  .hero h1 { font-size: clamp(34px, 10.4vw, 48px); }
  .hero__sub { margin: 20px 0 28px; }
  .actions .btn { width: 100%; }
  .hero__fact { margin-top: 22px; }
  .arcade { padding: 8px; border-radius: 18px; }
  .arcade__screen { aspect-ratio: 4 / 5; min-height: 0; }
  .cards, .formats, .steps { grid-template-columns: 1fr; }
  .cards .card:last-child { grid-column: auto; }
  .format, .format + .format { padding: 24px 0 26px; border-right: 0; border-top: 1px solid rgba(16, 13, 10, .14); margin-top: 0; }
  .format:first-child { border-top: 0; }
  .format__i { margin: 18px 0 18px; width: 48px; height: 48px; }
  .case { grid-template-columns: 1fr; }
  .case .btn { width: 100%; }
  .phone { width: min(78%, 300px); }
  .step__n { margin-bottom: 24px; }
  .close { min-height: 0; }
  .btn--xl { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
