/* FileConvert – webová prezentace. Designový systém: /DESIGN.md (Raycast, upravený pro FileConvert). */
:root {
  --primary: #ffffff;
  --primary-pressed: #e8e8e8;
  --on-primary: #000000;
  --ink: #f4f4f6;
  --body: #cdcdcd;
  --mute: #9c9c9d;
  --ash: #6a6b6c;
  --stone: #434345;
  --on-dark-mute: rgba(255, 255, 255, 0.72);
  --canvas: #07080a;
  --surface: #0d0d0d;
  --surface-elevated: #101111;
  --surface-card: #121212;
  --hairline: #242728;
  --hairline-soft: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --accent-blue: #57c1ff;
  --accent-blue-soft: rgba(87, 193, 255, 0.15);
  --accent-red: #ff6161;
  --accent-green: #59d499;
  --accent-green-soft: rgba(89, 212, 153, 0.15);
  --accent-yellow: #ffc533;
  --accent-yellow-soft: rgba(255, 197, 51, 0.15);
  --stripe-1: #9a93ff;
  --stripe-2: #7e77db;
  --stripe-3: #3a3480;
  /* Barvy aplikace – jen uvnitř mockupů */
  --app-slice: #282937;
  --app-edge: #14151f;
  --app-center: #181922;
  --app-rim: #2a2b41;
  --app-hover: #7e77db;
  --app-track: #2e2e35;
  --app-success: #1c9f73;

  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-xl: 16px;
  --section: 96px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font: 400 16px/1.6 Inter, "Inter Fallback", system-ui, sans-serif;
  font-feature-settings: "calt", "kern", "liga", "ss03";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 500; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--primary); text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--stripe-1); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: 56px;
  background: rgba(7, 8, 10, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; letter-spacing: 0.2px; }
.brand svg { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { white-space: nowrap; color: var(--body); font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: var(--r-md); transition: color .15s, background-color .15s; }
.nav-links a:hover { color: var(--primary); background: var(--surface-elevated); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 8px 16px;
  border-radius: var(--r-md); border: 1px solid transparent;
  font: 500 14px/1.6 inherit; font-family: inherit; letter-spacing: 0.2px; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .12s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-pressed); }
.btn-tertiary { background: var(--surface-elevated); color: var(--primary); border-color: var(--hairline); }
.btn-tertiary:hover { background: var(--surface-card); border-color: var(--hairline-strong); }
.btn-lg { height: 44px; padding: 10px 20px; font-size: 15px; }

.kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 1px 7px;
  border-radius: var(--r-xs); border: 1px solid var(--hairline);
  background: linear-gradient(#121212, #0d0d0d); color: var(--body);
  font: 500 13px/1 inherit; font-family: inherit; letter-spacing: 0.1px;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.04);
  transition: transform .1s, background .1s, color .1s;
}
.kbd.down { transform: translateY(1px); background: #1d1d22; color: var(--primary); border-color: var(--hairline-strong); }
.kbd-row { display: inline-flex; gap: 6px; align-items: center; }
.kbd-row .plus { color: var(--ash); font-size: 13px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px;
  border: 1px solid var(--hairline); border-radius: 9999px; background: var(--surface);
  font-size: 13px; color: var(--mute);
}
.badge { display: inline-block; padding: 2px 8px; border-radius: var(--r-xs); font-size: 12px; line-height: 1.5; letter-spacing: 0.4px; }
.badge-info { background: var(--accent-blue-soft); color: var(--accent-blue); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 88px 0 var(--section); overflow: hidden; }
.stripes { position: absolute; inset: -40% -10% auto; height: 520px; pointer-events: none; opacity: 0.9; }
.stripes span {
  position: absolute; left: -10%; width: 130%; height: 64px; border-radius: 9999px;
  background: linear-gradient(90deg, transparent 5%, var(--stripe-1) 40%, var(--stripe-2) 60%, var(--stripe-3) 85%, transparent);
  transform: rotate(-12deg); filter: blur(22px); opacity: 0.8;
}
.stripes span:nth-child(1) { top: 250px; height: 80px; }
.stripes span:nth-child(2) { top: 360px; opacity: 0.5; height: 48px; }
.stripes span:nth-child(3) { top: 445px; opacity: 0.3; height: 30px; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 200px; background: linear-gradient(transparent, var(--canvas)); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; text-align: center; max-width: 820px; margin: 0 auto; }
.hero h1 {
  margin: 22px 0 18px; font-size: clamp(38px, 6.4vw, 68px); line-height: 1.08; font-weight: 600;
  letter-spacing: -0.5px; font-feature-settings: "calt", "kern", "ss02", "ss03", "ss08";
}
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #fff, var(--stripe-1)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 18px; color: var(--body); max-width: 600px; margin: 0 auto; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }
.hero-hint { margin-top: 18px; font-size: 13px; color: var(--mute); display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* ---------- Mockup stage ---------- */
.stage {
  position: relative; z-index: 1; margin: 64px auto 0; max-width: 1040px;
  border: 1px solid var(--hairline); border-radius: var(--r-xl); background: #0b0c10;
  overflow: hidden; aspect-ratio: 16 / 9.4;
  container-type: inline-size;
}
.desk { position: absolute; inset: 0 0 34px; background:
  radial-gradient(120% 90% at 85% 10%, rgba(126,119,219,0.18), transparent 60%),
  radial-gradient(80% 70% at 0% 100%, rgba(58,52,128,0.25), transparent 70%), #0b0c10; }
.explorer {
  position: absolute; left: 5%; top: 7%; width: 62%; height: 78%;
  background: #191a1f; border: 1px solid #2b2d33; border-radius: var(--r-md); overflow: hidden;
  display: flex; flex-direction: column; font-size: clamp(9px, 1.35cqi, 14px);
}
.ex-title { display: flex; align-items: center; justify-content: space-between; padding: 0.6em 0.9em; background: #1f2026; color: var(--body); }
.ex-title .ctl { display: flex; gap: 1.2em; color: var(--ash); letter-spacing: 1px; }
.ex-path { display: flex; gap: 0.5em; align-items: center; margin: 0.5em 0.8em; padding: 0.35em 0.7em; background: #121317; border: 1px solid #2b2d33; border-radius: var(--r-sm); color: var(--mute); }
.ex-path b { color: var(--body); font-weight: 500; }
.ex-head, .ex-row { display: grid; grid-template-columns: 1fr 9em 7em 5em; align-items: center; padding: 0 1em; gap: 0.6em; }
.ex-head { color: var(--ash); height: 2.2em; border-bottom: 1px solid #2b2d33; }
.ex-row { height: 2.3em; color: var(--body); border: 1px solid transparent; border-radius: var(--r-xs); margin: 1px 0.4em; transition: background-color .2s, border-color .2s; }
.ex-row .nm { display: flex; align-items: center; gap: 0.6em; color: var(--ink); white-space: nowrap; overflow: hidden; }
.ex-row.sel { background: rgba(87,193,255,0.14); border-color: rgba(87,193,255,0.35); }
.ex-row.new { animation: rowIn .5s var(--ease-out); background: rgba(89,212,153,0.10); }
.ex-row .muted { color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); } }
.ficon { width: 1.5em; height: 1.85em; border-radius: 2px 6px 2px 2px; display: grid; place-items: end center; padding-bottom: 0.15em; font-size: 0.62em; font-weight: 700; color: #fff; flex: none; letter-spacing: 0.2px; }
.f-docx { background: #2b6cd8; } .f-xlsx { background: #1f8a4c; } .f-pptx { background: #d0532a; }
.f-pdf { background: #d33c3c; } .f-md { background: #4b4f5c; } .f-json { background: #b08a1e; }

.taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; background: #111216; border-top: 1px solid #22242a; display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 0 14px; font-size: 12px; color: var(--body); }
.taskbar .tray { width: 18px; height: 18px; }

.cursor { position: absolute; left: 0; top: 0; width: 22px; z-index: 6; pointer-events: none; transition: transform .6s var(--ease-in-out); filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.cursor.click { animation: click .25s; }
@keyframes click { 50% { scale: 0.85; } }

.hero-donut, .hero-badge { position: absolute; left: 0; top: 0; z-index: 5; translate: -50% -50%; pointer-events: none; }
.hero-donut { width: clamp(150px, 24cqi, 240px); opacity: 0; scale: 0.85; transition: opacity .12s, scale .12s var(--ease-out); }
.hero-donut.open { opacity: 1; scale: 1; }
.hero-donut.closing { opacity: 0; scale: 0.3; transition-duration: .18s; }
.hero-badge { width: clamp(58px, 8cqi, 84px); opacity: 0; scale: 0.4; transition: opacity .18s, scale .25s var(--ease-out); }
.hero-badge.show { opacity: 1; scale: 1; }
.hero-badge.pop { animation: pop .35s var(--ease-out); }
.hero-badge.hide { opacity: 0; transition-duration: .2s; }
@keyframes pop { 50% { scale: 1.1; } }

.toast {
  position: absolute; right: 2.5%; bottom: calc(34px + 3%); z-index: 7; width: min(330px, 46%);
  display: flex; gap: 12px; align-items: flex-start; padding: 14px;
  background: #1c1c24; border: 1px solid #2e2e3a; border-radius: var(--r-lg);
  font-size: clamp(11px, 1.3cqi, 14px); color: var(--body);
  translate: 0 calc(100% + 60px); transition: translate .45s var(--ease-out);
}
.toast.show { translate: 0 0; }
.toast .ok { flex: none; width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--app-success); display: grid; place-items: center; }
.toast b { color: var(--ink); font-weight: 600; display: block; }
.toast .link { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: var(--r-sm); background: #3d3d4d; color: #fff; font-size: 0.92em; }

.stage-keys { position: absolute; z-index: 7; left: 50%; top: 4%; translate: -50% 0; display: flex; gap: 6px; padding: 8px 10px; background: rgba(13,13,13,0.9); border: 1px solid var(--hairline); border-radius: var(--r-md); opacity: 0; transition: opacity .2s; }
.stage-keys.show { opacity: 1; }

/* ---------- Sections ---------- */
section { padding: var(--section) 0; }
.sec-head { max-width: 680px; margin-bottom: 48px; }
.sec-head .kicker { font-size: 13px; color: var(--stripe-1); letter-spacing: 0.4px; font-weight: 500; margin-bottom: 12px; display: block; }
.sec-head h2 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.14; letter-spacing: 0.2px; }
.sec-head p { margin-top: 16px; font-size: 18px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 16px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 24px; transition: border-color .2s, background-color .2s; }
.card:hover { border-color: var(--hairline-strong); }
.card h3 { font-size: 20px; line-height: 1.4; letter-spacing: 0.2px; margin-bottom: 8px; }
.card p { font-size: 14px; }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); background: var(--surface-card); border: 1px solid var(--hairline); color: var(--ink); font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.step-visual { height: 120px; margin: -4px -4px 20px; border-radius: var(--r-md); background: var(--surface-elevated); border: 1px solid var(--hairline); display: grid; place-items: center; overflow: hidden; }

/* Interaktivní donut */
.playground { display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; align-items: stretch; }
.pg-stage { position: relative; display: grid; place-items: center; min-height: 460px; background:
  radial-gradient(60% 60% at 50% 50%, rgba(126,119,219,0.12), transparent 70%), var(--surface);
  border: 1px solid var(--hairline); border-radius: var(--r-xl); }
.pg-stage svg.donut { width: min(340px, 78%); height: auto; overflow: visible; }
.pg-stage .pg-badge { position: absolute; width: 120px; }
.pg-side { display: flex; flex-direction: column; gap: 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { border: 1px solid var(--hairline); background: transparent; color: var(--body); font: 400 14px/1.6 inherit; font-family: inherit; padding: 4px 12px; border-radius: 9999px; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.pill:hover { color: var(--primary); border-color: var(--hairline-strong); }
.pill[aria-pressed="true"] { background: var(--surface-elevated); color: var(--primary); border-color: var(--hairline-strong); }
.pg-log { font-size: 14px; color: var(--mute); min-height: 1.6em; }
.pg-log b { color: var(--ink); font-weight: 500; }
.formats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.formats li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink); font-size: 15px; transition: background-color .15s; }
.formats li.active { background: var(--surface-card); }
.formats li .eng { margin-left: auto; font-size: 12px; color: var(--mute); }

.donut .slice path { fill: var(--app-slice); stroke: var(--app-edge); stroke-width: 3; transition: fill .14s; cursor: pointer; }
.donut .slice.hover path { fill: var(--app-hover); }
.donut .slice text { fill: #f2f2f5; font: 600 15px Inter, system-ui, sans-serif; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.donut .slice text.long { font-size: 12px; }
.donut .slice:focus { outline: none; }
.donut .slice:focus-visible path { stroke: #fff; }
.donut .hub { fill: var(--app-center); stroke: var(--app-rim); stroke-width: 2; }
.donut .c1 { fill: #f2f2f5; font: 600 17px Inter, system-ui, sans-serif; text-anchor: middle; }
.donut .c2 { fill: #9a9aa8; font: 400 12px Inter, system-ui, sans-serif; text-anchor: middle; }
.donut .c2.go { fill: #fff; font-weight: 600; font-size: 14px; }

.ring .track { fill: none; stroke: var(--app-track); stroke-width: 7; }
.ring .bar { fill: none; stroke: var(--app-hover); stroke-width: 7; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke .25s; }
.ring .bg { fill: var(--app-center); transition: fill .25s; }
.ring .pct { fill: #f2f2f5; font: 600 17px Inter, system-ui, sans-serif; text-anchor: middle; dominant-baseline: middle; transition: opacity .15s; }
.ring .check { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset .3s var(--ease-out) .05s; }
.ring.done .bar { stroke: var(--app-success); }
.ring.done .bg { fill: var(--app-success); }
.ring.done .pct { opacity: 0; }
.ring.done .check { stroke-dashoffset: 0; }

/* Převody */
.conv-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.conv { padding: 16px; display: flex; flex-direction: column; gap: 10px; border-radius: var(--r-md); }
.conv-top { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; }
.conv-top .arrow { color: var(--ash); }
.conv-in { font-size: 13px; color: var(--mute); }
.conv-in code { font-family: inherit; color: var(--body); }
.eng-badge { align-self: flex-start; font-size: 12px; padding: 2px 8px; border-radius: var(--r-xs); background: var(--surface-elevated); color: var(--on-dark-mute); border: 1px solid var(--hairline); }
.conv { transition: opacity 200ms var(--ease-out), scale 200ms var(--ease-out), border-color .2s; }
/* Karta, která se po přepnutí filtru znovu ukáže, se prolne místo skoku. */
@starting-style { .conv { opacity: 0; scale: 0.97; } }
.conv.hidden { display: none; }
.conv-count { margin-left: auto; font-size: 13px; color: var(--mute); align-self: center; }

/* Funkce */
.feat-ic { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; margin-bottom: 18px; background: var(--surface-card); border: 1px solid var(--hairline); }
.feat-ic svg { width: 20px; height: 20px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--hairline); border-radius: var(--r-lg); background: var(--surface); }
.stat { padding: 28px 24px; border-left: 1px solid var(--hairline); }
.stat:first-child { border-left: 0; }
.stat .num { font-size: clamp(30px, 4vw, 44px); color: var(--ink); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 14px; color: var(--mute); margin-top: 6px; }

/* Pod kapotou */
.arch { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.arch .card h3 { font-size: 16px; font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 500; }
.engines { margin-top: 16px; }
.eng-row { display: grid; grid-template-columns: 180px 1fr auto; gap: 16px; align-items: center; padding: 16px 24px; border-top: 1px solid var(--hairline); font-size: 14px; }
.eng-row:first-child { border-top: 0; }
.eng-row b { color: var(--ink); font-weight: 500; }

/* Stažení */
.download { position: relative; overflow: hidden; text-align: center; padding: 64px 24px; border-radius: var(--r-xl); border: 1px solid var(--hairline); background:
  radial-gradient(70% 120% at 50% 0%, rgba(126,119,219,0.22), transparent 65%), var(--surface); }
.download h2 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.15; }
.download p { max-width: 560px; margin: 16px auto 0; }
.req { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 28px; }
.req span { font-size: 13px; padding: 4px 12px; border: 1px solid var(--hairline); border-radius: 9999px; color: var(--body); background: var(--canvas); }

footer { border-top: 1px solid var(--hairline); padding: 48px 0 64px; font-size: 14px; color: var(--mute); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
footer a { color: var(--body); }
footer a:hover { color: var(--primary); }

/* Reveal */
.reveal { opacity: 0; translate: 0 16px; transition: opacity .6s var(--ease-out), translate .6s var(--ease-out); }
.reveal.in { opacity: 1; translate: 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .arch { grid-template-columns: repeat(2, 1fr); }
  .playground { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}
@media (max-width: 768px) {
  :root { --section: 64px; }
  .g3, .g2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--hairline); }
  .stage { aspect-ratio: 4 / 4.2; }
  .explorer { left: 4%; width: 92%; top: 14%; height: 60%; }
  .ex-head, .ex-row { grid-template-columns: 1fr 5em; }
  .ex-head > :nth-child(2), .ex-head > :nth-child(3), .ex-row > :nth-child(2), .ex-row > :nth-child(3) { display: none; }
  .toast { width: 74%; }
  .eng-row { grid-template-columns: 1fr; gap: 4px; }
  .pg-stage { min-height: 380px; }
}
@media (max-width: 480px) {
  :root { --section: 48px; }
  .wrap { padding: 0 16px; }
  .hero { padding-top: 56px; }
  .arch { grid-template-columns: 1fr; }
}
/* Méně pohybu: bez posunů a změn velikosti, prolnutí a barvy (hover) zůstávají. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; translate: none; }
  .btn:active { transform: none; }
  .cursor { transition: none; }
  .cursor.click, .hero-badge.pop, .ex-row.new { animation: none; }
  .hero-donut, .hero-donut.closing, .hero-badge { scale: 1; }
  @starting-style { .conv { scale: 1; } }
  .toast { translate: 0 0; opacity: 0; transition: opacity .2s ease; }
  .toast.show { opacity: 1; }
}
